Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
67 user(s) are online (37 user(s) are browsing Forums)

Members: 0
Guests: 67

more...

Headlines

Forum Index


Board index » All Posts (balaton)




Re: Qemu Pegasos II interrupts issue
Quite a regular
Quite a regular


@Hans
Interrupts probably only retrigger if level sensitive is used so is it set correctly in PIC? Does this only happen with BBoot or also with booting from pegasos2.rom? If only with BBoot maybe we're missing some PIC or other init that the firmware does normally.

I've checked the docs and emulation. VIA southbridges function 0 (ISA bridge) config register 0x54 is documented to set PIRQ inputs to edge or level sensitive, default is level sensitive. BBoot sets this for amigaone but not for pegasos2 but this does not matter as this register is not emulated and always set to level sensitive. This is (more or less) implemented in qemu/hw/isa/vt82c686.c::via_isa_set_irq(). It should keep track of interrupt states and keep the interrupt raised as long as there's one source active. But PIRQ pins are kept track together so if a PCI device uses more than one pin (PCI has INTA-INTD) or maybe if more than one device uses the same pin (but the latter should be handled by the PCI emulation so should not be a problem) it might clear PCI interrupts. I wonder if uint16_t mask = BIT(f) calculation should be moved after the switch (f) to keep track of PIRQ pins separately?

After that it goes to the i8259 PIC emulation and I don't know what that does with it and when does it raise the CPU interrupt. That may need to be checked separately but no time for that and without being able to test and reproduce the issue it's hard to check.

Does this patch help at all with this issue?


Edited by balaton on 2024/4/10 22:50:15
Edited by balaton on 2024/4/10 22:52:09
Edited by balaton on 2024/4/10 22:56:22
Edited by balaton on 2024/4/10 23:34:30
Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


The call to OS4 that queries the bridge device does not fail but when the PCI bridge is found SFS then checks for the Pericom bridge and that's not there so then returns 0 from the function that checks for bridges but I don't know if that's normal or not, maybe it fails later. Even adding a pericom bridge device does not make it work. It would be simpler for @joerg to check the source than for me to debug a binary only blob.

Could somebody with a real sam460 (any variant may probably do if no EX is available) post the output of lspci or showconfig to see what devices exist on real machine? Maybe the bridge is different on real machine and that's why it fails? I could not find any useful logs on-line so far from real sam460. Also could somebody with real SAM460 confirm which SFS versions work on real machine? (We have 1.277 on Aminet, 1.286 on 4.1Upd1, 1.290 in 4.1Upd5 and later including 4.1FE and 1.293 in Enhancer that I don't have. Could somebody with real sam460 test which of these work and which don't to avoid any issues with that.)

Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


It looks like the function that checks PCI bridges returns 0 and that makes it exit. Even if it finds 1014:27f it goes on trying 12d8:8150 then exits with 0 which the caller treats as an error and closes dos.library and exits (even if I add a dummy 8150 bridge device to sam460ex). At least that's what I think without the source. If you have the source please check this function and tell me what it may be missing on QEMU that it checks additionally to PCI device IDs. It may be some property of the PCI bridge is missing on QEMU that it looks for.

Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


@joerg
OK, I don't have Enhancer but we should aim to fix it for 1.290 that's on the install CD otherwise it would be difficult to install a system. I assume that version should work on real hardware if it comes with the sam460 install CD.
If I enable WaitPkt/ReplyPkt logs in Snoopy I also get the same logs but the ReplyPkt is followed by close(dos.library) on QEMU sam460ex.

Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


Where does SFS version 1.293 come from? The install CD seems to have 1.290 and did not find a new version in updates 1 and 2.
The Aminet 1.277 version also fails on pegasos2 the same way as 1.290 on sam460ex but 1.290 works on pegasos2. I'm still lost about what makes it exit on sam460ex. This happens somewhere after it checked the system type but before opening other libraries.

Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


On pegasos2 where it recognises the same USB driver with SFS I get:
00020 USB Fkt Init    o.k. = CreateNewProc("USB FD fkt start") [324uS]
00021 USB FD fkt start 0    FindSegmentStackSize("<untracked>") [10uS]
00022 USB FD fkt start o.k. = [execOpenDevice("usbsys.device",0,0x6E4B64E0,0x00000000) = [37uS]
00023 USB FD fkt start o.k. = [execOpenLibrary("massstorage.usbfd",0) [41uS]
00024 massstorage.usbfd o.k. = [execOpenDevice("usbsys.device",0,0x6E4B62A0,0x00000000) = [48uS]
00025 massstorage.usbfd :        [execCloseDevice("usbsys.device") [20uS]
00026 massstorage.usbfd FAIL GetVar("USB/FD/MassStorage/DOSNAME",0x02331B50,32,0x00000000) [919uS]
00027 massstorage.usbfd FAIL GetVar("USB/FD/MassStorage/CX_POPKEY",0x02331B70,128,0x00000000) [2629uS]
00028 : 
DH1/SmartFilesystem 1.290  0    FindSegmentStackSize("<untracked>") [7uS]
00029 : 
DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("dos.library",39) [17uS]
00030 DH1/SmartFilesystem 1.290  FAIL = [execOpenResource("newfilesystem.resource") [6uS]
00031 DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("expansion.library",51) [3uS]
00032 DH1/SmartFilesystem 1.290  :        [execCloseLibrary("expansion.library") [11uS]
00033 DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("intuition.library",39) [10uS]
00034 DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("utility.library",39) [3uS]
00035 DH1/SmartFilesystem 1.290  o.k. = [execOpenDevice("timer.device",1,0x6E1E6790,0x00000000) = [27uS]
00036 DH1/SmartFilesystem 1.290  o.k. = [execOpenDevice("timer.device",1,0x6E1E6760,0x00000000) = [13uS]
00037 ramlib          o.k. = [execFindResident("diskcache.library") [35uS]
00038 : 
ramlib          o.k. = [execOpenLibrary("newlib.library",3) [8uS]
00039 : 
DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("diskcache.library",3) [172140uS]
00040 DH1/SmartFilesystem 1.290  o.k. = [execOpenDevice("usbdisk.device",0,0x6E1E67F0,0x00000000) = [40uS]
00041 DH1/SmartFilesystem 1.290  o.k. = [execOpenDevice("usbdisk.device",0,0x6E4873F0,0x00000000) = [18uS]
00042 DH1/SmartFilesystem 1.290  FAIL = [execFindPort("SFS DosList handler") [29uS]
00043 DH1/SmartFilesystem 1.290  o.k. = CreateNewProc("SFS DosList handler") [314uS]
00044 DH1/SmartFilesystem 1.290  FAIL = [execFindPort("SFS DosList handler") [7uS]
00045 SFS DosList handler 0    FindSegmentStackSize("<untracked>") [8uS]
00046 SFS DosList handler o.k. = [execOpenLibrary("dos.library",39) [12uS]
00047 SFS DosList handler FAIL = [execFindPort("SFS DosList handler") [6uS]
00048 : 
DH1/SmartFilesystem 1.290  o.k. = [execFindPort("SFS DosList handler") [9uS]
00049 : 
DH1/SmartFilesystem 1.290  o.k. = MakeDosEntry("

00050 : SFS DosList handler : o.k. = AddDosEntry("
Test")
00051 : DH1/SmartFilesystem 1.290  : o.k. = [exec] OpenDevice("
input.device",0,0x6E4872A0,0x00000000) = 0 [36uS]
00052 : DH1/SmartFilesystem 1.290  :        [exec] CloseDevice("
input.device") [4uS]
00053 : Mounter Companion Process : o.k. = MountDevice("
DH1:",MDT_FileSystem,0x6EF81E48) [307566uS]
00054 : USB FD fkt start :        [exec] CloseLibrary("
massstorage.usbfd") [19uS]
00055 : USB FD fkt start :        [exec] CloseDevice("
usbsys.device") [4uS]
00056 : USB Fkt Init    :        [exec] CloseDevice("
usbsys.device") [159uS]
00057 : USB Fkt Init    :        [exec] CloseDevice("
usbsys.device") [6uS]

Maybe this gives @joerg or sombody else an idea at what point it could fail so we can check that further.

Edit: SFS version 1.277 from Aminet seems to only search for amigone PCI bridge so it does not seem to have sam specific code but still exits the same as above:
00001 USB Fkt Init    0    FindSegmentStackSize("<untracked>") [35uS]
00002 USB Fkt Init    o.k. = [execOpenDevice("usbsys.device",0,0x6DEE0B50,0x00000000) = [136uS]
00003 USB Fkt Init    FAIL Lock("PROGDIR:",SHARED) [47uS]
00004 USB Fkt Init    o.k. = Lock("LOCALE:",SHARED) [19731uS]
00005 USB Fkt Init    FAIL Open("LOCALE:Catalogs/english/sys/usbclasses.catalog",OLD) = [0x00000000] [5957uS]
00006 USB Fkt Init    FAIL Open("LOCALE:Catalogs/english_UTF-8/sys/usbclasses.catalog",OLD) = [0x00000000] [26235uS]
00007 USB Fkt Init    FAIL Open("LOCALE:Catalogs/english_US_ASCII/sys/usbclasses.catalog",OLD) = [0x00000000] [26573uS]
00008 : 
USB Fkt Init    o.k. = CreateNewProc("USB FD fkt start") [993uS]
00009 : 
USB FD fkt start 0    FindSegmentStackSize("<untracked>") [13uS]
00010 USB FD fkt start o.k. = [execOpenDevice("usbsys.device",0,0x6DEE06F0,0x00000000) = [93uS]
00011 USB FD fkt start o.k. = [execOpenLibrary("massstorage.usbfd",0) [86uS]
00012 massstorage.usbfd o.k. = [execOpenDevice("usbsys.device",0,0x6DEE0D50,0x00000000) = [191uS]
00013 massstorage.usbfd :        [execCloseDevice("usbsys.device") [18uS]
00014 massstorage.usbfd FAIL GetVar("USB/FD/MassStorage/DOSNAME",0x01F38FD0,32,0x00000000) [21212uS]
00015 massstorage.usbfd FAIL GetVar("USB/FD/MassStorage/CX_POPKEY",0x01F38FF0,128,0x00000000) [7537uS]
00016 DH1/SmartFilesystem 1.277  0    FindSegmentStackSize("<untracked>") [17uS]
00017 DH1/SmartFilesystem 1.277  o.k. = [execOpenLibrary("dos.library",39) [40uS]
00018 : 
DH1/SmartFilesystem 1.277  FAIL = [execOpenResource("newfilesystem.resource") [13uS]
00019 : 
DH1/SmartFilesystem 1.277  o.k. = [execOpenLibrary("expansion.library",51) [14uS]
00020 DH1/SmartFilesystem 1.277  :        [execCloseLibrary("expansion.library") [15uS]
00021 DH1/SmartFilesystem 1.277  :        [execCloseLibrary("dos.library") [7uS]
00022 Mounter Companion Process o.k. = MountDevice("DH1:",MDT_FileSystem,0x6FD7DE48) [46215uS]
00023 USB FD fkt start :        [execCloseLibrary("massstorage.usbfd") [24uS]
00024 USB FD fkt start :        [execCloseDevice("usbsys.device") [11uS]
00025 USB Fkt Init    :        [execCloseDevice("usbsys.device") [87uS]

So maybe it has nothing to do with sam specific parts but something in generic code does not behave on emulated PPC440 than on real machine? As there's no crash report or any error given I have no idea how to find where it stops.


Edited by balaton on 2024/4/7 17:02:28
Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


Yes, I've also found that on AOS4 one should use Snoopy instead of SnoopDOS I've tried to get some logs of attaching a USB drive with an SFS filesystem on it:
00009 : USB FD fkt start 0    FindSegmentStackSize("<untracked>") [13uS]
00010 USB FD fkt start o.k. = [execOpenDevice("usbsys.device",0,0x6E38AD60,0x00000000) = [99uS]
00011 USB FD fkt start o.k. = [execOpenLibrary("massstorage.usbfd",0) [84uS]
00012 massstorage.usbfd o.k. = [execOpenDevice("usbsys.device",0,0x6E38A6E0,0x00000000) = [109uS]
00013 massstorage.usbfd :        [execCloseDevice("usbsys.device") [18uS]
00014 massstorage.usbfd FAIL GetVar("USB/FD/MassStorage/DOSNAME",0x01F38FD0,32,0x00000000) [16313uS]
00015 massstorage.usbfd FAIL GetVar("USB/FD/MassStorage/CX_POPKEY",0x01F38FF0,128,0x00000000) [11931uS]
00016 DH1/SmartFilesystem 1.290  0    FindSegmentStackSize("<untracked>") [16uS]
00017 DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("dos.library",39) [40uS]
00018 : 
DH1/SmartFilesystem 1.290  FAIL = [execOpenResource("newfilesystem.resource") [13uS]
00019 : 
DH1/SmartFilesystem 1.290  o.k. = [execOpenLibrary("expansion.library",51) [15uS]
00020 DH1/SmartFilesystem 1.290  :        [execCloseLibrary("expansion.library") [16uS]
00021 DH1/SmartFilesystem 1.290  :        [execCloseLibrary("dos.library") [23uS]
00022 Mounter Companion Process o.k. = MountDevice("DH1:",MDT_FileSystem,0x6F3E4E48) [44203uS]
00023 USB FD fkt start :        [execCloseLibrary("massstorage.usbfd") [23uS]
00024 USB FD fkt start :        [execCloseDevice("usbsys.device") [9uS]
00025 USB Fkt Init    :        [execCloseDevice("usbsys.device") [14uS]

There's a FAIL while trying to open newfilesystem.resource but it still goes a bit further checking PCI bridges and exits somewhere after that. Without knowing what it tries to do it's hard to tell so I hope @joerg can remember something or check it and give some hints otherwise I'd need to do more experimenting. Also I'm not sure what else to enable in Snoopy to get more useful logs.

Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


So when a USB disk with an SFS partition is attached an SFS task is spawned but then it seems to exit. How to trace what it tries to do? Is there an strace equivalent? Something like SnoopDOS but maybe that only traces DOS calls and not what SFS calls at that point. If we can identify where SFS stops maybe we can find what's missing or different on emulated sam460ex which breaks it but I don't know how to do that under AmigaOS.
The kernel logs don't give enough info and using higher log levels generate too many unrelated logs that obscure the SFS task logs.

Go to top


Re: Qemu Pegasos II interrupts issue
Quite a regular
Quite a regular


@white
Maybe find the old thread or make a new one for these AmiCygnix experiments so this thread is kept for Hans's virtio-gpu issue.

Go to top


Re: QEMU, e500 and Linux
Quite a regular
Quite a regular


@Maijestro
Quote:
I carried out both measurements with the fastest session under Qemu. The Pegasos2 machine is currently still almost twice as fast as the Sam460 machine. I used Qemu 9 RC1 for this.

I wonder if that's because of AltiVec. Maybe you could also try pegasos2 with -cpu g3 (or one of the suitable 750 variants that SFS or whatever else likes, the difference between them I think is not emulated nor relevant so it just changes the PVR value) for comparison to confirm it's because of missing AltiVec or BookE CPU on sam460ex. In case it's AltiVec, these measurements may be different on x86_64.

Quote:
Usb-Storage "-device usb-storage,drive=ufat" cannot be used at the moment and leads to the machine not booting and a few errors being displayed via the firmware. I am not sure if this is a problem with the U-Boot firmware or if this support is simply missing.

That's a U-Boot issue, even on real machine but the updated U-Boot that fixes it is not available for download any more from aCube and the version that was used for QEMU is too old to fix this. You could avoid this by only adding the -drive if=none,id=ufat,... part to QEMU command line but not the -device usb-storage,drive=ufat and instead enter 'device_add usb-storage,drive=ufat' in QEMU monitor after boot to hot-plug the USB device so U-Boot does not see it. (I've tested this works while trying to debug SFS.) It's less convenient so maybe just use network share instead.

Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Quite a regular
Quite a regular


I have tried to find out why SFS does not work on QEMU sam460ex but since it does not log any error it's hard to see what happens. I've tried booting with debug kernel and logging enabled and it seems that SFS starts. (During startup it seems to look for PCI bridge to determine what system it's running on. It checks Mai Logic Articia S for amigaone, the bridge in 460EX for sam460 and a Pericom bridge that I don't know which system uses.) It seems a task for the volume is added but then after some other tasks are run it just exits for unknown reason. That's all I could find out and don't know how to debug this further. A shortened log excerpt is:
[_impl_InitCodeTesting module SmartFilesystem 1.290 (21.1.2011AmigaOS4 PPC (cJoerg Strohmayer <j_s@gmx.de>
[
_impl_InitCodeInitializing module SmartFilesystem 1.290 (21.1.2011AmigaOS4 PPC (cJoerg Strohmayer <j_s@gmx.de>
 [
_impl_InitResidentInitializing rom tag SmartFilesystem V1 (priority 79), init 0x014B3C20
[_impl_InitResidentInit function of SmartFilesystem V1 returned 0x6FF9F0C0
[_impl_AddTaskAdding Task 0x6FDF4620DH1/SmartFilesystem 1.290  (0x6FD58210)
[
RePostSignalReposting signals for task 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
[
RePostSignalDone reposting signals for task 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
# Then it stops running and other tasks are scheduled
[RePostSignalReady task is 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
[
RePostSignalReady task is 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
[
_impl_SetTaskPriChanging DH1/SmartFilesystem 1.290  priority to -10
# it's still there when modules are listed
[_impl_InitCodeTesting module SmartFilesystem 1.290 (21.1.2011AmigaOS4 PPC (cJoerg Strohmayer <j_s@gmx.de>
[
modulesinitModule Kickstart/SmartFilesystem
[RePostSignalReady task is 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
[
RePostSignalReady task is 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
# but then seems to just go away without any notice
[_impl_RemTaskRemoving 0x6FDF4620 (self) = DH1/SmartFilesystem 1.290 
[_impl_SuspendTaskSuspending self (DH1/SmartFilesystem 1.290 )
[
RePostSignalReady task is 0x6FDF4620 (DH1/SmartFilesystem 1.290 )
[
ReaperTaskTerminating task DH1/SmartFilesystem 1.290  (0x6FDF4620)

Does anybody know what the above mean and how it could be traced to find out why it stops? This was during boot, maybe I should try attaching a disk with an SFS partition after boot and see if it could be traced better that way but I don't know how to debug these under AmigaOS and don't have suitable setup for that so it's more work than I'm willing to do now.

It does the same when attaching the disk as usb-storage after boot:
[_impl_OpenResourceOpenResouceFileSystem.resource
[_impl_OpenResourceOpenResouceFileSystem.resource
[_impl_AddTaskAdding Task 0x6E488200DH1/SmartFilesystem 1.290  (0x6EC51A60)
[
_impl_AddTaskTask 0x6E488200ETask 0xFFF93C10Context 0xFFFAE7C0
[_impl_AddTaskStack bottom 0x6F1DF038Stack top 0x6F1E3024Stack pointer 0x6F1E2FF0
[_impl_AddTaskTask added to ready list
[
_impl_OpenResourceOpenResoucenewfilesystem.resource
[_impl_SetTaskPriChanging DH1/SmartFilesystem 1.290  priority to -10
[_impl_SetTaskPriChanging USB FD fkt start priority to -10
[_impl_RemTaskRemoving 0x6E488200 (self) = DH1/SmartFilesystem 1.290 
[_impl_SuspendTaskSuspending self (DH1/SmartFilesystem 1.290 )
[
_impl_RemTaskFreeing tracked resources
[_impl_RemTaskDone freeing resources
[_impl_RemTaskRemoving 0x6E488800 (self) = USB FD fkt start
[_impl_SuspendTaskSuspending self (USB FD fkt start)
[
_impl_RemTaskFreeing tracked resources
[_impl_RemTaskDone freeing resources
[_impl_SetTaskPriChanging USB Fkt Init priority to -10
[_impl_RemTaskRemoving 0x6E488B00 (self) = USB Fkt Init
[_impl_SuspendTaskSuspending self (USB Fkt Init)
[
_impl_RemTaskFreeing tracked resources
[_impl_RemTaskDone freeing resources

so it seems to exit for some reason when trying to detect a volume but it does not tell why. At least the kernel module seems to be loaded and "working" but it cannot handle volumes.

Go to top


Re: Qemu Pegasos II interrupts issue
Quite a regular
Quite a regular


@white
I don't think your problems in AmiCygnix were related to the guest network card type but more likely to port forwarding or other network setup on the host but you can try with -device ne2k_pci instead of -device rtl8139 and see if it works at all (could be it does not work if the driver expects something the QEMU emulation does not support) or try the udpated rtl8139 driver that was mentioned above in case that works better (but if you had no connection at all and not a connection that breaks then it's a different issue than this updated driver fixes).

Go to top


Re: QEMU, e500 and Linux
Quite a regular
Quite a regular


@Maijestro
Quote:
With the Update 2 kernel, the windows and mouse input stutter.

OK so easy workaround: don't update beyond Update 1 for now when using sam460ex.

Quote:
Believe me, fully configured, the AmigaOneXe/Pegasos2 machine is currently faster in all respects.

That sounds like most of this is coming from using SFS on amigaone/pegasos2 and comparing that to sam460ex without SFS.

Quote:
Quote:
What's the issue with SDL1/2 on sam460ex?

All programs/tools/games/ take much longer to load and are much slower to run. I'm not saying it's unusable, but compared to the Pegasos2/AmigaOnXe machine there are big differences. But I agree with you, overall the Sam460 is much faster than it was a year ago.

I think you also had the same problem before on pegasos2 with disk cache disabled. So the fix could be either enabling cache for FFS (@joerg mentioned something about that on the other forum) or trying to use the 68k version of SFS that works and then compare that to pegasos2. You're still using disk partition instead of image file for pegasos2 so it could still be a bit faster because of that but I think most of the problems you mentioned could be avoided with using Update 1 and the 68k SFS on sam460ex and get a system that works as good as pegasos2. In case somebody is interested to try that and find out I'd like to hear about the results. At least CPU benchmarks don't show a big difference now in QEMU 9.0 so if it's still slower then that's because of something else. I'd like to find out and make sam460ex work well too because those who have that version should also be able to use it. Considering that the files on the CD of these AmigaOS versions are mostly the same apart from the kernel and modules it does not make much sense to get more of them when you already have one. Unless maybe if you're using it a lot or need different versions for testing but for normal usage any of amigaone/pegasos2 or sam460ex should be sufficient. But looks like for sam460ex there are still some more bugs to fix.

Quote:
That doesn't matter I'll add something else....USB support is currently not working and as soon as the latest elf.library is installed as an update it causes the whole machine to stop booting. I just wanted to point this out.

I don't remember this USB issue either. I should look at that but considering that sam460ex uses usb keyboard and mouse by default I think USB should work. What's the issue you're referring to? Maybe it's just that there aren't enough ports emulated so you'd also need to add another USB card to add more devices. The real machine has an on-board hub but that's not emulated because the hub in QEMU did not support the needed USB version if I remember correctly.

I hoped sam640ex will really be much more usable with QEMU 9.0 so I'd like to find a way to make it work instead of just telling people not to use it.

Go to top


Re: Qemu Pegasos II interrupts issue
Quite a regular
Quite a regular


@joerg
Quote:
Supported Realtek Ethernet controllers are 8029, 8139 and 8169.

So does this driver on the install CD also support 8029? QEMU also emulates that as -device ne2k_pci so maybe that can also be tested then as an alternative to fix the problem with previous driver versions. As the driver is named rtl8139 I did not know it also supported other similar chips as well so I've never tried.

Go to top


Re: QEMU, e500 and Linux
Quite a regular
Quite a regular


@Maijestro
Quote:
The Sam460 emulation is currently the most up-to-date of the 3 machines, but unfortunately also the worst. You cannot use SmartFileSystem

OK I forgot about that. This affects only the SFS version on the install CD but we still don't know why is that if it works on real machine. But an easy workaround is to replace it with another version that works, either from Enhancer Software or OS4Depot should work.

Quote:
and AmigaOs4.1 Update 2 will make the machine unusable. Even simple SDL2 games like BreakHack cannot be used, the machine is simply too slow for that.

You've surely told me about this before but I've forgotten. What's the issue with Update 2? If Update 1 still works then maybe stay at that version for now on sam460ex until it's debugged.

Quote:
As already mentioned, the Sam460 is easy to install because you don't need any extra files and Qemu with U-Boot Bios provides everything. For simple tests the machine is sufficient,

Since @nox already has a real sam460ex with the corresponding version and experience installing it it's probably simplest to try that first and see how well it works emulated. An amigaone/pegasos2 version would not be that much faster, maybe just a little bit so I don't think it's worth the investment to get another version just to try it. If you start without any versiono then it's better to go with the amigaone or pegasos2 but if somebody already has sam460ex version that's also supposed to work so I'd say try that first and get other versions later when using the emulation more.

Quote:
if you want to use AmigaOs4.1 in emulation for a longer time I cannot recommend this machine at the moment.

I guess you've said the same just less detailed.

Quote:
SDL1/2 games/programs/tools BreakHack/MPlayer/DvPlayer everything runs very fast. Of course limited without 3d acceleration.

What's the issue with SDL1/2 on sam460ex?

Go to top


Re: QEMU, e500 and Linux
Quite a regular
Quite a regular


@joerg
Quote:
Depends on the software you want to use, and how good the AltiVec emulation of QEmu is.
On a real AmigaOne/Pegasos2 with G4 CPU AltiVec optimized software can be much faster than a non-AltiVec version.

I meant the general case as most AmigaOS software probably don't support AltiVec and for those there's probably not much difference with QEMU 9.0. With older QEMU versions sam460ex was slower but this should be improved with 9.0. Of course 460EX does not have AltiVec so if you want to use that you need a machine with G4 and corresponding AmigaOS version but it would need to be tested if that helps on QEMU or not. I think the limited FPU performance also holds back most AltiVec code so maybe it's not that much faster on QEMU at the moment but did not do profiling to find that out.

Go to top


Re: QEMU, e500 and Linux
Quite a regular
Quite a regular


@noXLar
The Classic iso won't work with QEMU (it should work with UAE that emulates classic machine but needs QEMU plugin for PPC) but the sam460 version runs with QEMU's sam460ex machine. Make sure to use the latest 9.0-rc1 or rc2 for now (final 9.0 will be released in about 2 weeks) for sam460ex as 9.0 should be much faster for sam460ex than previous QEMU versions. With QEMU 9.0 there's probably not that much difference between pegasos2/amigaone and sam460ex versions any more so if you already have that no need to get another one. The sam460ex version is also easier to install as the firmware is included with QEMU and the SM502 driver is on the iso so it should just boot without any fiddling that's needed to get the pegasos2/amigaone versions running and it's closest to real machine in installation. Pegasos2/amigaone might still run a bit faster but with QEMU 9.0 it's probably not that big difference any more as the biggest issue was solved that made sam460ex emulation slower.

Go to top


Re: Qemu Pegasos II interrupts issue
Quite a regular
Quite a regular


@Hans
I've re-read your first post and you wrote that you've set your handler to highest priority so it was basically do the logging I was suggesting but found you got no interrupts even as first handler. Then checked the PPC manual to see what could disable interrupts and found there's an MSR[EE] bit that can mask it out. There's also a comment in the manual:
Quote:
Asynchronous, maskable exceptions (such as the external interrupt and decrementer) are enabled by setting MSR[EE]. When MSR[EE] = 0, recognition of these exception conditions is delayed. MSR[EE] is cleared automatically when an exception is taken to delay recognition of conditions causing those exceptions.

I don't quite get what does that mean but maybe when the CPU calls an exception handler it disables further interrupts and something needs to enable it. Don't know if rfi does that or needs to be done explicitly but you could check that this bit is not masking out interrupts and where it would need to be enabled/disabled. I don't think emulation is completely broken, it's more likely something in AmigaOS does something that leaves the system in an unexpected state. The CPU register values can be checked in QEMU monitor with 'info registers' any time.

Go to top


Re: A1222+ memory interleaving
Quite a regular
Quite a regular


@sailor
Quote:
@balaton
please, do you have any idea what u-boot repo is closest to our A1222+? There are hundreds of them on git.

No idea, probably none of them.
Quote:
@all
please, are there any way how ask A1222+ U-boot developers?

The GPL says that whoever distributes binaries of GPL code should also accompany it with the source or at least an address where you can get the source. So contact whover sent you the board that contains the U-Boot binary and they should sort it out otherwise they would illegally distribute binaries they are not allowed to so they should stop doing that and play by the rules.

Go to top


Re: Qemu Pegasos II interrupts issue
Quite a regular
Quite a regular


@Hans
Quote:
I don't fully understand how the emulator works.

Maybe nobody does as it's quite big. But usually it's only needed to know the parts you care about. Interrupts in QEMU are just callback functions that get called. At the bottom the device emulation sets the interrupt which calls in the interrupt controller model (in this case qemu/hw/intc/i8259.c) that then eventually calls the CPU model's interrupt handler. On pegasos2 the i8259 PICs are embedded in the VIA VI8231 (modelled in qemu/hw/isa/vt82c686.c) where the PCI interrupts are also connected. The VT8231 has an output interrupt pin which is connected to a GPIO pin of the MV64361 north bridge and the interrupt output of the MV64361 is connected to the CPU interrupt input. The PCI IRQs are also connected to the MV64361 separately, so the guest could either program the PIC in the south bridge or the MV64361 to get CPU interrupt for PCI IRQs but most guests seem to use the PIC only. On amigaone this is simpler as the interrupt output of the VT82C686B is connected to the the CPU interrupt directly without going through the north bridge (I don't know if that's how the real machine does but since I don't have much info on the ArticiaS this was the simplest way to make it work). But the PIC emulation and the south bridge emulation is shared between amigaone and pegasos2 so they should behave the same. The sam460ex uses different CPU and interrupt controller model so testing that may get different results.

Quote:
I filtered out everything except for the interrupts on IRQ 9 (not easy, as the interrupt numbers used in various parts don't match. I'll check out excp_helper.c, to see if I can find something there.

On pegasos2 everything is configured to use IRQ9 so all interrupts from via-ac97, USB, and PCI cards will raise that. As this makes it quite frequent it's more likely some race condition will happen and since all drivers are on this single IRQ chain if one of them screws up then all other handlers may be affected. The problem may be there on amigaone too but since these are mapped to different interrupts they may not happen that frequently. I think adding a logging handler to the chain in AmigaOS might be the best way to debug it. You could even move that handler around to find the driver which stops.
Quote:
I don't know what the IMR and IRR registers are supposed to contain. Likewise, I currently have no idea how the OS can check what triggered PPC6xx_INPUT_INT.

These are documented in the i8259 PIC docs. Interrupt Mask Register and Interrupt Service Register. AFAIU interrupts with 1 bit in IMR are masked out, and 1 in IRR means the interrupt is raised. If the OS gets an interrupt it should check the PIC to know which IRQ it is then check each device configured to use that IRQ to know which one wants attention.
Quote:
I'm also still wondering if interrupts are level triggered, and if so, is it being emulated correctly (and how could I check that).

AFAIK the Edge/Level trigger is set by the ELCR register (or the LTIM bit in some global control register but AmigaOS does not touch that).

I've tried running with -bios pegasos2.rom -trace enable="pic_io*" and see what the PICs are set using the info pic command in the monitor. All PIC regs start out as 0, then pegasos2.rom does some setup:
Configuring Legacy Devices
Initializing KBD
...                                                    Done.
pic_ioport_write master 1 addr 0x0 val 0x11
pic_ioport_write master 0 addr 0x0 val 0x11
pic_ioport_write master 1 addr 0x1 val 0x0
pic_ioport_write master 0 addr 0x1 val 0x8
pic_ioport_write master 1 addr 0x1 val 0x4
pic_ioport_write master 0 addr 0x1 val 0x2
pic_ioport_write master 1 addr 0x1 val 0x1
pic_ioport_write master 0 addr 0x1 val 0x1
pic_ioport_write master 0 addr 0x1 val 0xff
pic_ioport_write master 1 addr 0x1 val 0xfb
Testing 10000000 Bytes
Pass00000000 Failed00000000
RAM TEST 
(fill linear)...                                              Done.

and at the smartfirmware OK prompt:
entering main read/eval loop...
ok
(qemuinfo pic
Interrupt controller information not available 
for 7457_v1.2-powerpc-cpu.
pic1irr=00 imr=ff isr=00 hprio=0 irq_base=08 rr_sel=0 elcr=00 fnm=0
pic0
irr=01 imr=fb isr=00 hprio=0 irq_base=00 rr_sel=0 elcr=28 fnm=0

after AmigaOS starts it programs the PIC on its own:
ok boot cd amigaboot.of
ISO
-9660 filesystem:  System-ID"AMIGA BOOT"  Volume-ID"AmigaOS 4.1 Update1 Pegasos2"
Root dir"^@" flags=0x2 extent=0x31 size=0x800

pic_ioport_write master 1 addr 0x1 val 0xff
pic_ioport_write master 0 addr 0x1 val 0xff
pic_ioport_write master 1 addr 0x0 val 0x11
pic_ioport_write master 1 addr 0x1 val 0x0
pic_ioport_write master 1 addr 0x1 val 0x4
pic_ioport_write master 1 addr 0x1 val 0x1
pic_ioport_write master 0 addr 0x0 val 0x11
pic_ioport_write master 0 addr 0x1 val 0x8
pic_ioport_write master 0 addr 0x1 val 0x2
pic_ioport_write master 0 addr 0x1 val 0x1
pic_ioport_write master 1 addr 0x0 val 0xb
pic_ioport_write master 0 addr 0x0 val 0xb
pic_ioport_write master 1 addr 0x1 val 0xff
pic_ioport_write master 0 addr 0x1 val 0xff
pic_ioport_write master 1 addr 0x1 val 0xfb
pic_ioport_write master 0 addr 0x1 val 0xff
pic_ioport_write master 1 addr 0x1 val 0xfb
pic_ioport_write master 0 addr 0x1 val 0xef
pic_ioport_read master 0 addr 0x1 val 0xef
pic_ioport_write master 0 addr 0x1 val 0xff
pic_ioport_write master 0 addr 0x0 val 0xb
pic_ioport_read master 0 addr 0x0 val 0x10
pic_ioport_write master 0 addr 0x0 val 0x64
pic_ioport_write master 0 addr 0x0 val 0xb
pic_ioport_read master 0 addr 0x0 val 0x0
pic_ioport_write master 1 addr 0x0 val 0xb
pic_ioport_read master 1 addr 0x0 val 0x4
pic_ioport_write master 1 addr 0x0 val 0x62
pic_ioport_write master 1 addr 0x0 val 0xb
pic_ioport_read master 1 addr 0x0 val 0x0
pic_ioport_write master 1 addr 0x1 val 0xfb
pic_ioport_write master 0 addr 0x1 val 0xef
pic_ioport_read master 1 addr 0x1 val 0xfb
pic_ioport_write master 1 addr 0x1 val 0xfb
pic_ioport_write master 1 addr 0x0 val 0xb
pic_ioport_read master 1 addr 0x0 val 0x0

then this repeats a lot as the IDE for the CD and maybe timer or other sources generate interrupts, at some random point later I get
(qemuinfo pic
Interrupt controller information not available 
for 7457_v1.2-powerpc-cpu.
pic1irr=00 imr=6d isr=00 hprio=0 irq_base=08 rr_sel=1 elcr=00 fnm=0
pic0
irr=01 imr=f9 isr=00 hprio=0 irq_base=00 rr_sel=1 elcr=28 fnm=0
(qemuinfo irq
IRQ statistics 
for 7457_v1.2-powerpc-cpu:
 
2187
 4
1778
 7
15
 8
560406
10
1294
73
4
IRQ statistics 
for isa-i8259:
 
0450
 1
7
 2
1776
12
1
15
1775

Don't know if it's any help but just to show how to debug this in QEMU and how you can check the PIC state and interrupts. I think it would be easier to debug it from the AmigaOS side as I think if you get an exception for the interrupts then the problem is not in emulation but in the handlers on the AmigaOS side.


Edited by balaton on 2024/3/23 17:46:00
Go to top



TopTop
« 1 2 3 (4) 5 6 7 ... 28 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project