commit
1b60cdaefb
@ -6,6 +6,7 @@ unsigned long rt_cpu_get_smp_id(void);
|
||||
void rt_cpu_mmu_disable(void);
|
||||
void rt_cpu_mmu_enable(void);
|
||||
void rt_cpu_tlb_set(volatile unsigned long*);
|
||||
void rt_hw_vector_init(void);
|
||||
|
||||
void rt_cpu_vector_set_base(unsigned int addr);
|
||||
|
||||
|
@ -29,8 +29,14 @@ rt_uint32_t rt_interrupt_from_thread;
|
||||
rt_uint32_t rt_interrupt_to_thread;
|
||||
rt_uint32_t rt_thread_switch_interrupt_flag;
|
||||
|
||||
extern void rt_cpu_vector_set_base(unsigned int addr);
|
||||
extern int system_vectors;
|
||||
|
||||
void rt_hw_vector_init(void)
|
||||
{
|
||||
rt_cpu_vector_set_base((unsigned int)&system_vectors);
|
||||
}
|
||||
|
||||
static void default_isr_handler(int vector, void *param)
|
||||
{
|
||||
rt_kprintf("unhandled irq: %d\n", vector);
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "board.h"
|
||||
#include "drv_uart.h"
|
||||
#include "cp15.h"
|
||||
|
||||
void rt_hw_timer_isr(int vector, void *parameter)
|
||||
{
|
||||
@ -65,7 +66,7 @@ void rt_hw_board_init(void)
|
||||
{
|
||||
/* initialize hardware interrupt */
|
||||
rt_hw_interrupt_init();
|
||||
vector_copy();
|
||||
rt_hw_vector_init();
|
||||
|
||||
/* initialize uart */
|
||||
rt_hw_uart_init();
|
||||
@ -82,7 +83,7 @@ void rt_hw_board_init(void)
|
||||
#endif
|
||||
|
||||
/* initialize timer for os tick */
|
||||
// rt_hw_timer_init();
|
||||
rt_hw_timer_init();
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
rt_components_board_init();
|
||||
|
@ -73,10 +73,6 @@ void ipi_handler()
|
||||
rt_scheduler_ipi_handler(0,RT_NULL);
|
||||
}
|
||||
#endif
|
||||
void vector_copy(void)
|
||||
{
|
||||
rt_memcpy((void*)0x0, (void*)0x8000, 64);
|
||||
}
|
||||
|
||||
void idle_wfi(void)
|
||||
{
|
||||
@ -87,7 +83,6 @@ void rt_hw_board_init(void)
|
||||
{
|
||||
/* initialize hardware interrupt */
|
||||
rt_hw_interrupt_init();
|
||||
vector_copy();
|
||||
rt_hw_vector_init();
|
||||
/* initialize uart */
|
||||
rt_hw_uart_init();
|
||||
|
@ -62,7 +62,7 @@ _reset:
|
||||
b continue
|
||||
|
||||
overHyped: /* Get out of HYP mode */
|
||||
ldr r1, =continue
|
||||
adr r1, continue
|
||||
msr ELR_hyp, r1
|
||||
mrs r1, cpsr_all
|
||||
and r1, r1, #0x1f ;@ CPSR_MODE_MASK
|
||||
|
Loading…
x
Reference in New Issue
Block a user