Hi,
wrote:
> Thx Coputer Guy ... that's right and i'm okay with that issue ... but i
> think both the RAM and ROM use the same address space (memory mapped
> i/o) ... but i can't manage to understand how to control the RAM and
> ROM sharing of these addresses ... is there a certain I/O port to
> communicate with to enable or desable the logic of address detection
> ... umm ... dono
For most PCI chipsets, in the PCI configuration space for the "PCI host
controller", there's settings that control what happens to accesses
to/from the area between 0x000C0000 and 0x000FFFFF (usually in banks of
16 KB or 32 KB).
Using the chipset you would be able to set these banks to "read only",
"write only", "read/write" or "not present" (for example).
During boot the system BIOS is actually just below 4 GB. When it starts
it sets it's area below 1 MB to "write only", then copies itself into
RAM, and then sets the area to "read only".
For the primary video card's display memory, sometimes the BIOS can set
the area from 0x000A0000 to 0x000BFFFF to "not present", which causes
accesses in this range to bypass RAM and go to the PCI bus instead, but
more often the chipset assumes this and doesn't allow the area to be
changed (and doesn't have a setting for it). I guess I should also
point out that most BIOS's use the RAM underneath the video display
memory for an SMM state save area (or for power management).
For a PCI device's ROM (e.g. the primary video card's ROM at
0x000C0000), the BIOS would set the relevant banks to "write only", so
that reads go to the PCI bus and writes go to RAM. Then it would copy
from the ROM (on the PCI bus) to RAM, by writing to the same addresses
that it reads the ROM data from. Once this is done the BIOS can change
these RAM banks to "read only", which is where your video BIOS shadow
comes from. Alternatively, the BIOS could set these areas to to "write
only" or "not present" so that reads get forwarded to the PCI bus
(shadowing is disabled).
For Intel chipsets, the registers that control all of this are in the
host controller's PCI configuration space (i.e. bus 0, device 0,
function 0) and are called the PAM registers (Programmable Attribute
Map registers). For the i440FX chipset they are at offsets 0x0059 to
0x005F. For Intel 845 and 865 chipsets the PAM registers are at offsets
0x0090 to 0x0096.
Now that you know this, don't touch any of it. :-)
Cheers,
Brendan