From: "Michael S. Tsirkin" <mst@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] seabios: move acpi table formatting out of bios
Date: Wed, 8 May 2013 21:15:44 +0300 [thread overview]
Message-ID: <20130508181544.GA10594@redhat.com> (raw)
In-Reply-To: <20130507230113.GA21370@morn.localdomain>
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.
>
> -Kevin
I have kind of done this, though only compile-tested
for now - still need to update the bios with the new
linker interface along the lines suggested by you.
If you want to see how the code looks like check out
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi
the code is in
hw/i386/acpi-build.c
and
hw/i386/bios-linker-loader.c
the history is all messed up now, I'll clean it up shortly.
That said, this uses fw_cfg so for this to be acceptable,
we need to fix migration with big fw_cfg files.
--
MST
next prev parent reply other threads:[~2013-05-08 18:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 9:02 [Qemu-devel] [PATCH RFC 0/3] seabios: move acpi table formatting out of bios Michael S. Tsirkin
2013-04-25 9:02 ` [Qemu-devel] [PATCH RFC 1/3] linker: utility to patch in-memory ROM files Michael S. Tsirkin
2013-04-25 9:02 ` [Qemu-devel] [PATCH RFC 2/3] acpi: load and link tables from /etc/acpi/ Michael S. Tsirkin
2013-04-29 11:41 ` Laszlo Ersek
2013-04-29 13:25 ` Michael S. Tsirkin
2013-04-25 9:02 ` [Qemu-devel] [PATCH RFC 3/3] acpi: add an option to disable builtin tables Michael S. Tsirkin
2013-04-25 18:19 ` [Qemu-devel] [SeaBIOS] [PATCH RFC 0/3] seabios: move acpi table formatting out of bios Fred .
2013-04-25 21:11 ` Michael S. Tsirkin
2013-04-25 22:39 ` Kevin O'Connor
2013-05-07 18:00 ` [Qemu-devel] " Michael S. Tsirkin
2013-05-07 23:01 ` Kevin O'Connor
2013-05-08 9:31 ` Gleb Natapov
2013-05-08 10:29 ` Michael S. Tsirkin
2013-05-08 10:34 ` Gleb Natapov
2013-05-08 10:43 ` Michael S. Tsirkin
2013-05-08 10:59 ` Gleb Natapov
2013-05-08 11:07 ` Michael S. Tsirkin
2013-05-08 11:35 ` Gleb Natapov
2013-05-08 12:35 ` Michael S. Tsirkin
2013-05-08 12:41 ` Gleb Natapov
2013-05-08 22:55 ` Kevin O'Connor
2013-05-09 5:42 ` Gleb Natapov
2013-05-08 18:15 ` Michael S. Tsirkin [this message]
2013-05-09 5:24 ` Gleb Natapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130508181544.GA10594@redhat.com \
--to=mst@redhat.com \
--cc=kevin@koconnor.net \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).