Andy Pont has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49017 )
Change subject: SMBIOS: Allow separation of mainboard and baseboard manufacturer. ......................................................................
SMBIOS: Allow separation of mainboard and baseboard manufacturer.
The existing SMBIOS implementation uses the same function to return the manufacturer information in the DMI Type 1 and Type 2 tables.
Add a new weak function smbios_baseboard_manufacturer() for the Type 2 table that by default calls smbios_mainboard_manufacturer() to replicate the existing behaviour.
For those platforms that wish to do so, smbios_baseboard_manufacturer() can be overridden in the same way as other smbios_ functions.
Signed-off-by: Andy Pont andy.pont@sdcsystems.com Change-Id: I76baa77b3226abed727f037eea563016b2d2cd79 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/49017/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index aabeb10..7948c50 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -567,7 +567,7 @@ t->type = SMBIOS_BOARD_INFORMATION; t->handle = handle; t->length = len - 2; - t->manufacturer = smbios_add_string(t->eos, smbios_mainboard_manufacturer()); + t->manufacturer = smbios_add_string(t->eos, smbios_baseboard_manufacturer()); t->product_name = smbios_add_string(t->eos, smbios_mainboard_product_name()); t->serial_number = smbios_add_string(t->eos, smbios_mainboard_serial_number()); t->version = smbios_add_string(t->eos, smbios_mainboard_version()); diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 4d8883f3..a97dd7f 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -63,12 +63,18 @@ return SMBIOS_BOARD_TYPE_UNKNOWN; }
+__weak const char *smbios_baseboard_manufacturer(void) +{ + return smbios_mainboard_manufacturer(); +} + __weak void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision) { *ec_major_revision = 0x0; *ec_minor_revision = 0x0; }
+ /* * System Enclosure or Chassis Types as defined in SMBIOS specification. * The default value is SMBIOS_ENCLOSURE_DESKTOP (0x03) but laptop, diff --git a/src/include/smbios.h b/src/include/smbios.h index e451d17..5585bed 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -55,6 +55,8 @@ const char *smbios_chassis_serial_number(void); const char *smbios_processor_serial_number(void);
+const char *smbios_baseboard_manufacturer(void); + void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision);
unsigned int smbios_memory_error_correction_type(struct memory_info *meminfo);
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49017 )
Change subject: SMBIOS: Allow separation of mainboard and baseboard manufacturer. ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/49017/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/49017/1//COMMIT_MSG@7 PS1, Line 7: SMBIOS: Allow separation of mainboard and baseboard manufacturer. It doesn't seem like SMBIOS is making this distinction. For type 2:
"[...], the information in this structure defines attributes of a system baseboard (for example, a motherboard, planar, server blade, or other standard system module)."
https://review.coreboot.org/c/coreboot/+/49017/1//COMMIT_MSG@10 PS1, Line 10: manufacturer information in the DMI Type 1 and Type 2 tables. For type 1 we call smbios_system_manufacturer() and for type 2 smbios_mainboard_manufacturer(). So they can already be overridden individually.
https://review.coreboot.org/c/coreboot/+/49017/1/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/49017/1/src/arch/x86/smbios.c@a570 PS1, Line 570: t->manufacturer = smbios_add_string(t->eos, smbios_mainboard_manufacturer()); After this change, nothing is calling smbios_mainboard_manufacturer() directly anymore. Seems odd.
Andy Pont has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/49017 )
Change subject: SMBIOS: Allow separation of mainboard and baseboard manufacturer. ......................................................................
Abandoned
Standard code supports this feature already, just needs the overrides setting correctly.