Commit 0a9f7473 authored by Achin Gupta's avatar Achin Gupta Committed by Dan Handley
Browse files

Move PSCI to runtime services directory

This patch creates a 'services' directory and moves the PSCI under
it. Other runtime services e.g. the Secure Payload Dispatcher service
will be placed under the same directory in the future.

Also fixes issue ARM-software/tf-issues#12

Change-Id: I187f83dcb660b728f82155d91882e961d2255068
parent 8aa0cd43
......@@ -131,7 +131,7 @@ INCLUDES += -Ilib/include/ \
-Iinclude/${ARCH}/ \
-Iinclude/ \
-Iarch/system/gic \
-Icommon/psci \
-Iservices/psci \
-Iinclude/stdlib \
-Iinclude/stdlib/sys \
-Iplat/${PLAT} \
......
......@@ -33,13 +33,13 @@ vpath %.c common \
arch/system/gic \
plat/${PLAT} \
arch/${ARCH} \
common/psci \
services/psci \
lib/sync/locks/bakery \
plat/${PLAT}/${ARCH} \
${PLAT_BL31_C_VPATH}
vpath %.S lib/arch/${ARCH} \
common/psci \
services/psci \
include \
plat/${PLAT}/${ARCH} \
lib/sync/locks/exclusive \
......
......@@ -31,6 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
......
......@@ -31,11 +31,13 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <psci.h>
#include <psci_private.h>
#include <context_mgmt.h>
typedef int (*afflvl_on_handler)(unsigned long,
aff_map_node *,
......
......@@ -31,6 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
......@@ -87,6 +88,7 @@ static int psci_afflvl0_suspend(unsigned long mpidr,
{
unsigned int index, plat_state;
unsigned long psci_entrypoint, sctlr = read_sctlr();
el3_state *saved_el3_state;
int rc = PSCI_E_SUCCESS;
/* Sanity check to safeguard against data corruption */
......@@ -112,6 +114,13 @@ static int psci_afflvl0_suspend(unsigned long mpidr,
cm_el3_sysregs_context_save(NON_SECURE);
rc = PSCI_E_SUCCESS;
/*
* The EL3 state to PoC since it will be accessed after a
* reset with the caches turned off
*/
saved_el3_state = get_el3state_ctx(cm_get_context(mpidr, NON_SECURE));
flush_dcache_range((uint64_t) saved_el3_state, sizeof(*saved_el3_state));
/* Set the secure world (EL3) re-entry point after BL1 */
psci_entrypoint = (unsigned long) psci_aff_suspend_finish_entry;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment