On 28/05/14 12:11, BALATON Zoltan wrote:
On Wed, 28 May 2014, Mark Cave-Ayland wrote:
For example, here my FreeBSD/NetBSD images hang somewhere in PCI bus enumeration on -M mac99 which could be a similar bug to the one you are
Can you point me to such an image please?
Just download the latest FreeBSD/NetBSD PPC ISO releases from their respective websites and try and boot them under QEMU with -M mac99 :) For one of them you need to manually punch in "boot cd:,\ofwboot.xcf" in order to start the boot from memory.
seeing on MorphOS (maybe interrupts?). But at least for the *BSDs you have the source code available so you can figure out what the code *should* be doing which helps narrow down the problem space considerably.
The problem with MorphOS seems to be that it cannot receive from the network. It initialises the card (I'm using rtl8139 as that's what has a driver in MorphOS) and seems to talk to it but packets are not received or not handled. I believe the problem may be that the interrupt is not handled correctly. I base this on the following:
Bus 0, device 14, function 0: Ethernet controller: PCI device 10ec:8139 IRQ 29. BAR0: I/O at 0x0400 [0x04ff]. BAR1: 32 bit memory at 0x82020000 [0x820200ff]. BAR6: 32 bit memory at 0x82040000 [0x8207ffff]. id ""
/pci #interrupt-cells 1 interrupt-map 00000000 00000000 00000000 00000001 fff56630 0000001b 00000003 00000000 00000000 00000000 00000002 fff56630 0000001c 00000003 00000000 00000000 00000000 00000003 fff56630 0000001d 00000003 00000000 00000000 00000000 00000004 fff56630 0000001e 00000003 00000000 00000000 00000000 00000005 fff56630 000000ff 00000003 00000000 00000000 00000000 00000006 fff56630 000000f3 00000003 00000000 00000000 00000000 00000007 fff56630 00000042 00000003 00000000 00000000 00000000 00000008 fff56630 000000cc 00000003 interrupt-map-mask 00000000 00000000 00000000 00000007 interrupt-parent fff56630
/pci/RTL8139 interrupts 1
But MorphOS says for all cards it finds: "Board uses custom interrupt ID 0x0400001b"
Changing interrupts to 3 in /pci/RTL8139 does not change anything. Does the above make sense to anyone who could please explain how it should work and what could be the problem? I'll try to find out more by testing with other OSes but maybe someone has other ideas that might help.
You may find the following thread helpful here: http://comments.gmane.org/gmane.comp.bios.openbios/4992. But again, you should be able to cross-check with the *BSD sources exactly how the interrupts are being routed to the CPU in QEMU based upon these properties which will make life much easier.
And don't forget to make yourself familiar with the IEEE1275 PCI bindings too: http://www.openfirmware.org/1275/bindings/pci/pci2_1.pdf.
HTH,
Mark.