drivers/firmware/efi/libstub/zboot-header.S
Source file repositories/reference/linux-study-clean/drivers/firmware/efi/libstub/zboot-header.S
File Facts
- System
- Linux kernel
- Corpus path
drivers/firmware/efi/libstub/zboot-header.S- Extension
.S- Size
- 4227 bytes
- Lines
- 178
- Domain
- Driver Families
- Bucket
- drivers/firmware
- Inferred role
- Driver Families: drivers/firmware
- Status
- atlas-only
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
linux/pe.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/pe.h>
#ifdef CONFIG_64BIT
.set .Lextra_characteristics, 0x0
.set .Lpe_opt_magic, IMAGE_NT_OPTIONAL_HDR64_MAGIC
#else
.set .Lextra_characteristics, IMAGE_FILE_32BIT_MACHINE
.set .Lpe_opt_magic, IMAGE_NT_OPTIONAL_HDR32_MAGIC
#endif
.section ".head", "a"
.globl __efistub_efi_zboot_header
__efistub_efi_zboot_header:
.Ldoshdr:
.long IMAGE_DOS_SIGNATURE
.ascii "zimg" // image type
.long __efistub__gzdata_start - .Ldoshdr // payload offset
.long __efistub__gzdata_size - ZBOOT_SIZE_LEN // payload size
.long 0, 0 // reserved
.asciz COMP_TYPE // compression type
.org .Ldoshdr + 0x38
.long LINUX_PE_MAGIC
.long .Lpehdr - .Ldoshdr // PE header offset
.Lpehdr:
.long IMAGE_NT_SIGNATURE
.short MACHINE_TYPE
.short .Lsection_count
.long 0
.long 0
.long 0
.short .Lsection_table - .Loptional_header
.short IMAGE_FILE_DEBUG_STRIPPED | \
IMAGE_FILE_EXECUTABLE_IMAGE | \
IMAGE_FILE_LINE_NUMS_STRIPPED |\
.Lextra_characteristics
.Loptional_header:
.short .Lpe_opt_magic
.byte 0, 0
.long _etext - .Lefi_header_end
.long __data_size
.long 0
.long __efistub_efi_zboot_entry - .Ldoshdr
.long .Lefi_header_end - .Ldoshdr
#ifdef CONFIG_64BIT
.quad 0
#else
.long _etext - .Ldoshdr, 0x0
#endif
.long 4096
.long 512
.short 0, 0
.short LINUX_EFISTUB_MAJOR_VERSION // MajorImageVersion
.short LINUX_EFISTUB_MINOR_VERSION // MinorImageVersion
.short 0, 0
.long 0
.long _end - .Ldoshdr
.long .Lefi_header_end - .Ldoshdr
.long 0
.short IMAGE_SUBSYSTEM_EFI_APPLICATION
.short IMAGE_DLLCHARACTERISTICS_NX_COMPAT
#ifdef CONFIG_64BIT
.quad 0, 0, 0, 0
#else
.long 0, 0, 0, 0
#endif
.long 0
Annotation
- Immediate include surface: `linux/pe.h`.
- Atlas domain: Driver Families / drivers/firmware.
- Implementation status: atlas-only.
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.