arch/loongarch/kernel/efi-header.S
Source file repositories/reference/linux-study-clean/arch/loongarch/kernel/efi-header.S
File Facts
- System
- Linux kernel
- Corpus path
arch/loongarch/kernel/efi-header.S- Extension
.S- Size
- 3559 bytes
- Lines
- 104
- Domain
- Architecture Layer
- Bucket
- arch/loongarch
- Inferred role
- Architecture Layer: arch/loongarch
- Status
- atlas-only
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/pe.hlinux/sizes.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/pe.h>
#include <linux/sizes.h>
.macro __EFI_PE_HEADER
.long IMAGE_NT_SIGNATURE
.Lcoff_header:
#ifdef CONFIG_32BIT
.short IMAGE_FILE_MACHINE_LOONGARCH32 /* Machine */
#else
.short IMAGE_FILE_MACHINE_LOONGARCH64 /* Machine */
#endif
.short .Lsection_count /* NumberOfSections */
.long 0 /* TimeDateStamp */
.long 0 /* PointerToSymbolTable */
.long 0 /* NumberOfSymbols */
.short .Lsection_table - .Loptional_header /* SizeOfOptionalHeader */
.short IMAGE_FILE_DEBUG_STRIPPED | \
IMAGE_FILE_EXECUTABLE_IMAGE | \
IMAGE_FILE_LINE_NUMS_STRIPPED /* Characteristics */
.Loptional_header:
.short IMAGE_NT_OPTIONAL_HDR64_MAGIC /* PE32+ format */
.byte 0x02 /* MajorLinkerVersion */
.byte 0x14 /* MinorLinkerVersion */
.long __inittext_end - .Lefi_header_end /* SizeOfCode */
.long _kernel_vsize /* SizeOfInitializedData */
.long 0 /* SizeOfUninitializedData */
.long __efistub_efi_pe_entry - _head /* AddressOfEntryPoint */
.long .Lefi_header_end - _head /* BaseOfCode */
.Lextra_header_fields:
.quad 0 /* ImageBase */
.long PECOFF_SEGMENT_ALIGN /* SectionAlignment */
.long PECOFF_FILE_ALIGN /* FileAlignment */
.short 0 /* MajorOperatingSystemVersion */
.short 0 /* MinorOperatingSystemVersion */
.short LINUX_EFISTUB_MAJOR_VERSION /* MajorImageVersion */
.short LINUX_EFISTUB_MINOR_VERSION /* MinorImageVersion */
.short 0 /* MajorSubsystemVersion */
.short 0 /* MinorSubsystemVersion */
.long 0 /* Win32VersionValue */
.long _end - _head /* SizeOfImage */
/* Everything before the kernel image is considered part of the header */
.long .Lefi_header_end - _head /* SizeOfHeaders */
.long 0 /* CheckSum */
.short IMAGE_SUBSYSTEM_EFI_APPLICATION /* Subsystem */
.short 0 /* DllCharacteristics */
.quad 0 /* SizeOfStackReserve */
.quad 0 /* SizeOfStackCommit */
.quad 0 /* SizeOfHeapReserve */
.quad 0 /* SizeOfHeapCommit */
.long 0 /* LoaderFlags */
.long (.Lsection_table - .) / 8 /* NumberOfRvaAndSizes */
.quad 0 /* ExportTable */
.quad 0 /* ImportTable */
.quad 0 /* ResourceTable */
.quad 0 /* ExceptionTable */
.quad 0 /* CertificationTable */
.quad 0 /* BaseRelocationTable */
/* Section table */
.Lsection_table:
.ascii ".text\0\0\0"
.long __inittext_end - .Lefi_header_end /* VirtualSize */
.long .Lefi_header_end - _head /* VirtualAddress */
.long __inittext_end - .Lefi_header_end /* SizeOfRawData */
.long .Lefi_header_end - _head /* PointerToRawData */
Annotation
- Immediate include surface: `linux/pe.h`, `linux/sizes.h`.
- Atlas domain: Architecture Layer / arch/loongarch.
- 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.