Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
47 user(s) are online (23 user(s) are browsing Forums)

Members: 1
Guests: 46

LyleHaze, more...

Support us!

Headlines

Forum Index


Board index » All Posts




Re: x1000 onboard network opensource driver in progress
Home away from home
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 ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: x1000 onboard network opensource driver in progress
Just popping in
Just popping in


@kas1e

Quote:

Or i hardware bug :)


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.

Go to top


Re: USB Audio driver for AmigaOS4
Quite a regular
Quite a regular


@afxgroup

Yeah that fixed it for me.
No more crackle or delay.
Very quick work.

Cheers

Go to top


Re: x1000 onboard network opensource driver in progress
Just can't stay away
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

Go to top


Re: x1000 onboard network opensource driver in progress
Home away from home
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.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: x1000 onboard network opensource driver in progress
Just popping in
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,

Go to top


Re: x1000 onboard network opensource driver in progress
Home away from home
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 interfaces6
  TX channels
:    20
  RX channels
:    64

DMA 
Interface Table (offset 0x0058):
  
Each entry maps a SerDes lane to a DMA interface.
  
On X1000only interface (SGMIIis active for Ethernet.

  Interface  
0devfn=0xA8 (dev=21 fn=0)  XAUI (not wired on X1000) => unused
  
Interface  1devfn=0xA9 (dev=21 fn=1)  XAUI (not wired on X1000) => unused
  
Interface  2devfn=0xA0 (dev=20 fn=0)  Quad 5 Lane 0 — PCIe slot 3 => PCIe (not SGMII)
  Interface  
3devfn=0xA1 (dev=20 fn=1)  Quad 5 Lane 1 — PCIe slot 4 => PCIe (not SGMII)
  Interface  
4devfn=0xA2 (dev=20 fn=2)  Quad 5 Lane 2 — PCIe slot 5 => PCIe (not SGMII)
  Interface  
5devfn=0xA3 (dev=20 fn=3)  Quad 5 Lane 3 — SGMII => Ethernet (Vitesse VSC8221 PHY)

TX Channels (send path):
  
TX chan  0sta=0x00000000 [idle --]  ring=0xDCFD1A40 (baseu=0x26CF0B79)
  
TX chan  1sta=0x00000000 [idle --]  ring=0x107FD000 (baseu=0x00200000)
  
TX chan  2sta=0x00000000 [idle --]  ring=0xD7271780 (baseu=0x1F440FFB)
  
TX chan  3sta=0x00000000 [idle --]  ring=0xFFFD5780 (baseu=0x3FFB0FF3)
  
TX chan  4sta=0x00000000 [idle --]  ring=0x33D17E40 (baseu=0x06DF0DA3)
  
TX chan  5sta=0x00000000 [idle --]  ring=0x98557EC0 (baseu=0x17E307C9)
  
TX chan  6sta=0x00000000 [idle --]  ring=0x856FAE40 (baseu=0x37D50FF1)
  
TX chan  7sta=0x00000000 [idle --]  ring=0x96D74180 (baseu=0x16F60B7B)
  
TX chan  8sta=0x00000000 [idle --]  ring=0x95E51E40 (baseu=0x17C207FB)
  
TX chan  9sta=0x00000000 [idle --]  ring=0xF78D6680 (baseu=0x07CF0BCA)
  
TX chan 10sta=0x00000000 [idle --]  ring=0xF7716600 (baseu=0x2FCF0BCB)
  
TX chan 11sta=0x00000000 [idle --]  ring=0xAB576CC0 (baseu=0x35E60C7D)
  
TX chan 12sta=0x00000000 [idle --]  ring=0xA4FD7480 (baseu=0x0FE60F1A)
  
TX chan 13sta=0x00000000 [idle --]  ring=0xDAE777C0 (baseu=0x39660FAE)
  
TX chan 14sta=0x00000000 [idle --]  ring=0xFCFDEFC0 (baseu=0x0ED70BE1)
  
TX chan 15sta=0x00000000 [idle --]  ring=0x885E5F40 (baseu=0x1DD70B8B)
  
TX chan 16sta=0x00000000 [idle --]  ring=0xDDC70A80 (baseu=0x0FC40F9B)
  
TX chan 17sta=0x00000000 [idle --]  ring=0xFCDF4E80 (baseu=0x03CD0FD9)
  
TX chan 18sta=0x00000000 [idle --]  ring=0xCD467A80 (baseu=0x2FD6031B)
  
TX chan 19sta=0x00000000 [idle --]  ring=0xCE356840 (baseu=0x2EEF0BEB)

RX Channels (receive path):
  
RX chan  0sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  1sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  2sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  3sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  4sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  5sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  6sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  7sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  8sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan  9sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 10sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 11sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 12sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 13sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 14sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 15sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 16sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 17sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 18sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 19sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 20sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 21sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 22sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 23sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 24sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 25sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 26sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 27sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 28sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 29sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 30sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 31sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 32sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 33sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 34sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 35sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 36sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 37sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 38sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 39sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 40sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 41sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 42sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 43sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 44sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 45sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 46sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 47sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 48sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 49sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 50sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 51sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 52sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 53sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 54sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 55sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 56sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 57sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 58sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 59sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 60sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 61sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 62sta=0x00000000 [idle --]  ring=0x00000000 (baseu=0x00000000)
  
RX chan 63sta=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  0sta=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  0sta=0x00010001 [ACTIVE EN]  ring=0x02BE0000 (baseu=0x04000000)
  
TX chan  1sta=0x00010001 [ACTIVE EN]  ring=0x13617000 (baseu=0x00200000)


RX Channels (receive path):
  
RX chan  5sta=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.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: x1000 onboard network opensource driver in progress
Just popping in
Just popping in


@kas1e
Quote:

But i wrote ...


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.

Go to top


Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
Quite a regular
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
Resized Image
Thanks

Go to top


Re: x1000 onboard network opensource driver in progress
Home away from home
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
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: USB Audio driver for AmigaOS4
Amigans Defender
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...
Go to top


Re: x1000 onboard network opensource driver in progress
Just popping in
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.

Go to top


Re: x1000 onboard network opensource driver in progress
Home away from home
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 ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: x1000 onboard network opensource driver in progress
Home away from home
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);

Go to top


Re: x1000 onboard network opensource driver in progress
Home away from home
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.

Go to top


Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
Home away from home
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.

Go to top


Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
Not too shy to talk
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.

Go to top


Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
Quite a regular
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.

Go to top


Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
Home away from home
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
Go to top


Re: [DEV] VirtioVGA Driver for QEmu / AmigaOS4.1FE
Just can't stay away
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.

Go to top



TopTop
(1) 2 3 4 ... 7643 »



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
8 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project