Nicolas Reinecke (nr@das-labor.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6761
-gerrit
commit bbbc19a66a0636865ac3d177429158a18c0511ec Author: Nicolas Reinecke nr@das-labor.org Date: Sun Aug 24 22:20:13 2014 +0200
lenovo/t520/mainboard.c: Add EC info to SMBIOS
As is in: 91175bb lenovo/x201 & x230: Add EC info to SMBIOS
This is needed for the Linux driver for the Lenovo's to properly attach.
Change-Id: I92bed33c639e36c41dffe556bc58ee4e5b6d42ab Signed-off-by: Nicolas Reinecke nr@das-labor.org --- src/mainboard/lenovo/t520/mainboard.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c index 8b1aa0d..c04bc68 100644 --- a/src/mainboard/lenovo/t520/mainboard.c +++ b/src/mainboard/lenovo/t520/mainboard.c @@ -40,6 +40,7 @@ #include <cbfs.h> #include <pc80/keyboard.h> #include <ec/lenovo/h8/h8.h> +#include <build.h> #include <device/azalia_device.h>
void mainboard_suspend_resume(void) @@ -133,6 +134,15 @@ static int int15_handler(void) } #endif
+const char *smbios_mainboard_bios_version(void) +{ + /* Satisfy thinkpad_acpi. */ + if (strlen(CONFIG_LOCALVERSION)) + return "CBET4000 " CONFIG_LOCALVERSION; + else + return "CBET4000 " COREBOOT_VERSION; +} + const char *smbios_mainboard_version(void) { return "ThinkPad T520"; @@ -166,11 +176,28 @@ static void mainboard_init(device_t dev) 0x42, 0x142); }
-/* mainboard_enable is executed as first thing after -enumerate_buses(). */ +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);