diff options
author | Kumar Gala <kumar.gala@linaro.org> | 2017-01-18 11:33:21 -0600 |
---|---|---|
committer | Kumar Gala <kumar.gala@linaro.org> | 2017-01-23 15:15:55 -0600 |
commit | 6782c3ea236b737389dd6df1d361dfdfd6d910a2 (patch) | |
tree | 002f6790098f1df1db1df78e527cb758725b75cd /include | |
parent | 7f5dc1ab300721a3e7f858f0bbea75503e58af46 (diff) |
arm: cmsis: Convert relocate_vector_table to use CMSIS
Replace _scs_relocate_vector_table with direct CMSIS register access and
use of __ISB/__DSB routinues. We also cleanup the code a little bit to
just have one implentation of relocate_vector_table() on ARMv7-M.
Jira: ZEP-1568
Change-Id: I088c30e680a7ba198c1527a5822114b70f10c510
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/arm/cortex_m/scs.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/include/arch/arm/cortex_m/scs.h b/include/arch/arm/cortex_m/scs.h index 0caf3b3a7..dd0e3de00 100644 --- a/include/arch/arm/cortex_m/scs.h +++ b/include/arch/arm/cortex_m/scs.h @@ -589,37 +589,6 @@ extern volatile struct __scs __scs; #error Unknown ARM architecture #endif /* CONFIG_ARMV6_M */ -/* API */ -#if defined(CONFIG_ARMV6_M) -#elif defined(CONFIG_ARMV7_M) -/** - * - * @brief Relocate the vector table - * - * Set the address of the vector table to the new address @a new_addr provided. - * - * It must be aligned on a 128-byte boundary. - * - * This routine must be called with interrupts locked and all sources of - * interrupts disabled. - * - * @param new_addr The new address of the vector table. - * - * @return N/A - */ - -static inline void _scs_relocate_vector_table(void *new_addr) -{ - __scs.scb.vtor.val = ((uint32_t)new_addr & 0xffffff80); - __asm__ volatile( - "dsb\n\t" - "isb\n\t" - :::); -} -#else -#error Unknown ARM architecture -#endif /* CONFIG_ARMV6_M */ - #endif /* _ASMLANGUAGE */ #ifdef __cplusplus |