From b3be36e23de7e5d87a7fe1a0c457c934cc5cb6a9 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Sun, 24 Mar 2024 15:53:36 +0100 Subject: [PATCH] Map BIOS ROM and VRAM --- xtldr/memory.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xtldr/memory.c b/xtldr/memory.c index 5daf8d1..72bf476 100644 --- a/xtldr/memory.c +++ b/xtldr/memory.c @@ -355,6 +355,14 @@ BlMapEfiMemory(IN OUT PXTBL_PAGE_MAPPING PageMap, } } + /* Map BIOS ROM and VRAM */ + Status = BlMapVirtualMemory(PageMap, NULL, (PVOID)0xA0000, 0x60, LoaderFirmwarePermanent); + if(Status != STATUS_EFI_SUCCESS) + { + /* Mapping failed */ + return Status; + } + /* Store next valid virtual address and return success */ *MemoryMapAddress = VirtualAddress; return STATUS_EFI_SUCCESS;