DMA cache issues on SAM440ep

This forum is for general developer support questions.
Post Reply
Posts: 8
Joined: Mon Sep 16, 2013 2:35 pm

DMA cache issues on SAM440ep

Post by ncafferkey »


I have encountered problems with my network drivers on the SAM440ep because of differing behaviour of Exec's DMA functions.

For example, when I call StartDMA()/EndDMA() without the DMA_ReadFromRAM flag, addresses outside the specified memory region are clobbered if they are unlucky enough to share cache lines with the specified region. This does not happen on e.g. the A1SE or X1000. Is this difference due to hardware or software (i.e. kernel implementation) differences?

Also, there seems to be some ambiguity surrounding the use of DMA_ReadFromRAM. The CachePreDMA() AutoDoc states that it *should* be used when the transfer is from RAM to the peripheral device. However, for StartDMA(), at least on the SAM, it appears to be mandatory. Moreover, there is no guidance on whether to use the flag when the device will both read and write the memory area (as is often the case with device-specific DMA transfer descriptors for example).

I currently have OS4.1 Update 6: is there any change in behaviour in later releases?

User avatar
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1415
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: DMA cache issues on SAM440ep

Post by tonyw »

I can't answer your question, but I have pointed it out to others more skilled in the art.

Post Reply