diff options
author | Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> | 2020-06-15 20:47:44 +0530 |
---|---|---|
committer | Chris Kay <chris@cjkay.com> | 2020-07-24 11:03:03 +0100 |
commit | c5d895d9378d20cf504467e25d51c365544487b6 (patch) | |
tree | 2107dceba663658c55d5b35aad4454df1ce47c7c /product/rddaniel | |
parent | 6a9ff2c0f2ed2dd240979691eb9ba4b9592603ab (diff) |
rddaniel: mscp_rom: set vector table offset register
With the use of CMSIS from Commit afd75a9 ("Refactor the architecture
layer"), ROM firmware is expected to set the vector table offset
register to the RAM firmware's vector table before jumping to the RAM
firmware. This patch sets the VTOR register to the RAM firmware's vector
table for rddaniel.
Change-Id: I4673acebe5e7039c0a4694ea3f4e694f342bb821
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Diffstat (limited to 'product/rddaniel')
-rw-r--r-- | product/rddaniel/module/mscp_rom/src/mod_mscp_rom.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/product/rddaniel/module/mscp_rom/src/mod_mscp_rom.c b/product/rddaniel/module/mscp_rom/src/mod_mscp_rom.c index 8aa72da9..a4b59194 100644 --- a/product/rddaniel/module/mscp_rom/src/mod_mscp_rom.c +++ b/product/rddaniel/module/mscp_rom/src/mod_mscp_rom.c @@ -16,6 +16,8 @@ #include <fwk_status.h> #include <fwk_thread.h> +#include <fmw_cmsis.h> + #include <stdint.h> #include <string.h> @@ -45,6 +47,9 @@ static void jump_to_ramfw(void) ramfw_reset_handler = (void (*)(void))*reset_base; + /* Set the vector table offset register to ramfw vector table */ + SCB->VTOR = rom_config->ramfw_ram_base; + /* * Execute the RAM firmware's reset handler to pass control from ROM * firmware to the RAM firmware. |