* Li-Ta Lo ollie@lanl.gov [040527 22:49]:
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 ?
I know some intel chipsets did this by forwarding reads from 0xc0000 to rom and writes to 0xc0000 to ram, then reading and rewriting the whole area to the same address. I'd assume that this is still handled similar but on AMD64 rather using the MEM maps?
- 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.
D'uh, of course! First 5 then 4, i mixed it up. Otherwise you risk running into exactly the mutual exclusive BAR problem that Eric described.
Stefan