URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [orp/] [orp_soc/] [sw.old/] [support/] [reset-ic.S] - Rev 1782
Compare with Previous | Blame | View Log
#include "spr_defs.h"
.extern _main
.global _reset_except
_reset_except:
l.movhi r0, 0x0
l.slli r0,r0,16
l.addi r1,r0,0x0
l.addi r2,r0,0x0
l.addi r3,r0,0x0
l.addi r4,r0,0x0
l.addi r5,r0,0x0
l.addi r6,r0,0x0
l.addi r7,r0,0x0
l.addi r8,r0,0x0
l.addi r9,r0,0x1234
l.addi r10,r0,0x0
l.addi r11,r0,0x0
l.addi r12,r0,0x0
l.addi r13,r0,0x0
l.addi r14,r0,0x0
l.addi r15,r0,0x0
l.addi r16,r0,0x0
l.addi r17,r0,0x0
l.addi r18,r0,0x0
l.addi r19,r0,0x0
l.addi r20,r0,0x0
l.addi r21,r0,0x0
l.addi r22,r0,0x0
l.addi r23,r0,0x0
l.addi r24,r0,0x0
l.addi r25,r0,0x0
l.addi r26,r0,0x0
l.addi r27,r0,0x0
l.addi r28,r0,0x0
l.addi r29,r0,0x0
l.addi r30,r0,0x0
l.addi r31,r0,0x0
/* Flush IC */
l.addi r10,r0,0
l.addi r11,r0,8192
loop:
l.mtspr r0,r10,SPR_ICBIR
l.sfne r10,r11
l.bf loop
l.addi r10,r10,16
/* Enable IC */
l.addi r10,r0,(SPR_SR_ICE|SPR_SR_SUPV)
l.mtspr r0,r10,SPR_SR
l.nop
l.nop
l.nop
l.nop
l.nop
/* Set stack pointer */
l.movhi r1,hi(0x801fff00)
l.addi r1,r1,lo(0x801fff00)
l.addi r1,r1,-4
/* Jump to main */
l.movhi r2,hi(_main)
l.ori r2,r2,lo(_main)
l.jr r2
l.addi r2,r0,0