aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2014-01-15 13:21:22 +0000
committerMark Brown <broonie@linaro.org>2014-07-24 22:58:42 +0100
commit24439fe94eaa533c36227c7d856021ec99696c0b (patch)
tree4f63ce52aa6653db41c0a6af0b45c5ed4cc6e046 /arch
parent9ed6b4ce7b3488d6bb880b06b868a976aa9fc968 (diff)
efi: Move facility flags to struct efi
As we grow support for more EFI architectures they're going to want the ability to query which EFI features are available on the running system. Instead of storing this information in an architecture-specific place, stick it in the global 'struct efi', which is already the central location for EFI state. While we're at it, let's change the return value of efi_enabled() to be bool and replace all references to 'facility' with 'feature', which is the usual word used to describe the attributes of the running system. Signed-off-by: Matt Fleming <matt.fleming@intel.com> (cherry picked from commit 3e909599215456928e6b42a04f11c2517881570b) Signed-off-by: Mark Brown <broonie@linaro.org> Conflicts: arch/x86/platform/efi/efi.c
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/efi/efi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 3104db146882..0f17a1d23c0a 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -72,15 +72,6 @@ static __initdata efi_config_table_type_t arch_tables[] = {
{NULL_GUID, NULL, 0},
};
-/*
- * Returns 1 if 'facility' is enabled, 0 otherwise.
- */
-int efi_enabled(int facility)
-{
- return test_bit(facility, &x86_efi_facility) != 0;
-}
-EXPORT_SYMBOL(efi_enabled);
-
u64 efi_setup; /* efi setup_data physical address */
static bool __initdata disable_runtime = false;
@@ -649,6 +640,10 @@ void __init efi_init(void)
set_bit(EFI_SYSTEM_TABLES, &efi.flags);
+ efi.config_table = (unsigned long)efi.systab->tables;
+ efi.fw_vendor = (unsigned long)efi.systab->fw_vendor;
+ efi.runtime = (unsigned long)efi.systab->runtime;
+
/*
* Show what we know for posterity
*/