[coreboot-gerrit] New patch to review for coreboot: d41f8b8 lenovo/t5x0: Make version look like something thinkpad_acpi would accept

Nicolas Reinecke (nr@das-labor.org) gerrit at coreboot.org
Thu Jan 29 14:37:23 CET 2015


Nicolas Reinecke (nr at das-labor.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8302

-gerrit

commit d41f8b8beb8d931e636a704582334e114ec11c56
Author: Nicolas Reinecke <nr at das-labor.org>
Date:   Wed Jan 28 11:38:44 2015 +0100

    lenovo/t5x0: Make version look like something thinkpad_acpi would accept
    
    thinkpad_acpi checks that BIOS version matches some pattern.
    Report version in this form.
    
    same as http://review.coreboot.org/4650 /
    63acd22dc5366c72a7165138f5030df9523824dc
    
    Change-Id: I82d7a2b9f2ec56557b3a9c26d1af57ed39e31850
    Signed-off-by: Nicolas Reinecke <nr at das-labor.org>
---
 src/mainboard/lenovo/t520/mainboard.c | 13 +++++++++++++
 src/mainboard/lenovo/t530/mainboard.c | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c
index 582ef81..8419abc 100644
--- a/src/mainboard/lenovo/t520/mainboard.c
+++ b/src/mainboard/lenovo/t520/mainboard.c
@@ -37,6 +37,7 @@
 #include <cbfs.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
+#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -44,7 +45,19 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
+const char *smbios_mainboard_bios_version(void)
+{
+	static char *s = NULL;
+
+	/* Satisfy thinkpad_acpi.  */
+	if (strlen(CONFIG_LOCALVERSION))
+		return "CBET4000 " CONFIG_LOCALVERSION;
 
+	if (s != NULL)
+		return s;
+	s = strconcat("CBET4000 ", coreboot_version);
+	return s;
+}
 
 static void mainboard_init(device_t dev)
 {
diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c
index 14e1960..072ebe9 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -37,6 +37,7 @@
 #include <cbfs.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
+#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -44,7 +45,19 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
+const char *smbios_mainboard_bios_version(void)
+{
+	static char *s = NULL;
+
+	/* Satisfy thinkpad_acpi.  */
+	if (strlen(CONFIG_LOCALVERSION))
+		return "CBET4000 " CONFIG_LOCALVERSION;
 
+	if (s != NULL)
+		return s;
+	s = strconcat("CBET4000 ", coreboot_version);
+	return s;
+}
 
 static void mainboard_init(device_t dev)
 {



More information about the coreboot-gerrit mailing list