Expand description
Download commit flow - transitions from UEFI to bare-metal for ISO download.
This module handles the critical ExitBootServices transition:
- User has selected ISO from catalog and confirmed download
- This module prepares the BootHandoff structure
- Calibrates TSC timing
- Calls ExitBootServices (POINT OF NO RETURN)
- Jumps to bare_metal_main for actual download
Β§Safety
After ExitBootServices:
- No UEFI runtime services for networking
- No heap allocator (must pre-allocate)
- No screen/console output (use serial)
- Must use pre-allocated stack
StructsΒ§
- Device
Path πHeader - Configuration for download commit.
- Loaded
Image πProtocol
EnumsΒ§
- Result of download commit operation.
ConstantsΒ§
- EFI_
LOADER_ πDATA UEFI memory types (from UEFI spec)
FunctionsΒ§
- Calibrate TSC frequency using UEFI Stall service. Must be called BEFORE ExitBootServices.
- Commit to download - this exits boot services and downloads in bare-metal mode.
- Display countdown before committing to download.
- find_
esp_ π βlba Find ESP start LBA by querying LoadedImage -> DeviceHandle -> DevicePath - leak_
string πLeak a string so it becomes βstatic. Safe to use since weβre about to exit boot services anyway. - Probe for VirtIO-blk device via PCI config space. Returns BlkProbeResult with device information. Probe for VirtIO-blk device via PCI config space. Returns BlkProbeResult with device information.
- Probe for VirtIO NIC via PCI config space. Returns NicProbeResult with full transport information.
- read_
tsc πRead TSC (Time Stamp Counter).