diff mbox

[SeaBIOS] QEMU regression problems

Message ID 20100421230203.GA5193@morn.localdomain
State New
Headers show

Commit Message

Kevin O'Connor April 21, 2010, 11:02 p.m. UTC
On Wed, Apr 21, 2010 at 09:16:54PM +0200, Gerhard Wiesinger wrote:
> On Mon, 19 Apr 2010, Kevin O'Connor wrote:
> >SeaBIOS will lock parts of ram from 0xc0000-0xfffff so that the option
> >roms aren't writable.  I wonder if that is confusing qemm when it
> >tries to locate the ebda into that area.

From your initial log, it looks like QEMM tried to relocate the ebda
to CEB5h-D035h.  However, the seabios log shows the last rom
(genroms/vapic.bin) at 0xce800-0xd0a00.  So, SeaBIOS would have locked
that ram.  Can you see if the patch below shows a different result for
you?

> Is the area from 0xc0000-0xfffff only read only when an option ROM
> is installed at some part of the memory area (e.g. option ROM at
> 0xD0000 to 0xDFFFF only 0xD0000 to 0xDFFFF is made read only) or the
> comple area is made read only?

SeaBIOS will lock only those areas it deployed option roms into.
However, the chipset only allows locking of 16K chunks - so SeaBIOS
will round up the option rom storage to the nearest 16K block.  For
example, should the last rom end at 0xd0a00, then SeaBIOS would lock
up to 0xd4000.

-Kevin

Comments

Gerhard Wiesinger April 22, 2010, 6:16 a.m. UTC | #1
On Wed, 21 Apr 2010, Kevin O'Connor wrote:

> On Wed, Apr 21, 2010 at 09:16:54PM +0200, Gerhard Wiesinger wrote:
>> On Mon, 19 Apr 2010, Kevin O'Connor wrote:
>>> SeaBIOS will lock parts of ram from 0xc0000-0xfffff so that the option
>>> roms aren't writable.  I wonder if that is confusing qemm when it
>>> tries to locate the ebda into that area.
>
> From your initial log, it looks like QEMM tried to relocate the ebda
> to CEB5h-D035h.  However, the seabios log shows the last rom
> (genroms/vapic.bin) at 0xce800-0xd0a00.  So, SeaBIOS would have locked
> that ram.  Can you see if the patch below shows a different result for
> you?

Ok, log file was until boot process only (as we discussed SCSI EBDA area). 
Therefore no QEMM is involved at all. Can send complete log file today 
evening for both cases (QEMM with/wo NOXBDA parameter).

>> Is the area from 0xc0000-0xfffff only read only when an option ROM
>> is installed at some part of the memory area (e.g. option ROM at
>> 0xD0000 to 0xDFFFF only 0xD0000 to 0xDFFFF is made read only) or the
>> comple area is made read only?
>
> SeaBIOS will lock only those areas it deployed option roms into.
> However, the chipset only allows locking of 16K chunks - so SeaBIOS
> will round up the option rom storage to the nearest 16K block.  For
> example, should the last rom end at 0xd0a00, then SeaBIOS would lock
> up to 0xd4000.
>

OK, clear.

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/
diff mbox

Patch

--- a/src/shadow.c
+++ b/src/shadow.c
@@ -104,6 +104,8 @@  make_bios_readonly(void)
     // Flush any pending writes before locking memory.
     wbinvd();
 
+    dprintf(1, "RomEnd=%x\n", RomEnd);
+#if 0
     // Write protect roms from 0xc0000-0xf0000
     int i;
     for (i=0; i<6; i++) {
@@ -115,6 +117,7 @@  make_bios_readonly(void)
         }
         pci_config_writeb(bdf, 0x5a + i, 0x11);
     }
+#endif
 
     // Write protect 0xf0000-0x100000
     pci_config_writeb(bdf, 0x59, 0x10);