summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-03-02 19:14:44 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2014-03-09 21:21:46 +0100
commit47089f29f0cf368e7c951158af61d5c040c7c8b9 (patch)
treeb0b07c4ba164330bd681028df2ed6015a9f2191b /src/arch
parent7d48f04bb4ba13e583a6fbc172eed9c8b5455dad (diff)
smbios: Supply tag type 2 (base board information)
Information really contained in it is mostly the same as in type 1 tag. However Linux uses type 2 to match hardware. Duplicate the info. Change-Id: I75e13d764464053ecab4a833fbb83836cedf26e6 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/5322 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/boot/smbios.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 65bf538cee..0e84acc737 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -217,6 +217,24 @@ static int smbios_write_type1(unsigned long *current, int handle)
return len;
}
+static int smbios_write_type2(unsigned long *current, int handle)
+{
+ struct smbios_type2 *t = (struct smbios_type2 *)*current;
+ int len = sizeof(struct smbios_type2);
+
+ memset(t, 0, sizeof(struct smbios_type2));
+ t->type = SMBIOS_BOARD_INFORMATION;
+ t->handle = handle;
+ t->length = len - 2;
+ t->manufacturer = smbios_add_string(t->eos, smbios_mainboard_manufacturer());
+ t->product_name = smbios_add_string(t->eos, smbios_mainboard_product_name());
+ t->serial_number = smbios_add_string(t->eos, smbios_mainboard_serial_number());
+ t->version = smbios_add_string(t->eos, smbios_mainboard_version());
+ len = t->length + smbios_string_table_len(t->eos);
+ *current += len;
+ return len;
+}
+
static int smbios_write_type3(unsigned long *current, int handle)
{
struct smbios_type3 *t = (struct smbios_type3 *)*current;
@@ -372,6 +390,7 @@ unsigned long smbios_write_tables(unsigned long current)
tables = current;
len = smbios_write_type0(&current, handle++);
len += smbios_write_type1(&current, handle++);
+ len += smbios_write_type2(&current, handle++);
len += smbios_write_type3(&current, handle++);
len += smbios_write_type4(&current, handle++);
#if CONFIG_ELOG