diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c index 0d9df7eb28..d9d515b1a9 100644 --- a/src/boot/efi/stub.c +++ b/src/boot/efi/stub.c @@ -50,11 +50,20 @@ static EFI_STATUS combine_initrd( n += extra_initrd_sizes[i]; } +#if defined(__i386__) || defined(__x86_64__) _cleanup_pages_ Pages pages = xmalloc_pages( AllocateMaxAddress, EfiLoaderData, EFI_SIZE_TO_PAGES(n), UINT32_MAX /* Below 4G boundary. */); +#else + _cleanup_pages_ Pages pages = xmalloc_pages( + AllocateAnyPages, + EfiLoaderData, + EFI_SIZE_TO_PAGES(n), + 0 /* Ignored. */); +#endif + uint8_t *p = PHYSICAL_ADDRESS_TO_POINTER(pages.addr); if (initrd_base != 0) { size_t pad;