On 10/7/09 4:04 AM, Alexander von Gluck wrote:
Funny... I was just looking at this yesterday :). The fix mentioned got the PPC port working on real hardware alot further along (bootmenu now works fine, we can load the kernel and modules into memory on G3 and G4 systems but lock up attempting to jump into the kernel). qemu-system-ppc still does not boot as expected and you can't even get the bootmenu up.
Thanks - in a way, it's a good thing this issue is reproducible and isn't only happening to me ;)
I haven't tried it on real hardware - though I have a G3 I'd like to boot Haiku on, I figured I'd only try it once I get it to at least boot in QEMU.
Something somewhere is really fishy, between being unable to jump into the kernel on real hardware... and being unable to get into the menu on emulated hardware. I think it has something to do with the mmu code in the boot loader and how we lay out the page table on powerpc. Maybe the early boot issue is the real problem... and the real hardware will run a little further just because it is less susceptible to bugs? I've put my eyeballs on this for quite some time but can't fish out the issue. (my powerpc assembly is novice at best, that previous patch was from lots of research of the assembly code that was locking up) If anyone has any PowerPC assembly experience and access to hardware or qemu-system-ppc, please take a look at things to try and figure out what is going on. The PPC PCI drivers are incomplete, but until Haiku can at least load the kernel into memory on qemu/real hardware, little progress will be made on the PPC front.
I guess the next thing I'd try is adding some debug within QEMU, maybe that'd enlighten us about why it's locking up. I'll let you know if I find out anything... I don't have any experience with PPC assembly either except for some AltiVec, but obviously that doesn't help here.
FYI to Eric, if you play with the range of the for statement on line 994 in src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp and change it (incorrectly) to ' for (int32 i = 1; i< 8; i++) { ' the boot loader will get a little further and give a "failed to find cpu" message.
Yep, I also got to that point by commenting out the calls to ppc_set_segment_register.
Eric