aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2017-09-22 08:32:10 +0100
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2017-10-23 08:15:11 +0100
commitbd0c34778174aa4239ff96b448d0b6e1deeec4e2 (patch)
tree57d35175d72f8ff523c0212ed180f68e52aac710
parent8e743bcd6a69bce2ac782319951061c69798558d (diff)
downloadarm-trusted-firmware-bd0c34778174aa4239ff96b448d0b6e1deeec4e2.tar.gz
PSCI: Publish CPU ON event
This allows other EL3 components to subscribe to CPU on events. Update Firmware Design guide to list psci_cpu_on_finish as an available event. Change-Id: Ida774afe0f9cdce4021933fcc33a9527ba7aaae2 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
-rw-r--r--docs/firmware-design.rst16
-rw-r--r--include/lib/el3_runtime/pubsub_events.h6
-rw-r--r--lib/psci/psci_on.c3
3 files changed, 25 insertions, 0 deletions
diff --git a/docs/firmware-design.rst b/docs/firmware-design.rst
index 8851065a..853e3901 100644
--- a/docs/firmware-design.rst
+++ b/docs/firmware-design.rst
@@ -2339,6 +2339,22 @@ implement:
SUBSCRIBE_TO_EVENT(foo, foo_handler);
+Available Events
+~~~~~~~~~~~~~~~~
+
+ARM Trusted Firmware core makes some events available by default. They're listed
+below, along with information as to when they're published, and the arguments
+passed to subscribed handlers.
+
+Other EL3 components that are conditionally compiled in may make their own
+events available, but aren't documented here.
+
+- ``psci_cpu_on_finish``
+
+ - When: Published on a PE after it's finished its power-up sequence.
+
+ - Argument: ``NULL``.
+
Performance Measurement Framework
---------------------------------
diff --git a/include/lib/el3_runtime/pubsub_events.h b/include/lib/el3_runtime/pubsub_events.h
index 8ef1a11b..62550f81 100644
--- a/include/lib/el3_runtime/pubsub_events.h
+++ b/include/lib/el3_runtime/pubsub_events.h
@@ -10,3 +10,9 @@
* This file defines a list of pubsub events, declared using
* REGISTER_PUBSUB_EVENT() macro.
*/
+
+/*
+ * Event published after a CPU has been powered up and finished its
+ * initialization.
+ */
+REGISTER_PUBSUB_EVENT(psci_cpu_on_finish);
diff --git a/lib/psci/psci_on.c b/lib/psci/psci_on.c
index d3d0e2ff..53b044ec 100644
--- a/lib/psci/psci_on.c
+++ b/lib/psci/psci_on.c
@@ -11,6 +11,7 @@
#include <context_mgmt.h>
#include <debug.h>
#include <platform.h>
+#include <pubsub_events.h>
#include <stddef.h>
#include "psci_private.h"
@@ -188,6 +189,8 @@ void psci_cpu_on_finish(unsigned int cpu_idx,
if (psci_spd_pm && psci_spd_pm->svc_on_finish)
psci_spd_pm->svc_on_finish(0);
+ PUBLISH_EVENT(psci_cpu_on_finish);
+
/* Populate the mpidr field within the cpu node array */
/* This needs to be done only once */
psci_cpu_pd_nodes[cpu_idx].mpidr = read_mpidr() & MPIDR_AFFINITY_MASK;