Skip to content

Commit 8eaec00

Browse files
author
Hernan Gatta
committed
core: OCALL capability
Adds a new capability that reports whether OP-TEE was built with OCALL support. Signed-off-by: Hernan Gatta <[email protected]>
1 parent 9f3e937 commit 8eaec00

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/arch/arm/include/sm/optee_smc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@
276276
#define OPTEE_SMC_SEC_CAP_DYNAMIC_SHM (1 << 2)
277277
/* Secure world is built with virtualization support */
278278
#define OPTEE_SMC_SEC_CAP_VIRTUALIZATION (1 << 3)
279-
279+
/* Secure world is built with OCALL support */
280+
#define OPTEE_SMC_SEC_CAP_OCALL (1 << 4)
280281

281282
#define OPTEE_SMC_FUNCID_EXCHANGE_CAPABILITIES 9
282283
#define OPTEE_SMC_EXCHANGE_CAPABILITIES \

core/arch/arm/tee/entry_fast.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ static void tee_entry_exchange_capabilities(struct thread_smc_args *args)
9191
#ifdef CFG_VIRTUALIZATION
9292
args->a1 |= OPTEE_SMC_SEC_CAP_VIRTUALIZATION;
9393
#endif
94+
#if defined(CFG_OCALL)
95+
args->a1 |= OPTEE_SMC_SEC_CAP_OCALL;
96+
#endif
9497

9598
#if defined(CFG_CORE_DYN_SHM)
9699
dyn_shm_en = core_mmu_nsec_ddr_is_defined();

0 commit comments

Comments
 (0)