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

Trevor Mosey (uberushaximus@gmail.com) gerrit at coreboot.org
Sat May 3 03:10:39 CEST 2014


Trevor Mosey (uberushaximus at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5638

-gerrit

commit d5d720211baf79aa4f36d74983422211f8401567
Author: Trevor Mosey <uberushaximus at gmail.com>
Date:   Fri May 2 20:07:03 2014 -0500

    lenovo/t60: Add "IBM ThinkPad Embedded Controller" SMBIOS OEM String
    
    The Linux thinkpad_acpi.c driver looks for this string while
    reading information about the system it is running on.
    
    This commit does not make the module load but it is one of
    several things that the module looks for on a ThinkPad.
    
    Change-Id: I5e54ea2833252bc4dbba46ceb67d78c435b34845
    Signed-off-by: Trevor Mosey <uberushaximus at gmail.com>
---
 src/mainboard/lenovo/t60/mainboard.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c
index 623031a..a25c92c 100644
--- a/src/mainboard/lenovo/t60/mainboard.c
+++ b/src/mainboard/lenovo/t60/mainboard.c
@@ -33,6 +33,7 @@
 #include <northbridge/intel/i945/i945.h>
 #include <pc80/mc146818rtc.h>
 #include <arch/x86/include/arch/acpigen.h>
+#include <smbios.h>
 
 static acpi_cstate_t cst_entries[] = {
 	{ 1,  1, 1000, { 0x7f, 1, 2, { 0 }, 1, 0 } },
@@ -78,9 +79,24 @@ static void mainboard_init(device_t dev)
 	ec_write(0x0c, inb(0x164c) & 8 ? 0x89 : 0x09);
 }
 
+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