diff options
Diffstat (limited to 'utils/atj2137/adfuload/test_binary/backlight_c')
-rw-r--r-- | utils/atj2137/adfuload/test_binary/backlight_c/crt0.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S b/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S index e03b8b5439..485a4fc26c 100644 --- a/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S +++ b/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S | |||
@@ -26,9 +26,9 @@ load_addr: | |||
26 | reloc_loop: | 26 | reloc_loop: |
27 | lw t2, 0(v0) # src | 27 | lw t2, 0(v0) # src |
28 | addiu v0, 4 # inc src addr | 28 | addiu v0, 4 # inc src addr |
29 | sw t2, 0(t0) # dst | ||
30 | bne t0, t1, reloc_loop | ||
31 | addiu t0, 4 # inc dst addr | 29 | addiu t0, 4 # inc dst addr |
30 | bne t0, t1, reloc_loop | ||
31 | sw t2, -4(t0) # dst | ||
32 | 32 | ||
33 | entry_point_jump: | 33 | entry_point_jump: |
34 | la t0, entry_point | 34 | la t0, entry_point |
@@ -49,17 +49,18 @@ entry_point: | |||
49 | cache_init_loop: | 49 | cache_init_loop: |
50 | cache 8, 0(t0) # index store icache tag | 50 | cache 8, 0(t0) # index store icache tag |
51 | cache 9, 0(t0) # index store dcache tag | 51 | cache 9, 0(t0) # index store dcache tag |
52 | bne t0, t1, cache_init_loop | ||
53 | addiu t0, t0, 0x10 | 52 | addiu t0, t0, 0x10 |
53 | bne t0, t1, cache_init_loop | ||
54 | nop | ||
54 | 55 | ||
55 | # clear bss | 56 | # clear bss |
56 | la t0, bssbegin | 57 | la t0, bssbegin |
57 | la t1, bssend | 58 | la t1, bssend |
58 | 59 | ||
59 | clear_bss_loop: | 60 | clear_bss_loop: |
60 | sw zero, 0(t0) | ||
61 | bne t0, t1, clear_bss_loop | ||
62 | addiu t0, 4 | 61 | addiu t0, 4 |
62 | bne t0, t1, clear_bss_loop | ||
63 | sw zero, -4(t0) | ||
63 | 64 | ||
64 | # setup stack | 65 | # setup stack |
65 | la sp, stackend | 66 | la sp, stackend |
@@ -67,9 +68,9 @@ clear_bss_loop: | |||
67 | li t1, 0xdeadbeef | 68 | li t1, 0xdeadbeef |
68 | 69 | ||
69 | stack_munge_loop: | 70 | stack_munge_loop: |
70 | sw t1, 0(t0) | ||
71 | bne t0, sp, stack_munge_loop | ||
72 | addiu t0, 4 | 71 | addiu t0, 4 |
72 | bne t0, sp, stack_munge_loop | ||
73 | sw t1, -4(t0) | ||
73 | 74 | ||
74 | # jump to C code | 75 | # jump to C code |
75 | j main | 76 | j main |