summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_jz47xx/crt0.S
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/crt0.S')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/crt0.S72
1 files changed, 36 insertions, 36 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/crt0.S b/firmware/target/mips/ingenic_jz47xx/crt0.S
index ce74b78e81..258a5c02fc 100644
--- a/firmware/target/mips/ingenic_jz47xx/crt0.S
+++ b/firmware/target/mips/ingenic_jz47xx/crt0.S
@@ -108,7 +108,7 @@ _cache_loop:
108 cache 0x9, 0(t0) # index store dcache tag 108 cache 0x9, 0(t0) # index store dcache tag
109 addiu t0, t0, 0x20 # 32 bytes per cache line 109 addiu t0, t0, 0x20 # 32 bytes per cache line
110 bne t0, t1, _cache_loop 110 bne t0, t1, _cache_loop
111 nop 111 ssnop
112 112
113 /* 113 /*
114 ---------------------------------------------------- 114 ----------------------------------------------------
@@ -116,10 +116,10 @@ _cache_loop:
116 ---------------------------------------------------- 116 ----------------------------------------------------
117 */ 117 */
118 mfc0 t0, C0_CONFIG 118 mfc0 t0, C0_CONFIG
119 nop 119 ssnop
120 ori t0, 2 120 ori t0, 2
121 mtc0 t0, C0_CONFIG 121 mtc0 t0, C0_CONFIG
122 nop 122 ssnop
123 123
124 /* 124 /*
125 ---------------------------------------------------- 125 ----------------------------------------------------
@@ -183,9 +183,9 @@ _irq_stack_loop:
183 ---------------------------------------------------- 183 ----------------------------------------------------
184 */ 184 */
185 jal system_main /* Init clocks etc first */ 185 jal system_main /* Init clocks etc first */
186 nop 186 ssnop
187 j main 187 j main
188 nop 188 ssnop
189 189
190 190
191 /* 191 /*
@@ -197,19 +197,19 @@ _irq_stack_loop:
197 197
198 .section .vectors.1, "ax", %progbits 198 .section .vectors.1, "ax", %progbits
199 j tlb_refill_handler 199 j tlb_refill_handler
200 nop 200 ssnop
201 201
202 .section .vectors.2, "ax", %progbits 202 .section .vectors.2, "ax", %progbits
203 j real_exception_handler 203 j real_exception_handler
204 nop 204 ssnop
205 205
206 .section .vectors.3, "ax", %progbits 206 .section .vectors.3, "ax", %progbits
207 j real_exception_handler 207 j real_exception_handler
208 nop 208 ssnop
209 209
210 .section .vectors.4, "ax", %progbits 210 .section .vectors.4, "ax", %progbits
211 j real_exception_handler 211 j real_exception_handler
212 nop 212 ssnop
213 213
214 .section .vectors, "ax", %progbits 214 .section .vectors, "ax", %progbits
215real_exception_handler: 215real_exception_handler:
@@ -253,47 +253,47 @@ real_exception_handler:
253 sw v0, 0x68(sp) 253 sw v0, 0x68(sp)
254 sw $1, 0x6C(sp) 254 sw $1, 0x6C(sp)
255 mflo k0 255 mflo k0
256 nop 256 ssnop
257 sw k0, 0x70(sp) 257 sw k0, 0x70(sp)
258 mfhi k0 258 mfhi k0
259 nop 259 ssnop
260 sw k0, 0x74(sp) 260 sw k0, 0x74(sp)
261 mfc0 k0, C0_STATUS 261 mfc0 k0, C0_STATUS
262 nop 262 ssnop
263 nop 263 ssnop
264 nop 264 ssnop
265 sw k0, 0x78(sp) 265 sw k0, 0x78(sp)
266 mfc0 k0, C0_EPC 266 mfc0 k0, C0_EPC
267 nop 267 ssnop
268 nop 268 ssnop
269 nop 269 ssnop
270 sw k0, 0x7C(sp) 270 sw k0, 0x7C(sp)
271 271
272 li k1, M_CauseExcCode 272 li k1, M_CauseExcCode
273 mfc0 k0, C0_CAUSE 273 mfc0 k0, C0_CAUSE
274 and k0, k1 274 and k0, k1
275 beq zero, k0, _int 275 beq zero, k0, _int
276 nop 276 ssnop
277 j _exception 277 j _exception
278 nop 278 ssnop
279 279
280_int: 280_int:
281 jal intr_handler 281 jal intr_handler
282 nop 282 ssnop
283 j _exception_return 283 j _exception_return
284 284
285_exception: 285_exception:
286 move a0, sp 286 move a0, sp
287 mfc0 a1, C0_CAUSE 287 mfc0 a1, C0_CAUSE
288 nop 288 ssnop
289 nop 289 ssnop
290 nop 290 ssnop
291 mfc0 a2, C0_EPC 291 mfc0 a2, C0_EPC
292 nop 292 ssnop
293 nop 293 ssnop
294 nop 294 ssnop
295 jal exception_handler 295 jal exception_handler
296 nop 296 ssnop
297 297
298_exception_return: 298_exception_return:
299 lw ra, 0(sp) 299 lw ra, 0(sp)
@@ -326,23 +326,23 @@ _exception_return:
326 lw $1, 0x6C(sp) 326 lw $1, 0x6C(sp)
327 lw k0, 0x70(sp) 327 lw k0, 0x70(sp)
328 mtlo k0 328 mtlo k0
329 nop 329 ssnop
330 lw k0, 0x74(sp) 330 lw k0, 0x74(sp)
331 mthi k0 331 mthi k0
332 nop 332 ssnop
333 lw k0, 0x78(sp) 333 lw k0, 0x78(sp)
334 mtc0 k0, C0_STATUS 334 mtc0 k0, C0_STATUS
335 nop 335 ssnop
336 nop 336 ssnop
337 nop 337 ssnop
338 lw k0, 0x7C(sp) 338 lw k0, 0x7C(sp)
339 mtc0 k0, C0_EPC 339 mtc0 k0, C0_EPC
340 nop 340 ssnop
341 nop 341 ssnop
342 nop 342 ssnop
343 /* Restore previous stack pointer */ 343 /* Restore previous stack pointer */
344 lw sp, 0x80(sp) 344 lw sp, 0x80(sp)
345 eret 345 eret
346 nop 346 ssnop
347 .set reorder 347 .set reorder
348 .set at 348 .set at