summaryrefslogtreecommitdiff
path: root/utils/atj2137/adfuload
diff options
context:
space:
mode:
Diffstat (limited to 'utils/atj2137/adfuload')
-rw-r--r--utils/atj2137/adfuload/test_binary/backlight_c/crt0.S15
-rw-r--r--utils/atj2137/adfuload/test_binary/timer_irq/crt0.S15
-rw-r--r--utils/atj2137/adfuload/test_binary/timer_irq/irq_handler.S2
-rw-r--r--utils/atj2137/adfuload/test_binary/timer_no_irq/crt0.S15
4 files changed, 25 insertions, 22 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:
26reloc_loop: 26reloc_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
33entry_point_jump: 33entry_point_jump:
34 la t0, entry_point 34 la t0, entry_point
@@ -49,17 +49,18 @@ entry_point:
49cache_init_loop: 49cache_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
59clear_bss_loop: 60clear_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
69stack_munge_loop: 70stack_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
diff --git a/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S b/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S
index eb78ba4fee..29fef6404f 100644
--- a/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S
+++ b/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S
@@ -29,9 +29,9 @@ load_addr:
29reloc_loop: 29reloc_loop:
30 lw t2, 0(v0) # src 30 lw t2, 0(v0) # src
31 addiu v0, 4 # inc src addr 31 addiu v0, 4 # inc src addr
32 sw t2, 0(t0) # dst
33 bne t0, t1, reloc_loop
34 addiu t0, 4 # inc dst addr 32 addiu t0, 4 # inc dst addr
33 bne t0, t1, reloc_loop
34 sw t2, -4(t0) # dst
35 35
36cache_init: 36cache_init:
37 # setup caches 37 # setup caches
@@ -47,8 +47,9 @@ cache_init:
47cache_init_loop: 47cache_init_loop:
48 cache 8, 0(t0) # index store icache tag 48 cache 8, 0(t0) # index store icache tag
49 cache 9, 0(t0) # index store dcache tag 49 cache 9, 0(t0) # index store dcache tag
50 bne t0, t1, cache_init_loop
51 addiu t0, t0, 0x10 50 addiu t0, t0, 0x10
51 bne t0, t1, cache_init_loop
52 nop
52 53
53intc_setup: 54intc_setup:
54 li t0, 0xb0020000 # INTC base 55 li t0, 0xb0020000 # INTC base
@@ -73,9 +74,9 @@ core_irq_setup:
73 la t1, bssend 74 la t1, bssend
74 75
75clear_bss_loop: 76clear_bss_loop:
76 sw zero, 0(t0)
77 bne t0, t1, clear_bss_loop
78 addiu t0, 4 77 addiu t0, 4
78 bne t0, t1, clear_bss_loop
79 sw zero, -4(t0)
79 80
80 # setup stack 81 # setup stack
81 la k0, irqstackend 82 la k0, irqstackend
@@ -84,9 +85,9 @@ clear_bss_loop:
84 li t1, 0xdeadbeef 85 li t1, 0xdeadbeef
85 86
86stack_munge_loop: 87stack_munge_loop:
87 sw t1, 0(t0)
88 bne t0, sp, stack_munge_loop
89 addiu t0, 4 88 addiu t0, 4
89 bne t0, sp, stack_munge_loop
90 sw t1, -4(t0)
90 91
91 # jump to C code with enabled interrupts 92 # jump to C code with enabled interrupts
92 la t0, main 93 la t0, main
diff --git a/utils/atj2137/adfuload/test_binary/timer_irq/irq_handler.S b/utils/atj2137/adfuload/test_binary/timer_irq/irq_handler.S
index 1d58c60f70..a9ae340810 100644
--- a/utils/atj2137/adfuload/test_binary/timer_irq/irq_handler.S
+++ b/utils/atj2137/adfuload/test_binary/timer_irq/irq_handler.S
@@ -83,7 +83,7 @@ irq_handler:
83 lw fp, 68(sp) 83 lw fp, 68(sp)
84 lw ra, 72(sp) 84 lw ra, 72(sp)
85 85
86 addiu sp, sp, 88 86 addiu sp, sp, 84
87 move sp, k1 87 move sp, k1
88 eret 88 eret
89 89
diff --git a/utils/atj2137/adfuload/test_binary/timer_no_irq/crt0.S b/utils/atj2137/adfuload/test_binary/timer_no_irq/crt0.S
index e03b8b5439..485a4fc26c 100644
--- a/utils/atj2137/adfuload/test_binary/timer_no_irq/crt0.S
+++ b/utils/atj2137/adfuload/test_binary/timer_no_irq/crt0.S
@@ -26,9 +26,9 @@ load_addr:
26reloc_loop: 26reloc_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
33entry_point_jump: 33entry_point_jump:
34 la t0, entry_point 34 la t0, entry_point
@@ -49,17 +49,18 @@ entry_point:
49cache_init_loop: 49cache_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
59clear_bss_loop: 60clear_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
69stack_munge_loop: 70stack_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