From 7abcf768d24edb227bc809d819e6b2544c496f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Thu, 11 Jun 2015 19:51:54 -0700 Subject: trusty: Handle fiqs without calling notifier and enabling interrupts Change-Id: Iab318f0efd7ca0217bd64a30918f040938af5b76 Signed-off-by: Michael Ryleev --- include/linux/trusty/sm_err.h | 1 + include/linux/trusty/smcall.h | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/trusty/sm_err.h b/include/linux/trusty/sm_err.h index 4ee67589c..7de09b46f 100644 --- a/include/linux/trusty/sm_err.h +++ b/include/linux/trusty/sm_err.h @@ -35,5 +35,6 @@ #define SM_ERR_NOT_ALLOWED -9 /* SMC call not allowed */ #define SM_ERR_END_OF_INPUT -10 #define SM_ERR_PANIC -11 /* Secure OS crashed */ +#define SM_ERR_FIQ_INTERRUPTED -12 /* Got interrupted by FIQ. Call back with SMC_SC_RESTART_FIQ on same CPU */ #endif diff --git a/include/linux/trusty/smcall.h b/include/linux/trusty/smcall.h index cdb4eccd7..7d8950a88 100644 --- a/include/linux/trusty/smcall.h +++ b/include/linux/trusty/smcall.h @@ -58,6 +58,18 @@ #define SMC_SC_RESTART_LAST SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 0) #define SMC_SC_NOP SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 1) +/** + * SMC_SC_RESTART_FIQ - Re-enter trusty after it was interrupted by an fiq + * + * No arguments, no return value. + * + * Re-enter trusty after returning to ns to process an fiq. Must be called iff + * trusty returns SM_ERR_FIQ_INTERRUPTED. + * + * Enable by selecting api version TRUSTY_API_VERSION_RESTART_FIQ (1) or later. + */ +#define SMC_SC_RESTART_FIQ SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 2) + /* * Return from secure os to non-secure os with return value in r1 */ @@ -94,7 +106,8 @@ * * This call must be made before any calls that are affected by the api version. */ -#define TRUSTY_API_VERSION_CURRENT (0) +#define TRUSTY_API_VERSION_RESTART_FIQ (1) +#define TRUSTY_API_VERSION_CURRENT (1) #define SMC_FC_API_VERSION SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 11) /* TRUSTED_OS entity calls */ -- cgit v1.2.2