From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXDvJ-0005cx-5c for qemu-devel@nongnu.org; Mon, 07 Apr 2014 14:05:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXDvA-0003T2-10 for qemu-devel@nongnu.org; Mon, 07 Apr 2014 14:05:33 -0400 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:50711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXDv9-0003Sy-TI for qemu-devel@nongnu.org; Mon, 07 Apr 2014 14:05:23 -0400 Received: by mail-qc0-f181.google.com with SMTP id x3so6686625qcv.26 for ; Mon, 07 Apr 2014 11:05:23 -0700 (PDT) Date: Mon, 7 Apr 2014 14:05:21 -0400 From: "Gabriel L. Somlo" Message-ID: <20140407180520.GI1602@ERROL.INI.CMU.EDU> References: <20140401184726.GH9466@ERROL.INI.CMU.EDU> <20140401202832.GA24065@morn.localdomain> <1396451097.31715.20.camel@nilsson.home.kraxel.org> <20140405003410.GA13086@morn.localdomain> <20140405011513.GB31429@foober.ini.cmu.edu> <20140405022632.GA21769@morn.localdomain> <1396854596.5001.17.camel@nilsson.home.kraxel.org> <20140407141435.GA22185@morn.localdomain> <20140407144953.GG1602@ERROL.INI.CMU.EDU> <20140407152344.GA26674@morn.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140407152344.GA26674@morn.localdomain> Subject: Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, Laszlo Ersek , Gerd Hoffmann , qemu-devel@nongnu.org On Mon, Apr 07, 2014 at 11:23:44AM -0400, Kevin O'Connor wrote: > So, I'm suggesting QEMU produce two new fw_cfg files: an anchor file > with the valid anchor table (the address pointer can be just set to > zero), and an smbios table file with the complete set of smbios tables > formatted according to the smbios spec. SeaBIOS can then use the > existence of one of these new files to determine if it should deploy > (and optionally modify) them or if it should use the old smbios > generation code. Oh, OK. Right now we have (in qemu): #define SMBIOS_FIELD_ENTRY 0 #define SMBIOS_TABLE_ENTRY 1 I will be adding (actually, migrating to): #define SMBIOS_ANCHOR_ENTRY 2 /* for the smbios entry point table */ #define SMBIOS_FULLTABLE_ENTRY 3 /* for the blob containing all types */ The cool thing here is that, along with the payload for each type, I can create a wrapper structure, like there already exists for fields and individual table types: struct smbios_field { struct smbios_header header; uint8_t type; uint16_t offset; uint8_t data[]; } QEMU_PACKED; struct smbios_table { struct smbios_header header; uint8_t data[]; } QEMU_PACKED; I can add such a structure for the anchor/entrypoint table and for the full blob-of-tables payload, in which I can tell you how big type 0 is, so the BIOS (SeaBIOS/TianoCore) side surgery can be made that much easier... Thanks, --Gabriel