summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-30 16:01:49 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-30 16:01:49 +0000
commit0709055ed66330fe7709c77d2dfbcb87f0c94272 (patch)
tree31b5d3b7354ad9a8b1bb3e423762e5ea1235d05b /services
parent7e9b0c8eef2b90f51ed41bb8ddf15d7c47672ca9 (diff)
Remove support for the SMC Calling Convention 2.0
This reverts commit 2f370465241c ("Add support for the SMC Calling Convention 2.0"). SMCCC v2.0 is no longer required for SPM, and won't be needed in the future. Removing it makes the SMC handling code less complicated. The SPM implementation based on SPCI and SPRT was using it, but it has been adapted to SMCCC v1.0. Change-Id: I36795b91857b2b9c00437cfbfed04b3c1627f578 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'services')
-rw-r--r--services/std_svc/spm/spci.c19
-rw-r--r--services/std_svc/spm/spm.mk5
-rw-r--r--services/std_svc/spm/sprt.c19
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
+);