mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 08:39:28 +00:00
efi: change heap allocation type to GRUB_EFI_LOADER_CODE
With upcoming changes to EDK2, allocations of type EFI_LOADER_DATA may not return regions with execute ability. Since modules are loaded onto the heap, change the heap allocation type to GRUB_EFI_LOADER_CODE in order to permit execution on systems with this feature enabled. Closes: 50420 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
1 parent
91212e0aa0
commit
f826330683
1 file changed
+3
-1
@@ -403,7 +403,9 @@ add_memory_regions (grub_efi_memory_descriptor_t *memory_map,
|
|||||||
pages = required_pages;
|
pages = required_pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr = grub_efi_allocate_fixed (start, pages);
|
addr = grub_efi_allocate_pages_real (start, pages,
|
||||||
|
GRUB_EFI_ALLOCATE_ADDRESS,
|
||||||
|
GRUB_EFI_LOADER_CODE);
|
||||||
if (! addr)
|
if (! addr)
|
||||||
grub_fatal ("cannot allocate conventional memory %p with %u pages",
|
grub_fatal ("cannot allocate conventional memory %p with %u pages",
|
||||||
(void *) ((grub_addr_t) start),
|
(void *) ((grub_addr_t) start),
|
||||||
|
|||||||
Reference in new issue
Block a user