Skip to content

Commit 34c55dd

Browse files
joerchanVge0rge
authored andcommitted
[nrf fromtree] 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 <[email protected]> Signed-off-by: Markus Swarowsky <[email protected]> (cherry picked from commit d931dde) Signed-off-by: Markus Swarowsky <[email protected]>
1 parent 32d3ac0 commit 34c55dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/trusted-firmware-m/interface/interface.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int32_t tfm_ns_interface_dispatch(veneer_fn fn,
3535
if (!is_pre_kernel) {
3636
/* TF-M request protected by NS lock */
3737
if (k_mutex_lock(&tfm_mutex, K_FOREVER) != 0) {
38-
return (int32_t)TFM_ERROR_GENERIC;
38+
return (int32_t)PSA_ERROR_GENERIC_ERROR;
3939
}
4040

4141
#if !defined(CONFIG_ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS)
@@ -79,7 +79,7 @@ uint32_t tfm_ns_interface_init(void)
7979
* The static K_MUTEX_DEFINE handles mutex initialization,
8080
* so this function may be implemented as no-op.
8181
*/
82-
return TFM_SUCCESS;
82+
return PSA_SUCCESS;
8383
}
8484

8585

@@ -90,7 +90,7 @@ uint32_t tfm_ns_interface_init(void)
9090
static int ns_interface_init(void)
9191
{
9292

93-
__ASSERT(tfm_ns_interface_init() == TFM_SUCCESS,
93+
__ASSERT(tfm_ns_interface_init() == PSA_SUCCESS,
9494
"TF-M NS interface init failed");
9595

9696
return 0;

0 commit comments

Comments
 (0)