[coreboot-gerrit] Patch set updated for coreboot: b08aea4 lenovo/x201 & x230: Add EC info to SMBIOS.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Thu Jan 23 18:00:14 CET 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4780

-gerrit

commit b08aea497637703001889cf237bbc5c268337c46
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Thu Jan 23 09:06:50 2014 +0100

    lenovo/x201 & x230: Add EC info to SMBIOS.
    
    Based on X60 counterpart.
    
    Change-Id: I1556f75db08edf47c9313dae91072335240d46ad
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/mainboard/lenovo/x201/mainboard.c | 15 +++++++++++++++
 src/mainboard/lenovo/x230/mainboard.c | 19 +++++++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index b460851..e9644e1 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -142,12 +142,27 @@ static void mainboard_init(device_t dev)
 	pc_keyboard_init(0);
 }
 
+static int mainboard_smbios_data(device_t dev, int *handle, unsigned long *current)
+{
+	int len;
+	char tpec[] = "IBM ThinkPad Embedded Controller -[                 ]-";
+	const char *oem_strings[] = {
+		tpec,
+	};
+
+	h8_build_id_and_function_spec_version(tpec + 35, 17);
+	len = smbios_write_type11(current, (*handle)++, oem_strings, ARRAY_SIZE(oem_strings));
+
+	return len;
+}
+
 static void mainboard_enable(device_t dev)
 {
 	device_t dev0;
 	u16 pmbase;
 
 	dev->ops->init = mainboard_init;
+	dev->ops->get_smbios_data = mainboard_smbios_data;
 
 	pmbase = pci_read_config32(dev_find_slot(0, PCI_DEVFN(0x1f, 0)),
 				   PMBASE) & 0xff80;
diff --git a/src/mainboard/lenovo/x230/mainboard.c b/src/mainboard/lenovo/x230/mainboard.c
index 6ae01fa..fcb884c 100644
--- a/src/mainboard/lenovo/x230/mainboard.c
+++ b/src/mainboard/lenovo/x230/mainboard.c
@@ -39,6 +39,7 @@
 #include <device/pci.h>
 #include <cbfs.h>
 #include <pc80/keyboard.h>
+#include <ec/lenovo/h8/h8.h>
 #include <build.h>
 #include "drivers/i2c/lenovo/eeprom.h"
 
@@ -187,12 +188,28 @@ static void mainboard_init(device_t dev)
 			   0x42, 0x142);
 }
 
+static int mainboard_smbios_data(device_t dev, int *handle, unsigned long *current)
+{
+	int len;
+	char tpec[] = "IBM ThinkPad Embedded Controller -[                 ]-";
+	const char *oem_strings[] = {
+		tpec,
+	};
+
+	h8_build_id_and_function_spec_version(tpec + 35, 17);
+	len = smbios_write_type11(current, (*handle)++, oem_strings, ARRAY_SIZE(oem_strings));
+
+	return len;
+}
+
 // mainboard_enable is executed as first thing after
 // enumerate_buses().
 
 static void mainboard_enable(device_t dev)
 {
 	dev->ops->init = mainboard_init;
+	dev->ops->get_smbios_data = mainboard_smbios_data;
+
 #if CONFIG_VGA_ROM_RUN
 	/* Install custom int15 handler for VGA OPROM */
 	mainboard_interrupt_handlers(0x15, &int15_handler);
@@ -200,8 +217,6 @@ static void mainboard_enable(device_t dev)
 	verb_setup();
 }
 
-void h8_mainboard_init_dock (void);
-
 void h8_mainboard_init_dock (void)
 {
 }



More information about the coreboot-gerrit mailing list