diff options
Diffstat (limited to 'utils/hwstub/stub/atj213x/crt0.S')
-rw-r--r-- | utils/hwstub/stub/atj213x/crt0.S | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/utils/hwstub/stub/atj213x/crt0.S b/utils/hwstub/stub/atj213x/crt0.S index 7d5bcde9b2..32797b513a 100644 --- a/utils/hwstub/stub/atj213x/crt0.S +++ b/utils/hwstub/stub/atj213x/crt0.S | |||
@@ -130,38 +130,34 @@ stack_munge_loop: | |||
130 | bne t0, sp, stack_munge_loop | 130 | bne t0, sp, stack_munge_loop |
131 | addiu t0, 4 | 131 | addiu t0, 4 |
132 | 132 | ||
133 | # setup Global Pointer | ||
134 | la gp, _gp | ||
135 | |||
133 | # jump to C code with enabled interrupts | 136 | # jump to C code with enabled interrupts |
134 | la t0, main | 137 | la t0, main |
135 | jr.hb t0 | 138 | jr.hb t0 |
136 | ei | 139 | ei |
137 | 140 | ||
138 | .extern exception_jmp_ctx_ptr | ||
139 | .global tlb_refill_handler | 141 | .global tlb_refill_handler |
140 | .section .exception.tlb_refill,"ax",%progbits | 142 | .section .exception.tlb_refill,"ax",%progbits |
141 | 143 | ||
142 | tlb_refill_handler: | 144 | tlb_refill_handler: |
145 | j restore_exception_jmp | ||
143 | li a0, EXCEPTION_ADDR | 146 | li a0, EXCEPTION_ADDR |
144 | la k0, restore_exception_jmp | ||
145 | jr k0 | ||
146 | nop | ||
147 | 147 | ||
148 | .global cache_error_handler | 148 | .global cache_error_handler |
149 | .section .exception.cache_error,"ax",%progbits | 149 | .section .exception.cache_error,"ax",%progbits |
150 | 150 | ||
151 | cache_error_handler: | 151 | cache_error_handler: |
152 | j restore_exception_jmp | ||
152 | li a0, EXCEPTION_ADDR | 153 | li a0, EXCEPTION_ADDR |
153 | la k0, restore_exception_jmp | ||
154 | jr k0 | ||
155 | nop | ||
156 | 154 | ||
157 | .global general_exception_handler | 155 | .global general_exception_handler |
158 | .section .exception.general_exception,"ax",%progbits | 156 | .section .exception.general_exception,"ax",%progbits |
159 | 157 | ||
160 | general_exception_handler: | 158 | general_exception_handler: |
159 | j restore_exception_jmp | ||
161 | li a0, EXCEPTION_UNSP | 160 | li a0, EXCEPTION_UNSP |
162 | la k0, restore_exception_jmp | ||
163 | jr k0 | ||
164 | nop | ||
165 | 161 | ||
166 | /* s0-s7 not saved as this are callee saved registers | 162 | /* s0-s7 not saved as this are callee saved registers |
167 | * CO_STATUS is not saved as nested interrupts are not supported | 163 | * CO_STATUS is not saved as nested interrupts are not supported |
@@ -249,8 +245,6 @@ restore: | |||
249 | addiu sp, sp, 84 | 245 | addiu sp, sp, 84 |
250 | move sp, k1 | 246 | move sp, k1 |
251 | eret | 247 | eret |
252 | nop | ||
253 | 248 | ||
254 | .set reorder | 249 | .set reorder |
255 | .set at | 250 | .set at |
256 | |||