BootMode
| Field |
Value |
| Index |
0374 |
| Module |
BootMode |
| PE Size |
10,720 bytes |
| Phase |
PEI (Pre-EFI Initialization) |
| Sections |
.text / .rdata / .data / .reloc |
| Arch |
IA-32 (0x014C) |
| SHA256 |
c3c995a2fd598b6438d32af1cc0a58c0b4ce70cdf10e |
Overview
BootMode detects and reports the system boot mode during the PEI phase. It reads GPIO pads, PCI Express registers, and CMOS values to determine the boot path (normal, S3 resume, recovery, etc.). The module installs a PPI indicating the detected boot mode so that other PEIMs can adapt their behavior accordingly. It also handles wake type detection (Power Button, RTC, PCIE, etc.) by reading ACPI PM1 status registers.
Key Functions
- ModuleEntryPoint -- Main entry point; detects boot mode and installs the boot mode PPI
- peim_detect_boot_mode -- Core boot mode detection logic
- peim_get_sleep_type_after_wakeup -- Reads ACPI PM1a status for wake source identification
- peim_check_rtc_power_fail -- Detects RTC power failure condition
- gpio_get_platform_info / gpio_read_pad -- GPIO-based platform identification
- pci_express_read / pci_express_get_base_address -- PCI Express MMIO access
- peim_install_ppi / peim_locate_ppi -- PPI installation and location
- iio_get_active_socket_index -- IIO socket identification
Dependencies
- MdePkg (BaseMemoryLib, BaseLib)
- PEI Services (PPI installation, HOB management)
- GPIO, PCI Express MMIO, CMOS I/O, ACPI PM1 access
- IIO (Integrated IO) configuration
Intel Purley platform, Lenovo HR650X server.