ec4acbbd98
- Try to fix things for new compiler madness. I really don't know why gcc decided __attribute__((packed)) on a "typedef struct" should imply __attribute__((align (1))) and that it should have a warning that it does so. The obvious behavior would be to keep the alignment of the first element unless it's used in another object or type that /also/ hask the packed attribute. Why should it change the default alignment at all? - Merge in the BLS patches Javier and I wrote. - Attempt to fix pmtimer initialization failures to not be super duper slow. Signed-off-by: Peter Jones <pjones@redhat.com>
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From f826330683675f0deb55b58fd229afd7d65fb053 Mon Sep 17 00:00:00 2001
|
|
From: Leif Lindholm <leif.lindholm@linaro.org>
|
|
Date: Thu, 3 Aug 2017 11:04:32 +0100
|
|
Subject: [PATCH 061/206] 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>
|
|
---
|
|
grub-core/kern/efi/mm.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
|
|
index b97b05fe825..ac2a4c556b8 100644
|
|
--- a/grub-core/kern/efi/mm.c
|
|
+++ b/grub-core/kern/efi/mm.c
|
|
@@ -403,7 +403,9 @@ add_memory_regions (grub_efi_memory_descriptor_t *memory_map,
|
|
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)
|
|
grub_fatal ("cannot allocate conventional memory %p with %u pages",
|
|
(void *) ((grub_addr_t) start),
|
|
--
|
|
2.15.0
|
|
|