On 11/05/18 10:35, Segher Boessenkool wrote:
That's definitely the long way around.
My reading of the IEEE-1275 PCI bindings is that you take the first 32-bit word of "reg" for the PCI configuration space address, so as you can see we return the device-id/vendor-id for the NE2000 NIC as above.
But the AGP and PCIe buses on a powermac are on separate PCI domains from the other PCI buses, and the PHBs have a different programming interface, too.
I don't know how things work in QEMU, but if it emulates the hardware at all, you will have to find the proper config-* to use via walking parents in the device tree, etc., not shortcut to one implementation for all buses.
If you look at the patch you can see that it implements the words on the PCI bus node, so that part is all fine - the main problem with the patch is that it hard-codes the PCI config space address.
ATB,
Mark.