efivars: check for EFI_RUNTIME_SERVICES
authorMatt Fleming <matt.fleming@intel.com>
Thu, 11 Jul 2013 06:30:33 +0000 (07:30 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 16 Jun 2014 20:14:54 +0000 (21:14 +0100)
commitb082f48205a0c8f3294f7de0852ac379a76fdc08
treea97d8119a1ff8e4828402a5cf755e56c30b39a0d
parentbb0145e4e0e6f8112464975795850b3ce00c24f7
efivars: check for EFI_RUNTIME_SERVICES

The efivars code requires EFI runtime services to function, so check
that they are enabled.

This fixes a crash when booting with the "noefi" kernel parameter, and
also when mixing kernel and firmware "bitness", e.g. 32-bit kernel with
64-bit firmware.

Tested-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
(cherry picked from commit d320c079efd46db1be0640d00bd6723d9e738f9f)
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/firmware/efi/efivars.c