summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2014-06-13 12:35:21 +0100
committerLuis Henriques <luis.henriques@canonical.com>2015-05-12 09:36:34 +0100
commitf6c2e46d68cd69266ae5f763f4a5c8c3c823104c (patch)
tree6caea37698e3ff22efe3da40c9094ac7d19dbe1b /include
parentc4bb687a50aa5021bc1837e1ec6bd1d6062e2cb7 (diff)
efi/reboot: Allow powering off machines using EFI
commit 0c5ed61adbdbf2ca5de934642d5be1e971c498c1 upstream. Not only can EfiResetSystem() be used to reboot, it can also be used to power down machines. By and large, this functionality doesn't work very well across the range of EFI machines in the wild, so it should definitely only be used as a last resort. In an ideal world, this wouldn't be needed at all. Unfortunately, we're starting to see machines where EFI is the *only* reliable way to power down, and nothing else, not PCI, not ACPI, works. efi_poweroff_required() should be implemented on a per-architecture basis, since exactly when we should be using EFI runtime services is a platform-specific decision. There's no analogue for reboot because each architecture handles reboot very differently - the x86 code in particular is pretty complex. Patches to enable this for specific classes of hardware will be submitted separately. Tested-by: Mark Salter <msalter@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 0958d4bb399f..2539aff31808 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -876,6 +876,8 @@ extern void efi_reserve_boot_services(void);
extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose);
extern struct efi_memory_map memmap;
+extern bool efi_poweroff_required(void);
+
/* Iterate through an efi_memory_map */
#define for_each_efi_memory_desc(m, md) \
for ((md) = (m)->map; \