summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2013-07-06 19:51:12 +0200
committerRonald G. Minnich <rminnich@gmail.com>2013-07-15 17:06:23 +0200
commitc392b6477f656331c7e19b22f6eb240cdd5465a1 (patch)
treeb07b77472888dafc4188a74d1ed9f71716379190 /src/arch/x86
parent4e7385b58fcff0f59db6f0c4852a57e74f0d3b00 (diff)
downloadcoreboot-c392b6477f656331c7e19b22f6eb240cdd5465a1.tar.xz
SMBIOS: Add smbios_write_type11() for creating an OEM Strings structure
Change-Id: Id338968429435bac26595c4843b07cdbb91dd64d Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://review.coreboot.org/3618 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/boot/smbios.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 073c7c5e08..901a209eda 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -256,6 +256,24 @@ static int smbios_write_type4(unsigned long *current, int handle)
return len;
}
+int smbios_write_type11(unsigned long *current, int handle, const char **oem_strings, int count)
+{
+ struct smbios_type11 *t = (struct smbios_type11 *)*current;
+ int i, len;
+
+ memset(t, 0, sizeof *t);
+ t->type = SMBIOS_OEM_STRINGS;
+ t->handle = handle;
+ t->length = len = sizeof *t - 2;
+
+ for (i = 0; i < count; i++)
+ t->count = smbios_add_string(t->eos, oem_strings[i]);
+
+ len += smbios_string_table_len(t->eos);
+ *current += len;
+ return len;
+}
+
static int smbios_write_type32(unsigned long *current, int handle)
{
struct smbios_type32 *t = (struct smbios_type32 *)*current;