On Fri, May 11, 2018 at 09:11:40AM +0100, Mark Cave-Ayland wrote:
On 11/05/18 08:11, Jd Lyons via OpenBIOS wrote:
Seems I could add config-1@ as a colon definition, however I’m not sure how too deal with r1@?
: rl@-le rl@ lbflip ; : >config f1000000 + ; : config-l@ >config cr ." config-l@ " dup . rl@-le space dup . ;
Just can’t figure how r1@ is implemented in SLOF?
rl@, not r1@. It is defined in hvcall.code or nativeio.code, depending on what platform you are building for. It does a "raw" cache-inhibited 32-bit read.
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.