diff options
author | Angel Pons <th3fanbus@gmail.com> | 2022-09-01 14:41:09 +0200 |
---|---|---|
committer | Paul Fagerburg <pfagerburg@chromium.org> | 2022-09-19 14:53:01 +0000 |
commit | d6695626631a86d9613ea7c34ff0e898fbfa443c (patch) | |
tree | 3d6243b3fafc6132604041aa4e951e88c2e44abc /src/mainboard/prodrive/hermes/mainboard.c | |
parent | 1075fef4459c96375c1a0b7e5f63e47fee11d509 (diff) |
mb/prodrive/hermes: Add part numbers to SMBIOS
Adjust the EEPROM layout to account for two new fields: board part
number and product part number. In addition, put them in a Type 11
SMBIOS table (OEM Strings).
TODO: This currently stores the "raw" part numbers, should we add a
prefix to the SMBIOS strings?
Change-Id: I85fb9dc75f231004ccce2a55ebd9d7a4867fcb93
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67276
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/prodrive/hermes/mainboard.c')
-rw-r--r-- | src/mainboard/prodrive/hermes/mainboard.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mainboard/prodrive/hermes/mainboard.c b/src/mainboard/prodrive/hermes/mainboard.c index 2f0de61843..bf568abf54 100644 --- a/src/mainboard/prodrive/hermes/mainboard.c +++ b/src/mainboard/prodrive/hermes/mainboard.c @@ -174,6 +174,12 @@ static void mainboard_final(struct device *dev) pmc_soc_set_afterg3_en(on); } +static void mainboard_smbios_strings(struct device *dev, struct smbios_type11 *t) +{ + t->count = smbios_add_string(t->eos, eeprom_read_serial(board_part_number, "N/A")); + t->count = smbios_add_string(t->eos, eeprom_read_serial(product_part_number, "N/A")); +} + #if CONFIG(HAVE_ACPI_TABLES) static void mainboard_acpi_fill_ssdt(const struct device *dev) { @@ -219,6 +225,7 @@ static void mainboard_enable(struct device *dev) mb_usb2_fp2_pwr_enable(1); dev->ops->final = mainboard_final; + dev->ops->get_smbios_strings = mainboard_smbios_strings; #if CONFIG(HAVE_ACPI_TABLES) dev->ops->acpi_fill_ssdt = mainboard_acpi_fill_ssdt; |