1. 19 7月, 2014 2 次提交
    • M
      efi/reboot: Allow powering off machines using EFI · 0c5ed61a
      Matt Fleming 提交于
      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: NMark Salter <msalter@redhat.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      0c5ed61a
    • M
      efi/reboot: Add generic wrapper around EfiResetSystem() · 8562c99c
      Matt Fleming 提交于
      Implement efi_reboot(), which is really just a wrapper around the
      EfiResetSystem() EFI runtime service, but it does at least allow us to
      funnel all callers through a single location.
      
      It also simplifies the callsites since users no longer need to check to
      see whether EFI_RUNTIME_SERVICES are enabled.
      
      Cc: Tony Luck <tony.luck@intel.com>
      Tested-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      8562c99c