2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: CacheClearE() - Clear the caches with extended control, ARM Linux-hosted implementation
9 #include <exec/execbase.h>
10 #include <aros/atomic.h>
11 #include <aros/libcall.h>
12 #include <proto/exec.h>
14 #include <aros/debug.h>
16 AROS_LH3(void, CacheClearE
,
17 AROS_LHA(APTR
, address
, A0
),
18 AROS_LHA(ULONG
, length
, D0
),
19 AROS_LHA(ULONG
, caches
, D1
),
20 struct ExecBase
*, SysBase
, 107, Exec
)
24 D(bug("CacheClearE(%08x, %08x, %x)\n", address
, length
, caches
));
26 /* Linux supports only instruction cache flush */
27 if (caches
& CACRF_ClearI
)
29 /* Forbid(). We inline it because we could use real executable jumptable,
30 in this case this function can be called for validating ExecBase
32 AROS_ATOMIC_INC(SysBase
->TDNestCnt
);
34 const int syscall
= 0xf0002;
42 : "r" (address
), "r" ((IPTR
)address
+ length
), "r" (syscall
)
43 : "r0", "r1", "r2", "r7", "memory"
46 /* It's okay to use library base now */