lenovo: Make version look like something thinkpad_acpi would accept

thinkpad_acpi checks that BIOS version matches some pattern.
Report version in this form.

Not cleaned up as the idea of this patch seems to be met with resistance.
Can make it Thinkpad-specific if the idea is accepted.

Change-Id: I15e33e87e7a7f42d6a06f12fb39b5172153af8a1
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4650
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Vladimir Serbinenko
2014-06-01 00:26:48 +02:00
parent 4c81a9e142
commit 63acd22dc5
6 changed files with 53 additions and 4 deletions

View File

@@ -118,6 +118,14 @@ static int smbios_processor_name(char *start)
return smbios_add_string(start, tmp);
}
const char *__attribute__((weak)) smbios_mainboard_bios_version(void)
{
if (strlen(CONFIG_LOCALVERSION))
return CONFIG_LOCALVERSION;
else
return COREBOOT_VERSION;
}
static int smbios_write_type0(unsigned long *current, int handle)
{
struct smbios_type0 *t = (struct smbios_type0 *)*current;
@@ -132,10 +140,7 @@ static int smbios_write_type0(unsigned long *current, int handle)
#if !CONFIG_CHROMEOS
t->bios_release_date = smbios_add_string(t->eos, COREBOOT_DMI_DATE);
if (strlen(CONFIG_LOCALVERSION))
t->bios_version = smbios_add_string(t->eos, CONFIG_LOCALVERSION);
else
t->bios_version = smbios_add_string(t->eos, COREBOOT_VERSION);
t->bios_version = smbios_add_string(t->eos, smbios_mainboard_bios_version());
#else
#define SPACES \
" "