aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch/x86
diff options
context:
space:
mode:
authorKane Chen <kane.chen@intel.com>2014-09-08 18:40:30 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-02 13:26:05 +0200
commit51bdc4781635b99d89e6b7a414a2172be8cb690c (patch)
tree639ead91d32fbc70fa7dfebd34c02ebe8f67564e /src/arch/x86
parent2b59a838b4b6dd68994ae5883d4f1692c2217b16 (diff)
downloadcoreboot-51bdc4781635b99d89e6b7a414a2172be8cb690c.tar.gz
coreboot-51bdc4781635b99d89e6b7a414a2172be8cb690c.tar.xz
coreboot-51bdc4781635b99d89e6b7a414a2172be8cb690c.zip
smbios: add a family id in smbios type1 family
mosys will use this field to identify system BRANCH=none BUG=chromium:359155 TEST=build ok, use dmidecode to check whether data is written correctly Change-Id: I461215c012b6ad712b3f813a3928e90a23bf54f1 Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Original-Commit-Id: 7adbdab761cd7b4bda0a43e7b1c4070de26f150a Original-Change-Id: Icfbd4c61fc49a9cb3d3ecd2b622339957963150c Original-Signed-off-by: Kane Chen <kane.chen@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/217400 Original-Reviewed-by: David Hendricks <dhendrix@chromium.org> Original-Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: http://review.coreboot.org/9230 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/boot/smbios.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 4c3490db0..8b4fd68db 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -302,6 +302,13 @@ void __attribute__((weak)) smbios_mainboard_set_uuid(u8 *uuid)
/* leave all zero */
}
+#ifdef CONFIG_MAINBOARD_FAMILY
+const char *smbios_mainboard_family(void)
+{
+ return CONFIG_MAINBOARD_FAMILY;
+}
+#endif /* CONFIG_MAINBOARD_FAMILY */
+
static int smbios_write_type1(unsigned long *current, int handle)
{
struct smbios_type1 *t = (struct smbios_type1 *)*current;
@@ -334,6 +341,9 @@ static int smbios_write_type2(unsigned long *current, int handle)
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());
+#ifdef CONFIG_MAINBOARD_FAMILY
+ t->family = smbios_add_string(t->eos, smbios_mainboard_family());
+#endif
len = t->length + smbios_string_table_len(t->eos);
*current += len;
return len;