[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv4 37/43] plat/common: Implement system off for arm64
Using PSCI despatch function to call PSCI_SYSTEM_OFF function to shutdown system. Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- plat/common/arm/cpu_native.c | 8 ++++++++ plat/common/include/arm/arm64/cpu.h | 1 + 2 files changed, 9 insertions(+) diff --git a/plat/common/arm/cpu_native.c b/plat/common/arm/cpu_native.c index 177cbd8..b4a33e9 100644 --- a/plat/common/arm/cpu_native.c +++ b/plat/common/arm/cpu_native.c @@ -50,3 +50,11 @@ void reset(void) else if (psci_method == PSCI_METHOD_SMC) psci_smc_call(PSCI_FNID_SYSTEM_RESET); } + +void system_off(void) +{ + if (psci_method == PSCI_METHOD_HVC) + psci_hvc_call(PSCI_FNID_SYSTEM_OFF); + else if (psci_method == PSCI_METHOD_SMC) + psci_smc_call(PSCI_FNID_SYSTEM_OFF); +} \ No newline at end of file diff --git a/plat/common/include/arm/arm64/cpu.h b/plat/common/include/arm/arm64/cpu.h index c744ed6..bc1bfc4 100644 --- a/plat/common/include/arm/arm64/cpu.h +++ b/plat/common/include/arm/arm64/cpu.h @@ -74,6 +74,7 @@ /* CPU native APIs */ void halt(void); void reset(void); +void system_off(void); /* PSCI conduit method to call functions */ extern int psci_method; -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |