Who's Online |
47 user(s) are online ( 23 user(s) are browsing Forums)
Members: 1
Guests: 46
LyleHaze,
more...
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Home away from home 
|
@Georg I didnt tried Linux myself on x5k yet, but those who did on hyperion forum keep saying all fine. But maybe i should test it myself anyway.. and probably better go 32bit version of linux not 64bit one (to be close as possible).
As for gfx drivers, etc, you think they even without usage of pasemi_dma.resourse do dma stuff for x1000 internaly ? Then when os loaded without pasemi_dma.resource i dudnt see any channel is used by anyone. I mean, if anyone use channel i should see active one in dma index map, but i dont ..
In end of all i can just try 3-5 tests with random channels like tx12/rx12, tx18/rx23 etc just random and if lets say 3-5 random channels cause same => sure no one mess us with channels, right ?
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1e Quote: Try under Linux? Quote: So we can rule out sharing of same channels.
Theoretically whoever uses it (gfx? gfx driver?) could still screw you if they do something like:
gfx_function_xyz()
if (using_preallocated_dma_channel == FALSE)
{
/* fast path */
using_preallocated_dma_channel = TRUE;
ch = preallocated_dma_channel;
}
else
{
/* slow path */
ch = alloc_channel();
}
DO_DMA_STUFF(ch);
if (using_preallocate_channel == FALSE)
{
free_channel(ch);
}
else
{
using_preallocated_channel = FALSE;
}
Are gfx drivers in AOS4 already loaded/running when S:startup-sequence is executed? If not, maybe try to run network stress test there when as few as possible other things (gfx/audio/...) are running in the background.
|
|
|
|
|
|
Re: USB Audio driver for AmigaOS4
|
Posted on: Yesterday 23:41
#3
|
Quite a regular 
|
@afxgroup
Yeah that fixed it for me. No more crackle or delay. Very quick work.
Cheers
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 22:17
#4
|
Just can't stay away 
|
@kas1e
I remember something similar, not sure when and where it was discussed (but loooong ago).
However when I check my X1000 with Ranger, it reports a MAC address of C4:3D: ..., i.e. different from yours.
So either it was solved at some point, or it was never all X1000 machines?
Best regards,
Niels
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 22:05
#5
|
Home away from home 
|
@Petrol Quote: I was looking on your ranger'screenshots and remarked that we've got the same hardware MAC address! Should not it be different? It also differs from the Firmware value of ETH0_HWADDR Env var.
I do not remember, but wasn't there some issue with MAC addresses on x1000 where they all the same? I sure remember something of that sort, just dunno if for x1000.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 21:28
#6
|
Just popping in 
|
Hi Kas1e, I was looking on your ranger'screenshots and remarked that we've got the same hardware MAC address! Should not it be different? It also differs from the Firmware value of ETH0_HWADDR Env var.
Kind regards,
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 20:53
#7
|
Home away from home 
|
@Georg Or i hardware bug :) At least we should remember that others who working before on same kind of driver also meet with some issues like "halt when transfer data", but i do not know what kind of halt it was, and if it all related to what we have there.. @Balaton I go futher : i just wrote small tool which query the DMA table, and: 1). Check how many Interfaces it have and for what devices (numbers are taken from .dts files of x1000 linux port + this small TRM we have for x1000). 2). check how many channels (rx and tx) it have and what ones are active, and what ones in use. Then result is (without driver running and without pasemi_dma.resource running):
PA6T-1682M ENVOI DMA Engine — X1000 (Nemo)
============================================
Capabilities:
DMA interfaces: 6
TX channels: 20
RX channels: 64
DMA Interface Table (offset 0x0058):
Each entry maps a SerDes lane to a DMA interface.
On X1000, only interface 5 (SGMII) is active for Ethernet.
Interface 0: devfn=0xA8 (dev=21 fn=0) XAUI (not wired on X1000) => unused
Interface 1: devfn=0xA9 (dev=21 fn=1) XAUI (not wired on X1000) => unused
Interface 2: devfn=0xA0 (dev=20 fn=0) Quad 5 Lane 0 — PCIe slot 3 => PCIe (not SGMII)
Interface 3: devfn=0xA1 (dev=20 fn=1) Quad 5 Lane 1 — PCIe slot 4 => PCIe (not SGMII)
Interface 4: devfn=0xA2 (dev=20 fn=2) Quad 5 Lane 2 — PCIe slot 5 => PCIe (not SGMII)
Interface 5: devfn=0xA3 (dev=20 fn=3) Quad 5 Lane 3 — SGMII => Ethernet (Vitesse VSC8221 PHY)
TX Channels (send path):
TX chan 0: sta=0x00000000 [idle --] ring=0xDCFD1A40 (baseu=0x26CF0B79)
TX chan 1: sta=0x00000000 [idle --] ring=0x107FD000 (baseu=0x00200000)
TX chan 2: sta=0x00000000 [idle --] ring=0xD7271780 (baseu=0x1F440FFB)
TX chan 3: sta=0x00000000 [idle --] ring=0xFFFD5780 (baseu=0x3FFB0FF3)
TX chan 4: sta=0x00000000 [idle --] ring=0x33D17E40 (baseu=0x06DF0DA3)
TX chan 5: sta=0x00000000 [idle --] ring=0x98557EC0 (baseu=0x17E307C9)
TX chan 6: sta=0x00000000 [idle --] ring=0x856FAE40 (baseu=0x37D50FF1)
TX chan 7: sta=0x00000000 [idle --] ring=0x96D74180 (baseu=0x16F60B7B)
TX chan 8: sta=0x00000000 [idle --] ring=0x95E51E40 (baseu=0x17C207FB)
TX chan 9: sta=0x00000000 [idle --] ring=0xF78D6680 (baseu=0x07CF0BCA)
TX chan 10: sta=0x00000000 [idle --] ring=0xF7716600 (baseu=0x2FCF0BCB)
TX chan 11: sta=0x00000000 [idle --] ring=0xAB576CC0 (baseu=0x35E60C7D)
TX chan 12: sta=0x00000000 [idle --] ring=0xA4FD7480 (baseu=0x0FE60F1A)
TX chan 13: sta=0x00000000 [idle --] ring=0xDAE777C0 (baseu=0x39660FAE)
TX chan 14: sta=0x00000000 [idle --] ring=0xFCFDEFC0 (baseu=0x0ED70BE1)
TX chan 15: sta=0x00000000 [idle --] ring=0x885E5F40 (baseu=0x1DD70B8B)
TX chan 16: sta=0x00000000 [idle --] ring=0xDDC70A80 (baseu=0x0FC40F9B)
TX chan 17: sta=0x00000000 [idle --] ring=0xFCDF4E80 (baseu=0x03CD0FD9)
TX chan 18: sta=0x00000000 [idle --] ring=0xCD467A80 (baseu=0x2FD6031B)
TX chan 19: sta=0x00000000 [idle --] ring=0xCE356840 (baseu=0x2EEF0BEB)
RX Channels (receive path):
RX chan 0: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 1: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 2: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 3: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 4: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 5: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 6: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 7: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 8: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 9: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 10: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 11: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 12: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 13: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 14: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 15: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 16: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 17: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 18: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 19: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 20: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 21: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 22: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 23: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 24: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 25: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 26: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 27: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 28: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 29: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 30: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 31: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 32: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 33: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 34: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 35: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 36: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 37: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 38: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 39: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 40: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 41: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 42: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 43: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 44: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 45: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 46: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 47: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 48: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 49: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 50: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 51: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 52: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 53: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 54: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 55: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 56: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 57: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 58: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 59: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 60: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 61: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 62: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
RX chan 63: sta=0x00000000 [idle --] ring=0x00000000 (baseu=0x00000000)
Now, when i run it with just running OS with pasemi_dma.resource, it's show me all same, but (!)
TX chan 0: sta=0x00010001 [ACTIVE EN] ring=0x02BE0000 (baseu=0x04000000)
Dunno who own it, but that explain me why with first tests of driver i wernt able to use TX 0, i were sure it's something about video memory, because i had video memory trash when tried to use it, so i skip it in favor of TX channel 1, even have comment about like "video take the channel 0?" But then, the RX channel i use is 5, and TX channel i use are 1. Now how channels looks like when i run with both pasemi_dma and our driver:
TX Channels (send path):
TX chan 0: sta=0x00010001 [ACTIVE EN] ring=0x02BE0000 (baseu=0x04000000)
TX chan 1: sta=0x00010001 [ACTIVE EN] ring=0x13617000 (baseu=0x00200000)
RX Channels (receive path):
RX chan 5: sta=0x00010001 [ACTIVE EN] ring=0x12E16000 (baseu=0x00200000)
Both TX1 and RX5 my ones, without driver they empty. So we can rule out sharing of same channels.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 17:49
#8
|
Just popping in 
|
@kas1e Quote: Then I fall back to the loop-in-some-list theory. Maybe some stupid little bug that causes some Node (or io request or whatever has a node in it) to be removed while it is not in a list, or added to a new list while it is still part of another list, or added a second time when it already is in the list (io: re-send an io request while it is still pending). Something like that.
|
|
|
|
|
|
Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
|
Posted on: Yesterday 13:33
#9
|
Quite a regular 
|
@derfs Quote: I created a 'fake' SM502 driver based on linux code (not released as it was proof-of-concept) so you could do that, however the route I was looking at for a VirtioGPU driver was to have it loaded by PCIGraphics.card via SetMethod hooks to give Workbench full RTG support on the VirtIO GPU. It uses a VirtIOGPUBoard NT_RESOURCE resident that runs before graphics.library to hook PCIGraphics.card's FindCard/InitBoard methods. I may pick it up again in the future. It’s great that you’ve been working on this. I hope you’ll get back to it and manage to finish it. I'm currently using your two Virio drivers and they're working well for me  I've had a look at your new qemu-runner project – it's/will be brilliant!!! The remote console (seralshell) is a blast :D  Thanks
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 12:39
#10
|
Home away from home 
|
@Georg Quote: The priority of your interrupt handler is just for multiple handlers among same hw irq. Hw pri is still the same whatever it is. You can set it to max. possible values, but interrupts which have higher hardware priority are not affected.
So even with the test results it's probably still not 100% sure, that it isn't "simply" some (high pri) interrupt handler being stuck in a loop or that's there endless interrupt flood.
But i wrote in previous post(s) that i create version also with no interrupts usage at all for sake of tests (at least from driver), and do all by cpu -> same lockup.. So this probably out of question too.. If only you didn't mean not driver's irq flood, but system's one when some bug happens .. Question is : can we for sure detect what is it : BUS lockup or what ? Only by JTAG ?
Edited by kas1e on 2026/3/17 13:00:24
|
|
|
|
|
|
Re: USB Audio driver for AmigaOS4
|
Posted on: Yesterday 11:50
#11
|
Amigans Defender 
|
A new driver is available (version 2.3). You should be able to play correctly now on almost all platforms. Changelog:
BOOT SAFETY ------------
The driver is safe to have installed with a USB audio device permanently connected. All USB access is deferred until the first actual playback request (AHIsub_AllocAudio). Before scanning, the driver waits for the Sirion USB stack to signal USBNM_TYPE_STACKFULLBOOTED, ensuring the stack has fully initialised and all USB function drivers have completed their setup. A 5-second timeout prevents indefinite hangs if the stack was already booted before the notification subscription.
CONCURRENT ACCESS -----------------
USB audio is exclusive: only one playback stream can use the isochronous endpoint at a time. If another application (e.g. a music player) is already playing through the USB audio device, a new AHI session (e.g. AHI Prefs test tone) will be refused gracefully — the running playback is never interrupted.
DEVICE HOT-REMOVAL ------------------
If the USB audio device is physically unplugged during playback or recording, the driver detects the loss (consecutive fatal USB errors) and stops the playback/recording process cleanly. No system hang or crash will occur.
There are some problems on Input and Output but I think this is because the USBAUDIO audio mode that should be generated at runtime. I will check this. Enjoy
|
i'm really tired...
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 9:50
#12
|
Just popping in 
|
@kas1e Quote: Soft-int with maximum priority died.
One problem with this timer softint loop I forgot is that (unless AOS4 does it differently) the softints caused from a hw interrupt are not executed immediately, but only when the last hw interrupt is done, ie. before returning to usermode. So even if hw timer interrupt would still be running/runnable, a "stuck" lower hw priority interrupt could still prevent the "loop" (which re-sends the timer request) from working. Using AOS4 version of maybe undocumented ~PA_CALL/~PA_FASTCALL instead of PA_SOFTINT for the timer replyport would work better. Because the difference to PA_SOFTINT is that when the timer is replied, it does not result in Cause(), but in a direct function call. Quote: Interrupts with maximum priority died.
The priority of your interrupt handler is just for multiple handlers among same hw irq. Hw pri is still the same whatever it is. You can set it to max. possible values, but interrupts which have higher hardware priority are not affected. So even with the test results it's probably still not 100% sure, that it isn't "simply" some (high pri) interrupt handler being stuck in a loop or that's there endless interrupt flood.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 8:28
#13
|
Home away from home 
|
@balaton Quote: I only know DMA on Sam460EX and A1222 that I had experience emulating but X1000 probably works the same. AmigaOS uses the DMA engine for blitter ops or memory moves and this seems to be coordinated by dma.resource. The Sam460ex is simple as it has only one DMA channel but on A1222 I noticed not all channels are used. Then I was told some channels may be reserved for audio or network that's why not all channels are claimed by dma.resource. If the driver goes through dma.resource to alloc a channel then you could make sure nothing else will use that. Otherwise you may need to use the channel reserved for it but I don't know which is that or is there any. The author of the dma.resource for the X1000 should be able to tell. If you pick a channel that dma.resource can also use then it could be the kernel would also try to use that and break your settings.
pasemi_dma.resource are just that:
pasemi_dma/main/AllocBuffer
pasemi_dma/main/AllocChannel
pasemi_dma/main/AllocEvent
pasemi_dma/main/AllocFunction
pasemi_dma/main/AllocRing
pasemi_dma/main/ClearEvent
pasemi_dma/main/FreeBuffer
pasemi_dma/main/FreeChannel
pasemi_dma/main/FreeEvent
pasemi_dma/main/FreeFunction
pasemi_dma/main/FreeRing
pasemi_dma/main/ReadDMARegByte
pasemi_dma/main/ReadDMARegLong
pasemi_dma/main/ReadDMARegWord
pasemi_dma/main/SetEvent
pasemi_dma/main/StartChannel
pasemi_dma/main/StopChannel
pasemi_dma/main/WriteDMARegLong
pasemi_dma/main/WriteIOBRegLong
pasemi_dma/main/AllocBuffer
So yeah, for moving memory blocks and co. For sake of tests i simple comment out loading of pasemi_dma.resource , then of course power off / power on with long enough waiting just in case, and lockup still there. So this probably rule out it. But i think it's time to wait for source to be online, just need a bit more time to clean them up. @joerg Quote: Replacing it with a custom one is possible, but can't help.
Already did, but my lockup didn't cause MCE, its something else, like BUS deadlock which i do not know if possible some to catch at the "beginning" of this process so to dump addresses/etc. Quote: 4) Using the unused X1000/X5000 co-processor "Xena" could help. Even if the main CPU is stuck this chip could still do something. I don't know anything at all about it, but I read something on this forum about someone using it for debugging.
I do not know if i understand it correctly, but is any "lockup" mean you always (does not matter what kind of lockup) can "do something with some hw/sw tools" ? I mean, can't it be such a lockup which then take over everything and everything died just like you hold power off button ? Like those BUS lockups for example i think of ? Quote: 5) PerformanceMonitor.resource, if implemented in the X1000 kernel.
It implemented for now in all kernels, but i can confirm it works at least on x5k (on beta kernel), and on peg2 (as years before), dunno about x1000, but then, what use it give us there ? I always think that this is something which help collect static data to use with gprof or so after. Quote: Not all kernels support it. Very low level and high priority, may still work even if interrupt handlers don't work anymore or are stuck in an endless loop, or if the OS is killed by something like IExec->Disable(); while(1);
For me it didn't looks like anything work: Soft-int with maximum priority died. Interrupts with maximum priority died. MCE never called. It just looks like bus lockup, no ?
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 6:58
#14
|
Home away from home 
|
@kas1e Quote: Next things about which i may think for now:
[...] 3). Buy JTAG, and check the state when CPU died.. 4) Using the unused X1000/X5000 co-processor "Xena" could help. Even if the main CPU is stuck this chip could still do something. I don't know anything at all about it, but I read something on this forum about someone using it for debugging. 5) PerformanceMonitor.resource, if implemented in the X1000 kernel. Not all kernels support it. Very low level and high priority, may still work even if interrupt handlers don't work anymore or are stuck in an endless loop, or if the OS is killed by something like IExec->Disable(); while(1);
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: Yesterday 5:27
#15
|
Home away from home 
|
@balaton Quote: Make sure you check the right bit for MSR[ME] as PPC docs count bits from the other end than everybody else normally does. MCE is implemented and enabled in the kernel. Never seen something like Quote: Dump of context at 0x12345678 Trap type: Machine check exception ... in the serial output yet?  Replacing it with a custom one is possible, but can't help.
|
|
|
|
|
|
Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
|
Posted on: Yesterday 5:01
#16
|
Home away from home 
|
@smarkusg Quote: If I understand correctly, the main difference between AOS4 and ASO4FE (PPC) is the new graphics.library API. There is next to nothing left from P96 in AmigaOS 4.x, everything P96 did is implemented in graphics.library instead, except for: - The .card and .chip driver API. - The overlay/PIP related functions in Picasso96API.library, which are only supported by very few old gfx cards anyway (Merlin, Voodoo, Permedia, ATIRadeon). Can help with video playback for example if YUV modes are supported. The other Picasso96API.library functions just call graphics.library functions now. Quote: The old P96 drivers are unable to load during system boot. Would be strange. May need specific settings in Kickstart/p96Config, but should work. In case there really is something hard coded in PCIGraphics.card not changeable with ENV variables or p96Config simply use for example ATIRadeon.chip, 3dfxVoodoo.chip or 3DLabsPermedia2.chip as the name of your virtio .chip driver  The main problem with this VirtioVGA driver is that it seems to be a replacement for PCIGraphics.card accessing the virtio VGA directly instead of using OS functions (expansion.library PCI functions), not a GPU, even if framebuffer only, .chip driver. Can be done, but doesn't make any sense to me. The AmigaOne, Sam460 and Pegasos2 parts in QEmu emulate everything required for PCIGraphics.card, and it shouldn't make any difference if it's a real PCI(e) gfx card (a passed through RadonHD/RX for example), an emulated one like the SM502, or a virtio PCI device. @derfs Quote: It uses a VirtIOGPUBoard NT_RESOURCE resident that runs before graphics.library to hook PCIGraphics.card's FindCard/InitBoard methods. Why? PCIGraphics.card should find all display class PCI devices and call all installed .chip drivers with each of them. The .chip driver init function has to return TRUE or FALSE (or maybe some other defined return values) depending on if it's a driver for this gfx chip, checking the PCI IDs, or not.
|
|
|
|
|
|
Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
|
Posted on: Yesterday 0:57
#17
|
Not too shy to talk 
|
@smarkusg
I created a 'fake' SM502 driver based on linux code (not released as it was proof-of-concept) so you could do that, however the route I was looking at for a VirtioGPU driver was to have it loaded by PCIGraphics.card via SetMethod hooks to give Workbench full RTG support on the VirtIO GPU. It uses a VirtIOGPUBoard NT_RESOURCE resident that runs before graphics.library to hook PCIGraphics.card's FindCard/InitBoard methods. I may pick it up again in the future.
|
|
|
|
|
|
Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
|
Posted on: 3/16 23:31
#18
|
Quite a regular 
|
@joerg If I understand correctly, the main difference between AOS4 and ASO4FE (PPC) is the new graphics.library API. The old P96 drivers are unable to load during system boot. You can add entries to DEVS:Monitors/ (for example, VirtioVGA) for P96 and set the correct values for the new “chip,” but the system still checks during boot (graphics.library) to see if the card is in PCIGRAphics.chip and won't start. I checked this driver, the VirtioVGA Driver for QEmu, and it seems to me that the concept is more based on a dual graphics card. The card used at startup is sm501, and there’s also virtiovga. The VirtioVGA initialization itself crashes on startup with an error related to graphics.library (something is initializing from the host side QEMU).
I think, as @balaton wrote, the best thing to do if nothing else works is to have VirtioVGA “pretend to be” some card that supports the PCIGRAphics.chip and see what’s going on.
|
|
|
|
|
|
Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
|
Posted on: 3/16 16:50
#19
|
Home away from home 
|
@balaton Quote: It is not helped by that the graphics driver API of AmigaOS 4 is not public but maybe it's similar to the P96 API so you could start from there but there could be differences. The API for the .card and .chip drivers is still the same as in P96, with 2 exceptions: There is one additional, optional .chip function for HW accelerated compositing (only implemented in the ATIRadeon.chip, RadeonHD.chip and RadeonRX.chip drivers, maybe partially in the siliconmotion502.chip as well but I'm not sure, all others don't support it) and PPC native drivers are supported. m68k drivers still work as well, most classic Amiga Zorro II/III gfx drivers are still m68k, they were implemented in m68k asm and never ported to PPC. Quote: If you ask me I'd trash most of this code and start by patching PCIGraphics.card to load a virtio-vga.chip driver for the PCI IDs of the virtio card No need to patch anything, you can set the name of the .chip driver in the TOOLTYPEs of DEVS:Monitors/PCIGraphics. May need to be moved there from SYS:Storage/Monitors. .card driver: Hardware bus access, different ones required on classic Amigas with Zorro II/III, CPU module (CyberVisionPPC), etc. gfx cards. For all PPC Amigas with PCI, AGP and PCIe slots, even classic Amigas with a FireStorm, Prometheus or Mediator Zorro III<->PCI bridge: PCIGraphics.card .chip driver: GPU specific driver, for example 3dfxVoodoo, ATIRadeon (R100/R200), RadeonHD, RadeonRX, siliconmotion502, virtiovga. Quote: The code as generated by AI does not seem to do any of that I didn't check much of if, but already the struct EmuTrap m68k->PPC stubs are complete nonsense. Unless the virtiovga.card is an emulated m68k instead of a PPC native driver, but that wouldn't make any sense either.
Edited by joerg on 2026/3/16 17:51:29
|
|
|
|
|
|
Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
|
Posted on: 3/16 13:51
#20
|
Just can't stay away 
|
@n3m3 "nach" means "to" as in copy to if that's what you mean. Otherwise it means what the post says. Falke_34 used an AI code generator to try to make a virtio-vga driver but it does not work. It is not helped by that the graphics driver API of AmigaOS 4 is not public but maybe it's similar to the P96 API so you could start from there but there could be differences. If you ask me I'd trash most of this code and start by patching PCIGraphics.card to load a virtio-vga.chip driver for the PCI IDs of the virtio card and try to find out what it needs to set the frame buffer parameters enough for AmigaOS to be able to draw into it. The code as generated by AI does not seem to do any of that and you see all parameters are still wrong about the card and connected monitor modes which should come from DDC but it does not seem to read that so no idea where the modes come from. Maybe the only parts useful from this code are the communication with virtio PCI devices and the skeleton to make a driver but the actual graphics driver code is probably mostly wrong.
|
|
|
|
|
|