mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 07:15:20 +00:00
Add PubSub events for CPU powerdown/powerup
The suspend hook is published at the start of a CPU powerdown operation. The resume hook is published at the end of a CPU powerup operation. Change-Id: I50c05e2dde0d33834095ac41b4fcea4c161bb434 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
This commit is contained in:
parent
08e06be819
commit
7593252cee
2 changed files with 12 additions and 0 deletions
|
@ -17,6 +17,13 @@
|
||||||
*/
|
*/
|
||||||
REGISTER_PUBSUB_EVENT(psci_cpu_on_finish);
|
REGISTER_PUBSUB_EVENT(psci_cpu_on_finish);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These events are published before/after a CPU has been powered down/up
|
||||||
|
* via the PSCI CPU SUSPEND API.
|
||||||
|
*/
|
||||||
|
REGISTER_PUBSUB_EVENT(psci_suspend_pwrdown_start);
|
||||||
|
REGISTER_PUBSUB_EVENT(psci_suspend_pwrdown_finish);
|
||||||
|
|
||||||
#ifdef AARCH64
|
#ifdef AARCH64
|
||||||
/*
|
/*
|
||||||
* These events are published by the AArch64 context management framework
|
* These events are published by the AArch64 context management framework
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <pmf.h>
|
#include <pmf.h>
|
||||||
|
#include <pubsub_events.h>
|
||||||
#include <runtime_instr.h>
|
#include <runtime_instr.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "psci_private.h"
|
#include "psci_private.h"
|
||||||
|
@ -68,6 +69,8 @@ static void psci_suspend_to_pwrdown_start(unsigned int end_pwrlvl,
|
||||||
{
|
{
|
||||||
unsigned int max_off_lvl = psci_find_max_off_lvl(state_info);
|
unsigned int max_off_lvl = psci_find_max_off_lvl(state_info);
|
||||||
|
|
||||||
|
PUBLISH_EVENT(psci_suspend_pwrdown_start);
|
||||||
|
|
||||||
/* Save PSCI target power level for the suspend finisher handler */
|
/* Save PSCI target power level for the suspend finisher handler */
|
||||||
psci_set_suspend_pwrlvl(end_pwrlvl);
|
psci_set_suspend_pwrlvl(end_pwrlvl);
|
||||||
|
|
||||||
|
@ -308,6 +311,8 @@ void psci_cpu_suspend_finish(unsigned int cpu_idx,
|
||||||
/* Invalidate the suspend level for the cpu */
|
/* Invalidate the suspend level for the cpu */
|
||||||
psci_set_suspend_pwrlvl(PSCI_INVALID_PWR_LVL);
|
psci_set_suspend_pwrlvl(PSCI_INVALID_PWR_LVL);
|
||||||
|
|
||||||
|
PUBLISH_EVENT(psci_suspend_pwrdown_finish);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic management: Now we just need to retrieve the
|
* Generic management: Now we just need to retrieve the
|
||||||
* information that we had stashed away during the suspend
|
* information that we had stashed away during the suspend
|
||||||
|
|
Loading…
Add table
Reference in a new issue