From b2082bbad0a2a8c44f0c9fe9b48589f0151a00f7 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Aug 2022 11:50:01 +0200 Subject: [PATCH] stub: Use EfiLoaderCode for kernel memory Fixes: #24237 (cherry picked from commit 79a7ef89aa5dd9d99a904f1253bad7512d3feee5) (cherry picked from commit 7dacfb3fb4eaceedf994705d63fa1a1b72f8f12a) --- src/boot/efi/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/efi/linux.c b/src/boot/efi/linux.c index ce0f4985c0..42cb69ecac 100644 --- a/src/boot/efi/linux.c +++ b/src/boot/efi/linux.c @@ -146,7 +146,7 @@ EFI_STATUS linux_exec( */ /* allocate SizeOfImage + SectionAlignment because the new_buffer can move up to Alignment-1 bytes */ kernel.num = EFI_SIZE_TO_PAGES(ALIGN_TO(kernel_size_of_image, kernel_alignment) + kernel_alignment); - err = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, kernel.num, &kernel.addr); + err = BS->AllocatePages(AllocateAnyPages, EfiLoaderCode, kernel.num, &kernel.addr); if (EFI_ERROR(err)) return EFI_OUT_OF_RESOURCES; new_buffer = PHYSICAL_ADDRESS_TO_POINTER(ALIGN_TO(kernel.addr, kernel_alignment));