diff options
Diffstat (limited to 'libcpu/mips')
| -rw-r--r-- | libcpu/mips/jz47xx/stack.c | 5 | ||||
| -rw-r--r-- | libcpu/mips/loongson/start_gcc.S | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/libcpu/mips/jz47xx/stack.c b/libcpu/mips/jz47xx/stack.c index 947408354d..33dbaf5b64 100644 --- a/libcpu/mips/jz47xx/stack.c +++ b/libcpu/mips/jz47xx/stack.c @@ -43,7 +43,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter, rt_uint8_t *stack_ad {
g_sr = cp0_get_status();
g_sr &= 0xfffffffe;
- g_sr |= 0x8403;
+ g_sr |= 0x0403;
}
/** Start at stack top */
@@ -53,8 +53,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter, rt_uint8_t *stack_ad *(--stk) = (rt_uint32_t) 0xffff; /* c0_badvaddr */
*(--stk) = (rt_uint32_t) cp0_get_lo(); /* lo */
*(--stk) = (rt_uint32_t) cp0_get_hi(); /* hi */
- // *(--stk) = (rt_uint32_t) g_sr; /* C0_SR: HW2 = En, IE = En */
- *(--stk) = (rt_uint32_t) 0xFC01; /* C0_SR: HW2 = En, IE = En */
+ *(--stk) = (rt_uint32_t) g_sr; /* C0_SR: HW2 = En, IE = En */
*(--stk) = (rt_uint32_t) texit; /* ra */
*(--stk) = (rt_uint32_t) 0x0000001e; /* s8 */
*(--stk) = (rt_uint32_t) stack_addr; /* sp */
diff --git a/libcpu/mips/loongson/start_gcc.S b/libcpu/mips/loongson/start_gcc.S index 42e19b5d99..200e98d04a 100644 --- a/libcpu/mips/loongson/start_gcc.S +++ b/libcpu/mips/loongson/start_gcc.S @@ -36,6 +36,7 @@ _start: li sp, SYSTEM_STACK
la gp, _gp
+#if 0
/* copy IRAM section */
la t0, _iramcopy
la t1, _iramstart
@@ -46,6 +47,7 @@ _iram_loop: addiu t1, 4
bne t1, t2, _iram_loop
addiu t0, 4
+#endif
/* clear bss */
la t0, __bss_start
@@ -94,6 +96,9 @@ cp0_get_lo: /* Exception Handler */
/* 0x0 - TLB refill handler */
.section .vectors.1, "ax", %progbits
+ .global tlb_refill_exception
+ .type tlb_refill_exception,@function
+tlb_refill_exception:
j tlb_refill_handler
nop
@@ -104,11 +109,17 @@ cp0_get_lo: /* 0x180 - Exception/Interrupt handler */
.section .vectors.3, "ax", %progbits
+ .global general_exception
+ .type general_exception,@function
+general_exception:
j _general_exception_handler
nop
/* 0x200 - Special Exception Interrupt handler (when IV is set in CP0_CAUSE) */
.section .vectors.4, "ax", %progbits
+ .global irq_exception
+ .type irq_exception,@function
+irq_exception:
j _irq_handler
nop
|
