[haiku] Re: Haiku on PowerPC - try 2. GREAT SUCCESS!

  • From: Alexander von Gluck <kallisti5@xxxxxxxxxxx>
  • To: <haiku@xxxxxxxxxxxxx>
  • Date: Wed, 22 Jul 2009 17:03:33 -0500

On Wed, 22 Jul 2009 17:47:08 +0200, Alexander Baldeck <kth5@xxxxxxxxx>
wrote:
> Alexander von Gluck wrote:
> Afaik, GCC - unlike on x86 from 4.3 on - doesn't automatically chose 
> optimization flags on PPC. For as long as you don't force -mabi or
> use -mcpu you'll be fine.

HAHAHA!

I have found the problem in the boot loader.  I was right that it was
getting choked up at the exact same spot in QEMU and on the PowerBook.

The following code is causing the bootloader to freeze up in qemu and G3
systems:
src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp
"
// set up new page table and turn on translation again

for (int32 i = 0; i < 16; i++) {
ppc_set_segment_register((void *)(i * 0x10000000), sSegments[i]);
// one segment describes 256 MB of memory
}
"

commenting out ppc_set_segment_register lets the bootloader come up the
rest of the way.  This is not a fix as I am just bypassing code that may be
required to boot the kernel, but at least it's good progress.

Screenshots of this modification allowing the boot to finish on a real
powerpc system and QEMU are attached.  The lock ups may be just occurring
only after ppc_set_segment_register runs x number of times so i am going to
do a puts in this for loop.

If I can determine if this is not needed, or find why it works sometimes
and not others ill produce a patch.


blurry and not so blurry photos attached.

-- 
Thanks!
Alexander von Gluck
http://unixzen.com
PGP: F079C049
Google Voice: 832-592-7635

Attachment: 2009-07-22 16.50.57.jpg
Description: JPEG image

Attachment: success.png
Description: PNG image

Other related posts: