linux-hardened/drivers/platform/x86
Matt Fleming 83e6818974 efi: Make 'efi_enabled' a function to query EFI facilities
Originally 'efi_enabled' indicated whether a kernel was booted from
EFI firmware. Over time its semantics have changed, and it now
indicates whether or not we are booted on an EFI machine with
bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.

The immediate motivation for this patch is the bug report at,

    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

which details how running a platform driver on an EFI machine that is
designed to run under BIOS can cause the machine to become
bricked. Also, the following report,

    https://bugzilla.kernel.org/show_bug.cgi?id=47121

details how running said driver can also cause Machine Check
Exceptions. Drivers need a new means of detecting whether they're
running on an EFI machine, as sadly the expression,

    if (!efi_enabled)

hasn't been a sufficient condition for quite some time.

Users actually want to query 'efi_enabled' for different reasons -
what they really want access to is the list of available EFI
facilities.

For instance, the x86 reboot code needs to know whether it can invoke
the ResetSystem() function provided by the EFI runtime services, while
the ACPI OSL code wants to know whether the EFI config tables were
mapped successfully. There are also checks in some of the platform
driver code to simply see if they're running on an EFI machine (which
would make it a bad idea to do BIOS-y things).

This patch is a prereq for the samsung-laptop fix patch.

Cc: David Airlie <airlied@linux.ie>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Peter Jones <pjones@redhat.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Steve Langasek <steve.langasek@canonical.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-01-30 11:51:59 -08:00
..
acer-wmi.c acer-wmi: add Aspire 5741G touchpad toggle key 2013-01-07 12:32:04 -05:00
acerhdf.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
amilo-rfkill.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
apple-gmux.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
asus-laptop.c asus-laptop: Fix potential invalid pointer dereference 2013-01-07 12:33:48 -05:00
asus-nb-wmi.c Corentin has moved 2012-12-17 17:15:14 -08:00
asus-wmi.c Corentin has moved 2012-12-17 17:15:14 -08:00
asus-wmi.h asus-wmi: record wlan status while controlled by userapp 2012-08-17 17:34:39 -04:00
classmate-laptop.c classmate-laptop: always call input_sync() after input_report_switch() 2012-08-17 17:34:42 -04:00
compal-laptop.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
dell-laptop.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
dell-wmi-aio.c dell: Convert printks to pr_<level> 2011-05-27 12:35:47 -04:00
dell-wmi.c dell-wmi: Add keys for Dell XPS L502X 2011-08-05 15:21:47 -04:00
eeepc-laptop.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
eeepc-wmi.c Corentin has moved 2012-12-17 17:15:14 -08:00
fujitsu-laptop.c Email/web address change 2012-03-28 10:35:15 +02:00
fujitsu-tablet.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
hdaps.c platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP 2012-08-10 14:29:43 +02:00
hp-wmi.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
hp_accel.c hp_accel: convert to module_acpi_driver() 2012-09-21 13:40:45 -04:00
ibm_rtl.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
ideapad-laptop.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
intel_ips.c Power management updates for 3.6 2012-07-22 13:36:52 -07:00
intel_ips.h drm/i915, intel_ips: When i915 loads after IPS, make IPS relink to i915. 2010-12-23 09:51:36 +00:00
intel_menlow.c switch sysfs attr->mode to umode_t 2012-01-03 22:54:55 -05:00
intel_mid_powerbtn.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
intel_mid_thermal.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
intel_oaktrail.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
intel_pmic_gpio.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
intel_scu_ipc.c intel_scu_ipc: Remove Moorestown support 2012-03-20 12:02:02 -04:00
intel_scu_ipcutil.c intel_scu_ipc: Remove Moorestown support 2012-03-20 12:02:02 -04:00
Kconfig ideapad: add Lenovo IdeaPad Z570 support (part 2) 2012-08-20 12:44:34 -04:00
Makefile platform/x86: Add driver for Apple gmux device 2012-03-26 15:05:25 -04:00
msi-laptop.c platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP 2012-08-10 14:29:43 +02:00
msi-wmi.c x86: fix up files really needing to include module.h 2011-10-31 19:30:36 -04:00
mxm-wmi.c mxm/wmi: add MXMX interface entry point. 2011-05-09 11:40:38 +10:00
panasonic-laptop.c platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP 2012-08-10 14:29:43 +02:00
samsung-laptop.c samsung-laptop: Add quirk for broken acpi_video backlight on N250P 2013-01-07 12:32:12 -05:00
samsung-q10.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
sony-laptop.c sony-laptop: fix SNC buffer calls when SN06 returns Integers 2013-01-07 12:32:38 -05:00
tc1100-wmi.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
thinkpad_acpi.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
topstar-laptop.c topstar-laptop: convert to module_acpi_driver() 2012-09-21 13:41:24 -04:00
toshiba_acpi.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
toshiba_bluetooth.c toshiba_bluetooth: convert to module_acpi_driver() 2012-09-21 13:41:37 -04:00
wmi.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
xo1-rfkill.c Drivers: platform: x86: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
xo15-ebook.c xo15-ebook: convert to module_acpi_driver() 2012-09-21 13:42:26 -04:00