Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
52 user(s) are online (38 user(s) are browsing Forums)

Members: 2
Guests: 50

khayoz, RussellB, more...

Support us!

Headlines

Report message:*
 

Re: DMA buffer for PCI busmaster headache

Subject: Re: DMA buffer for PCI busmaster headache
by ncafferkey on 2021/2/22 0:27:31

@geennaam

Using StartDMA()/EndDMA() would be a lot simpler. If the buffer you pass to it is physically contiguous, you'll only get one address in the returned list. So these functions don't require scatter/gather, they just support it.

Then you won't need to worry about supervisor mode, low level functions for cache flushing and getting physical addresses etc.

CachePreDMA()/CachePostDMA() are broken on OS4, so don't use them.

One other thing to watch out for: the DMAF_ReadFromRAM flag must be passed to StartDMA()/EndDMA() if the device will only read your buffer OR if it will read AND write your buffer. I.e. the only time it shouldn't be set is if you're sure the device will only write to the buffer.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project