summaryrefslogtreecommitdiff
path: root/bl31
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 /bl31
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 'bl31')
-rw-r--r--bl31/aarch64/runtime_exceptions.S85
1 files changed, 12 insertions, 73 deletions
diff --git a/bl31/aarch64/runtime_exceptions.S b/bl31/aarch64/runtime_exceptions.S
index e7abd503..4f53b8e7 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 @@ vector_entry serror_aarch32
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 @@ smc_handler64:
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
-
-#elif SMCCC_MAJOR_VERSION == 2
-
- /* Bit 31 must be set */
- tbz x0, #FUNCID_TYPE_SHIFT, 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:
+ /* Load descriptor index from array of indices */
+ adr x14, rt_svc_descs_indices
+ ldrb w15, [x14, x16]
- /* Namespace is b'00 (compatibility) or b'01 (vendor) */
+ /* Any index greater than 127 is invalid. Check bit 7. */
+ tbnz w15, 7, smc_unknown
/*
- * 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