From 1b84c89a560c20171b83971f6cda6cd896fcd71c Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Sun, 5 Sep 2010 23:43:35 +0000 Subject: update jz47xx branch code. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@894 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- libcpu/mips/jz47xx/jz47xx.h | 2 +- libcpu/mips/jz47xx/stack.c | 3 ++- libcpu/mips/jz47xx/start_gcc.S | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'libcpu') diff --git a/libcpu/mips/jz47xx/jz47xx.h b/libcpu/mips/jz47xx/jz47xx.h index 8f60d33d2c..a0e7e08322 100644 --- a/libcpu/mips/jz47xx/jz47xx.h +++ b/libcpu/mips/jz47xx/jz47xx.h @@ -91,6 +91,6 @@ #define IRQ_GPIO0 28 #define IRQ_LCD 30 -#define SYSTEM_STACK 0x8000ffe8 /* the kernel system stack address */ +#define SYSTEM_STACK 0x80003fe8 /* the kernel system stack address */ #endif diff --git a/libcpu/mips/jz47xx/stack.c b/libcpu/mips/jz47xx/stack.c index c1576072b1..947408354d 100644 --- a/libcpu/mips/jz47xx/stack.c +++ b/libcpu/mips/jz47xx/stack.c @@ -53,7 +53,8 @@ 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) g_sr; /* C0_SR: HW2 = En, IE = En */ + *(--stk) = (rt_uint32_t) 0xFC01; /* 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/jz47xx/start_gcc.S b/libcpu/mips/jz47xx/start_gcc.S index 97bedb6c7f..d496b54e92 100644 --- a/libcpu/mips/jz47xx/start_gcc.S +++ b/libcpu/mips/jz47xx/start_gcc.S @@ -20,7 +20,7 @@ _start: la ra, _start /* init cp0 registers. */ - li t0, 0x0040FC00 + li t0, 0x0000FC00 /* BEV = 0 and mask all interrupt */ mtc0 t0, CP0_STATUS li t1, 0x00800000 -- cgit v1.3.1