diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/std_svc/spm/spci.c | 19 | ||||
-rw-r--r-- | services/std_svc/spm/spm.mk | 5 | ||||
-rw-r--r-- | services/std_svc/spm/sprt.c | 19 |
3 files changed, 31 insertions, 12 deletions
diff --git a/services/std_svc/spm/spci.c b/services/std_svc/spm/spci.c index 44a0acd6..1ee986af 100644 --- a/services/std_svc/spm/spci.c +++ b/services/std_svc/spm/spci.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Arm Limited. All rights reserved. + * Copyright (c) 2018-2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,7 @@ #include <string.h> #include <common/debug.h> +#include <common/runtime_svc.h> #include <lib/el3_runtime/context_mgmt.h> #include <lib/smccc.h> #include <lib/spinlock.h> @@ -679,9 +680,10 @@ static uint64_t spci_service_get_response(void *handle, u_register_t x1, /******************************************************************************* * This function handles all SMCs in the range reserved for SPCI. ******************************************************************************/ -uint64_t spci_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, - uint64_t x3, uint64_t x4, void *cookie, void *handle, - uint64_t flags) +static uintptr_t spci_smc_handler(uint32_t smc_fid, u_register_t x1, + u_register_t x2, u_register_t x3, + u_register_t x4, void *cookie, void *handle, + u_register_t flags) { uint32_t spci_fid; @@ -773,3 +775,12 @@ uint64_t spci_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, WARN("SPCI: Unsupported call 0x%08x\n", smc_fid); SMC_RET1(handle, SPCI_NOT_SUPPORTED); } + +DECLARE_RT_SVC( + spci_handler, + OEN_SPCI_START, + OEN_SPCI_END, + SMC_TYPE_FAST, + NULL, + spci_smc_handler +); diff --git a/services/std_svc/spm/spm.mk b/services/std_svc/spm/spm.mk index 4ba9feb3..448aba40 100644 --- a/services/std_svc/spm/spm.mk +++ b/services/std_svc/spm/spm.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -26,8 +26,5 @@ SPM_SOURCES := $(addprefix services/std_svc/spm/, \ INCLUDES += ${SPRT_LIB_INCLUDES} -# Force SMC Calling Convention 2 when using SPM -SMCCC_MAJOR_VERSION := 2 - # Let the top-level Makefile know that we intend to include a BL32 image NEED_BL32 := yes diff --git a/services/std_svc/spm/sprt.c b/services/std_svc/spm/sprt.c index f6af49fc..8aa2a88a 100644 --- a/services/std_svc/spm/sprt.c +++ b/services/std_svc/spm/sprt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Arm Limited. All rights reserved. + * Copyright (c) 2018-2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -10,6 +10,7 @@ #include <arch_helpers.h> #include <common/debug.h> +#include <common/runtime_svc.h> #include <lib/el3_runtime/context_mgmt.h> #include <lib/smccc.h> #include <lib/utils.h> @@ -154,9 +155,10 @@ static int32_t sprt_memory_perm_attr_set(sp_context_t *sp_ctx, /******************************************************************************* * This function handles all SMCs in the range reserved for SPRT. ******************************************************************************/ -uint64_t sprt_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, - uint64_t x3, uint64_t x4, void *cookie, void *handle, - uint64_t flags) +static uintptr_t sprt_smc_handler(uint32_t smc_fid, u_register_t x1, + u_register_t x2, u_register_t x3, + u_register_t x4, void *cookie, void *handle, + u_register_t flags) { /* SPRT only supported from the Secure world */ if (is_caller_non_secure(flags) == SMC_FROM_NON_SECURE) { @@ -214,3 +216,12 @@ uint64_t sprt_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, WARN("SPRT: Unsupported call 0x%08x\n", smc_fid); SMC_RET1(handle, SPRT_NOT_SUPPORTED); } + +DECLARE_RT_SVC( + sprt_handler, + OEN_SPRT_START, + OEN_SPRT_END, + SMC_TYPE_FAST, + NULL, + sprt_smc_handler +); |