diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-03-06 15:49:24 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-03-14 11:00:18 +0000 |
commit | 60c0d45a7f7ab4e30452fa14deb23a33e29adbc2 (patch) | |
tree | 121c8626db3bd9313368c00da9b4f56caee315f8 /arch/arm64/kernel/efi.c | |
parent | 285994a62c80f1d72c6924282bcb59608098d5ec (diff) | |
download | linux-60c0d45a7f7ab4e30452fa14deb23a33e29adbc2.tar.gz linux-60c0d45a7f7ab4e30452fa14deb23a33e29adbc2.tar.bz2 linux-60c0d45a7f7ab4e30452fa14deb23a33e29adbc2.zip |
efi/arm64: use UEFI for system reset and poweroff
If UEFI Runtime Services are available, they are preferred over direct
PSCI calls or other methods to reset the system.
For the reset case, we need to hook into machine_restart(), as the
arm_pm_restart function pointer may be overwritten by modules.
Tested-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/efi.c')
-rw-r--r-- | arch/arm64/kernel/efi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index b42c7b480e1e..2b8d70164428 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -354,3 +354,12 @@ void efi_virtmap_unload(void) efi_set_pgd(current->active_mm); preempt_enable(); } + +/* + * UpdateCapsule() depends on the system being shutdown via + * ResetSystem(). + */ +bool efi_poweroff_required(void) +{ + return efi_enabled(EFI_RUNTIME_SERVICES); +} |