1
2
3
4
5
6
7 #include "s4clow.h"
8
9
10
11
12 .text
13 .align 4
14 .globl sun4c_segment_cache_flush
15 sun4c_segment_cache_flush:
16 std %g0, [REGSAVE_BASE + FLUSHREGS + 0x0]
17 std %g2, [REGSAVE_BASE + FLUSHREGS + 0x8]
18 set C_LABEL(sun4c_vacinfo), %g2
19 ld [%g2 + VACINFO_HWFLSH], %g3
20 cmp %g3, 0x0
21 ld [%g2 + VACINFO_SIZE], %g3
22 add %g1, %g3, %g3
23 be,a sw_flush
24 ld [%g2 + VACINFO_LSIZE], %g2
25
26
27 sethi %hi(PAGE_SIZE), %g2
28 sta %g0, [%g1] 0x05
29 1:
30 add %g1, %g2, %g1
31 cmp %g1, %g3
32 blu,a 1b
33 sta %g0, [%g1] 0x05
34
35 ldd [REGSAVE_BASE + FLUSHREGS + 0x0], %g0
36 jmpl %g4, %g0
37 ldd [REGSAVE_BASE + FLUSHREGS + 0x8], %g2
38
39 sw_flush:
40 sta %g0, [%g1] 0x0c
41 2:
42 add %g1, %g2, %g1
43 cmp %g1, %g3
44 blu,a 2b
45 sta %g0, [%g1] 0x0c
46
47 ldd [REGSAVE_BASE + FLUSHREGS + 0x0], %g0
48 jmpl %g4, %g0
49 ldd [REGSAVE_BASE + FLUSHREGS + 0x8], %g2