Received: from eggs.gnu.org ([2001:4830:134:3::10]:38619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAlHw-0007SH-ER for qemu-devel@nongnu.org; Tue, 04 Feb 2014 14:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAlHq-0007uH-KW for qemu-devel@nongnu.org; Tue, 04 Feb 2014 14:04:04 -0500 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:54082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAlHq-0007uA-Fz for qemu-devel@nongnu.org; Tue, 04 Feb 2014 14:03:58 -0500 Received: by mail-qc0-f170.google.com with SMTP id e9so14728110qcy.29 for ; Tue, 04 Feb 2014 11:03:58 -0800 (PST) Date: Tue, 4 Feb 2014 14:02:59 -0500 From: "Gabriel L. Somlo" Message-ID: <20140204190258.GS29329@ERROL.INI.CMU.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH 1/2] SMBIOS: Update Type 17 (Memory Device) struct to v2.3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: seabios@seabios.org Cc: qemu-devel@nongnu.org, agraf@suse.de Add v2.3 fields to Type 17 (Memory Device) structure. Without these, selecting "About This Mac" on an OS X guest will crash and restart the GUI. Signed-off-by: Gabriel Somlo --- src/fw/smbios.c | 6 ++++++ src/std/smbios.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/fw/smbios.c b/src/fw/smbios.c index 55c662a..b2d7f14 100644 --- a/src/fw/smbios.c +++ b/src/fw/smbios.c @@ -417,6 +417,12 @@ smbios_init_type_17(void *start, u32 size_mb, int instance) set_field_with_default(17, memory_type, 0x07); /* RAM */ set_field_with_default(17, type_detail, 0); + set_field_with_default(17, speed, 0); /* unknown */ + load_str_field_or_skip(17, manufacturer_str); + load_str_field_or_skip(17, serial_number_str); + load_str_field_or_skip(17, asset_tag_number_str); + load_str_field_or_skip(17, part_number_str); + *end = 0; end++; if (!str_index) { diff --git a/src/std/smbios.h b/src/std/smbios.h index 0513716..ba0e95d 100644 --- a/src/std/smbios.h +++ b/src/std/smbios.h @@ -127,6 +127,12 @@ struct smbios_type_17 { u8 bank_locator_str; u8 memory_type; u16 type_detail; + /* v2.3 fields: */ + u16 speed; + u8 manufacturer_str; + u8 serial_number_str; + u8 asset_tag_number_str; + u8 part_number_str; } PACKED; /* SMBIOS type 19 - Memory Array Mapped Address */ -- 1.8.1.4