diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-18 10:11:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-23 09:19:17 +0100 |
commit | 272534eb725f2486b7a32b39d998202a101bd36e (patch) | |
tree | 1cd2ae81d871698e49093fb0ec2488d88e0593d9 /bsps/arm/raspberrypi | |
parent | arm: Add support for Arm PMSAv8-32 (diff) | |
download | rtems-272534eb725f2486b7a32b39d998202a101bd36e.tar.bz2 |
bsps/arm: Set VBAR in start.S
Set the VBAR to the vector table in the start section before
bsp_start_hook_0() is called to earlier handle exceptions in RTEMS.
Set the VBAR to the normal vector table in start.S for the main
processor. Secondary processors set it in bsp_start_hook_0().
Update #4202.
Diffstat (limited to 'bsps/arm/raspberrypi')
-rw-r--r-- | bsps/arm/raspberrypi/start/bspsmp_init.c | 3 | ||||
-rw-r--r-- | bsps/arm/raspberrypi/start/bspstarthooks.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bsps/arm/raspberrypi/start/bspsmp_init.c b/bsps/arm/raspberrypi/start/bspsmp_init.c index a8c79e9f7c..a4dd470287 100644 --- a/bsps/arm/raspberrypi/start/bspsmp_init.c +++ b/bsps/arm/raspberrypi/start/bspsmp_init.c @@ -55,6 +55,9 @@ void rpi_start_rtems_on_secondary_processor(void) { uint32_t ctrl; + /* Change the VBAR from the start to the normal vector table */ + arm_cp15_set_vector_base_address(bsp_vector_table_begin); + ctrl = arm_cp15_start_setup_mmu_and_cache( 0, ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_Z diff --git a/bsps/arm/raspberrypi/start/bspstarthooks.c b/bsps/arm/raspberrypi/start/bspstarthooks.c index eb6546db1c..c46c4f5cbf 100644 --- a/bsps/arm/raspberrypi/start/bspstarthooks.c +++ b/bsps/arm/raspberrypi/start/bspstarthooks.c @@ -117,9 +117,6 @@ void BSP_START_TEXT_SECTION bsp_start_hook_0(void) /* Clear Translation Table Base Control Register */ arm_cp15_set_translation_table_base_control_register(0); - /* Clear Secure or Non-secure Vector Base Address Register */ - arm_cp15_set_vector_base_address(bsp_vector_table_begin); - #ifdef RTEMS_SMP if (cpu_index_self == 0) { rpi_ipi_initialize(); |