2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: CacheControl() - Global control of the system caches.
9 #include "aros/m68k/asm.h"
17 .globl AROS_SLIB_ENTRY(CacheControl_00,Exec,108)
18 .type AROS_SLIB_ENTRY(CacheControl_00,Exec,108),@function
19 AROS_SLIB_ENTRY(CacheControl_00,Exec,108):
20 /* 68000/010 have no caches */
34 .globl AROS_SLIB_ENTRY(CacheControl_20,Exec,108)
35 .type AROS_SLIB_ENTRY(CacheControl_20,Exec,108),@function
36 AROS_SLIB_ENTRY(CacheControl_20,Exec,108):
43 lea.l cachecontrolsup_20,%a5
48 movem.l %d2/%d3,-(%sp)
57 or.w #0x0808,%d3 // CACRF_ClearI|CACRF_ClearD
59 movem.l (%sp)+,%d2/%d3
68 .globl AROS_SLIB_ENTRY(CacheControl_40,Exec,108)
69 .type AROS_SLIB_ENTRY(CacheControl_40,Exec,108),@function
70 AROS_SLIB_ENTRY(CacheControl_40,Exec,108):
77 lea.l cachecontrolsup_40,%a5
82 movem.l %d2/%d3,-(%sp)
85 and.l #0x0101,%d1 // CACRF_EnableI|CACRF_EnableD
86 and.l #0x0101,%d2 // CACRF_EnableI|CACRF_EnableD
111 // documentation says caches must be
112 // flushed before modifying cache state.
120 // 040/060 code cache?
124 or.w #0x0011,%d0 // CACRF_IBE|CACRF_EnableI
125 1: // 040/060 data cache?
128 // ->data+burst+copyback
129 or.l #0x80001100,%d0 // CACRF_CopyBack|CACRF_DBE|CACRF_EnableE
131 movem.l (%sp)+,%d2/%d3
141 movem.l %d0-%d1/%a0-%a1,-(%sp)
147 movem.l (%sp)+,%d0-%d1/%a0-%a1
150 movem.l %d0-%d1/%a0-%a1,-(%sp)
155 movem.l (%sp)+,%d0-%d1/%a0-%a1
158 .string "CO(%08x,%08x)"