support pcix/pciex extended iospace
A bit cryptic message on boot:
WARNING: illegal PCI request: offset = 100, size = 4
The early PCI setup is using inb/inw/inl based IO access to PCI config space (as opposed to memory mapped reads) and the access is validated against pci_iocfg_max_offset global variable, which is set to value 0xff. Unfortunately the PCI-X 2.0 and PCIE extended config space is starting from offset 0x100 and the space is 4k, and accessing the extended config space will result with validation failure and the warning message above.
The quick fix is to set (for mech1) pci_iocfg_max_offset = 0xfff; So the extended config space access will be allowed. Note, the similar workaround is already in place for AMD.
The better approach would be to determine the cfg space size for each case and use that value in validation, but I would implement this quick fix for now, so we would get access to devices and address the proper fix later (especially considering the pci code is shared with sparc px driver and there are probably more complications).
Tested with qemu 2.10.1 + UEFI, this fix does enable nvme devices to attach.
Updated by Toomas Soome over 2 years ago
Michal Nowak wrote:
OpenIndiana user at #11050 got the very same warning when they attached PCIe card, an xHCI adapter. The card seems to be misconfigured. Might be worth reiterating the proposed fix as we have a reproducer.
It is not forgotten, just postponed - the very first implementation is of course too crude, but proper fix needs time...