feat: add support for shutdown/reboot via UEFI Runtime Services

This commit is contained in:
2026-02-26 18:08:05 +01:00
parent 33c5d6037a
commit b01789a1f4
11 changed files with 208 additions and 20 deletions
+8
View File
@@ -108,10 +108,18 @@ public:
// Map a page into an arbitrary PML4 with User + Write-Combining attributes.
static void MapUserInWC(std::uint64_t pml4Phys, std::uint64_t physicalAddress, std::uint64_t virtualAddress);
// Identity-map EFI runtime service regions so firmware code can
// reference its own data at physical addresses.
void MapEfiRuntime(limine_efi_memmap_response* efiMemmap);
};
extern Paging* g_paging;
extern "C" uint64_t GetCR3();
extern "C" void LoadCR3(PageTable* PML4);
inline void FlushTLB() {
asm volatile("mov %%cr3, %%rax; mov %%rax, %%cr3" ::: "rax", "memory");
}
};