#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/memblock.h>
#include <linux/ioport.h>
#include <linux/mc146818rtc.h>
#include <linux/efi.h>
#include <linux/export.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/ucs2_string.h>
#include <linux/cc_platform.h>
#include <linux/sched/task.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/e820/api.h>
#include <asm/tlbflush.h>
#include <asm/proto.h>
#include <asm/efi.h>
#include <asm/cacheflush.h>
#include <asm/fixmap.h>
#include <asm/realmode.h>
#include <asm/time.h>
#include <asm/pgalloc.h>
#include <asm/sev.h>
static u64 efi_va = …;
static struct mm_struct *efi_prev_mm;
int __init efi_alloc_page_tables(void)
{ … }
void efi_sync_low_kernel_mappings(void)
{ … }
static inline phys_addr_t
virt_to_phys_or_null_size(void *va, unsigned long size)
{ … }
#define virt_to_phys_or_null(addr) …
int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
{ … }
static void __init __map_region(efi_memory_desc_t *md, u64 va)
{ … }
void __init efi_map_region(efi_memory_desc_t *md)
{ … }
void __init efi_map_region_fixed(efi_memory_desc_t *md)
{ … }
void __init parse_efi_setup(u64 phys_addr, u32 data_len)
{ … }
static int __init efi_update_mappings(efi_memory_desc_t *md, unsigned long pf)
{ … }
bool efi_disable_ibt_for_runtime __ro_after_init = …;
static int __init efi_update_mem_attr(struct mm_struct *mm, efi_memory_desc_t *md,
bool has_ibt)
{ … }
void __init efi_runtime_update_mappings(void)
{ … }
void __init efi_dump_pagetable(void)
{ … }
static void efi_enter_mm(void)
{ … }
static void efi_leave_mm(void)
{ … }
void arch_efi_call_virt_setup(void)
{ … }
void arch_efi_call_virt_teardown(void)
{ … }
static DEFINE_SPINLOCK(efi_runtime_lock);
#define __efi_thunk(func, ...) …
#define efi_thunk(func...) …
static efi_status_t __init __no_sanitize_address
efi_thunk_set_virtual_address_map(unsigned long memory_map_size,
unsigned long descriptor_size,
u32 descriptor_version,
efi_memory_desc_t *virtual_map)
{ … }
static efi_status_t efi_thunk_get_time(efi_time_t *tm, efi_time_cap_t *tc)
{ … }
static efi_status_t efi_thunk_set_time(efi_time_t *tm)
{ … }
static efi_status_t
efi_thunk_get_wakeup_time(efi_bool_t *enabled, efi_bool_t *pending,
efi_time_t *tm)
{ … }
static efi_status_t
efi_thunk_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm)
{ … }
static unsigned long efi_name_size(efi_char16_t *name)
{ … }
static efi_status_t
efi_thunk_get_variable(efi_char16_t *name, efi_guid_t *vendor,
u32 *attr, unsigned long *data_size, void *data)
{ … }
static efi_status_t
efi_thunk_set_variable(efi_char16_t *name, efi_guid_t *vendor,
u32 attr, unsigned long data_size, void *data)
{ … }
static efi_status_t
efi_thunk_set_variable_nonblocking(efi_char16_t *name, efi_guid_t *vendor,
u32 attr, unsigned long data_size,
void *data)
{ … }
static efi_status_t
efi_thunk_get_next_variable(unsigned long *name_size,
efi_char16_t *name,
efi_guid_t *vendor)
{ … }
static efi_status_t
efi_thunk_get_next_high_mono_count(u32 *count)
{ … }
static void
efi_thunk_reset_system(int reset_type, efi_status_t status,
unsigned long data_size, efi_char16_t *data)
{ … }
static efi_status_t
efi_thunk_update_capsule(efi_capsule_header_t **capsules,
unsigned long count, unsigned long sg_list)
{ … }
static efi_status_t
efi_thunk_query_variable_info(u32 attr, u64 *storage_space,
u64 *remaining_space,
u64 *max_variable_size)
{ … }
static efi_status_t
efi_thunk_query_variable_info_nonblocking(u32 attr, u64 *storage_space,
u64 *remaining_space,
u64 *max_variable_size)
{ … }
static efi_status_t
efi_thunk_query_capsule_caps(efi_capsule_header_t **capsules,
unsigned long count, u64 *max_size,
int *reset_type)
{ … }
void __init efi_thunk_runtime_setup(void)
{ … }
efi_status_t __init __no_sanitize_address
efi_set_virtual_address_map(unsigned long memory_map_size,
unsigned long descriptor_size,
u32 descriptor_version,
efi_memory_desc_t *virtual_map,
unsigned long systab_phys)
{ … }