summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWisley Chen <wisley.chen@quantatw.com>2019-09-11 13:59:00 +0800
committerFurquan Shaikh <furquan@google.com>2019-09-20 05:27:47 +0000
commitc0441677d19ce9d09d96c48573452f1c156c9dfa (patch)
tree7a5fb080f399518bef5a5127735220d8129ec68e /src
parentce828b6ae8b272cc65d8ea500ab00c100035bf46 (diff)
mb/google/hatch: override smbios manufacturer name from CBI
BUG=none TEST=emerge-hatch coreboot, use ectool to write oem name in CBI, and checked smbios manufacturer name. Change-Id: I9be85fbc47031d049b5bd51cfaf6232cab24e9fe Signed-off-by: Wisley Chen <wisley.chen@quantatw.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35345 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/hatch/mainboard.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mainboard/google/hatch/mainboard.c b/src/mainboard/google/hatch/mainboard.c
index 4d5e8ed5f8..5761b085dd 100644
--- a/src/mainboard/google/hatch/mainboard.c
+++ b/src/mainboard/google/hatch/mainboard.c
@@ -52,3 +52,22 @@ const char *smbios_system_sku(void)
return sku_str;
}
+
+const char *smbios_mainboard_manufacturer(void)
+{
+ static char oem_name[32];
+ static const char *manuf;
+
+ if (manuf)
+ return manuf;
+
+ if (google_chromeec_cbi_get_oem_name(&oem_name[0],
+ ARRAY_SIZE(oem_name)) < 0) {
+ printk(BIOS_INFO, "Couldn't obtain OEM name from CBI\n");
+ manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
+ } else {
+ manuf = &oem_name[0];
+ }
+
+ return manuf;
+}