From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua0j8-0006db-7g for qemu-devel@nongnu.org; Wed, 08 May 2013 05:31:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ua0j5-0001q1-Ck for qemu-devel@nongnu.org; Wed, 08 May 2013 05:31:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua0j5-0001pp-59 for qemu-devel@nongnu.org; Wed, 08 May 2013 05:31:55 -0400 Date: Wed, 8 May 2013 12:31:50 +0300 From: Gleb Natapov Message-ID: <20130508093150.GP12349@redhat.com> References: <20130507180048.GA25280@redhat.com> <20130507230113.GA21370@morn.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130507230113.GA21370@morn.localdomain> Subject: Re: [Qemu-devel] [PATCH RFC 0/3] seabios: move acpi table formatting out of bios List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org, "Michael S. Tsirkin" On Tue, May 07, 2013 at 07:01:13PM -0400, Kevin O'Connor wrote: > On Tue, May 07, 2013 at 09:00:48PM +0300, Michael S. Tsirkin wrote: > > On Thu, Apr 25, 2013 at 12:02:20PM +0300, Michael S. Tsirkin wrote: > > > Untested yet, but I thought I'd share the > > > BIOS bits so we can agree on direction. > > > > > > In particular check out ROM sizes: > > > - Before patchset with DSDT enabled > > > Total size: 127880 Fixed: 59060 Free: 3192 (used 97.6% of 128KiB rom) > > > - Before patchset with DSDT disabled > > > Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) > > > - After patchset: > > > Total size: 128776 Fixed: 59100 Free: 2296 (used 98.2% of 128KiB rom) > > > - Legacy disabled at build time: > > > Total size: 119836 Fixed: 58996 Free: 11236 (used 91.4% of 128KiB rom) > > > > > > As can be seen from this, most size savings come > > > from dropping DSDT, but we do save a bit by removing > > > other tables. Of course the real reason to move tables to QEMU > > > is so that ACPI can better match hardware. > > > > > > This patchset adds an option to move all code for formatting acpi tables > > > out of BIOS. With this, QEMU has full control over the table layout. > > > All tables are loaded from the new "/etc/acpi/" directory. > > > Any entries in this directory cause BIOS to disable > > > ACPI table generation completely. > > > A generic linker script, controlled by QEMU, is > > > loaded from "/etc/linker-script". It is used to > > > patch in table pointers and checksums. > > > > After some thought, there are two additional > > options worth considering, in that they simplify > > bios code somewhat: > > > > - bios could get size from qemu, allocate a buffer > > (e.g. could be one buffer for all tables) > > and pass the address to qemu. > > qemu does all the patching > > > > - further, qemu could do the copy of tables into > > that address directly > > This seems more complex than necessary to me. > > The important task is to get the tables generated in QEMU - I'd focus > on getting the tables generated in QEMU (one table per fw_cfg "file"). > Once that is done, the SeaBIOS side can be easily implemented, and we > can add any enhancements on top if we feel it is necessary. > +1. This "copy of tables into that address directly" is just an ad-hoc PV isa DMA device in disguise. Such device was refused when libguestfs asked for it, and they wanted it for much better reason - performance. There is existing mechanism to pass data into firmware. Use it please. -- Gleb.