[SeaBIOS] varlow/extrastack vs code

Kevin O'Connor kevin at koconnor.net
Tue Feb 14 19:43:23 CET 2017


On Tue, Feb 14, 2017 at 07:04:05PM +0100, Laszlo Ersek wrote:
> On 02/14/17 18:16, Kevin O'Connor wrote:
> > Also, the PAM registers on real hardware support a mode where reads to
> > 0xf0000 return the pristine copy of the bios while writes update
> > memory.  I didn't think there was any interest in implementing that on
> > QEMU (nor do I think it would be particularly helpful to have).
> 
> Hmmm, I thought this was implemented with the four modes visible in
> init_pam() and switched by pam_update(), in "hw/pci-host/pam.c".
> 
> Based on the remaining "XXX" comments though, and the wording of commit
> 175f099b30d47 ("pam: partly fix write-only mode"), it seems that the
> emulation is not complete just yet?...
> 
> Perhaps this helps Dave identify what should be fixed in QEMU...

I don't think anything in QEMU needs to be "fixed" - the bug is
definitely in SeaBIOS.  The QEMU pam stuff is definitely quirky, but
even if we updated qemu we'd still have to fix seabios for old
versions of qemu.

Just for historical perspective - the reason I think qemu didn't
implement the pam "read from rom and write to memory" mode is that I
don't think there's a good way to emulate that with page tables (and
the range needs to be executable so just making it all device memory
isn't practical).  Even if it were implemented, though, I doubt it
would help much.

-Kevin



More information about the SeaBIOS mailing list