summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2013-07-06 20:10:36 +0200
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2013-12-02 18:16:51 +0100
commitb6b3f79db8af6f4ed4fa5aca79ca159a638ac00a (patch)
tree78590897aee459fdedbb37b41d30d1e4c2122c54 /src/mainboard
parent9a6ca071e006b46ec4472e781d177271e2e02a45 (diff)
downloadcoreboot-b6b3f79db8af6f4ed4fa5aca79ca159a638ac00a.tar.xz
lenovo/x60: 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: Ia48bbd85ba4d528063695345b0f968d264573341 Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://review.coreboot.org/3779 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/lenovo/x60/mainboard.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index d425cd2128..d1fcb7b0bf 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 = {