include/linux/efi.h
Source file repositories/reference/linux-study-clean/include/linux/efi.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/efi.h- Extension
.h- Size
- 45155 bytes
- Lines
- 1347
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/string.hlinux/time.hlinux/types.hlinux/proc_fs.hlinux/rtc.hlinux/ioport.hlinux/pfn.hlinux/pstore.hlinux/range.hlinux/reboot.hlinux/uuid.hasm/page.h
Detected Declarations
struct screen_infostruct efi_manage_capsule_headerstruct efi_manage_capsule_image_headerstruct win_certstruct win_cert_uefi_guidstruct efi_image_authstruct capsule_infostruct efi_boot_memmapstruct efi_unaccepted_memorystruct efi_memory_map_datastruct efi_memory_mapstruct efi_mem_rangestruct efi_generic_dev_pathstruct efi_acpi_dev_pathstruct efi_pci_dev_pathstruct efi_vendor_dev_pathstruct efi_rel_offset_dev_pathstruct efi_mem_mapped_dev_pathstruct efi_file_path_dev_pathstruct efi_dev_pathstruct efivar_operationsstruct efivarsstruct linux_efi_random_seedstruct linux_efi_tpm_eventlogstruct efi_tcg2_final_events_tablestruct efi_runtime_workstruct linux_efi_memreservestruct efi_mokvar_table_entrystruct linux_efi_coco_secret_areastruct linux_efi_initrdenum efi_secureboot_modeenum efi_rts_idsfunction mm_is_efifunction efi_guidcmpfunction efi_guid_to_strfunction efi_enter_virtual_modefunction efi_query_variable_storefunction efi_esrt_initfunction efi_enabledfunction efi_soft_reserve_enabledfunction efi_rt_services_supportedfunction efi_enabledfunction efi_rebootfunction efi_rt_services_supportedfunction efi_find_mirrorfunction memrange_efi_to_nativefunction efivar_reserved_spacefunction efivar_is_available
Annotated Snippet
struct efi_manage_capsule_header {
u32 ver;
u16 emb_drv_cnt;
u16 payload_cnt;
/*
* Variable-size array of the size given by the sum of
* emb_drv_cnt and payload_cnt.
*/
u64 offset_list[];
} __packed;
/* EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER */
struct efi_manage_capsule_image_header {
u32 ver;
efi_guid_t image_type_id;
u8 image_index;
u8 reserved_bytes[3];
u32 image_size;
u32 vendor_code_size;
/* hw_ins was introduced in version 2 */
u64 hw_ins;
/* capsule_support was introduced in version 3 */
u64 capsule_support;
} __packed;
/* WIN_CERTIFICATE */
struct win_cert {
u32 len;
u16 rev;
u16 cert_type;
};
/* WIN_CERTIFICATE_UEFI_GUID */
struct win_cert_uefi_guid {
struct win_cert hdr;
efi_guid_t cert_type;
u8 cert_data[];
};
/* EFI_FIRMWARE_IMAGE_AUTHENTICATION */
struct efi_image_auth {
u64 mon_count;
struct win_cert_uefi_guid auth_info;
};
/*
* EFI capsule flags
*/
#define EFI_CAPSULE_PERSIST_ACROSS_RESET 0x00010000
#define EFI_CAPSULE_POPULATE_SYSTEM_TABLE 0x00020000
#define EFI_CAPSULE_INITIATE_RESET 0x00040000
struct capsule_info {
efi_capsule_header_t header;
efi_capsule_header_t *capsule;
int reset_type;
long index;
size_t count;
size_t total_size;
struct page **pages;
phys_addr_t *phys;
size_t page_bytes_remain;
};
int efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
size_t hdr_bytes);
int __efi_capsule_setup_info(struct capsule_info *cap_info);
/*
* Types and defines for Time Services
*/
#define EFI_TIME_ADJUST_DAYLIGHT 0x1
#define EFI_TIME_IN_DAYLIGHT 0x2
#define EFI_UNSPECIFIED_TIMEZONE 0x07ff
typedef struct {
u16 year;
u8 month;
u8 day;
u8 hour;
u8 minute;
u8 second;
u8 pad1;
u32 nanosecond;
s16 timezone;
u8 daylight;
u8 pad2;
} efi_time_t;
typedef struct {
Annotation
- Immediate include surface: `linux/init.h`, `linux/string.h`, `linux/time.h`, `linux/types.h`, `linux/proc_fs.h`, `linux/rtc.h`, `linux/ioport.h`, `linux/pfn.h`.
- Detected declarations: `struct screen_info`, `struct efi_manage_capsule_header`, `struct efi_manage_capsule_image_header`, `struct win_cert`, `struct win_cert_uefi_guid`, `struct efi_image_auth`, `struct capsule_info`, `struct efi_boot_memmap`, `struct efi_unaccepted_memory`, `struct efi_memory_map_data`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.