|
From: Antonino D. <ad...@po...> - 2003-03-17 07:03:39
|
On Mon, 2003-03-17 at 12:00, Jon Smirl wrote: > --- Antonino Daplas <ad...@po...> wrote: > > > > 3. write to PCI config space of secondary > > controller the address you > > > > want it to appear (ie C000:0000). Can I use > > other addresses? > > > > I checked the PCI 2.2 specs, and it doesn't have > > this capability. It > > will give you the address of the expansion ROM, but > > you still have to > > manually copy the ROM and place it in any of the > > expansion areas. > > Unfortunately for VGA controllers, it's always > > C000:0000. > > You can very definitely move the ROMs to where ever > you want that isn't occupied by something else. I have > written code that does it. Also, the system BIOS must > be moving the ROMs in order to sort things out so that > they don't all appear on top of each other. > You're talking about other device's expansion ROM's. VGA ROM's, especially for the x86, are an exception and has to be always mapped at c000:0000. > You don't even need to move the ROM. Just enable it > and read it's address form PCI space. The system BIOS > will have sorted the addresses out so that they don't > overlap. PCI config Region 6 is always the ROM see > include/linux/pci.h > > > 1. COOO:0000 will be write protected by the BIOS > > upon initialization of > > the first VGA controller. This will prevent copying > > of the succeeding > > ROMS into that segment (unless you have a BIOS that > > supports read-write > > shadow ROM's). > > How is C000 write protected? I'm pretty sure that the > ATI ROM are writing to C000. It is. C000 is write enabled by the BIOS before init. Then it calls the INIT procedure, which adjusts the initialization size before returning. Afterwards, the BIOS write-protects the block equivalent to the initialization size. Suceeding ROM's will then be mapped after this block. Remember, ROM's are supposed to be read-only, so even if they are shadowed, the BIOS write protects it. Tony |