tfm: Use PSA error codes instead of TFM error codes

The TFM error codes are no longer in the interface headers.
All TF-M functions return PSA status codes, so use this here as well.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2023-12-08 15:17:10 +01:00 committed by Carles Cufí
parent a14f42a817
commit d931dded11

View file

@ -35,7 +35,7 @@ int32_t tfm_ns_interface_dispatch(veneer_fn fn,
if (!is_pre_kernel) {
/* TF-M request protected by NS lock */
if (k_mutex_lock(&tfm_mutex, K_FOREVER) != 0) {
return (int32_t)TFM_ERROR_GENERIC;
return (int32_t)PSA_ERROR_GENERIC_ERROR;
}
#if !defined(CONFIG_ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS)
@ -79,7 +79,7 @@ uint32_t tfm_ns_interface_init(void)
* The static K_MUTEX_DEFINE handles mutex initialization,
* so this function may be implemented as no-op.
*/
return TFM_SUCCESS;
return PSA_SUCCESS;
}
@ -90,7 +90,7 @@ uint32_t tfm_ns_interface_init(void)
static int ns_interface_init(void)
{
__ASSERT(tfm_ns_interface_init() == TFM_SUCCESS,
__ASSERT(tfm_ns_interface_init() == PSA_SUCCESS,
"TF-M NS interface init failed");
return 0;