Interface: Refactor the NS interface
This patch refactors the NS interface source code
to provide an easier paradigm for integration by
marking the NS interface function as weak in order
for integrators to provide their own implementation
to fulfill their requirements.
Change-Id: Id8231cf91773d6850149a028e1b639432540efa0
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/interface/src/tfm_audit_api.c b/interface/src/tfm_audit_api.c
index fd4fc67..3439635 100644
--- a/interface/src/tfm_audit_api.c
+++ b/interface/src/tfm_audit_api.c
@@ -7,23 +7,23 @@
#include "psa_audit_api.h"
#include "tfm_veneers.h"
-#include "tfm_ns_lock.h"
+#include "tfm_ns_interface.h"
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
-#define API_DISPATCH(sfn_name) \
- tfm_ns_lock_dispatch((veneer_fn)tfm_##sfn_name##_veneer, \
- (uint32_t)in_vec, (uint32_t)ARRAY_SIZE(in_vec), \
+#define API_DISPATCH(sfn_name) \
+ tfm_ns_interface_dispatch((veneer_fn)tfm_##sfn_name##_veneer, \
+ (uint32_t)in_vec, (uint32_t)ARRAY_SIZE(in_vec), \
(uint32_t)out_vec, (uint32_t)ARRAY_SIZE(out_vec))
-#define API_DISPATCH_NO_INVEC(sfn_name) \
- tfm_ns_lock_dispatch((veneer_fn)tfm_##sfn_name##_veneer, \
- (uint32_t)NULL, 0, \
+#define API_DISPATCH_NO_INVEC(sfn_name) \
+ tfm_ns_interface_dispatch((veneer_fn)tfm_##sfn_name##_veneer, \
+ (uint32_t)NULL, 0, \
(uint32_t)out_vec, (uint32_t)ARRAY_SIZE(out_vec))
-#define API_DISPATCH_NO_OUTVEC(sfn_name) \
- tfm_ns_lock_dispatch((veneer_fn)tfm_##sfn_name##_veneer, \
- (uint32_t)in_vec, (uint32_t)ARRAY_SIZE(in_vec), \
+#define API_DISPATCH_NO_OUTVEC(sfn_name) \
+ tfm_ns_interface_dispatch((veneer_fn)tfm_##sfn_name##_veneer, \
+ (uint32_t)in_vec, (uint32_t)ARRAY_SIZE(in_vec), \
(uint32_t)NULL, 0)
psa_status_t psa_audit_retrieve_record(const uint32_t record_index,