From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNOTN-0005jH-6D for qemu-devel@nongnu.org; Tue, 11 Mar 2014 11:20:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNOTH-0007IP-LT for qemu-devel@nongnu.org; Tue, 11 Mar 2014 11:20:05 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:57477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNOTH-0007IK-HW for qemu-devel@nongnu.org; Tue, 11 Mar 2014 11:19:59 -0400 Received: by mail-qg0-f48.google.com with SMTP id j107so25266317qga.7 for ; Tue, 11 Mar 2014 08:19:59 -0700 (PDT) From: "Gabriel L. Somlo" Date: Tue, 11 Mar 2014 11:16:29 -0400 Message-Id: <1394550989-693-14-git-send-email-somlo@cmu.edu> In-Reply-To: <1394550989-693-1-git-send-email-somlo@cmu.edu> References: <1394532186.22422.24.camel@nilsson.home.kraxel.org> <1394550989-693-1-git-send-email-somlo@cmu.edu> Subject: [Qemu-devel] [v2 PATCH 13/13] SMBIOS: Build full tables for type 32 and 127 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agraf@suse.de, gsomlo@gmail.com, armbru@redhat.com, alex.williamson@redhat.com, kevin@koconnor.net, kraxel@redhat.com, lersek@redhat.com From: "Gabriel L. Somlo" 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 --- 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