summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/sarien/ramstage.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mainboard/google/sarien/ramstage.c b/src/mainboard/google/sarien/ramstage.c
index d8d1c9dbe3..1d220461cf 100644
--- a/src/mainboard/google/sarien/ramstage.c
+++ b/src/mainboard/google/sarien/ramstage.c
@@ -14,6 +14,7 @@
*/
#include <arch/acpi.h>
+#include <drivers/vpd/vpd.h>
#include <smbios.h>
#include <soc/gpio.h>
#include <soc/ramstage.h>
@@ -21,6 +22,26 @@
#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)