2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: CacheControl() - Global control of the system caches.
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
13 /* See rom/exec/cachecontrol.c for documentation */
15 extern void AROS_SLIB_ENTRY(CacheControl_00
,Exec
,108)(void);
16 extern void AROS_SLIB_ENTRY(CacheControl_20
,Exec
,108)(void);
17 extern void AROS_SLIB_ENTRY(CacheControl_40
,Exec
,108)(void);
19 #include <proto/exec.h>
21 AROS_LH2(ULONG
, CacheControl
,
22 AROS_LHA(ULONG
, cacheBits
, D0
),
23 AROS_LHA(ULONG
, cacheMask
, D1
),
24 struct ExecBase
*, SysBase
, 108, Exec
)
30 if (SysBase
->AttnFlags
& AFF_68040
) {
31 /* 68040/68060 support */
32 func
= AROS_SLIB_ENTRY(CacheControl_40
, Exec
, 108);
33 } else if (SysBase
->AttnFlags
& AFF_68020
) {
34 /* 68020/68030 support */
35 func
= AROS_SLIB_ENTRY(CacheControl_20
, Exec
, 108);
37 /* Everybody else (68000, 68010) */
38 func
= AROS_SLIB_ENTRY(CacheControl_00
, Exec
, 108);
40 SetFunction((struct Library
*)SysBase
, -LIB_VECTSIZE
* 108, func
);
43 return CacheControl(cacheBits
, cacheMask
);