Andrew Scull | 550d99b | 2020-02-10 13:55:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020 The Hafnium Authors. |
| 3 | * |
Andrew Walbran | e959ec1 | 2020-06-17 15:01:09 +0100 | [diff] [blame] | 4 | * Use of this source code is governed by a BSD-style |
| 5 | * license that can be found in the LICENSE file or at |
| 6 | * https://opensource.org/licenses/BSD-3-Clause. |
Andrew Scull | 550d99b | 2020-02-10 13:55:00 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "hf/vcpu.h" |
| 12 | |
| 13 | /** |
Olivier Deprez | f17eadc | 2021-01-25 15:33:38 +0100 | [diff] [blame] | 14 | * Returns the platform specific PSCI version value. |
| 15 | */ |
| 16 | uint32_t plat_psci_version_get(void); |
| 17 | |
| 18 | /** |
| 19 | * Called once at boot time to initialize the platform power management module. |
| 20 | */ |
| 21 | void plat_psci_init(void); |
| 22 | |
| 23 | /** |
Andrew Scull | 550d99b | 2020-02-10 13:55:00 +0000 | [diff] [blame] | 24 | * Called before the PSCI_CPU_SUSPEND SMC is forwarded. The power state is |
| 25 | * provided to allow actions to be taken based on the implementation defined |
| 26 | * meaning of this field. |
| 27 | */ |
| 28 | void plat_psci_cpu_suspend(uint32_t power_state); |
| 29 | |
| 30 | /** Called when a CPU resumes from being off or suspended. */ |
Olivier Deprez | 148b560 | 2022-03-16 17:13:06 +0100 | [diff] [blame^] | 31 | struct vcpu *plat_psci_cpu_resume(struct cpu *c); |