this basically comes down to this in the specs:

- Allocation requests of Type AllocateMaxAddress allocate any available range
  of pages whose uppermost address is less than or equal to the address pointed
  to by Memory on input. (this returns EFI_OUT_OF_RESOURCEST on loading
  slightly large, 710MB, kernel images)

+ Allocation requests of Type AllocateAnyPages allocate any available range of
  pages that satisfies the request. On input, the address pointed to by Memory
  is ignored.

Signed-off-by: Paymon MARANDI <pay...@encs.concordia.ca>
---
 grub-core/kern/efi/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index df238b165..782b08099 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -169,7 +169,7 @@ void *
 grub_efi_allocate_any_pages (grub_efi_uintn_t pages)
 {
   return grub_efi_allocate_pages_real (GRUB_EFI_MAX_USABLE_ADDRESS,
-                                      pages, GRUB_EFI_ALLOCATE_MAX_ADDRESS,
+                                      pages, GRUB_EFI_ALLOCATE_ANY_PAGES,
                                       GRUB_EFI_LOADER_DATA);
 }
 
-- 
2.49.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to