2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: CachePostDMA() - Do what is necessary for DMA.
11 #include <aros/debug.h>
12 #include <exec/types.h>
13 #include <exec/execbase.h>
14 #include <aros/libcall.h>
16 /*****************************************************************************
19 #include <proto/exec.h>
21 AROS_LH3(void, CachePostDMA
,
24 AROS_LHA(APTR
, address
, A0
),
25 AROS_LHA(ULONG
*, length
, A1
),
26 AROS_LHA(ULONG
, flags
, D0
),
29 struct ExecBase
*, SysBase
, 128, Exec
)
32 Do everything necessary to make CPU caches aware that a DMA has
36 address - Virtual address of memory affected by the DMA
37 *length - Number of bytes affected
38 flags - DMA_NoModify - Indicate that the memory did not change.
39 DMA_ReadFromRAM - Indicate that the DMA goes from RAM
40 to the device. Set this bit in
46 DMA must follow a call to CachePreDMA() and must be followed
47 by a call to CachePostDMA().
58 ******************************************************************************/
63 * Due to the strong cache coherency of x86 systems this function
64 * is actually not needed. CPU snoops the address lines and
65 * invalidate all cache which is out-of-date. It is valid for both
66 * D and I caches). Even a BM-DMA transfer are perfectly safe here.