misc/uefi: Switch from EfiLoaderData to EfiLoaderCode at 2 more allocation sites

This commit is contained in:
mintsuki 2024-06-16 18:27:55 +02:00
parent b30da71874
commit 70749d0baa
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ noreturn void uefi_entry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
size_t new_base;
for (new_base = 0x1000; new_base + (size_t)__image_size < 0x100000000; new_base += 0x1000) {
EFI_PHYSICAL_ADDRESS _new_base = (EFI_PHYSICAL_ADDRESS)new_base;
status = gBS->AllocatePages(AllocateAddress, EfiLoaderData, image_size_pages, &_new_base);
status = gBS->AllocatePages(AllocateAddress, EfiLoaderCode, image_size_pages, &_new_base);
if (status == 0) {
goto new_base_gotten;
}

View File

@ -257,7 +257,7 @@ noreturn void efi_chainload_file(char *config, char *cmdline, struct file_handle
memdev_path[0].Header.Length[0] = sizeof(MEMMAP_DEVICE_PATH);
memdev_path[0].Header.Length[1] = sizeof(MEMMAP_DEVICE_PATH) >> 8;
memdev_path[0].MemoryType = EfiLoaderData;
memdev_path[0].MemoryType = EfiLoaderCode;
memdev_path[0].StartingAddress = (uintptr_t)ptr;
memdev_path[0].EndingAddress = (uintptr_t)ptr + image_size;