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>
diff --git a/bl31/aarch64/runtime_exceptions.S b/bl31/aarch64/runtime_exceptions.S
index e7abd50..4f53b8e 100644
--- a/bl31/aarch64/runtime_exceptions.S
+++ b/bl31/aarch64/runtime_exceptions.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -303,38 +303,6 @@
b enter_lower_el_async_ea
end_vector_entry serror_aarch32
-
- /* ---------------------------------------------------------------------
- * This macro takes an argument in x16 that is the index in the
- * 'rt_svc_descs_indices' array, checks that the value in the array is
- * valid, and loads in x15 the pointer to the handler of that service.
- * ---------------------------------------------------------------------
- */
- .macro load_rt_svc_desc_pointer
- /* Load descriptor index from array of indices */
- adr x14, rt_svc_descs_indices
- ldrb w15, [x14, x16]
-
-#if SMCCC_MAJOR_VERSION == 1
- /* Any index greater than 127 is invalid. Check bit 7. */
- tbnz w15, 7, smc_unknown
-#elif SMCCC_MAJOR_VERSION == 2
- /* Verify that the top 3 bits of the loaded index are 0 (w15 <= 31) */
- cmp w15, #31
- b.hi smc_unknown
-#endif /* SMCCC_MAJOR_VERSION */
-
- /*
- * Get the descriptor using the index
- * x11 = (base + off), w15 = index
- *
- * handler = (base + off) + (index << log2(size))
- */
- adr x11, (__RT_SVC_DESCS_START__ + RT_SVC_DESC_HANDLE)
- lsl w10, w15, #RT_SVC_SIZE_LOG2
- ldr x15, [x11, w10, uxtw]
- .endm
-
/* ---------------------------------------------------------------------
* The following code handles secure monitor calls.
* Depending upon the execution state from where the SMC has been
@@ -363,56 +331,27 @@
mov x5, xzr
mov x6, sp
-#if SMCCC_MAJOR_VERSION == 1
-
/* Get the unique owning entity number */
ubfx x16, x0, #FUNCID_OEN_SHIFT, #FUNCID_OEN_WIDTH
ubfx x15, x0, #FUNCID_TYPE_SHIFT, #FUNCID_TYPE_WIDTH
orr x16, x16, x15, lsl #FUNCID_OEN_WIDTH
- load_rt_svc_desc_pointer
+ /* Load descriptor index from array of indices */
+ adr x14, rt_svc_descs_indices
+ ldrb w15, [x14, x16]
-#elif SMCCC_MAJOR_VERSION == 2
-
- /* Bit 31 must be set */
- tbz x0, #FUNCID_TYPE_SHIFT, smc_unknown
+ /* Any index greater than 127 is invalid. Check bit 7. */
+ tbnz w15, 7, smc_unknown
/*
- * Check MSB of namespace to decide between compatibility/vendor and
- * SPCI/SPRT
- */
- tbz x0, #(FUNCID_NAMESPACE_SHIFT + 1), compat_or_vendor
-
- /* Namespace is b'10 (SPRT) or b'11 (SPCI) */
-#if ENABLE_SPM
- tst x0, #(1 << FUNCID_NAMESPACE_SHIFT)
- adr x15, spci_smc_handler
- adr x16, sprt_smc_handler
- csel x15, x15, x16, ne
- b prepare_enter_handler
-#else
- b smc_unknown
-#endif
-
-compat_or_vendor:
-
- /* Namespace is b'00 (compatibility) or b'01 (vendor) */
-
- /*
- * Add the LSB of the namespace (bit [28]) to the OEN [27:24] to create
- * a 5-bit index into the rt_svc_descs_indices array.
+ * Get the descriptor using the index
+ * x11 = (base + off), w15 = index
*
- * The low 16 entries of the rt_svc_descs_indices array correspond to
- * OENs of the compatibility namespace and the top 16 entries of the
- * array are assigned to the vendor namespace descriptor.
+ * handler = (base + off) + (index << log2(size))
*/
- ubfx x16, x0, #FUNCID_OEN_SHIFT, #(FUNCID_OEN_WIDTH + 1)
-
- load_rt_svc_desc_pointer
-
-prepare_enter_handler:
-
-#endif /* SMCCC_MAJOR_VERSION */
+ adr x11, (__RT_SVC_DESCS_START__ + RT_SVC_DESC_HANDLE)
+ lsl w10, w15, #RT_SVC_SIZE_LOG2
+ ldr x15, [x11, w10, uxtw]
/*
* Restore the saved C runtime stack value which will become the new