arch/x86/platform/efi/efi_stub_32.S
Source file repositories/reference/linux-study-clean/arch/x86/platform/efi/efi_stub_32.S
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/platform/efi/efi_stub_32.S- Extension
.S- Size
- 1178 bytes
- Lines
- 61
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: arch/x86
- 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/linkage.hlinux/init.hasm/asm-offsets.hasm/page_types.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/asm-offsets.h>
#include <asm/page_types.h>
__INIT
SYM_FUNC_START(efi_call_svam)
push %ebp
movl %esp, %ebp
push %ebx
push 16(%esp)
push 16(%esp)
push %ecx
push %edx
movl %eax, %ebx // &systab_phys->runtime
/*
* Switch to the flat mapped alias of this routine, by jumping to the
* address of label '1' after subtracting PAGE_OFFSET from it.
*/
movl $1f, %edx
subl $__PAGE_OFFSET, %edx
jmp *%edx
1:
/* disable paging */
movl %cr0, %edx
andl $0x7fffffff, %edx
movl %edx, %cr0
/* convert the stack pointer to a flat mapped address */
subl $__PAGE_OFFSET, %esp
/* call the EFI routine */
movl (%eax), %eax
call *EFI_svam(%eax)
/* grab the virtually remapped EFI runtime services table pointer */
movl (%ebx), %ecx
movl 36(%esp), %edx // &efi.runtime
movl %ecx, (%edx)
/* re-enable paging */
movl %cr0, %edx
orl $0x80000000, %edx
movl %edx, %cr0
movl 16(%esp), %ebx
leave
RET
SYM_FUNC_END(efi_call_svam)
Annotation
- Immediate include surface: `linux/linkage.h`, `linux/init.h`, `asm/asm-offsets.h`, `asm/page_types.h`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.