@joerg The CPU core in PPC440EP and PPC46EX are PPC 440 but other peripherals in the SoC are differnent. Only the EX versions have PCIe but there exist 405EX with a 405 core as well so these may be mix and match in different configs.
If you look at AmigaOS 4.1FE Update 2 there are different kernels for Sam440 and Sam460 in it so maybe these need to handle some differences in the SoC. You could check the datasheets to see what are these differences may be.
But what's the point of all this? It's proven that at least on some machines with only PCI AmigaOS is able to handle PCIe cards so then this should be fixable on pegasos2 unless there's something in the hardware that would prevent this but that's not likely as the firmware seems to be OK with the card. So this just need to be looked at by AEon/Hans and find out what's going on as they own the kernel and drivers. We've checked the firmware side and that seems to be working.
You need to add another device. For example -device sm501.
Your "black window" will display a line that the guest has initialized the display yet. Now click with your mouse button inside that window and type " /failsafe" io. An OK prompt will now appear on your terminal from which you've started qemu.
From there you can enter the usual boot command
Alternatively you can add a non existing VGA device: -device VGA,romfile=""
In case of my Radeon 9250, it suddenly shows the Smartfirmware output.
This is what i get when running qemu - I have stripped out extra devices, such as the passthrough gpu, and drives for now. I get a similar "UNHANDLED INT 10" issue with the passthrough gpu though.
$ qemu-system-ppc -L pc-bios -machine pegasos2 -bios pegasos2.rom -cdrom Peg2InstallCD.iso -serial stdio -vga none -device sm501 -device ati-vga
PegasosII Boot Strap (c) 2002-2003 bplan GmbH
Running on CPU PVR:000C0209
Enable L1 ICache... Done.
Reading W83194 : FAILED.
Setting Front Side Bus to 133MHz... FAILED.
Configuring DDR... Done.
Configuring PCI0... Done.
Configuring PCI1... Done.
Configuring ETH... Done.
Releasing IDE reset ... Done.
Configuring Legacy Devices
Initializing KBD... Done.
Testing 10000000 Bytes, Pass: 00000000 Failed: 00000000
RAM TEST (fill linear)... Done.
FFFFFFFF
SmartFirmware:
cpu0: PowerPC,G4 CPUClock 599 Mhz BUSClock 133 Mhz (Version 0x000C,0x0209)
no/bad nvramrc - performing default startup script
channel 1 unit 0 : atapi | QEMU DVD-ROM | 2.5+
ATA device not present or not responding
MISC: UNHANDLED 32 BIT DATA PREFIX
AT CS:IP = 0000C000:000033EF 99
INTERNAL ERROR: 0000000A=UNHANDLED 32BIT PREFIX
EAX=0000 EBX=0000 ECX=0000 EDX=0000 ESP=0000 EBP=0000 ESI=0000 EDI=0000
AX=1407 BX=0190 CX=4E04 DX=0000 SP=FFAE BP=FFD2 SI=0008 DI=0280
DS=1000 ES=C000 SS=1000 CS=C000 IP=33F2 NV UP -- PL NZ NA PO NC
CS:IP = F7
STACK: 0000 0000 0000 0000 0000 0000 0000 0000
00: FE00 F000 FE01 F000 FE02 F000 FE03 F000
10: FE04 F000 FE05 F000 FE06 F000 FE07 F000
20: FE08 F000 FE09 F000 FE0A F000 FE0B F000
30: FE0C F000 FE0D F000 FE0E F000 FE0F F000
40: FE10 F000 FE11 F000 FE12 F000 FE13 F000
50: FE14 F000 FE15 F000 FE16 F000 FE17 F000
60: FE18 F000 FE19 F000 FE1A F000 FE1B F000
70: FE1C F000 FE1D F000 FE1E F000 FE1F F000
80: FE20 F000 FE21 F000 FE22 F000 FE23 F000
90: FE24 F000 FE25 F000 FE26 F000 FE27 F000
A0: FE28 F000 FE29 F000 FE2A F000 FE2B F000
B0: FE2C F000 FE2D F000 FE2E F000 FE2F F000
C0: FE30 F000 FE31 F000 FE32 F000 FE33 F000
D0: FE34 F000 FE35 F000 FE36 F000 FE37 F000
E0: FE38 F000 FE39 F000 FE3A F000 FE3B F000
F0: FE3C F000 FE3D F000 FE3E F000 FE3F F000
00: FE40 F000 FE41 F000 FE42 F000 FE43 F000
10: FE44 F000 FE45 F000 FE46 F000 FE47 F000
20: FE48 F000 FE49 F000 FE4A F000 FE4B F000
30: FE4C F000 FE4D F000 FE4E F000 FE4F F000
Failed to emulate CS:IP [C000:33F1]=66,F7,FE,66,0F,B7
UNHANDLED INT 10 FUNCTION 0100 WITHIN EMULATION
EA: BYTE READ FROM UNINITIALIZED LOW MEM 0040:0085
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
entering main read/eval loop...
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 FUNCTION 1301 WITHIN EMULATION
If I click into the 'black window' to type " /failsafe" io, then it adds extra UNHANDLED lines for every key press, and OK does not appear. Something must be different or not set up correctly.
My issue was my keyboard keymap (en-gb) was different between QEMU and the OS, so instead of " (shift+2 for me) it was using @.
That took a while but I can play around with passthrough a bit more now.
But what's the point of all this? It's proven that at least on some machines with only PCI AmigaOS is able to handle PCIe cards
Only on machines with U-Boot.
Quote:
so then this should be fixable on pegasos2 unless there's something in the hardware that would prevent this but that's not likely as the firmware seems to be OK with the card.
I doubt it's hardware (or hardware emulation) related, but the Firmware configuring 64 bit BARs as 64 bit "x" instead of 32 bit "m" BARs, which the AmigaOS Pegasos2 kernel may not support. If that's the case it would require changes in the Pegasos2 kernel, the slb (slb_v2, amigaboot.(ub|of), Parthenope (which isn't usable anyway because it doesn't support any AmigaOS file system but only Linux (ext2fs) and AROS (SFS 1.84) ones)) can't fix it, nor can the AmigaOS gfx drivers.
If the source for the pegasos2 issue is the OS4 kernel then this is something that can only be fixed by aeon. I think that they have other priorities at the moment.
geennaam wrote:VFIO for the Sam460ex target results in qemu DMA errors. So for now that doesn't work
Do you mean passing through PCIe card as PCIe or PCI? It's expected that it won't work as PCIe card as the PCIe controller needs to be emulated better for the firmware to be able to find devices and make them usabble. I'm not sure about passing through as PCI card but maybe that wasn't tested on real hardware either as it's not needed when one has PCIe slot.
Ah, thanks for the hint. Maybe I can upgrade my Sam440 iso with the 460 kernel from Update2.
Why would you do that? Maybe check first if there's any difference then tha Kickstart files between the two CDs. Probably they are the same just have different kernel and drivers so you can already run the Sam460 version.
Does A1 XE use U-Boot? I only know pegasos2 and sam460ex so don't know what other machines have but Hans said it's from the pegasos2 era when U-Boot may not have been that popuiar.
Quote:
I doubt it's hardware (or hardware emulation) related, but the Firmware configuring 64 bit BARs as 64 bit "x" instead of 32 bit "m" BARs, which the AmigaOS Pegasos2 kernel may not support. If that's the case it would require changes in the Pegasos2 kernel, the slb (slb_v2, amigaboot.(ub|of), Parthenope (which isn't usable anyway because it doesn't support any AmigaOS file system but only Linux (ext2fs) and AROS (SFS 1.84) ones)) can't fix it, nor can the AmigaOS gfx drivers.
Well, if the only problem is that pegasos2 firmware reports the BARs as 64 bit instead of 32 bit then this may be patched from Forth by replacing the assigned addresses and reg properties with the same values but showing 32bit for AmigaOS. As this happens at the OK prompt after the fiemware has init the card and mapped its resources the firmware does not care any more and then nothing else needs to be modified in AmigaOS either. Somebody would just need to find out the forth code to do that. It would need to read and parse the reg and assigned-addresses properties of the card then create equivalent properties with the BAR type changed to 32 bit. Even though this may not be trivial in Forth there should be some example code for this on-line. For general Forth introduction see https://www.forth.com/starting-forth/ and for the properties format the PCI binding doc I've quoted before. Is there anybody who wants to give this a try?
Update: If this works then the same could be done from amigaboot.of, loader.of or from the replacement amigaboot if we need it to work with QEMU VOF so this may still be slovable withot modifying everyhing else.
Running my Sam440 install CD in the Sam460ex target results in a kernel panic.
Yes, that's for a different machine than what QEMU emulates. You need the corresponding AOS version. Just updateing the kernel is not enough as other drivers for the Sam640 may also be needed.
@geennaam See info qtree to find out. Just adding devices without any bus will go to PCI that is called pci.0. The 1x PCIe is pcie.0 and the 4x PCIe is pcie.1 but these don't work yet. Also you can't use the 1x bus because it's set to SATA as we don't have NVRAM to change settings. So unleds you had bus=pcie.1 in the vfio-pci when you got the errors then the card was passed as PCI. Maybe we could check similar infos from U-Boot but I don't know how to get those. U-Boot shold have some help or docs. Also there's an info pci command in the QEMU montitor that only lists the PCI devices but info qtree is more detailed and shows the relation to buses.
@geennaam You may be violating the license by modifying the CD that way so you should not do that. (I know that adding the sm502 driver to pegasos2 cd is also similar but at least that's not running a completely different version on a machine it wasn't intended for). So if you want to keep to the rules set by the owners of this software you sould buy the version you need. Otherwise they could have published a single version for all machines but that's not how they license it. If you don't care about the rules and get in trouble because of that that's your problem.
That is a weird warning. If you've read the eula then you should know that running OS4.1 on a thing else then the target machine is a violation of the eula. This also include modification of the iso (sm502 driver). This effectively means the end of the qemu OS4 effort.
@geennaam I also know about that but other OSes like macOS and Windows also have similar clauses in their license yet people still run those for a while. QEMU does not violate that license, it just emulates some hardware. People who run AmigaOS with QEMU may do something the license does not permit but that's not my problem. If the AmigaOS owners want to sell more copies of these CDs that otherwise nobody would buy as the machines they are made for not produced any more then maybe it's not a wise move to try to enforce that clause though.
Of course it's a means to sell more copies. But it is just cynical that you lecture me on a breach of the EULA when the whole QEMU effort is a breach of the EULA. QEMU is neither an amiga-branded nor amiga-licensed computer. If you want to abide to the rules then either stop cherry picking or don't try to lecture others. At this moment it's just for educational purposed for me. Actually the only reason why I am doing this is to help you in your effort. I own several real AmigaOnes so I'm not in need of qemu.
Quote:
This License allows you to install and use the AmigaOS on a single Amiga-branded or Amiga-licensed computer at a time