qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] pc/i386: legacy memory attributes - write only?


From: Andriy Gapon
Subject: [Qemu-devel] pc/i386: legacy memory attributes - write only?
Date: Wed, 17 Sep 2008 19:05:41 +0300
User-agent: Thunderbird 2.0.0.16 (X11/20080805)


I am working on a BIOS-ish code geared towards 440BX/PIIX4 chipset, so I
decided to try it under qemu emulation.

There is a snippet in the code that works as best described in 82443BX
documentation:
As an example, consider a BIOS that is implemented on the expansion
bus. During the initialization process, the BIOS can be shadowed in
main memory to increase the system performance. When BIOS is shadowed
in main memory, it should be copied to the same address location. To
shadow the BIOS, the attributes for that address range should be set
to write only. The BIOS is shadowed by first doing a read of that
address. This read is forwarded to the expansion bus. The host then
does a write of the same address, which is directed to main memory.
After the BIOS is shadowed, the attributes for that memory area are
set to read only so that all writes are forwarded to the expansion
bus.

The code tries to do exactly that by writing 20h to PCI configuration register 20h (of device 0:0:0). Then reading and writing back the whole F0000h-FFFFFh region and then setting the register to 10h.

But in qemu I see that after the above operation the corresponding RAM
region contains all zero bytes.

I think that behavior of 440BX and 440FX which qemu emulates should be
identical in this respect.
Does qemu perform proper emulation of attributes for legacy memory segments?
Should the above work in qemu? Maybe there is some bug in my code.

--
Andriy Gapon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]