[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] MorphOS 4.x on QEMU
From: |
BALATON Zoltan |
Subject: |
Re: [Qemu-ppc] MorphOS 4.x on QEMU |
Date: |
Thu, 13 Mar 2014 16:55:45 +0100 (CET) |
User-agent: |
Alpine 2.02 (LMD 1266 2009-07-14) |
Hello,
I'm still trying to find out how to boot MorphOS on QEMU. I think at least
some of the problems come from MorphOS being confused about the memory
layout. Not sure if this is because of incorrect assumptions on its side
or bugs in the OpenBIOS supplied device tree but so far I've found out the
following. I'll put the questions first hoping that more people read and
answer it this way. For detailed explanation see below. Here are the
questions:
1. Is there a way to move the VGA mapping after the macio one? I've tried
-vga none but I need to type a boot command and without a graphics card
the console and QEMU monitor both ended up on stdio and mixed up. I guess
OpenBIOS creates mappings in the order of the device number of the cards.
How can I change the device number of the VGA? Like putting it in a
different slot or otherwise make it mapped after the on-board devices.
2. Another difference between the memory maps seems to be that on hardware
the pci controller gets f2000000 and f3000000 and on QEMU it's f2000000
and f2800000. Can this alignement be changed somewhere? I think it is in
OpenBIOS somewhere but where?
Now for the details:
The memory map of real hardware according to the device tree dump found
here
(http://web.archive.org/web/20090107145016/http://penguinppc.org/historical/dev-trees-html/g4_agp_400_1.html#.)
looks like this:
00000000-0fffffff /memory
80000000-8fffffff /address@hidden
80000000-8007ffff /address@hidden/pci-bridge/mac-io
80000050-8000007f /address@hidden/pci-bridge/mac-io/gpio
80008400-800084ff /address@hidden/pci-bridge/mac-io/escc-legacy
80008500-800085ff /address@hidden/pci-bridge/mac-io/escc-legacy
80008600-800086ff /address@hidden/pci-bridge/mac-io/escc-legacy
80008700-800087ff /address@hidden/pci-bridge/mac-io/escc-legacy
80008800-800088ff /address@hidden/pci-bridge/mac-io/davbus
80008900-800089ff /address@hidden/pci-bridge/mac-io/davbus
80008a00-80008aff /address@hidden/pci-bridge/mac-io/address@hidden
80008b00-80008bff /address@hidden/pci-bridge/mac-io/address@hidden
80008c00-80008cff /address@hidden/pci-bridge/mac-io/address@hidden
80012000-80012fff /address@hidden/pci-bridge/mac-io/escc-legacy
80013000-80013fff /address@hidden/pci-bridge/mac-io/escc
80014000-80014fff /address@hidden/pci-bridge/mac-io/davbus
80015000-80015fff /address@hidden/pci-bridge/mac-io/timer
80016000-80017fff /address@hidden/pci-bridge/mac-io/via-pmu
80018000-80018fff /address@hidden/pci-bridge/mac-io/i2c
8001f000-8001ffff /address@hidden/pci-bridge/mac-io/address@hidden
80020000-80020fff /address@hidden/pci-bridge/mac-io/address@hidden
80021000-80021fff /address@hidden/pci-bridge/mac-io/address@hidden
80083000-80083fff /address@hidden/pci-bridge/address@hidden
80040000-8007ffff /address@hidden/pci-bridge/mac-io/interrupt-controller
90000000-90003fff /address@hidden/ATY,Rage128s
90020000-9003ffff /address@hidden/ATY,Rage128s
94000000-97ffffff /address@hidden/ATY,Rage128s
f0000000-f07fffff /address@hidden
f1000000-f1ffffff /address@hidden
f2000000-f27fffff /address@hidden
f3000000-f3ffffff /address@hidden
f8000000-f8ffffff /uni-n
f8001000-f8001fff /uni-n/i2c
ff800000-ffffffff /rom
fff00000-ffffffff /rom/boot-rom
fff04000-fff07fff /nvram
In QEMU things are mapped differently:
Bus 0, device 11, function 0:
Host bridge: PCI device 106b:0020
id ""
Bus 0, device 12, function 0:
VGA controller: PCI device 1234:1111
BAR0: 32 bit prefetchable memory at 0x80000000 [0x80ffffff].
BAR2: 32 bit memory at 0x81000000 [0x81000fff].
BAR6: 32 bit memory at 0x81010000 [0x8101ffff].
id ""
Bus 0, device 13, function 0:
Class 65280: PCI device 106b:0022
IRQ 28.
BAR0: 32 bit memory at 0x81080000 [0x810fffff].
id ""
Bus 0, device 14, function 0:
Serial port: PCI device 1b36:0002
IRQ 29.
BAR0: I/O at 0x0400 [0x0407].
id ""
00000000-ffffffff (prio 0, RW): system
00000000-0fffffff (prio 0, RW): ppc_core99.ram
80000000-efffffff (prio 0, RW): alias pci-hole @pci-mmio 80000000-efffffff
f0000510-f0000511 (prio 0, RW): fwcfg.ctl
f0000512-f0000512 (prio 0, RW): fwcfg.data
f0800000-f0800fff (prio 0, RW): pci-conf-idx
f0c00000-f0c00fff (prio 0, RW): pci-conf-data
f2000000-f27fffff (prio 0, RW): alias isa_mmio @io 00000000-007fffff
f2800000-f2800fff (prio 0, RW): pci-conf-idx
f2c00000-f2c00fff (prio 0, RW): pci-conf-data
f3000000-f3000fff (prio 0, RW): unin
f8000000-f8000fff (prio 0, RW): unin
fff00000-ffffffff (prio 0, R-): ppc_core99.bios
fff04000-fff07fff (prio 0, RW): macio-nvram
I/O
00000000-0000ffff (prio 0, RW): io
000001ce-000001ce (prio 0, RW): vbe
000001d0-000001d0 (prio 0, RW): vbe
000003b4-000003b5 (prio 0, RW): vga
000003ba-000003ba (prio 0, RW): vga
000003c0-000003cf (prio 0, RW): vga
000003d4-000003d5 (prio 0, RW): vga
000003da-000003da (prio 0, RW): vga
00000400-00000407 (prio 1, RW): serial
uni-north-agp
VGA
macio-newworld
pci-serial
aliases
pci-mmio
00000000-ffffffff (prio 0, RW): pci-mmio
00000000-ffffffff (prio 0, RW): pci-mmio
000a0000-000affff (prio 2, RW): alias vga.chain4 @vga.vram
00000000-0000ffff
000a0000-000bffff (prio 1, RW): vga-lowmem
80000000-80ffffff (prio 1, RW): vga.vram
81000000-81000fff (prio 1, RW): vga.mmio
81000400-8100041f (prio 0, RW): vga ioports remapped
81000500-81000515 (prio 0, RW): bochs dispi interface
81010000-8101ffff (prio 1, RW): vga.rom
81080000-810fffff (prio 1, RW): macio
81088000-81088fff (prio 0, RW): dbdma
81092000-810920ff (prio 0, RW): escc-legacy
81093000-8109303f (prio 0, RW): alias escc-bar @escc 00000000-0000003f
81095000-81095fff (prio 0, RW): timer
81096000-81097fff (prio 0, RW): cuda
810a0000-810a0fff (prio 0, RW): pmac-ide
810a1000-810a1fff (prio 0, RW): pmac-ide
810c0000-810fffff (prio 0, RW): openpic
810c0000-810c10ef (prio 0, RW): glb
810c10f0-810c130f (prio 0, RW): tmr
810d0000-810d1fff (prio 0, RW): src
810e0000-810ff0ff (prio 0, RW): cpu
io
00000000-0000ffff (prio 0, RW): io
000001ce-000001ce (prio 0, RW): vbe
000001d0-000001d0 (prio 0, RW): vbe
000003b4-000003b5 (prio 0, RW): vga
000003ba-000003ba (prio 0, RW): vga
000003c0-000003cf (prio 0, RW): vga
000003d4-000003d5 (prio 0, RW): vga
000003da-000003da (prio 0, RW): vga
00000400-00000407 (prio 1, RW): serial
vga.vram
80000000-80ffffff (prio 1, RW): vga.vram
escc-bar
00013000-0001303f (prio 0, RW): alias escc-bar @escc 00000000-0000003f
escc
00000000-0000003f (prio 0, RW): escc
The main difference is that macio is mapped from 81000000 on hardware
whereas it ends up at 81080000 on QEMU due to the VGA adapter is mapped
before it. Despite this, MorphOS seems to try to talk to via-pmu/cuda at
80016000, although it can seemingly talk to openpic and can find an IDE
controller at 810a2000 (which is missing from qemu mtree but present in
the device tree, also it looks for ide controllers named ata-4 and ata-3
which is indeed all three are called on hardware, strange...). The wrong
cuda address looks like a MorphOS bug because it is correctly represented
in the device tree as far as I can tell but the MorphOS developers are not
that helpful so far so if there's an easy way to move the macio mapping to
where it is on real hardware this would help.
The other errors I get that may be related to the memory map differences
are these:
Alert: SYS_MMUAddPage: Page 0x80000 EndPage 0x81000 already exists
Alert: SYS_MMUAddPage: Page 0xf2000 EndPage 0xf2001 already exists
I don't know what these mean but bringing the memory layout closer to
hardware may solve it or provide some more clues.
Regards,
BALATON Zoltan
Re: [Qemu-ppc] MorphOS 4.x on QEMU, Mark Cave-Ayland, 2014/03/13