Check if volumes are bootable by checking whether C/Shell is compatible with
[cake.git] / rom / exec / cachepredma.c
blob86603362e5a9a069b7df04df1a934b909a532dec
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CachePreDMA() - Do what is necessary for DMA.
6 Lang: english
7 */
9 #define DEBUG 0
11 #include <aros/debug.h>
12 #include <exec/types.h>
13 #include <aros/libcall.h>
15 /*****************************************************************************
17 NAME */
18 #include <proto/exec.h>
20 AROS_LH3(APTR, CachePreDMA,
22 /* SYNOPSIS */
23 AROS_LHA(APTR, address, A0),
24 AROS_LHA(ULONG *, length, A1),
25 AROS_LHA(ULONG, flags, D0),
27 /* LOCATION */
28 struct ExecBase *, SysBase, 127, Exec)
30 /* FUNCTION
31 Do everything necessary to make CPU caches aware that a DMA
32 will happen. Virtual memory systems will make it possible
33 that your memory is not at one block and not at the address
34 you thought. This function gives you all the information
35 you need to split the DMA request up and to convert virtual
36 to physical addresses.
38 INPUTS
39 address - Virtual address of memory affected by the DMA
40 *length - Number of bytes affected
41 flags - DMA_Continue - This is a call to continue a
42 request that was broken up.
43 DMA_ReadFromRAM - Indicate that the DMA goes from
44 RAM to the device. Set this bit
45 in both calls.
47 RESULT
48 The physical address in memory.
49 *length contains the number of contiguous bytes in physical
50 memory.
52 NOTES
53 DMA must follow a call to CachePreDMA() and must be followed
54 by a call to CachePostDMA().
56 EXAMPLE
58 BUGS
60 SEE ALSO
61 CachePostDMA()
63 INTERNALS
64 This function should be replaced by a function in $(KERNEL).
66 ******************************************************************************/
68 AROS_LIBFUNC_INIT
70 #warning "TODO: Write exec/CachePreDMA()"
71 #if defined(DEBUG) && (DEBUG > 0)
72 aros_print_not_implemented("CachePreDMA");
73 #endif
74 return address;
76 AROS_LIBFUNC_EXIT
77 } /* CachePreDMA() */