[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [v2 PATCH 13/13] SMBIOS: Build full tables for type 32 and
From: |
Gabriel L. Somlo |
Subject: |
[Qemu-devel] [v2 PATCH 13/13] SMBIOS: Build full tables for type 32 and 127 |
Date: |
Tue, 11 Mar 2014 11:16:29 -0400 |
From: "Gabriel L. Somlo" <address@hidden>
Build full smbios type 32 (system boot info) and 127 (end-of-table)
tables, and make them available via fw_cfg.
Signed-off-by: Gabriel Somlo <address@hidden>
---
hw/i386/smbios.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index 9cf29d3..2bde2a5 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -583,6 +583,22 @@ static void smbios_build_type_20_table(unsigned instance,
SMBIOS_BUILD_TABLE_POST;
}
+static void smbios_build_type_32_table(void)
+{
+ SMBIOS_BUILD_TABLE_PRE(32, 0x2000, true); /* required */
+
+ memset(t->reserved, 0, 6);
+ t->boot_status = 0; /* No errors detected */
+
+ SMBIOS_BUILD_TABLE_POST;
+}
+
+static void smbios_build_type_127_table(void)
+{
+ SMBIOS_BUILD_TABLE_PRE(32, 0x7F00, true); /* required */
+ SMBIOS_BUILD_TABLE_POST;
+}
+
#define SMBIOS_SET_DEFAULT(field, value) \
if (!field) { \
field = value; \
@@ -661,6 +677,8 @@ uint8_t *smbios_get_table(size_t *length)
start_mb += size_mb;
}
}
+ smbios_build_type_32_table();
+ smbios_build_type_127_table();
smbios_validate_table();
smbios_immutable = true;
}
--
1.8.1.4
- [Qemu-devel] [v2 PATCH 03/13] SMBIOS: Use macro to set smbios defaults, (continued)
- [Qemu-devel] [v2 PATCH 06/13] SMBIOS: Build full tables for types 0 and 1, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 09/13] SMBIOS: Build full type 4 tables, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 08/13] SMBIOS: Build full type 3 table, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 10/13] SMBIOS: Build full smbios v2.3 compliant type 16 and 17 tables, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 07/13] SMBIOS: Remove unused code for passing individual fields to bios, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 12/13] SMBIOS: Build full type 20 tables, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 13/13] SMBIOS: Build full tables for type 32 and 127,
Gabriel L. Somlo <=
- [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gabriel L. Somlo, 2014/03/11
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gerd Hoffmann, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gabriel L. Somlo, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gerd Hoffmann, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gabriel L. Somlo, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gerd Hoffmann, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gabriel L. Somlo, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gabriel L. Somlo, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 11/13] SMBIOS: Build full type 19 tables, Gabriel L. Somlo, 2014/03/12
- Re: [Qemu-devel] [v2 PATCH 00/13] SMBIOS: build full tables in QEMU, Kevin O'Connor, 2014/03/11