[coreboot-gerrit] New patch to review for coreboot: 1bb3907 lenovo/x60: Add "IBM ThinkPad Embedded Controller" SMBIOS OEM String

Peter Stuge (peter@stuge.se) gerrit at coreboot.org
Sat Jul 6 20:28:19 CEST 2013


Peter Stuge (peter at stuge.se) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3620

-gerrit

commit 1bb390712c0a9695825b40e2779dd4eaa42e5d5e
Author: Peter Stuge <peter at stuge.se>
Date:   Sat Jul 6 20:10:36 2013 +0200

    lenovo/x60: Add "IBM ThinkPad Embedded Controller" SMBIOS OEM String
    
    The Linux thinkpad_acpi.c kernel driver looks for this string in the
    DMI tables in order to determine that it is running on an actual
    ThinkPad.
    
    This commit in itself does not seem to be sufficient to allow the
    module to load, but it is one of several things required.
    
    Change-Id: Ief5f28d2e27bf959cb579c4c8eea9eecc9a89a7c
    Signed-off-by: Peter Stuge <peter at stuge.se>
---
 src/mainboard/lenovo/x60/mainboard.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index b344ccb..f4c5a34 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -36,6 +36,7 @@
 #include <pc80/mc146818rtc.h>
 #include "dock.h"
 #include <arch/x86/include/arch/acpigen.h>
+#include <smbios.h>
 #include <x86emu/x86emu.h>
 #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
 
@@ -133,9 +134,24 @@ static void mainboard_init(device_t dev)
 	}
 }
 
+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)
 {
 	dev->ops->init = mainboard_init;
+	dev->ops->get_smbios_data = mainboard_smbios_data;
 }
 
 struct chip_operations mainboard_ops = {



More information about the coreboot-gerrit mailing list