[OpenBIOS] [morphos] MorphOS on QEMU

BALATON Zoltan balaton at eik.bme.hu
Fri Mar 7 01:03:57 CET 2014


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:

macio_scan:
macio_scan: found <mac-io> at 0x81080000
No more MacIO devices
Done scanning MacIO
openpic_init()
Resetting PIC
PIC reset
0xF80000E0 = 00000000
0xF80000E0 = 00000000
VendorID 0x0
I am CPU 0
IPVP0 Reg 0xa0000000
SYS_PreInit: Am I still alive?
SYS_PreInit: Am I yet still alive?


Quark 0.93 (29.11.2013) Copyright 1998-2013 by Ralph Schmidt, Mark Olsen

SYS_Init: MemoryPtr 0x00988000 MemoryEnd 0x10000000
SYS_CopyCPUHalConfig: CPU Version 0xc Revision 0x209
SYS_CopyCPUHalConfig: CPUClock 0 BUSClock 0 BusTicks 0
SYS_CopyCPUHalConfig: Ticks50Hz 20000000
SYS_CopyCPUHalConfig: CacheL1Type 0x0 CacheL1Flags 0x1000f
SYS_CopyCPUHalConfig: ICacheL1Size 32768 ICacheL1LineSize 32 ICacheL1Lines 1024
SYS_CopyCPUHalConfig: DCacheL1Size 32768 DCacheL1LineSize 32 DCacheL1Lines 1024
SYS_CopyCPUHalConfig: CacheL2Type 0x0 CacheL2Flags 0x0
SYS_CopyCPUHalConfig: ICacheL2Size 0 ICacheL2LineSize 0 ICacheL2Lines 0
SYS_CopyCPUHalConfig: DCacheL2Size 0 DCacheL2LineSize 0 DCacheL2Lines 0
SYS_CopyCPUHalConfig: CacheL3Type 0x0 CacheL3Flags 0x0
SYS_CopyCPUHalConfig: ICacheL3Size 0 ICacheL3LineSize 0 ICacheL3Lines 0
SYS_CopyCPUHalConfig: DCacheL3Size 0 DCacheL3LineSize 0 DCacheL3Lines 0
SYS_CopyCPUHalConfig: TLBEntries 0 TLBSets 0
MMU_SetupPageTable: MemoryPtr 0x00988000 MemoryEnd 0x10000000
MMU_SetupPageTable: PhysicalSpaceSize 0x11288000
MMU_Init_GetTableSize: AddressPhySpace 0x11288000 must be covered
MMU_Init_GetTableSize: 0x20000000 Bytes covers all
MMU_Init_GetTableSize: 2^524288 mapped Pages
MMU_Init_GetTableSize: Number of PTEGs 0x00010000
MMU_SetupPageTable: PageTableSize 0x00400000
MMU_SetupPageTable: PageTable1 0xfc00000 PageTable2 0xc00000
MMU_SetupPageTable: PageTable 0xfc00000
MMU_SetupPageTable: SDR1 0x0fc0003f
MMU_SetupPageTable: HTABORG 0x0fc00000
MMU_SetupPageTable: HTABMASK 0x0000003f
MMU_SetupPageTable: Result 0x1
SYS_Init: New MemoryPtr 0x00988000 MemoryEnd 0x0fc00000
SYS_CreateMemList: MemoryPtr 0x988000 MemoryEnd 0xfc00000
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 0xfde7e20
SYS_MoveRomModuleToMemoryEnd: MyBoardNode 0x688314 MemoryStart 0x988000 MemoryEnd 0xfc00000
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 0xf870000
SYS_MoveRomModuleToMemoryEnd: [] 9421fe80 7c0802a6 90010184 3ca01139
SYS_MoveRomModuleToMemoryEnd: New BoardNode Address 0xf870000 Size 0x390000
SYS_MoveRomModuleToMemoryEnd: MemoryEnd 0xf870000
SYS_CreateMemList: Check Entry 1 VendorID 0x30000 DeviceID 0x3 Flags 0x1
SYS_CreateMemList: MyBoardNode 0x6883a4 Type 0x0 Name 0x68841c <ABox Module Rom>
SYS_CreateMemList: FunctionID 0x2 VendorID 0x30000 DeviceID 0x3 <>
SYS_CreateMemList: Address 0x4c0000 Size 0x1bb000 MapList 0xfde7e20
SYS_MoveRomModuleToMemoryEnd: MyBoardNode 0x6883a4 MemoryStart 0x988000 MemoryEnd 0xf870000
SYS_MoveRomModuleToMemoryEnd: Module 0x4c0000 0x1bb000
SYS_MoveRomModuleToMemoryEnd: CompressType 0x1 [] 434f4d31 003d00e0 001ba40c 7f800000
SYS_MoveRomModuleToMemoryEnd: Uncompress Module 0x4c0000(CSize 0x1bb000) Size 0x3d1000 CType 0x1
SYS_MoveRomModuleToMemoryEnd: Map it to 0xf49f000
SYS_MoveRomModuleToMemoryEnd: [] ff000000 101003c0 9421ffe0 7c0802a6
SYS_MoveRomModuleToMemoryEnd: New BoardNode Address 0xf49f000 Size 0x3d1000
SYS_MoveRomModuleToMemoryEnd: MemoryEnd 0xf49f000
SYS_CreateMemList: Check Entry 2 VendorID 0x30000 DeviceID 0x7 Flags 0x1
SYS_CreateMemList: Board not found
SYS_CreateMemList: Check Entry 3 VendorID 0x30000 DeviceID 0x4 Flags 0x1
SYS_CreateMemList: Board not found
SYS_CreateMemList: Check Entry 4 VendorID 0x30000 DeviceID 0x2 Flags 0x0
SYS_CreateMemList: Board not found
SYS_CreateMemList: Check Entry 5 VendorID 0x30000 DeviceID 0x6 Flags 0x0
SYS_CreateMemList: Board not found
SYS_CreateMemList: Check Entry 6 VendorID 0x30000 DeviceID 0x8 Flags 0x0
SYS_CreateMemList: Board not found
SYS_CreateMemList: VModuleTable 0xf870000 0xfc00000 Size 0x390000
SYS_CreateMemList: VModuleTable 0xf49f000 0xf870000 Size 0x3d1000
SYS_CreateMemList: VModuleTable 0x0 0x0 Size 0x0
SYS_CreateMemList: VModuleTable 0x0 0x0 Size 0x0
SYS_CreateMemList: VModuleTable 0x0 0x0 Size 0x0
SYS_CreateMemList: VModuleTable 0x0 0x0 Size 0x0
SYS_CreateMemList: VModuleTable 0x0 0x0 Size 0x0
SYS_CreateMemList: VModuleTable 0xfc00000 0x10000000 Size 0x400000
SYS_CreateMemList: Final MemoryPtr 0x988000 MemoryEnd 0xf49f000
SYS_CreateMemList: MemoryPtr 0x988000
SYS_FindFreeMemArea: MemoryPtr 0x988000 MemoryEnd 0xf49f000
SYS_FindFreeMemArea: PMemoryPtr 0x988000 PAreaEnd 0xf49f000
SYS_FindFreeMemArea: Current Module[0] 0xf870000 0xfc00000
SYS_FindFreeMemArea: Current Module[1] 0xf49f000 0xf870000
SYS_FindFreeMemArea: New CurrentEnd 0xf49f000
SYS_FindFreeMemArea: Current Module[2] 0x0 0x0
SYS_FindFreeMemArea: skip
SYS_FindFreeMemArea: Current Module[3] 0x0 0x0
SYS_FindFreeMemArea: skip
SYS_FindFreeMemArea: Current Module[4] 0x0 0x0
SYS_FindFreeMemArea: skip
SYS_FindFreeMemArea: Current Module[5] 0x0 0x0
SYS_FindFreeMemArea: skip
SYS_FindFreeMemArea: Current Module[6] 0x0 0x0
SYS_FindFreeMemArea: skip
SYS_FindFreeMemArea: Current Module[7] 0xfc00000 0x10000000
SYS_FindFreeMemArea: FreeAreaSize 0xeb17000
SYS_CreateMemList: FreeAreaSize 0xeb17000
SYS_CreateMemList: EndArea MemoryPtr 0xf49f000
SYS_CreateMemList: SkipAreaSize 0x0
SYS_CreateMemList: MemoryPtr 0xf49f000
SYS_CreateMemList: MemoryPtr 0x0f49f000 MemoryEnd 0x0f49f000
SYS_Init: RamDebug Start 0x10000000 Size 0x400000
SYS_Init: Initializing RamDebug at 0xf09f000 Size 0x400000
SYS_Init: RamDebug log start
SYS_Init: create MyBase->KernelMemPool
SYS_Init: HalConfig 0x684348
SYS_Init: KernelMemPool 0x988000
SYS_Init: HalConfig 0x684348
SYS_Init: InitStack 0x9880a0 size 0x1000
SYS_Init: HalConfig 0x684348
SYS_Start: HalConfig 0x684348
SYS_Start: Alloc Interrupt Stacks for CPU 0
SYS_Start: CPU 0 IntStack 0x98a030
SYS_Start: Load CPU 0 stack 0x98b020
SYS_Start: MMU_CreateTable()
*********************************
*********************************
*********************************
*********************************
*********************************
*********************************
Alert: 0x1005
Alert: SYS_MMUAddPage: Page 0x80000 EndPage 0x81000 already exists
*********************************
*********************************
*********************************
*********************************
*********************************
*********************************
Alert: 0x1005
Alert: SYS_MMUAddPage: Page 0xf2000 EndPage 0xf2001 already exists
SYS_Start: done
SYS_Start: Create Initial Kernel Threads
SYS_Start: Create System Chief Thread
SYS_Start: done
SYS_Start: Create Exception Server Thread
SYS_Start: done
SYS_Start: Create SystemInit Thread
SYS_Start: done
SYS_Start: done
SYS_Start: MasterClanChiefTID 0x10000000 ExceptionTID 0x10000010 SystemInitTID 0x10000011 CPUTimerServerTID 0x0 KernelPID 0x10000000
SYS_Start: Enable Interrupts
SYS_Start: Start first thread
SYS_Start: MSR 0x3030

Can you tell if the above are good or something is obviously wrong here? 
Can you give any tips on how to continue from here?

This is starting to look promising but without a working console I don't 
really know if it's working yet or not. For the graphics card I have these 
three ideas:

1. Find a supported card I can plug in my host and try to pci pass through 
it. QEMU people said this may be problematic as this was not tested very 
well. (And I don't have a suitable card yet either.)

2. Maybe MorphOS can use some generic graphics card (VESA frame buffer) or 
can have drivers to one of the virtual graphics cards supported by QEMU 
(QXL, VMWare).

3. There exists an open source Voodoo1-3 emulation that may be possible to 
be adapted to QEMU if this would work with MorphOS but I'm not sure how 
much work would this be.

Any comments on this?

Regards,
BALATON Zoltan



More information about the OpenBIOS mailing list