This source file includes following definitions.
- enable_vac
- disable_vac
- hw_flush_vac_context_entry
- sw_flush_vac_context_entry
- hw_flush_vac_segment_entry
- sw_flush_vac_segment_entry
- hw_flush_vac_page_entry
- sw_flush_vac_page_entry
1
2
3
4
5
6
7
8
9
10
11 extern __inline__ int enable_vac()
12 {
13 int success;
14
15 &success;
16
17 __asm__ __volatile__("lduba [%1] 2, %0\n\t"
18 "or %0, 0x10, %0\n\t"
19 "stba %0, [%1] 2\n\t"
20 "or %%g0, %%g0, %0" :
21 "=r" (success) :
22 "r" ((unsigned int) 0x40000000),
23 "0" (success));
24 return success;
25 }
26
27
28
29
30
31 extern __inline__ int disable_vac()
32 {
33 int success;
34
35 __asm__ __volatile__("lduba [%1] 0x2, %0\n\t"
36 "xor %0, 0x10, %0\n\t"
37 "stba %0, [%1] 0x2\n\t"
38 "or %%g0, %%g0, %0" :
39 "=r" (success) :
40 "r" (0x40000000),
41 "0" (success));
42 return success;
43 }
44
45
46
47 extern __inline__ void hw_flush_vac_context_entry(char* addr)
48 {
49 __asm__ __volatile__("sta %%g0, [%0] 0x7" : : "r" (addr));
50 }
51
52 extern __inline__ void sw_flush_vac_context_entry(char* addr)
53 {
54 __asm__ __volatile__("sta %%g0, [%0] 0xe" : : "r" (addr));
55 }
56
57 extern __inline__ void hw_flush_vac_segment_entry(char* addr)
58 {
59 __asm__ __volatile__("sta %%g0, [%0] 0x5" : : "r" (addr));
60 }
61
62 extern __inline__ void sw_flush_vac_segment_entry(char* addr)
63 {
64 __asm__ __volatile__("sta %%g0, [%0] 0xc" : : "r" (addr));
65 }
66
67 extern __inline__ void hw_flush_vac_page_entry(char* addr)
68 {
69 __asm__ __volatile__("sta %%g0, [%0] 0x6" : : "r" (addr));
70 }
71
72 extern __inline__ void sw_flush_vac_page_entry(char* addr)
73 {
74 __asm__ __volatile__("sta %%g0, [%0] 0xd" : : "r" (addr));
75 }
76