Interface: Fix veneer function naming
Some veneer functions are named with "tfm_tfm_" prefix. It is confusing
and unfriendly to NS integration.
This patch unifies the prefix of all the veneer function as "tfm_"
- Fix the duplicated "tfm_" prefixes by checking secure function prefix
in tfm_veneer template.
- Replace all the "tfm_tfm_" prefixes with "tfm_".
Change-Id: Id658486f49f4a6f1f22fd3897be27865889474ae
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/interface/src/tfm_firmware_update_func_api.c b/interface/src/tfm_firmware_update_func_api.c
index 1d34d03..4870288 100644
--- a/interface/src/tfm_firmware_update_func_api.c
+++ b/interface/src/tfm_firmware_update_func_api.c
@@ -24,7 +24,7 @@
{ .base = block, .len = block_size }
};
- status = tfm_ns_interface_dispatch((veneer_fn)tfm_tfm_fwu_write_req_veneer,
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_fwu_write_req_veneer,
(uint32_t)in_vec, IOVEC_LEN(in_vec),
(uint32_t)NULL, 0);
@@ -54,7 +54,7 @@
return PSA_ERROR_INVALID_ARGUMENT;
}
- status = tfm_ns_interface_dispatch((veneer_fn)tfm_tfm_fwu_install_req_veneer,
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_fwu_install_req_veneer,
(uint32_t)in_vec, IOVEC_LEN(in_vec),
(uint32_t)out_vec, IOVEC_LEN(out_vec));
@@ -73,7 +73,7 @@
{ .base = &image_id, .len = sizeof(image_id) }
};
- status = tfm_ns_interface_dispatch((veneer_fn)tfm_tfm_fwu_abort_req_veneer,
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_fwu_abort_req_veneer,
(uint32_t)in_vec, IOVEC_LEN(in_vec),
(uint32_t)NULL, 0);
@@ -95,7 +95,7 @@
{ .base = info, .len = sizeof(*info)}
};
- status = tfm_ns_interface_dispatch((veneer_fn)tfm_tfm_fwu_query_req_veneer,
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_fwu_query_req_veneer,
(uint32_t)in_vec, IOVEC_LEN(in_vec),
(uint32_t)out_vec, IOVEC_LEN(out_vec));
@@ -110,9 +110,10 @@
{
psa_status_t status;
- status = tfm_ns_interface_dispatch((veneer_fn)tfm_tfm_fwu_request_reboot_req_veneer,
- (uint32_t)NULL, 0,
- (uint32_t)NULL, 0);
+ status = tfm_ns_interface_dispatch(
+ (veneer_fn)tfm_fwu_request_reboot_req_veneer,
+ (uint32_t)NULL, 0,
+ (uint32_t)NULL, 0);
if (status == (psa_status_t)TFM_ERROR_INVALID_PARAMETER) {
return PSA_ERROR_INVALID_ARGUMENT;
@@ -125,7 +126,7 @@
{
psa_status_t status;
- status = tfm_ns_interface_dispatch((veneer_fn)tfm_tfm_fwu_accept_req_veneer,
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_fwu_accept_req_veneer,
(uint32_t)NULL, 0,
(uint32_t)NULL, 0);