|
@@ -55,6 +55,25 @@ struct efi __read_mostly efi = {
|
|
};
|
|
};
|
|
EXPORT_SYMBOL(efi);
|
|
EXPORT_SYMBOL(efi);
|
|
|
|
|
|
|
|
+static unsigned long *efi_tables[] = {
|
|
|
|
+ &efi.mps,
|
|
|
|
+ &efi.acpi,
|
|
|
|
+ &efi.acpi20,
|
|
|
|
+ &efi.smbios,
|
|
|
|
+ &efi.smbios3,
|
|
|
|
+ &efi.sal_systab,
|
|
|
|
+ &efi.boot_info,
|
|
|
|
+ &efi.hcdp,
|
|
|
|
+ &efi.uga,
|
|
|
|
+ &efi.uv_systab,
|
|
|
|
+ &efi.fw_vendor,
|
|
|
|
+ &efi.runtime,
|
|
|
|
+ &efi.config_table,
|
|
|
|
+ &efi.esrt,
|
|
|
|
+ &efi.properties_table,
|
|
|
|
+ &efi.mem_attr_table,
|
|
|
|
+};
|
|
|
|
+
|
|
static bool disable_runtime;
|
|
static bool disable_runtime;
|
|
static int __init setup_noefi(char *arg)
|
|
static int __init setup_noefi(char *arg)
|
|
{
|
|
{
|
|
@@ -855,6 +874,20 @@ int efi_status_to_err(efi_status_t status)
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+bool efi_is_table_address(unsigned long phys_addr)
|
|
|
|
+{
|
|
|
|
+ unsigned int i;
|
|
|
|
+
|
|
|
|
+ if (phys_addr == EFI_INVALID_TABLE_ADDR)
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < ARRAY_SIZE(efi_tables); i++)
|
|
|
|
+ if (*(efi_tables[i]) == phys_addr)
|
|
|
|
+ return true;
|
|
|
|
+
|
|
|
|
+ return false;
|
|
|
|
+}
|
|
|
|
+
|
|
#ifdef CONFIG_KEXEC
|
|
#ifdef CONFIG_KEXEC
|
|
static int update_efi_random_seed(struct notifier_block *nb,
|
|
static int update_efi_random_seed(struct notifier_block *nb,
|
|
unsigned long code, void *unused)
|
|
unsigned long code, void *unused)
|