diff options
author | Subhasish Ghosh <subhasish.ghosh@arm.com> | 2021-11-14 17:19:09 +0000 |
---|---|---|
committer | Subhasish Ghosh <subhasish.ghosh@arm.com> | 2021-12-08 10:15:21 +0000 |
commit | b9fd2d3ce3d4e543a2e04dc237cd4e7ff7765c7a (patch) | |
tree | 8dbbdaa2a692538aadb51f3f1fe2d7a9b3dc51bd /services | |
parent | 73193689c0e9cf13ad0ddbb9da25e9a66c4e14b3 (diff) | |
download | arm-trusted-firmware-b9fd2d3ce3d4e543a2e04dc237cd4e7ff7765c7a.tar.gz |
fix(rmmd): align RMI and GTSI FIDs with SMCCC
This patch allocates the RMI and GTSI FIDs from the reserved
range in Standard Secure Service call range of SMCCC.
Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Change-Id: I82e77778882194c2a78ca6340788d53bab7c3a50
Diffstat (limited to 'services')
-rw-r--r-- | services/arm_arch_svc/arm_arch_svc_setup.c | 24 | ||||
-rw-r--r-- | services/std_svc/std_svc_setup.c | 12 |
2 files changed, 12 insertions, 24 deletions
diff --git a/services/arm_arch_svc/arm_arch_svc_setup.c b/services/arm_arch_svc/arm_arch_svc_setup.c index 1d4423cb3..5523a1c38 100644 --- a/services/arm_arch_svc/arm_arch_svc_setup.c +++ b/services/arm_arch_svc/arm_arch_svc_setup.c @@ -11,19 +11,9 @@ #include <lib/cpus/wa_cve_2018_3639.h> #include <lib/smccc.h> #include <services/arm_arch_svc.h> -#include <services/rmi_svc.h> -#include <services/rmmd_svc.h> #include <smccc_helpers.h> #include <plat/common/platform.h> -#if ENABLE_RME -/* Setup Arm architecture Services */ -static int32_t arm_arch_svc_setup(void) -{ - return rmmd_setup(); -} -#endif - static int32_t smccc_version(void) { return MAKE_SMCCC_VERSION(SMCCC_MAJOR_VERSION, SMCCC_MINOR_VERSION); @@ -143,16 +133,6 @@ static uintptr_t arm_arch_svc_smc_handler(uint32_t smc_fid, SMC_RET0(handle); #endif default: -#if ENABLE_RME - /* - * RMI functions are allocated from the Arch service range. Call - * the RMM dispatcher to handle RMI calls. - */ - if (is_rmi_fid(smc_fid)) { - return rmmd_rmi_handler(smc_fid, x1, x2, x3, x4, cookie, - handle, flags); - } -#endif WARN("Unimplemented Arm Architecture Service Call: 0x%x \n", smc_fid); SMC_RET1(handle, SMC_UNK); @@ -165,10 +145,6 @@ DECLARE_RT_SVC( OEN_ARM_START, OEN_ARM_END, SMC_TYPE_FAST, -#if ENABLE_RME - arm_arch_svc_setup, -#else NULL, -#endif arm_arch_svc_smc_handler ); diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c index 39db42913..eea7e147a 100644 --- a/services/std_svc/std_svc_setup.c +++ b/services/std_svc/std_svc_setup.c @@ -15,6 +15,7 @@ #include <lib/runtime_instr.h> #include <services/gtsi_svc.h> #include <services/pci_svc.h> +#include <services/rmi_svc.h> #include <services/rmmd_svc.h> #include <services/sdei.h> #include <services/spm_mm_svc.h> @@ -62,6 +63,12 @@ static int32_t std_svc_setup(void) } #endif +#if ENABLE_RME + if (rmmd_setup() != 0) { + ret = 1; + } +#endif + #if SDEI_SUPPORT /* SDEI initialisation */ sdei_init(); @@ -169,6 +176,11 @@ static uintptr_t std_svc_smc_handler(uint32_t smc_fid, return rmmd_gtsi_handler(smc_fid, x1, x2, x3, x4, cookie, handle, flags); } + + if (is_rmi_fid(smc_fid)) { + return rmmd_rmi_handler(smc_fid, x1, x2, x3, x4, cookie, + handle, flags); + } #endif #if SMC_PCI_SUPPORT |