On Mon, 1 Jul 2019, Mark Cave-Ayland wrote:
Then please implement that as I don't know how to do that. The result would be the same so I don't see why this is not acceptable now. This is only touching the qemu init.c and only for MAC99 whereas your suggestion would need changes all over the place that would have a higher chance of breaking something that I can't even test so I won't attempt doing that. If your priorities are to avoid breaking stuff and have device tree corresponding to the real machine then this patch seems to be the easiest way to reach those goals. What is it that you still don't like about this?
Errr... I did spend time making the OpenBIOS bridge code generic so that others could use it, so the theory says that all you have to do is feed in an initial value. If we need workarounds then I accept that these are necessary at times, but cases like this where the work is already done then there is no need for this.
If you think it's trivial to do then please come up with a patch or provide some detailed hints on what needs to be done because I was not able to find it. Where should I feed an inital value? The ob_pci_init() function has no parameter and adding one would require changing all callers that I can't test so I'd rather not do.
Also re-reading the patch I'm not sure that {0, 1} is correct under QEMU compared with a real Mac, since there is no PCI bridge present under /pci@f2000000?
Feel free to change it to whatever you think is appropriate, MorphOS does not care what value this has and I don't know what other guests would expect. I can resubmit this with any value you suggest but I can't figure out what value should be there other than what I've seen in real hardware device tree dump. (I don't have time to study standards documents so if someone here is familiar with those please share your knowledge to save us time.)
Regards, BALATON Zoltan