Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
36 user(s) are online (21 user(s) are browsing Forums)

Members: 1
Guests: 35

328gts, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 3 4 5 (6)
Re: x1000 onboard network opensource driver in progress
Home away from home
Home away from home


See User information
@balaton
Quote:

Did you upload the CFE test case somewhere to have a look? If you can identify the condition where it locks up then maybe you can fix it


Yes, there is:

https://kas1e.mikendezign.com/aos4/x10 ... etwork/bug/cfe_dma_test.c

And the point is there is no conditions. Pure random in time. Does not matter what i try can happens fast, can happens not so fast. All i can say for now is:

Sustained concurrent DMA writes + CPU access to ring memory causes a hard internal bus deadlock, with no exception, no error register, no info in debug registers (all clean), nothing. The CPU completely dies — not stuck in a loop, not in an exception handler. Three independent watchdogs (VERTB, CPU timer, IRQ counters) all stop simultaneously , serial also becomes inaccessible, bus lockup.

In test case interrupts not involved, amigaos4/roadshow not involved, same from pure CFE. Descriptor parsing is not involved — blind recycling (no data reading, no validation) locks up identically. DMA channel number doesn't matter(1, 44, 56 were tried, all same). TX channels not invovled, just enough RX one.


But what for sure is that continuous DMA + CPU ring access is REQUIRED to crash - when DMA fills the ring and stops (no recycling), no crash. When CPU doesn't touch the ring (NO_POLL), no crash. Only when both run simultaneously does it lock up.

Only that fewer packets per second = longer before lockup, but it can be just luck and random.


Quote:

I don't see why do you need RadeonHD in Linux. As long as you get a command prompt you can run simple test. In fact you should not have full desktop just the kernel booted and even that without network driver to make sure nothing else interferes. (Or if you want to test Linux driver you can do that from command line too.)


Yes, just framebuffer and command prompt is enough. I just fighting now to find any distro which i boot up from usb on x1000. And all i will do, is setup network , and then do udp-flood from pc as i do now for aos4 version and for CFE version. Will it die the same or not will clear a lot. If it will survive i can just debug it till death and simple mimic the same.

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


See User information
This loop in your dma_test.c is very confusing.

You have 3 different indexes (idx, buf_idx, rx_next_buf).

Sure this is all correct "logic"? That you don't end up having two (or more) identical rx_buf_phys pointers that are active (~dma'ing) in the rx_buf_ring at the same time?

Go to top
Re: x1000 onboard network opensource driver in progress
Home away from home
Home away from home


See User information
@Georg
The indices are confusing because of the different naming: it's two variables for one thing.. buf_idx and br_idx always same value because NUM_RX_BUFS == RX_BUF_RING_SIZE == 2048

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


See User information
@kas1e

I'm talking about the old "dma_test.c". Not your new one for cfe.

There you do

uint32 buf_idx num_bufs_alloced;
rx_buf_ring[rx_next_buf & (RX_BUF_RING_SIZE 1)] = XCT_RXB_LEN(RX_BUF_SIZE) | XCT_RXB_ADDR(rx_bufs_phys[buf_idx]);


buf_idx = 0 .. 15, because batch = 16. So you only ever repost rx_bufs_phys[0 .. 15].

Go to top
Re: x1000 onboard network opensource driver in progress
Home away from home
Home away from home


See User information
@Georg
Oh, missed that, will check later, but what i want to say now:

@All
i installed some "Void" ppc linux on x1000, and run udpflood on the onboard network, over 1gb link : millions packets were handled (i can see by "ip -s link show" that they are recieved and counted) and no lockup !

So, it indeed works under linux. For today that for sure enough : it proved that hardware CAN work, mean that i dind't do something. Ok for amigaos4 can be all sort of bugs with roadshow and kernel, but CFE version lockup mean my own issue, it should work if it work under linux. I just need to find what they do differently, how they handle it all.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: x1000 onboard network opensource driver in progress
Just can't stay away
Just can't stay away


See User information
@kas1e
Quote:
And the point is there is no conditions. Pure random in time. Does not matter what i try can happens fast, can happens not so fast. All i can say for now is:

Sustained concurrent DMA writes + CPU access to ring memory causes a hard internal bus deadlock,
...
But what for sure is that continuous DMA + CPU ring access is REQUIRED to crash - when DMA fills the ring and stops (no recycling), no crash. When CPU doesn't touch the ring (NO_POLL), no crash. Only when both run simultaneously does it lock up.

There you have it. As I said before it's likely that you can't touch memory that is used by DMA. Looks like you can't even read it. (That makes sense because if network chip is accessing some memory, the CPU can't access the same area. I don't know if it's just the same address or a whole page.) So in your driver you must make sure that if you pass a pointer to the network interface for DMA nothing will touch that buffer until the DMA is finished so you will have to manage these buffers to avoid concurrent use by the network chip and CPU. This seems to explain the test case as you just run DMA then concurently read buffers by CPU if you're lucky both are the same speed so they are racing around until CPU read reaches the buffer that is being DMA'd into. So you have to keep off of buffers that are active in DMA and only replace it when either DMA has finished or stopped to not try to simlutaneously access the same buffer by card and DMA. This is what I said before that you need some kind of synchronisation between the network chip and CPU access and I think that's what the interrupt is for. The chip will raise an interrupt when it finished DMA and only then you can touch the buffer from the CPU. If the chip is continuing DMA it might wrap around before you finish accessing the buffer so either stop DMA until that or have another buffer ready and quickly replace the pointer in the ring so DMA will use new buffer.

Go to top

  Register To Post
« 1 ... 3 4 5 (6)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )



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