summaryrefslogtreecommitdiff
path: root/services/std_svc
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-02-01 08:05:36 +0000
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-09-07 08:42:50 +0100
commitf933b44bd6c35df1ee3685cbf8a88c3498116138 (patch)
tree87e9e2a8943126b8741302853096399f28b9c348 /services/std_svc
parent783fd8e00f7a58462891ff16fa3f10f635df7a12 (diff)
SDEI: Mask events after CPU wakeup
The specification requires that, after wakeup from a CPU suspend, the dispatcher must mask all events on the CPU. This patch adds the feature to the SDEI dispatcher by subscribing to the PSCI suspend to power down event, and masking all events on the PE. Change-Id: I9fe1d1bc2a58379ba7bba953a8d8b275fc18902c Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'services/std_svc')
-rw-r--r--services/std_svc/sdei/sdei_main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/std_svc/sdei/sdei_main.c b/services/std_svc/sdei/sdei_main.c
index 9b78d7fb..990d0287 100644
--- a/services/std_svc/sdei/sdei_main.c
+++ b/services/std_svc/sdei/sdei_main.c
@@ -81,6 +81,17 @@ static void *sdei_cpu_on_init(const void *arg)
return NULL;
}
+/* CPU initialisation after wakeup from suspend */
+static void *sdei_cpu_wakeup_init(const void *arg)
+{
+ SDEI_LOG("Events masked on %lx\n", read_mpidr_el1());
+
+ /* All PEs wake up with SDEI events masked */
+ sdei_pe_mask();
+
+ return 0;
+}
+
/* Initialise an SDEI class */
static void sdei_class_init(sdei_class_t class)
{
@@ -1075,3 +1086,6 @@ uint64_t sdei_smc_handler(uint32_t smc_fid,
/* Subscribe to PSCI CPU on to initialize per-CPU SDEI configuration */
SUBSCRIBE_TO_EVENT(psci_cpu_on_finish, sdei_cpu_on_init);
+
+/* Subscribe to PSCI CPU suspend finisher for per-CPU configuration */
+SUBSCRIBE_TO_EVENT(psci_suspend_pwrdown_finish, sdei_cpu_wakeup_init);