From 0590ad3bcd31ebcdf110306ce0cc5e6662daa234 Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Wed, 4 Feb 2026 19:21:23 +0100 Subject: [PATCH] Remove explicit identity mapping for internal page tables --- boot/xtldr/arch/amd64/memory.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/xtldr/arch/amd64/memory.cc b/boot/xtldr/arch/amd64/memory.cc index ebe6f0b..8f3659a 100644 --- a/boot/xtldr/arch/amd64/memory.cc +++ b/boot/xtldr/arch/amd64/memory.cc @@ -45,7 +45,7 @@ Memory::BuildPageMap(IN PXTBL_PAGE_MAPPING PageMap, } /* Add new memory mapping for the page map itself */ - Status = MapVirtualMemory(PageMap, Address, Address, 1, LoaderMemoryData); + Status = MapVirtualMemory(PageMap, (ULONGLONG)NULLPTR, Address, 1, LoaderMemoryData); if(Status != STATUS_EFI_SUCCESS) { /* Memory mapping failure */ @@ -201,7 +201,7 @@ Memory::GetNextPageTable(IN PXTBL_PAGE_MAPPING PageMap, } /* Add new memory mapping */ - Status = MapVirtualMemory(PageMap, Address, Address, 1, LoaderMemoryData); + Status = MapVirtualMemory(PageMap, (ULONGLONG)NULLPTR, Address, 1, LoaderMemoryData); if(Status != STATUS_EFI_SUCCESS) { /* Memory mapping failure */