|
@@ -23,6 +23,8 @@
|
|
|
#include <stdlib.h>
|
|
|
#include <ioremap.h>
|
|
|
#include <rtdevice.h>
|
|
|
+#include <gic.h>
|
|
|
+#include <gicv3.h>
|
|
|
|
|
|
#define SIZE_KB 1024
|
|
|
#define SIZE_MB (1024 * SIZE_KB)
|
|
@@ -456,10 +458,12 @@ void rt_hw_common_setup(void)
|
|
|
|
|
|
/* initialize uart */
|
|
|
rt_hw_uart_init();
|
|
|
+#endif
|
|
|
|
|
|
+#ifndef RT_HWTIMER_ARM_ARCH
|
|
|
/* initialize timer for os tick */
|
|
|
rt_hw_gtimer_init();
|
|
|
-#endif
|
|
|
+#endif /* !RT_HWTIMER_ARM_ARCH */
|
|
|
|
|
|
#ifdef RT_USING_COMPONENTS_INIT
|
|
|
rt_components_board_init();
|
|
@@ -540,9 +544,20 @@ rt_weak void rt_hw_secondary_cpu_bsp_start(void)
|
|
|
#ifdef RT_USING_PIC
|
|
|
rt_pic_irq_init();
|
|
|
#else
|
|
|
- rt_hw_interrupt_init();
|
|
|
+ /* initialize vector table */
|
|
|
+ rt_hw_vector_init();
|
|
|
+
|
|
|
+ arm_gic_cpu_init(0, 0);
|
|
|
+#ifdef BSP_USING_GICV3
|
|
|
+ arm_gic_redist_init(0, 0);
|
|
|
+#endif /* BSP_USING_GICV3 */
|
|
|
#endif
|
|
|
|
|
|
+#ifndef RT_HWTIMER_ARM_ARCH
|
|
|
+ /* initialize timer for os tick */
|
|
|
+ rt_hw_gtimer_local_enable();
|
|
|
+#endif /* !RT_HWTIMER_ARM_ARCH */
|
|
|
+
|
|
|
rt_dm_secondary_cpu_init();
|
|
|
|
|
|
rt_hw_interrupt_umask(RT_SCHEDULE_IPI);
|