qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	seabios@seabios.org, qemu-devel@nongnu.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP
Date: Wed, 14 Aug 2013 16:52:07 +0200	[thread overview]
Message-ID: <1376491927.3245.43.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <20130814123850.GB30821@morn.localdomain>

> > Maybe this wasn't clear, but in (4) the table is generated by *qemu*
> > with the values programmed by the firmware.
> 
> Yes.  I still don't much like it.  I'd think it would be much simpler
> for qemu to generate the tables once at startup and not have to patch
> them at runtime.  It also introduces an obscure dependency on the
> ordering of the firmware.

The ordering isn't a big problem I think as it fits the normal order how
the firmware boots up: hardware initialization goes first, generating
the tables for the guest comes later on.

> > The mmconf xbar is setup as one of the first things coreboot does, even
> > before romstage, then coreboot does the complete pci initialization
> > using mmconf.
> 
> It's not hard to read a value from fw_cfg early on (even in
> assembler):
> 
> outw(FWCFG_MY_EARLY_PORT, PORT_QEMU_CFG_CTL);
> u8 myval = inb(PORT_QEMU_CFG_DATA);

Well, only if the stuff isn't in a fw_cfg file, which happens to be the
case for all new stuff we are adding.  Also I'm not sure I can easily
make the xbar location a runtime variable in coreboot.

> Also, if this needs to be determined before the ram controller is
> initialized, then I think it's fine to hard code the value (real
> machines will almost assuredly hardcode as well).

Yea, real machines hardcode that.  As mentioned for coreboot this is a
compile-time constant (aka #define), which makes sense of course.  With
firmware generating the acpi tables this works fine, it just uses the
#defined value when writing the tables.

With qemu generating the acpi tables we can hardcode it to the same
value in both firmware and qemu.  Which pretty much implies we can never
ever change it in the future without breaking stuff.  Thats why I'd like
avoid that in the first place.

Making qemu lookup the values in the hardware registers, after the
firmware programmed them, has the big advantage that we don't need any
new paravirtual interfaces to have firmware and qemu agree on the
values ...

cheers,
  Gerd

  reply	other threads:[~2013-08-14 14:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1375167638-4325-1-git-send-email-imammedo@redhat.com>
     [not found] ` <20130731055959.GA31017@redhat.com>
     [not found]   ` <20130731081459.77eba7bb@nial.usersys.redhat.com>
     [not found]     ` <51FFCCF4.706@redhat.com>
     [not found]       ` <20130805181618.GB4244@redhat.com>
     [not found]         ` <911613672.9763982.1375729901921.JavaMail.root@redhat.com>
     [not found]           ` <20130806143901.GA17072@redhat.com>
     [not found]             ` <1243962588.10286037.1375807384073.JavaMail.root@redhat.com>
     [not found]               ` <20130806165820.GB20305@redhat.com>
     [not found]                 ` <5201F763.3030507@redhat.com>
2013-08-08  6:04                   ` [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP Michael S. Tsirkin
     [not found]                   ` <20130807095019.GA26266@redhat.com>
     [not found]                     ` <5202218C.70005@redhat.com>
     [not found]                       ` <20130807111031.GC3068@redhat.com>
     [not found]                         ` <52023A52.6010208@redhat.com>
     [not found]                           ` <20130807123509.GA10670@redhat.com>
     [not found]                             ` <520257F8.1080501@redhat.com>
     [not found]                               ` <20130807145312.GA14308@redhat.com>
     [not found]                                 ` <52034F73.4040904@redhat.com>
2013-08-08  8:37                                   ` Michael S. Tsirkin
2013-08-08  8:57                                     ` Gerd Hoffmann
2013-08-08  9:52                                       ` Michael S. Tsirkin
2013-08-08 10:21                                         ` Gerd Hoffmann
2013-08-08 14:13                                           ` Michael S. Tsirkin
2013-08-08 14:56                                             ` Gerd Hoffmann
2013-08-09  4:13                                               ` Kevin O'Connor
2013-08-09  6:25                                                 ` Gerd Hoffmann
2013-08-10  3:10                                                   ` Kevin O'Connor
2013-08-12  6:05                                                     ` Gerd Hoffmann
2013-08-12 22:42                                                       ` Kevin O'Connor
2013-08-13  6:49                                                         ` Gerd Hoffmann
2013-08-14 12:38                                                           ` Kevin O'Connor
2013-08-14 14:52                                                             ` Gerd Hoffmann [this message]
2013-08-09  9:45                                                 ` Gerd Hoffmann
2013-08-10  3:30                                                   ` Kevin O'Connor
2013-08-10 15:50                                                     ` Kevin O'Connor
2013-08-09 15:49                                                 ` Michael S. Tsirkin
2013-08-10  3:06                                                   ` Kevin O'Connor
2013-08-12  6:37                                                   ` Gerd Hoffmann
2013-08-12  7:56                                                     ` Michael S. Tsirkin
2013-08-12 13:08                                                   ` Laszlo Ersek
     [not found]                                   ` <20130808082212.GA26837@redhat.com>
     [not found]                                     ` <52035C2F.4040700@redhat.com>
2013-08-08  9:37                                       ` Michael S. Tsirkin

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=1376491927.3245.43.camel@nilsson.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).