[OpenBIOS] [morphos] MorphOS on QEMU

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Mar 7 20:20:53 CET 2014


On 07/03/14 00:03, BALATON Zoltan wrote:

> On Thu, 6 Mar 2014, laire at t-online.de wrote:
>> The new log is beyond the Openfirmware stage. Can't really say why it
>> fails now. Could be a side effect to unexpected data from OpenBIOS or
>> unusual powerpc usage. But without looking deeper into this I wouldn't
>> know what the root cause is.
>
> I've debugged it a bit further and here is the result:
>
> Breakpoint 3, 0x00441dec in ?? ()
> (gdb) info reg
> r0 0x434f4d31 1129270577
> r1 0x7de7d90 132021648
>
> note the stack pointer and compare this with the log:
>
>> SYS_Init: New MemoryPtr 0x00988000 MemoryEnd 0x07e00000
>> SYS_CreateMemList: MemoryPtr 0x988000 MemoryEnd 0x7e00000
>> SYS_CreateMemList: Check Entry 0 VendorID 0x30000 DeviceID 0x1 Flags 0x1
>> SYS_CreateMemList: MyBoardNode 0x688314 Type 0x0 Name 0x68838c <ABox Rom>
>> SYS_CreateMemList: FunctionID 0x1 VendorID 0x30000 DeviceID 0x1 <>
>> SYS_CreateMemList: Address 0x445000 Size 0x7b000 MapList 0x7de7e20
>> SYS_MoveRomModuleToMemoryEnd: MyBoardNode 0x688314 MemoryStart
>> 0x988000 MemoryEnd 0x7e00000
>> SYS_MoveRomModuleToMemoryEnd: Module 0x445000 0x7b000
>> SYS_MoveRomModuleToMemoryEnd: CompressType 0x1 [] 434f4d31 0038fd60
>> 0007ae06 4a085fc8
>> SYS_MoveRomModuleToMemoryEnd: Uncompress Module 0x445000(CSize
>> 0x7b000) Size 0x390000 CType 0x1
>> SYS_MoveRomModuleToMemoryEnd: Map it to 0x7a70000
>
> if I'm reading this right it copies data to 0x7a70000-0x7e00000 which
> will overwrite the stack. I tried with larger memory (256M instead of
> the default 128M) to see if it helps and here's what I've got:
>
> Breakpoint 2, 0x00441dec in ?? ()
> (gdb) info reg
> r0 0x434f4d31 1129270577
> r1 0xfde7d90 266239376
>
> and the log also looks much better now:

(cut)

Yes, this definitely looks better. In terms of the memory size, does 
MorphOS have a minimum memory requirement of 256MB? Otherwise, are you 
using the debug binary openbios-qemu.elf.nostrip rather than the 
stripped version? The reason for asking is that arch/ppc/qemu/ofmem.c 
declares OF_CODE_SIZE as 0x00100000 (1MB) whilst the debug file is 
~1.4MB on my system here.

Does either increasing this to 2MB or swapping to use the stripped 
openbios-qemu.elf binary at 128MB help at all?


ATB,

Mark.



More information about the OpenBIOS mailing list