From patchwork Tue Mar 4 19:19:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel L. Somlo" X-Patchwork-Id: 326456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0840E2C009C for ; Wed, 5 Mar 2014 06:22:32 +1100 (EST) Received: from localhost ([::1]:47801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKuv7-0001mc-SH for incoming@patchwork.ozlabs.org; Tue, 04 Mar 2014 14:22:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKuuk-0001lA-Lw for qemu-devel@nongnu.org; Tue, 04 Mar 2014 14:22:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKuuf-0008Aa-3O for qemu-devel@nongnu.org; Tue, 04 Mar 2014 14:22:06 -0500 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:39154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKuue-0008AO-V9 for qemu-devel@nongnu.org; Tue, 04 Mar 2014 14:22:01 -0500 Received: by mail-qg0-f50.google.com with SMTP id z60so16639991qgd.9 for ; Tue, 04 Mar 2014 11:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=2TDlswYAatNgVejuak87iiNXZDbnPSnsAvZhOKhSRY4=; b=Ofc1urx2dt0vt94JQg8rCvTnUmgiBMgVWkLtpT6vsBqNk/Q84rw6vlUKFa2/3mZKLL sy3GOmL7twhuroYY1/a5vnNsZoawQW4N//e21ui5sSdIXSPZe6qG/Kwc0fdXzYyPjNMH R03n44wdvJ5uy31ssXIFEFpd9G2Hcolaf9u3nLkyDhDpsZtTxBwFceAeH6M7ZRRcLzR0 noj+F1/c/vyJh+L09fbQ2E+p3y7ooJF6kQpUUqSfUqxO8C8EXbK9+cS9OcplMpaJUwqL zIP/KuwZDu6ZuMfjQDyWw/n9zQGDVMQ59wp+AfU6FTikp7Kd7qTAs0HRdZSoLiGbXMxA 6jMg== X-Received: by 10.140.107.138 with SMTP id h10mr1766968qgf.30.1393960919952; Tue, 04 Mar 2014 11:21:59 -0800 (PST) Received: from ERROL.INI.CMU.EDU (ERROL.INI.CMU.EDU. [128.2.16.43]) by mx.google.com with ESMTPSA id 110sm21259989qgv.19.2014.03.04.11.21.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 04 Mar 2014 11:21:59 -0800 (PST) Date: Tue, 4 Mar 2014 14:19:15 -0500 From: "Gabriel L. Somlo" To: qemu-devel@nongnu.org Message-ID: <20140304191914.GR17184@ERROL.INI.CMU.EDU> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <53064465.2080302@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::232 Cc: kevin@koconnor.net, seabios@seabios.org, lersek@redhat.com, kraxel@redhat.com, agraf@suse.de Subject: [Qemu-devel] [PATCH 1/2] QEMU: SMBIOS: Update all structs to v2.3; Add type 2 struct X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org - update type 4 and 17 structures to v2.3 of the smbios spec - add type 2 structure definition Signed-off-by: Gabriel Somlo --- This patch changes none of the current functionality. It simply documents a few missing fields and adds the definition for an optional type, so I'm hoping it will not be too controversial :) Thanks, Gabriel include/hw/i386/smbios.h | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/include/hw/i386/smbios.h b/include/hw/i386/smbios.h index 18fb970..4e0d9c9 100644 --- a/include/hw/i386/smbios.h +++ b/include/hw/i386/smbios.h @@ -60,6 +60,22 @@ struct smbios_type_1 { uint8_t family_str; } QEMU_PACKED; +/* SMBIOS type 2 - Base Board */ +struct smbios_type_2 { + struct smbios_structure_header header; + uint8_t manufacturer_str; + uint8_t product_str; + uint8_t version_str; + uint8_t serial_number_str; + uint8_t asset_tag_number_str; + uint8_t feature_flags; + uint8_t location_str; + uint16_t chassis_handle; + uint8_t board_type; + uint8_t contained_element_count; + // contained elements follow +} QEMU_PACKED; + /* SMBIOS type 3 - System Enclosure (v2.3) */ struct smbios_type_3 { struct smbios_structure_header header; @@ -79,7 +95,7 @@ struct smbios_type_3 { // contained elements follow } QEMU_PACKED; -/* SMBIOS type 4 - Processor Information (v2.0) */ +/* SMBIOS type 4 - Processor Information (v2.3) */ struct smbios_type_4 { struct smbios_structure_header header; uint8_t socket_designation_str; @@ -97,6 +113,10 @@ struct smbios_type_4 { uint16_t l1_cache_handle; uint16_t l2_cache_handle; uint16_t l3_cache_handle; + uint8_t serial_number_str; + uint8_t asset_tag_number_str; + uint8_t part_number_str; + } QEMU_PACKED; /* SMBIOS type 16 - Physical Memory Array @@ -111,7 +131,7 @@ struct smbios_type_16 { uint16_t memory_error_information_handle; uint16_t number_of_memory_devices; } QEMU_PACKED; -/* SMBIOS type 17 - Memory Device +/* SMBIOS type 17 - Memory Device (v2.3) * Associated with one type 19 */ struct smbios_type_17 { @@ -127,6 +147,11 @@ struct smbios_type_17 { uint8_t bank_locator_str; uint8_t memory_type; uint16_t type_detail; + uint16_t speed; + uint8_t manufacturer_str; + uint8_t serial_number_str; + uint8_t asset_tag_number_str; + uint8_t part_number_str; } QEMU_PACKED; /* SMBIOS type 19 - Memory Array Mapped Address */