From 798e3c393af4a59c93a9124d10f9a2114becea31 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Wed, 27 Feb 2019 15:28:34 +0200 Subject: [PATCH] Call tfm_panic for SPM_PANIC --- components/TARGET_PSA/inc/psa/service.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/TARGET_PSA/inc/psa/service.h b/components/TARGET_PSA/inc/psa/service.h index 072195ff6f..0d2d087860 100644 --- a/components/TARGET_PSA/inc/psa/service.h +++ b/components/TARGET_PSA/inc/psa/service.h @@ -16,15 +16,18 @@ */ #if defined(TARGET_TFM) + #include "interface/include/psa_service.h" -#define SPM_PANIC(format, ...) \ -{ \ - while(1){}; \ -} +#define SPM_PANIC(format, ...) tfm_panic() + #elif defined(TARGET_MBED_SPM) + #include "TARGET_MBED_SPM/psa_defs.h" #include "TARGET_MBED_SPM/COMPONENT_SPE/spm_server.h" #include "TARGET_MBED_SPM/COMPONENT_SPE/spm_panic.h" + #else + #error "Compiling psa service header on non-secure target is not allowed" + #endif