8 #ifndef __TFM_SECURE_API_H__
9 #define __TFM_SECURE_API_H__
11 #ifndef TFM_MULTI_CORE_TOPOLOGY
21 #ifndef TFM_MULTI_CORE_TOPOLOGY
28 #if defined(__GNUC__) && !defined(__ARMCC_VERSION)
33 #define __tfm_secure_gateway_attributes__ \
34 __attribute__((cmse_nonsecure_entry, noclone, section("SFN")))
36 #define __tfm_secure_gateway_attributes__ \
37 __attribute__((cmse_nonsecure_entry, section("SFN")))
47 #if defined(__GNUC__) && !defined(__ARMCC_VERSION)
52 #define __tfm_psa_secure_gateway_attributes__ \
53 __attribute__((cmse_nonsecure_entry, noclone, naked, section("SFN")))
55 #define __tfm_psa_secure_gateway_attributes__ \
56 __attribute__((cmse_nonsecure_entry, naked, section("SFN")))
63 #define TFM_ERROR_STATUS(status) (status)
65 #define TFM_ERROR_STATUS(status) (TFM_PARTITION_BUSY)
69 #error TFM_LVL is not defined!
75 typedef int32_t(*
sfn_t)(int32_t, int32_t, int32_t, int32_t);
91 #define TFM_CORE_IOVEC_SFN_REQUEST(id, is_ns, fn, a, b, c, d) \
92 return tfm_core_partition_request(id, is_ns, fn, \
93 (int32_t)a, (int32_t)b, (int32_t)c, (int32_t)d)
96 int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4);
98 __attribute__ ((always_inline)) __STATIC_INLINE
108 #if defined(__GNUC__) && !defined(__ARMCC_VERSION) && \
110 (__GNUC__ == 7 && (__GNUC_MINOR__ < 3 || \
111 (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1))))
117 (uintptr_t)__builtin_extract_return_addr(__builtin_return_address(0U))
124 return (cmse_nonsecure_caller() != 0) ?
true :
false;
int32_t tfm_core_partition_request(uint32_t id, bool is_ns, void *fn, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4)
int32_t(* sfn_t)(int32_t, int32_t, int32_t, int32_t)
int32_t tfm_core_get_caller_client_id(int32_t *caller_client_id)
int32_t tfm_core_sfn_request(const struct tfm_sfn_req_s *desc_ptr)
void tfm_secure_api_error_handler(void)
__STATIC_INLINE bool tfm_core_is_ns_client(void)
int32_t tfm_spm_sfn_request_thread_mode(struct tfm_sfn_req_s *desc_ptr)