2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: CacheClearE() - Clear the caches with extended control.
9 #include <aros/debug.h>
10 #include <exec/types.h>
11 #include <exec/execbase.h>
12 #include <aros/libcall.h>
14 /*****************************************************************************
17 #include <proto/exec.h>
19 AROS_LH3(void, CacheClearE
,
22 AROS_LHA(APTR
, address
, A0
),
23 AROS_LHA(IPTR
, length
, D0
),
24 AROS_LHA(ULONG
, caches
, D1
),
27 struct ExecBase
*, SysBase
, 107, Exec
)
30 Flush the contents of the CPU instruction or data caches. If some
31 of the cache contains dirty data, push it to memory first.
33 For most systems DMA will not effect processor caches. If *any*
34 external (non-processor) event changes system memory, you MUST
35 clear the cache. For example:
38 Code relocation to run at a different address
40 Loading code from disk
43 address - Address to start the operation. This address may be
44 rounded DOWN due to hardware granularity.
45 length - Length of the memory to flush. This will be rounded
46 up, of $FFFFFFFF to indicate that all addresses
48 caches - Bit flags to indicate which caches should be cleared
50 CACRF_ClearI - Clear the instruction cache
51 CACRF_ClearD - Clear the data cache
53 All other bits are reserved.
56 The caches will be flushed.
59 It is possible that on some systems the entire cache will be
60 even if this was not the specific request.
67 CacheClearU(), CacheControl()
70 This is a rather CPU dependant function. You should replace it
73 ******************************************************************************/
77 /* This function is entirely architecture-specific. Replace when needed. */