2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: CacheClearU - Simple way of clearing the caches.
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
13 /*****************************************************************************
16 #include <proto/exec.h>
18 AROS_LH0(void, CacheClearU
,
21 struct ExecBase
*, SysBase
, 106, Exec
)
24 Flush the entire contents of the CPU instruction and data caches.
25 If some of the cache contains dirty data, push it to memory first.
27 For most systems DMA will not effect processor caches. If *any*
28 external (non-processor) event changes system memory, you MUST
29 clear the cache. For example:
32 Code relocation to run at a different address
34 Loading code from disk
39 The caches will be flushed.
42 It is possible that on some systems the entire cache will be
43 even if this was not the specific request.
50 CacheClearE(), CacheControl(), CachePreDMA(), CachePostDMA()
53 Although it is not necessary, but it could be more efficient if
54 this function was replaced by a function in $(KERNEL).
56 ******************************************************************************/
60 /* Just dump the whole lot */
61 CacheClearE(0, 0xFFFFFFFF, CACRF_ClearI
| CACRF_ClearD
);