summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-11-17 23:41:55 +0000
committer[email protected] <[email protected]>2010-11-17 23:41:55 +0000
commit643fea758bdee60beb9160fe1aa3076a89903407 (patch)
treed193b3badb678673df790a4d278cc4baddd96de5 /bsp
parent2c647575b35a56e900f766dc83d83ce96f95c5d8 (diff)
add vector copy routine.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1059 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
-rw-r--r--bsp/dev3210/startup.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/bsp/dev3210/startup.c b/bsp/dev3210/startup.c
index 29aa38e2ec..8b38099c6f 100644
--- a/bsp/dev3210/startup.c
+++ b/bsp/dev3210/startup.c
@@ -17,6 +17,7 @@
#include <cache.h>
#include "board.h"
+#define A_K0BASE 0x80000000
/**
* @addtogroup Loongson SoC3210
@@ -42,6 +43,10 @@ void dump_mem(const unsigned char* addr)
rt_kprintf("\n");
}
+extern void tlb_refill_exception(void);
+extern void general_exception(void);
+extern void irq_exception(void);
+
/**
* This function will startup RT-Thread RTOS.
*/
@@ -52,12 +57,10 @@ void rtthread_startup(void)
/* init hardware interrupt */
rt_hw_interrupt_init();
- /*
- dump_mem((rt_uint8_t*)0x80000000);
- dump_mem((rt_uint8_t*)0x80000100);
- dump_mem((rt_uint8_t*)0x80000180);
- dump_mem((rt_uint8_t*)0x80000200);
- */
+ /* copy vector */
+ memcpy((void *)A_K0BASE, tlb_refill_exception, 0x20);
+ memcpy((void *)(A_K0BASE + 0x180), general_exception, 0x20);
+ memcpy((void *)(A_K0BASE + 0x200), irq_exception, 0x20);
/* init board */
rt_hw_board_init();