From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mp4BE-0006dx-Ff for qemu-devel@nongnu.org; Sat, 19 Sep 2009 13:57:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mp4BA-0006c2-RN for qemu-devel@nongnu.org; Sat, 19 Sep 2009 13:57:04 -0400 Received: from [199.232.76.173] (port=39569 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mp4BA-0006bw-NL for qemu-devel@nongnu.org; Sat, 19 Sep 2009 13:57:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3845) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mp4BA-00038n-18 for qemu-devel@nongnu.org; Sat, 19 Sep 2009 13:57:00 -0400 Date: Sat, 19 Sep 2009 20:56:55 +0300 From: Gleb Natapov Message-ID: <20090919175655.GA4955@redhat.com> References: <20090914125141.GB30746@redhat.com> <20090915000824.GA16210@morn.localdomain> <20090915054339.GD30746@redhat.com> <20090916020259.GA18131@morn.localdomain> <20090917095728.GN23157@redhat.com> <20090918012411.GA23213@morn.localdomain> <20090918100120.GC11921@redhat.com> <20090919151641.GC28926@morn.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090919151641.GC28926@morn.localdomain> Subject: [Qemu-devel] Re: [PATCH][SEABIOS] Move qemu config port access functions into separate file. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: qemu-devel@nongnu.org On Sat, Sep 19, 2009 at 11:16:41AM -0400, Kevin O'Connor wrote: > On Fri, Sep 18, 2009 at 01:01:20PM +0300, Gleb Natapov wrote: > > On Thu, Sep 17, 2009 at 09:24:11PM -0400, Kevin O'Connor wrote: > > > On coreboot there is the Coreboot FileSystem (CBFS). Basically, the > > > flash stores a series of named files, and SeaBIOS knows how to iterate > > > through them. So, for instance, one might find the file > > > "pci1013,00b8.rom" which contains an option rom for pci device > > > 1013:00b8, or one might find "floppyimg/FreeDOS" with an image of a > > > floppy to be emulated. > > > > > > So, ideally qemu would do something similar. Maybe something like: > > Qemu already does something different. For instance acpi tables are > > transfered as stream formated like this: > > <1 table length>
<2 table length>
> > ...
> > Maybe a stream could be introduced with something like: > ... > The format is already set. The are two ports. You write option id in first port and you read option value from second one. The value format is different for each option. Additional acpi table format is like I described above. If we want to use the same APIs for config access for coreboot and qemu the API will have to be general enough to accommodate both approaches. Changing formats is not an option at this stage. > > I don't think qemu should expose file system API to a BIOS. > > To be clear, I'm not proposing exposing the system's filesystem to the > guest. > > It's really just a way of getting name=value pairs. If there is a > different way to do this then that's fine. Ideally, to fit with > SeaBIOS' current code, there would be a way to obtain the size and > data for a given "name" along with an ability to iterate through the > list of "names" available. > You can obtain size for acpi tables by reading the whole data first time just for calculating the data size and discarding the data. But I don't see the point of doing it. The format was specifically designed to allow reading one table at a time and placing it in its final place in memory. -- Gleb.