On 09/29/14 13:01, Paolo Bonzini wrote: > Il 29/09/2014 09:22, Gerd Hoffmann ha scritto: >> >>>> The one thing I'm a bit unsure about is PciInitializationQ35 >>>> (BdsPlatform.c); >>>> In PciInitializationPIIX (which used to be plain PciInitialization before >>>> this patch), there's a whole bunch of other devices (ide, video, network, >>>> etc.) being initialized by writing to registers >> That is wrong. The function should only initialize the chipset, i.e >> devices 0 (northbridge) and 1 (southbridge). Everything else is just a >> shot into the dark, hoping the devices are there. Which is the case in >> a default qemu configuration, i.e. if you boot the system with just >> "qemu -hda $image" and let qemu add default vga+nic. It is possible to >> configure qemu completely different though. > > Writes to 0x3d are useless---that is a read-only register.
Apparently so, for 00:01.3 on the PIIX4. But for other PCI devices, I think it's writeable, isn't it? (Of course the devices-related code in this function should go away completely, if possible. git-blame is probably helpful here.) > In fact, 0x3d should be _used_ to determine whether to fill in the > register at 0x3c, and what value to write. OVMF must write there the > GSI number associated to the corresponding INTX pin. See > pci_bios_init_device in SeaBIOS's src/fw/pciinit.c. The PIIX4 spec says in 7.1.8. "INTLN—INTERRUPT LINE REGISTER (FUNCTION 3)" that "The value in this register has no affect on PIIX4 hardware operations." (It might still be useful for code that reads the register later, for all I know.) > This should be done > in a PEI (or is it PI?) driver, not DXE, because it must run on resume > from S3. The place would be MiscInitialization() in "OvmfPkg/PlatformPei/Platform.c", but I'm not sure it would have any effect. (Its lack doesn't seem to.) Thanks Laszlo ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
