On Thu, 2004-05-27 at 14:30, Stefan Reinauer wrote:
- Eric W. Biederman ebiederman@lnxi.com [040527 22:16]:
We could probably reserve a hole for this purpose, which is a good idea except for bridges.
Also, the graphics card option roms are usually hardcoded to 0xc0000
Do you mean the expansion rom BAR is hard coded to 0xc0000 ? The how does the bios copy the bios in ROM at 0xc0000 to memory in DRAM at 0xc0000 as stated in PCI spec 6.3.3.1.1 ?
Be very careful here. The PCI spec allows the option rom BAR to be mutually exclusive with the other BARS so in general they both can not be enabled.
The only safe way to go is probably to probe one after the other while leaving the rest untouched, i.e
- probe option rom, if it doesn't exist go to 6.
- enable option rom
- evtl. copy rom code to ram (in case it installs an int13 handler or such)
- execute option rom code.
- disable option rom
- repeat this for all pci devices.
If I am right you should disable option rom BEFORE execute the code in DRAM. The spec says it is possible that the other BAR shares the same address decoder with ROM BAR.
Ollie
This procedure should be a part of "testbios" rather than LinuxBIOS' PCI code, but reserving some space for it early might be the way to go indeed.
Stefan