24 #ifdef PLATFORM_SVC_HANDLERS
26 uint32_t *ctx, uint32_t lr);
32 bool ns_caller =
false;
34 uint32_t veneer_base =
35 (uint32_t)®ION_NAME(Image$$, TFM_UNPRIV_CODE, $$RO$$Base);
36 uint32_t veneer_limit =
37 (uint32_t)®ION_NAME(Image$$, TFM_UNPRIV_CODE, $$RO$$Limit);
46 if (ctx[6] >= veneer_base && ctx[6] < veneer_limit &&
59 case TFM_SVC_PSA_FRAMEWORK_VERSION:
61 case TFM_SVC_PSA_VERSION:
63 case TFM_SVC_PSA_CONNECT:
65 case TFM_SVC_PSA_CALL:
67 case TFM_SVC_PSA_CLOSE:
74 case TFM_SVC_PSA_SET_RHANDLE:
77 case TFM_SVC_PSA_READ:
79 case TFM_SVC_PSA_SKIP:
81 case TFM_SVC_PSA_WRITE:
84 case TFM_SVC_PSA_REPLY:
87 case TFM_SVC_PSA_NOTIFY:
90 case TFM_SVC_PSA_CLEAR:
102 case TFM_SVC_PSA_PANIC:
108 case TFM_SVC_PSA_LIFECYCLE:
111 #ifdef PLATFORM_SVC_HANDLERS
112 return (platform_svc_handlers(svc_num, ctx, lr));
114 ERROR_MSG(
"Unknown SVC number requested!");
141 switch (svc_number) {
150 svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);
159 __ASM
volatile(
"SVC %0 \n"
void tfm_spm_psa_eoi(uint32_t *svc_args)
Handle request to record IRQ processed.
void tfm_spm_psa_set_rhandle(uint32_t *args)
SVC handler for psa_set_rhandle.
uint32_t tfm_spm_psa_framework_version(void)
SVC handler for psa_framework_version.
void tfm_spm_psa_reply(uint32_t *args)
SVC handler for psa_reply.
uint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)
The C source of SVCall handlers.
void tfm_core_get_boot_data_handler(uint32_t args[])
Retrieve secure partition related data from shared memory area, which stores shared data between boot...
void tfm_spm_psa_panic(void)
Terminate execution within the calling Secure Partition and will not return.
void tfm_spm_enable_irq(uint32_t *args)
SVC handler of enabling irq_line of the specified irq_signal.
void tfm_spm_validate_caller(struct partition_t *p_cur_sp, uint32_t *p_ctx, uint32_t exc_return, bool ns_caller)
Validate the whether NS caller re-enter.
uint32_t tfm_spm_init(void)
SPM initialization implementation.
uint32_t tfm_spm_get_lifecycle_state(void)
void tfm_core_panic(void)
REGION_DECLARE(Image $$, TFM_UNPRIV_CODE,$$RO $$Base)
void tfm_spm_psa_close(uint32_t *args, bool ns_caller)
SVC handler for psa_close.
#define PSA_ERROR_GENERIC_ERROR
psa_status_t tfm_spm_psa_get(uint32_t *args)
SVC handler for psa_get.
psa_status_t tfm_spm_psa_call(uint32_t *args, bool ns_caller, uint32_t lr)
SVC handler for psa_call.
void tfm_spm_psa_write(uint32_t *args)
SVC handler for psa_write.
void tfm_spm_psa_clear(void)
SVC handler for psa_clear.
struct partition_t * tfm_spm_get_running_partition(void)
Get current running partition context.
void tfm_spm_psa_wait(uint32_t *svc_args)
Handle signal wait request.
void tfm_access_violation_handler(void)
Should be called in case of access violation.
#define TFM_VENEER_LR_BIT0_MASK
void tfm_spm_request_handler(const struct tfm_state_context_t *svc_ctx)
Handle an SPM request by a secure service.
void tfm_spm_psa_notify(uint32_t *args)
SVC handler for psa_notify.
size_t tfm_spm_psa_read(uint32_t *args)
SVC handler for psa_read.
uint32_t tfm_spm_psa_version(uint32_t *args, bool ns_caller)
SVC handler for psa_version.
void tfm_core_handler_mode(void)
Move to handler mode by a SVC for specific purpose.
__STATIC_INLINE bool is_return_secure_stack(uint32_t lr)
Check whether Secure or Non-secure stack is used to restore stack frame on exception return...
size_t tfm_spm_psa_skip(uint32_t *args)
SVC handler for psa_skip.
void tfm_arch_clear_fp_status(void)
void tfm_spm_disable_irq(uint32_t *args)
SVC handler of disabling irq_line of the specified irq_signal.
psa_status_t tfm_spm_psa_connect(uint32_t *args, bool ns_caller)
SVC handler for psa_connect.