Remove grub_efi_allocate_pages.

grub_efi_allocate_pages Essentially does 2 unrelated things:
* Allocate at fixed address.
* Allocate at any address.

To switch between 2 different functions it uses address == 0 as magic
value which is wrong as 0 is a perfectly valid fixed adress to allocate at.
This commit is contained in:
Vladimir Serbinenko 2017-08-07 18:33:29 +02:00
parent dd5fde2df8
commit 4bc909bf89
8 changed files with 32 additions and 34 deletions

View file

@ -324,10 +324,9 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file,
grub_dprintf ("xen_loader", "Xen_boot file size: 0x%lx\n", binary->size);
binary->start
= (grub_addr_t) grub_efi_allocate_pages (0,
GRUB_EFI_BYTES_TO_PAGES
(binary->size +
binary->align));
= (grub_addr_t) grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES
(binary->size +
binary->align));
if (!binary->start)
{
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));