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 a6f7109 commit 4008dfc
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 (1 << 2)
/* Secure world is built with virtualization support */
#define OPTEE_SMC_SEC_CAP_VIRTUALIZATION (1 << 3)

/* Secure world is built with OCALL support */
#define OPTEE_SMC_SEC_CAP_OCALL (1 << 4)

#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 4008dfc

Please sign in to comment.