What I was trying to find out yesterday is what's missing from QEMU virtual open firmware for AmigaOS to boot. My boot loader would mostly be ready if that worked but I could not find out what it's missing. I can boot AmigaOS with it using the pegasos2.rom but with VOF AmigaOS does not start but crashes around the time it tries to access PCI devices. Not sure it it's still in the loader or in openfirmware.resource within the kernel but since it works with original firmware I think it's not something missing from the boot loader but something missing from the device tree under VOF. It does instatiate rtas and VOF has that as Linux also uses it and it works with that but AmigaOS does not seem to call the rtas yet but crashes between instantiating it and using it for PCI access. Does anybody know what it may do in that part and what it might need from the device tree at that point?
When using pegaoss2.rom I get:
CI_CALL nextprop 3 1
CI_CALL child 1 1
CI_CALL peer 1 1
CI_CALL peer 1 1
CI_CALL getprop 4 1 ph=0xfc54558 "cpu" => len=4 [00000000]
CI_CALL finddevice 1 1 /cpus
Invalid write at addr 0xFE000080, size 1, region '(null)', reason: rejected
Invalid write at addr 0x80, size 1, region '(null)', reason: rejected
pci_cfg_read sm501 00:01.0 @0x34 -> 0x0
pci_cfg_read vt8231-isa 00:0c.0 @0x34 -> 0xc0
pci_cfg_read vt8231-isa 00:0c.0 @0xc0 -> 0x0
pci_cfg_read vt8231-isa 00:0c.0 @0xc1 -> 0x0
pci_cfg_read via-ide 00:0c.1 @0x34 -> 0xc0
pci_cfg_read via-ide 00:0c.1 @0xc0 -> 0x1
when using VOF:
CI_CALL nextprop 3 1
CI_CALL child 1 1
CI_CALL peer 1 1
CI_CALL peer 1 1
CI_CALL getprop 4 1vof_getprop ph=0x4 "cpu" => len=-1 []
ph=0x4 "cpu" => len=4 [00000000]
CI_CALL finddevice 1 1 /cpus
vof_finddevice "/cpus" => ph=0x6
Invalid write at addr 0xFE000080, size 1, region '(null)', reason: rejected
Invalid write at addr 0x80, size 1, region '(null)', reason: rejected
invalid/unsupported opcode: 00 - 00 - 00 - 00 (00000000) 0182c350
Invalid write at addr 0xFFFFE1E0, size 4, region '(null)', reason: rejected
Invalid write at addr 0xFFFFE1DC, size 4, region '(null)', reason: rejected
Invalid write at addr 0xFFFFE1D8, size 4, region '(null)', reason: rejected
Invalid write at addr 0xFFFFE1E4, size 4, region '(null)', reason: rejected
Invalid write at addr 0xFFFFE1E8, size 4, region '(null)', reason: rejected
Both using my boot loader. It seems to get into a write loop or maybe pegasos2 firmware does something about setting up some MMU mappings on claim maybe? I'm stuck at this point at the moment.
Additionally if I break at the address giving me invalid 0 opcode at 0x0182c350 there seems to be code there at first but maybe something overwrites it so could be this is around when init-ing memory and uses some missing value that should come from the device tree but what?
Edited by balaton on 2023/7/16 14:02:25
Edited by balaton on 2023/7/16 14:25:58