diff options
author | Graf Yang <graf.yang@analog.com> | 2008-10-16 10:50:46 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-16 10:50:46 -0400 |
commit | b4f5c58fd1de11f698d95beb1e67d5b8f97fbe66 (patch) | |
tree | 855338d2cad2a1b3aa144a4e6cbc0471d973e76d | |
parent | 121e598f5d5a9cc7e3bbd203a5c97afa1c46c521 (diff) |
Blackfin arch: Zero out bss region in L1/L2 memory.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r-- | arch/blackfin/mach-common/head.S | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index 3069df580729..f123a62e2451 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
@@ -206,6 +206,60 @@ ENTRY(_real_start) | |||
206 | w[p0] = r0; | 206 | w[p0] = r0; |
207 | ssync; | 207 | ssync; |
208 | 208 | ||
209 | #if L1_DATA_A_LENGTH > 0 | ||
210 | r1.l = __sbss_l1; | ||
211 | r1.h = __sbss_l1; | ||
212 | r2.l = __ebss_l1; | ||
213 | r2.h = __ebss_l1; | ||
214 | r0 = 0 (z); | ||
215 | r2 = r2 - r1; | ||
216 | cc = r2 == 0; | ||
217 | if cc jump .L_a_l1_done; | ||
218 | r2 >>= 2; | ||
219 | p1 = r1; | ||
220 | p2 = r2; | ||
221 | lsetup (.L_clear_a_l1, .L_clear_a_l1 ) lc0 = p2; | ||
222 | .L_clear_a_l1: | ||
223 | [p1++] = r0; | ||
224 | .L_a_l1_done: | ||
225 | #endif | ||
226 | |||
227 | #if L1_DATA_B_LENGTH > 0 | ||
228 | r1.l = __sbss_b_l1; | ||
229 | r1.h = __sbss_b_l1; | ||
230 | r2.l = __ebss_b_l1; | ||
231 | r2.h = __ebss_b_l1; | ||
232 | r0 = 0 (z); | ||
233 | r2 = r2 - r1; | ||
234 | cc = r2 == 0; | ||
235 | if cc jump .L_b_l1_done; | ||
236 | r2 >>= 2; | ||
237 | p1 = r1; | ||
238 | p2 = r2; | ||
239 | lsetup (.L_clear_b_l1, .L_clear_b_l1 ) lc0 = p2; | ||
240 | .L_clear_b_l1: | ||
241 | [p1++] = r0; | ||
242 | .L_b_l1_done: | ||
243 | #endif | ||
244 | |||
245 | #if L2_LENGTH > 0 | ||
246 | r1.l = __sbss_l2; | ||
247 | r1.h = __sbss_l2; | ||
248 | r2.l = __ebss_l2; | ||
249 | r2.h = __ebss_l2; | ||
250 | r0 = 0 (z); | ||
251 | r2 = r2 - r1; | ||
252 | cc = r2 == 0; | ||
253 | if cc jump .L_l2_done; | ||
254 | r2 >>= 2; | ||
255 | p1 = r1; | ||
256 | p2 = r2; | ||
257 | lsetup (.L_clear_l2, .L_clear_l2 ) lc0 = p2; | ||
258 | .L_clear_l2: | ||
259 | [p1++] = r0; | ||
260 | .L_l2_done: | ||
261 | #endif | ||
262 | |||
209 | /* Zero out the bss region | 263 | /* Zero out the bss region |
210 | * Note: this will fail if bss is 0 bytes ... | 264 | * Note: this will fail if bss is 0 bytes ... |
211 | */ | 265 | */ |