diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2020-05-31 12:31:15 -0500 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-01-04 23:12:58 +0000 |
commit | 8bdb006db54dfecb1cbf132dbe627aad46a4e656 (patch) | |
tree | 5959f07ea22616bdb8a1e7fc052e4a3b045eb3f9 /src/mainboard/google/sarien | |
parent | 1717231b74ed7aad3e38afb2b3e569fa5459eb3a (diff) |
drivers/vpd: Add support to read device serial from VPD
Add functions to read the system and mainboard serial numbers
from VPD tables stored in flash.
Remove board-specific implementations for google/drallion and
google/sarien and select the new Kconfig instead.
Test: build/boot google/akemi with RO_VPD region persisted from
stock Google firmware, verify system/mainboard serial numbers
present via dmidecode.
Change-Id: I14ae07cd8b764e1e22d58577c7cc697ca1496bd5
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49050
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/sarien')
-rw-r--r-- | src/mainboard/google/sarien/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/sarien/ramstage.c | 21 |
2 files changed, 1 insertions, 21 deletions
diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig index 9b0d25158c..444234af45 100644 --- a/src/mainboard/google/sarien/Kconfig +++ b/src/mainboard/google/sarien/Kconfig @@ -16,6 +16,7 @@ config BOARD_GOOGLE_BASEBOARD_SARIEN select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_I2C_TPM_CR50 select MAINBOARD_HAS_TPM2 + select SMBIOS_SERIAL_FROM_VPD if VPD select SOC_INTEL_WHISKEYLAKE select SOC_INTEL_COMMON_BLOCK_HDA_VERB select SOC_INTEL_COMMON_BLOCK_SMM_ESPI_DISABLE diff --git a/src/mainboard/google/sarien/ramstage.c b/src/mainboard/google/sarien/ramstage.c index f4704faf86..de97c686ee 100644 --- a/src/mainboard/google/sarien/ramstage.c +++ b/src/mainboard/google/sarien/ramstage.c @@ -2,33 +2,12 @@ #include <acpi/acpi.h> #include <boardid.h> -#include <drivers/vpd/vpd.h> #include <smbios.h> #include <soc/gpio.h> #include <variant/gpio.h> #include <vendorcode/google/chromeos/chromeos.h> #if CONFIG(GENERATE_SMBIOS_TABLES) -#define VPD_KEY_SYSTEM_SERIAL "serial_number" -#define VPD_KEY_MAINBOARD_SERIAL "mlb_serial_number" -#define VPD_SERIAL_LEN 64 - -const char *smbios_system_serial_number(void) -{ - static char serial[VPD_SERIAL_LEN]; - if (vpd_gets(VPD_KEY_SYSTEM_SERIAL, serial, VPD_SERIAL_LEN, VPD_RO)) - return serial; - return ""; -} - -const char *smbios_mainboard_serial_number(void) -{ - static char serial[VPD_SERIAL_LEN]; - if (vpd_gets(VPD_KEY_MAINBOARD_SERIAL, serial, VPD_SERIAL_LEN, VPD_RO)) - return serial; - return ""; -} - /* mainboard silk screen shows DIMM-A and DIMM-B */ void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t) |