diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -168,7 +168,7 @@ RS = ST->RuntimeServices; heapsize = 64 * 1024 * 1024; - status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderCode, EFI_SIZE_TO_PAGES(heapsize), &heap); if (status != EFI_SUCCESS) { ST->ConOut->OutputString(ST->ConOut, diff --git a/stand/efi/loader/efi_main.c b/stand/efi/loader/efi_main.c --- a/stand/efi/loader/efi_main.c +++ b/stand/efi/loader/efi_main.c @@ -97,7 +97,7 @@ EfiConsoleControlScreenText); heapsize = 64 * 1024 * 1024; - status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderCode, EFI_SIZE_TO_PAGES(heapsize), &heap); if (status != EFI_SUCCESS) { ST->ConOut->OutputString(ST->ConOut, (CHAR16 *)L"Failed to allocate memory for heap.\r\n");