#define pr_fmt(fmt) …
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/efi.h>
#include <linux/of.h>
#include <linux/initrd.h>
#include <linux/io.h>
#include <linux/kexec.h>
#include <linux/platform_device.h>
#include <linux/random.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/ucs2_string.h>
#include <linux/memblock.h>
#include <linux/security.h>
#include <linux/notifier.h>
#include <asm/early_ioremap.h>
struct efi __read_mostly efi = …;
EXPORT_SYMBOL(…);
unsigned long __ro_after_init efi_rng_seed = …;
static unsigned long __initdata mem_reserve = …;
static unsigned long __initdata rt_prop = …;
static unsigned long __initdata initrd = …;
extern unsigned long screen_info_table;
struct mm_struct efi_mm = …;
struct workqueue_struct *efi_rts_wq;
static bool disable_runtime = … IS_ENABLED(…);
static int __init setup_noefi(char *arg)
{ … }
early_param(…);
bool efi_runtime_disabled(void)
{ … }
bool __pure __efi_soft_reserve_enabled(void)
{ … }
static int __init parse_efi_cmdline(char *str)
{ … }
early_param(…);
struct kobject *efi_kobj;
static ssize_t systab_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
static struct kobj_attribute efi_attr_systab = …;
static ssize_t fw_platform_size_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
extern __weak struct kobj_attribute efi_attr_fw_vendor;
extern __weak struct kobj_attribute efi_attr_runtime;
extern __weak struct kobj_attribute efi_attr_config_table;
static struct kobj_attribute efi_attr_fw_platform_size = …;
static struct attribute *efi_subsys_attrs[] = …;
umode_t __weak efi_attr_is_visible(struct kobject *kobj, struct attribute *attr,
int n)
{ … }
static const struct attribute_group efi_subsys_attr_group = …;
struct blocking_notifier_head efivar_ops_nh;
EXPORT_SYMBOL_GPL(…);
static struct efivars generic_efivars;
static struct efivar_operations generic_ops;
static bool generic_ops_supported(void)
{ … }
static int generic_ops_register(void)
{ … }
static void generic_ops_unregister(void)
{ … }
void efivars_generic_ops_register(void)
{ … }
EXPORT_SYMBOL_GPL(…);
void efivars_generic_ops_unregister(void)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
#define EFIVAR_SSDT_NAME_MAX …
static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata;
static int __init efivar_ssdt_setup(char *str)
{ … }
__setup(…);
static __init int efivar_ssdt_load(void)
{ … }
#else
static inline int efivar_ssdt_load(void) { return 0; }
#endif
#ifdef CONFIG_DEBUG_FS
#define EFI_DEBUGFS_MAX_BLOBS …
static struct debugfs_blob_wrapper debugfs_blob[EFI_DEBUGFS_MAX_BLOBS];
static void __init efi_debugfs_init(void)
{ … }
#else
static inline void efi_debugfs_init(void) {}
#endif
static int __init efisubsys_init(void)
{ … }
subsys_initcall(efisubsys_init);
void __init efi_find_mirror(void)
{ … }
int __efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md)
{ … }
extern int efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md)
__weak __alias(__efi_mem_desc_lookup);
u64 __init efi_mem_desc_end(efi_memory_desc_t *md)
{ … }
void __init __weak efi_arch_mem_reserve(phys_addr_t addr, u64 size) { … }
void __init efi_mem_reserve(phys_addr_t addr, u64 size)
{ … }
static const efi_config_table_type_t common_tables[] __initconst = …;
static __init int match_config_table(const efi_guid_t *guid,
unsigned long table,
const efi_config_table_type_t *table_types)
{ … }
static __init void reserve_unaccepted(struct efi_unaccepted_memory *unaccepted)
{ … }
int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
int count,
const efi_config_table_type_t *arch_tables)
{ … }
int __init efi_systab_check_header(const efi_table_hdr_t *systab_hdr)
{ … }
static const efi_char16_t *__init map_fw_vendor(unsigned long fw_vendor,
size_t size)
{ … }
static void __init unmap_fw_vendor(const void *fw_vendor, size_t size)
{ … }
void __init efi_systab_report_header(const efi_table_hdr_t *systab_hdr,
unsigned long fw_vendor)
{ … }
static __initdata char memory_type_name[][13] = …;
char * __init efi_md_typeattr_format(char *buf, size_t size,
const efi_memory_desc_t *md)
{ … }
u64 efi_mem_attributes(unsigned long phys_addr)
{ … }
int efi_mem_type(unsigned long phys_addr)
{ … }
int efi_status_to_err(efi_status_t status)
{ … }
EXPORT_SYMBOL_GPL(…);
static DEFINE_SPINLOCK(efi_mem_reserve_persistent_lock);
static struct linux_efi_memreserve *efi_memreserve_root __ro_after_init;
static int __init efi_memreserve_map_root(void)
{ … }
static int efi_mem_reserve_iomem(phys_addr_t addr, u64 size)
{ … }
int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size)
{ … }
static int __init efi_memreserve_root_init(void)
{ … }
early_initcall(efi_memreserve_root_init);
#ifdef CONFIG_KEXEC
static int update_efi_random_seed(struct notifier_block *nb,
unsigned long code, void *unused)
{ … }
static struct notifier_block efi_random_seed_nb = …;
static int __init register_update_efi_random_seed(void)
{ … }
late_initcall(register_update_efi_random_seed);
#endif