From d0ee0ec1c65c438832b7a92fb658a76282cc7d40 Mon Sep 17 00:00:00 2001 From: Karl Meakin Date: Thu, 11 Jul 2024 14:35:40 +0100 Subject: [PATCH] refactor: report features supported to secure world Report `FFA_MEM_PERM_GET` and `FFA_MEM_PERM_SET` supported to secure world instances. Signed-off-by: Karl Meakin Change-Id: I90e6b0ab601ae1142b419cacfa56109c183ab640 --- services/std_svc/spm/el3_spmc/spmc_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/services/std_svc/spm/el3_spmc/spmc_main.c b/services/std_svc/spm/el3_spmc/spmc_main.c index bddfe9693..c67a6fc93 100644 --- a/services/std_svc/spm/el3_spmc/spmc_main.c +++ b/services/std_svc/spm/el3_spmc/spmc_main.c @@ -1359,6 +1359,16 @@ static uint64_t ffa_features_handler(uint32_t smc_fid, /* Execution stops here. */ /* Supported ABIs only from the secure world. */ + case FFA_MEM_PERM_GET_SMC32: + case FFA_MEM_PERM_GET_SMC64: + case FFA_MEM_PERM_SET_SMC32: + case FFA_MEM_PERM_SET_SMC64: + /* these ABIs are only supported from S-EL0 SPs */ + #if !(SPMC_AT_EL3_SEL0_SP) + return spmc_ffa_error_return(handle, FFA_ERROR_NOT_SUPPORTED); + #endif + /* fall through */ + case FFA_SECONDARY_EP_REGISTER_SMC64: case FFA_MSG_SEND_DIRECT_RESP_SMC32: case FFA_MSG_SEND_DIRECT_RESP_SMC64: @@ -1367,7 +1377,6 @@ static uint64_t ffa_features_handler(uint32_t smc_fid, case FFA_MSG_WAIT: case FFA_CONSOLE_LOG_SMC32: case FFA_CONSOLE_LOG_SMC64: - if (!secure_origin) { return spmc_ffa_error_return(handle, FFA_ERROR_NOT_SUPPORTED);