Laurent Vivier wrote:
Nice, I was wondering why Morphos on PPC failed to boot, perhaps this corrects the problem... if a day I've time anymore, I'll try ;-)
Well, while I'm testing on PPC...
Using the Morphos ISO I managed to fix a stack error in getprop, however it looks like the Morphos boot loader is broken. With DEBUG_CIF enabled I get this:
finddevice("/pci") = 0x05415ff4 getprop(0x05415ff4, "device_type", 0x078efe90, 64) = 4 0x078efe90 70 63 69 00 __ __ __ __ __ __ __ __ __ __ __ __ pci. child(0x05415ff4) = 0x0541643c getprop(0x0541643c, "device_type", 0x078efe90, 64) = 8 0x078efe90 64 69 73 70 6c 61 79 00 __ __ __ __ __ __ __ __ display. peer(0x0541643c) = 0x05416938 getprop(0x05416938, "device_type", 0x078efe90, 64) = 8 0x078efe90 6e 65 74 77 6f 72 6b 00 __ __ __ __ __ __ __ __ network. peer(0x05416938) = 0x05416d0c getprop(0x05416d0c, "device_type", 0x078efe90, 64) = 8 0x078efe90 70 63 69 2d 69 64 65 00 __ __ __ __ __ __ __ __ pci-ide. peer(0x05416d0c) = 0x054177f4 getprop(0x054177f4, "device_type", 0x078efe90, 64) = 7 0x078efe90 6d 61 63 2d 69 6f 00 __ __ __ __ __ __ __ __ __ mac-io. getprop(0x054177f4, "assigned-addresses", 0x078efe70, 20) = 20 0x078efe70 82 00 20 10 00 00 00 00 80 80 00 00 00 00 00 00 ..
.............
0x078efe80 00 08 00 00 __ __ __ __ __ __ __ __ __ __ __ __ .... child(0x054177f4) = 0x05417cc0 getprop(0x05417cc0, "device_type", 0x078efe90, 64) = 9 0x078efe90 76 69 61 2d 63 75 64 61 00 __ __ __ __ __ __ __ via-cuda. peer(0x05417cc0) = 0x05418530 getprop(0x05418530, "device_type", 0x078efe90, 64) = 6 0x078efe90 6e 76 72 61 6d 00 __ __ __ __ __ __ __ __ __ __ nvram. peer(0x05418530) = 0x05418744 getprop(0x05418744, "device_type", 0x078efe90, 64) = 5 0x078efe90 65 73 63 63 00 __ __ __ __ __ __ __ __ __ __ __ escc. peer(0x05418744) = 0x05418d20 getprop(0x05418d20, "device_type", 0x078efe90, 64) = 4 0x078efe90 61 74 61 00 __ __ __ __ __ __ __ __ __ __ __ __ ata. peer(0x05418d20) = 0x00000000 getprop(0x00000000, "device_type", 0x078efe90, 64) = -1 peer(0x00000000) = 0x0540de20 getprop(0x0540de20, "device_type", 0x078efe90, 64) = -1 peer(0x0540de20) = 0x00000000 getprop(0x00000000, "device_type", 0x078efe90, 64) = -1 peer(0x00000000) = 0x0540de20 getprop(0x0540de20, "device_type", 0x078efe90, 64) = -1 peer(0x0540de20) = 0x00000000 getprop(0x00000000, "device_type", 0x078efe90, 64) = -1 peer(0x00000000) = 0x0540de20 getprop(0x0540de20, "device_type", 0x078efe90, 64) = -1 peer(0x0540de20) = 0x00000000 getprop(0x00000000, "device_type", 0x078efe90, 64) = -1 peer(0x00000000) = 0x0540de20
So when Morphos gets to the end of enumerating the PCI bus, "peer" returns a value of 0 which is correct according to the spec. However, Morphos seems to continue to plug this value back into "getprop" to retrieve a device type which of course fails. Finally it calls "peer" again on 0 which again according to spec should return the root node. And so it gets stuck in a loop trying to locate a peer for the root device and failing :(
I guess the only way to solve this would be to find out which bug MacOS firmware has and to emulate it, or ask the Morphos people to change their loader to follow the spec.
ATB,
Mark.