[coreboot-gerrit] New patch to review for coreboot: b26e00b smbios: add a family id in smbios type1 family

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Apr 1 23:47:18 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9230

-gerrit

commit b26e00b6ee794af469e1882d3bffac47be2c724e
Author: Kane Chen <kane.chen at intel.com>
Date:   Mon Sep 8 18:40:30 2014 -0700

    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 at chromium.org>
    Original-Commit-Id: 7adbdab761cd7b4bda0a43e7b1c4070de26f150a
    Original-Change-Id: Icfbd4c61fc49a9cb3d3ecd2b622339957963150c
    Original-Signed-off-by: Kane Chen <kane.chen at intel.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/217400
    Original-Reviewed-by: David Hendricks <dhendrix at chromium.org>
    Original-Reviewed-by: Shawn Nematbakhsh <shawnn at chromium.org>
---
 src/arch/x86/boot/smbios.c | 10 ++++++++++
 src/include/smbios.h       |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 4c3490d..8b4fd68 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;
diff --git a/src/include/smbios.h b/src/include/smbios.h
index 7d1c333..c6132ec 100644
--- a/src/include/smbios.h
+++ b/src/include/smbios.h
@@ -40,6 +40,9 @@ const char *smbios_mainboard_version(void);
 void smbios_mainboard_set_uuid(u8 *uuid);
 const char *smbios_mainboard_bios_version(void);
 u8 smbios_mainboard_enclosure_type(void);
+#ifdef CONFIG_MAINBOARD_FAMILY
+const char *smbios_mainboard_family(void);
+#endif
 
 #define BIOS_CHARACTERISTICS_PCI_SUPPORTED  (1 << 7)
 #define BIOS_CHARACTERISTICS_PC_CARD  (1 << 8)



More information about the coreboot-gerrit mailing list