dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/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
..
boot x86, efi: correct precedence of operators in setup_efi_pci 2012-12-20 11:47:14 -08:00
configs
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-12-15 12:35:19 -08:00
ia32 new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to those 2012-12-19 18:07:41 -05:00
include efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
kernel efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
kvm KVM: x86: use dynamic percpu allocations for shared msrs area 2013-01-08 12:51:56 -02:00
lguest
lib X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
math-emu
mm Automatic NUMA Balancing V11 2012-12-16 15:18:08 -08:00
net
oprofile
pci X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
platform efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
power
realmode Revert "x86, mm: Include the entire kernel memory map in trampoline_pgd" 2012-12-15 12:29:54 -08:00
syscalls Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
tools x86: Fix the error of using "const" in gen-insn-attr-x86.awk 2012-12-10 10:31:24 -08:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
vdso Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-12-13 15:31:08 -08:00
video
xen Bugfixes: 2012-12-18 12:26:54 -08:00
.gitignore
Kbuild
Kconfig x86/olpc: Fix olpc-xo1-sci.c build errors 2013-01-24 16:00:23 +01:00
Kconfig.cpu x86, 386 removal: Document Nx586 as a 386 and thus unsupported 2012-11-29 13:28:39 -08:00
Kconfig.debug
Makefile md update for 3.8 2012-12-18 09:32:44 -08:00
Makefile.um
Makefile_32.cpu