diff options
-rw-r--r-- | utils/atj2137/adfuload/test_binary/timer_irq/crt0.S | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S b/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S index 7b46164ab4..eb78ba4fee 100644 --- a/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S +++ b/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S | |||
@@ -18,9 +18,12 @@ load_addr: | |||
18 | addiu v0, ra, -12 # calc real load address | 18 | addiu v0, ra, -12 # calc real load address |
19 | # account for branch delay slot | 19 | # account for branch delay slot |
20 | # and very first 'di' instruction | 20 | # and very first 'di' instruction |
21 | la t0, relocstart | 21 | lui t3, 0xa000 # use KSEG1 uncached unmapped |
22 | la t0, relocstart # addresses as we don't know | ||
23 | or t0, t0, t3 # the state of caches | ||
22 | la t1, relocend | 24 | la t1, relocend |
23 | beq t0, v0, entry_point # no relocation needed | 25 | or t1, t1, t3 |
26 | beq t0, v0, cache_init # no relocation needed | ||
24 | nop | 27 | nop |
25 | 28 | ||
26 | reloc_loop: | 29 | reloc_loop: |
@@ -30,12 +33,7 @@ reloc_loop: | |||
30 | bne t0, t1, reloc_loop | 33 | bne t0, t1, reloc_loop |
31 | addiu t0, 4 # inc dst addr | 34 | addiu t0, 4 # inc dst addr |
32 | 35 | ||
33 | entry_point_jump: | 36 | cache_init: |
34 | la t0, entry_point | ||
35 | jr t0 | ||
36 | nop | ||
37 | |||
38 | entry_point: | ||
39 | # setup caches | 37 | # setup caches |
40 | # 4-way, 256 sets, 16 bytes cacheline I/D | 38 | # 4-way, 256 sets, 16 bytes cacheline I/D |
41 | li t0, 3 # enable cache for kseg0 accesses | 39 | li t0, 3 # enable cache for kseg0 accesses |
@@ -91,7 +89,8 @@ stack_munge_loop: | |||
91 | addiu t0, 4 | 89 | addiu t0, 4 |
92 | 90 | ||
93 | # jump to C code with enabled interrupts | 91 | # jump to C code with enabled interrupts |
94 | j main | 92 | la t0, main |
93 | jr t0 | ||
95 | ei | 94 | ei |
96 | 95 | ||
97 | .set at | 96 | .set at |