14 #include "tfm_hal_device_header.h"
15 #include "cmsis_compiler.h"
17 #if defined(__ARM_ARCH_8_1M_MAIN__) || \
18 defined(__ARM_ARCH_8M_MAIN__) || defined(__ARM_ARCH_8M_BASE__)
20 #elif defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_7M__) || \
21 defined(__ARM_ARCH_7EM__)
24 #error "Unsupported ARM Architecture."
27 #define XPSR_T32 0x01000000
41 #define TFM_STATE_RET_VAL(ctx) (((struct tfm_state_context_t *)((ctx)->sp))->r0)
43 __attribute__ ((always_inline))
46 SCB->ICSR = SCB_ICSR_PENDSVSET_Msk;
54 #if !defined ( __ICCARM__ )
55 __attribute__ ((always_inline)) __STATIC_INLINE uint32_t
__get_LR(
void)
57 register uint32_t result;
59 __ASM
volatile (
"MOV %0, LR\n" :
"=r" (result));
64 __attribute__ ((always_inline))
70 IPSR.w = __get_IPSR();
74 __attribute__ ((always_inline))
79 ctrl.w = __get_CONTROL();
81 __set_CONTROL(ctrl.w);
89 uint32_t sp, uint32_t sp_limit);
107 void *param, uintptr_t pfn,
108 uintptr_t stk_btm, uintptr_t stk_top);
void tfm_arch_configure_coprocessors(void)
Configure coprocessors.
void tfm_arch_clear_fp_status(void)
void tfm_arch_init_actx(struct tfm_arch_ctx_t *p_actx, uint32_t sp, uint32_t sp_limit)
__STATIC_INLINE uint32_t __get_active_exc_num(void)
__STATIC_INLINE void __set_CONTROL_SPSEL(uint32_t SPSEL)
void tfm_arch_set_secure_exception_priorities(void)
void tfm_arch_init_context(struct tfm_arch_ctx_t *p_actx, void *param, uintptr_t pfn, uintptr_t stk_btm, uintptr_t stk_top)
__STATIC_INLINE uint32_t __get_LR(void)
Get Link Register.
__STATIC_INLINE void tfm_arch_trigger_pendsv(void)