From caa84939a4d8b1189dea8619ccc57bdb3026b125 Mon Sep 17 00:00:00 2001 From: Jeenu Viswambharan Date: Thu, 6 Feb 2014 10:36:15 +0000 Subject: Add support for handling runtime service requests This patch uses the reworked exception handling support to handle runtime service requests through SMCs following the SMC calling convention. This is a giant commit since all the changes are inter-related. It does the following: 1. Replace the old exception handling mechanism with the new one 2. Enforce that SP_EL0 is used C runtime stacks. 3. Ensures that the cold and warm boot paths use the 'cpu_context' structure to program an ERET into the next lower EL. 4. Ensures that SP_EL3 always points to the next 'cpu_context' structure prior to an ERET into the next lower EL 5. Introduces a PSCI SMC handler which completes the use of PSCI as a runtime service Change-Id: I661797f834c0803d2c674d20f504df1b04c2b852 Co-authored-by: Achin Gupta --- common/psci/psci_setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common/psci/psci_setup.c') diff --git a/common/psci/psci_setup.c b/common/psci/psci_setup.c index c471d1f5..8d7903c1 100644 --- a/common/psci/psci_setup.c +++ b/common/psci/psci_setup.c @@ -195,6 +195,9 @@ static void psci_init_aff_map_node(unsigned long mpidr, cm_set_context(mpidr, (void *) &psci_ns_context[linear_id], NON_SECURE); + + /* Initialize exception stack in the context */ + cm_init_exception_stack(mpidr, NON_SECURE); } return; @@ -348,5 +351,5 @@ DECLARE_RT_SVC( OEN_STD_END, SMC_TYPE_FAST, psci_setup, - NULL + psci_smc_handler ); -- cgit v1.2.3