Skip to content

Commit

Permalink
core: OCALL capability
Browse files Browse the repository at this point in the history
Adds a new capability that reports whether OP-TEE was built with OCALL
support.

Signed-off-by: Hernan Gatta <[email protected]>
  • Loading branch information
HernanGatta committed Mar 26, 2020
1 parent 41ce932 commit b3d485f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/arch/arm/include/sm/optee_smc.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@
#define OPTEE_SMC_SEC_CAP_DYNAMIC_SHM BIT(2)
/* Secure world is built with virtualization support */
#define OPTEE_SMC_SEC_CAP_VIRTUALIZATION BIT(3)

/* Secure world is built with OCALL support */
#define OPTEE_SMC_SEC_CAP_OCALL BIT(5)

#define OPTEE_SMC_FUNCID_EXCHANGE_CAPABILITIES 9
#define OPTEE_SMC_EXCHANGE_CAPABILITIES \
Expand Down
3 changes: 3 additions & 0 deletions core/arch/arm/tee/entry_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ static void tee_entry_exchange_capabilities(struct thread_smc_args *args)
#ifdef CFG_VIRTUALIZATION
args->a1 |= OPTEE_SMC_SEC_CAP_VIRTUALIZATION;
#endif
#if defined(CFG_OCALL)
args->a1 |= OPTEE_SMC_SEC_CAP_OCALL;
#endif

#if defined(CFG_CORE_DYN_SHM)
dyn_shm_en = core_mmu_nsec_ddr_is_defined();
Expand Down

0 comments on commit b3d485f

Please sign in to comment.