6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>
#include "proc-macros.S"
ENTRY(__flush_dcache_all)
dsb sy
mrs x0, clidr_el1
and x3, x0, #0x7000000
lsr x3, x3, #23
cbz x3, finished
mov x10, #0
loop1:
add x2, x10, x10, lsr #1
lsr x1, x0, x2
and x1, x1, #7
cmp x1, #2
b.lt skip
save_and_disable_irqs x9
msr csselr_el1, x10
isb
mrs x1, ccsidr_el1
restore_irqs x9
and x2, x1, #7
add x2, x2, #4
mov x4, #0x3ff
and x4, x4, x1, lsr #3
clz w5, w4
mov x7, #0x7fff
and x7, x7, x1, lsr #13
loop2:
mov x9, x4
loop3:
lsl x6, x9, x5
orr x11, x10, x6
lsl x6, x7, x2
orr x11, x11, x6
dc cisw, x11
subs x9, x9, #1
b.ge loop3
subs x7, x7, #1
b.ge loop2
skip:
add x10, x10, #2
cmp x3, x10
b.gt loop1
finished:
mov x10, #0
msr csselr_el1, x10
dsb sy
isb
ret
ENDPROC(__flush_dcache_all)
ENTRY(flush_cache_all)
mov x12, lr
bl __flush_dcache_all
mov x0, #0
ic ialluis
ret x12
ENDPROC(flush_cache_all)
ENTRY(flush_icache_range)
ENTRY(__flush_cache_user_range)
dcache_line_size x2, x3
sub x3, x2, #1
bic x4, x0, x3
1:
USER(9f, dc cvau, x4 )
add x4, x4, x2
cmp x4, x1
b.lo 1b
dsb sy
icache_line_size x2, x3
sub x3, x2, #1
bic x4, x0, x3
1:
USER(9f, ic ivau, x4 )
add x4, x4, x2
cmp x4, x1
b.lo 1b
9:
dsb sy
isb
ret
ENDPROC(flush_icache_range)
ENDPROC(__flush_cache_user_range)
ENTRY(__flush_dcache_area)
dcache_line_size x2, x3
add x1, x0, x1
sub x3, x2, #1
bic x0, x0, x3
1: dc civac, x0
add x0, x0, x2
cmp x0, x1
b.lo 1b
dsb sy
ret
ENDPROC(__flush_dcache_area)
|