Re: Is OpenPIC mandatory for an ofppc-machine?
Artyom Tarasenko <[email protected]> Tue, 9 Sep 2014 17:29:52 +0200
| Newsgroups | gmane.os.netbsd.ports.ofppc |
|---|---|
| Message-ID | <CACXAS8DTQeJZRZdASLC2TPEnbEU132kjfY8k=6VuTztTsUhJjA@mail.gmail.com> |
On Sat, Sep 6, 2014 at 11:40 AM, Frank Wille <[email protected]> wrote: > Artyom Tarasenko wrote: > >> experimenting with Open Firmware for QEMU PReP target. >> [...] >> And here it hangs. Saw in some boot logs openpic initialization here. >> QEMU uses an i8259, can this be the reason? > > Does QEMU PReP really emulate OpenFirmware correctly? There must be an > OFW-tree entry with a name or device_type of "interrupt-controller". > NetBSD/ofppc works with the Pegasos 2, which is an OpenFirmware machine > with i8259 PIC. So theoretically it should work. That's a good news, thank you. Here is my device tree: ok show-devs /dropin-fs /flash@fff00000 /cpus /pci /mmu /memory@0 /aliases /options /openprom /chosen /packages /cpus/PowerPC,603@0 /pci/vga@2 /pci/ide@b,1 /pci/isa@b /pci/ide@b,1/disk /pci/isa@b/nvram@i74 /pci/isa@b/rtc@i74 /pci/isa@b/gpio@i3e0 /pci/isa@b/power@i380 /pci/isa@b/8042@i60 /pci/isa@b/fdc@i3f0 /pci/isa@b/parallel@i378 /pci/isa@b/serial@i2f8 /pci/isa@b/serial@i3f8 /pci/isa@b/configuration@i15c /pci/isa@b/timer@i40 /pci/isa@b/interrupt-controller@i20 ok dev /pci/isa@b/interrupt-controller@i20 ok .properties built-in model WINB,83C553 reg 00000001 00000020 00000002 00000001 000000a0 00000002 00000001 000004d0 00000002 compatible chrp,iic pci10ad,105-interrupt-controller pci8086,484-interrupt-controller pnpPNP,0 device_type interrupt-controller name interrupt-controller #address-cells 00000000 #interrupt-cells 00000002 interrupts 00000000 00000000 interrupt-controller ok Do you see anything suspicious? > OFW PIC detection is in src/sys/arch/powerpc/pci/pci_machdep_ofw.c > genofw_find_ofpics(). Looks like the code ( http://fxr.watson.org/fxr/source/arch/powerpc/pci/pci_machdep_ofw.c?v=NETBSD#L142 ) is expecting just one "compatible" propery. Or do I read it wrong? Otoh the i8259 is the default. It seems that it should work without the "interrupt-controller" node at all. I tried removing this node from the device tree, but I see no visible change in the behavior. Btw, the boot process seems to be much slower than for NetBSD/prep on the same machine: writting output looks like an original 300 bod terminal. Is it normal? Btw2, we are not emulating OpenFirmware. It is the original OpenFirmware from FirmWorks which I slightly adjusted for qemu -M prep. -- Regards, Artyom Tarasenko SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu