/* Safe fdt location is at 128MB */
new_fdt_addr = fdt_ram_start + (128 * 1024 * 1024) + fdt_size;
- if (efi_allocate_pages(1, EFI_RUNTIME_SERVICES_DATA, fdt_pages,
+ if (efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS,
+ EFI_RUNTIME_SERVICES_DATA, fdt_pages,
&new_fdt_addr) != EFI_SUCCESS) {
/* If we can't put it there, put it somewhere */
new_fdt_addr = (ulong)memalign(EFI_PAGE_SIZE, fdt_size);
- if (efi_allocate_pages(1, EFI_RUNTIME_SERVICES_DATA, fdt_pages,
+ if (efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS,
+ EFI_RUNTIME_SERVICES_DATA, fdt_pages,
&new_fdt_addr) != EFI_SUCCESS) {
printf("ERROR: Failed to reserve space for FDT\n");
return NULL;
uint64_t pages = (len + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
efi_status_t r;
- r = efi_allocate_pages(0, memory_type, pages, &ret);
+ r = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES, memory_type, pages,
+ &ret);
if (r == EFI_SUCCESS)
return (void*)(uintptr_t)ret;
return EFI_SUCCESS;
}
- r = efi_allocate_pages(0, pool_type, num_pages, &t);
+ r = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES, pool_type, num_pages,
+ &t);
if (r == EFI_SUCCESS) {
struct efi_pool_allocation *alloc = (void *)(uintptr_t)t;
/* Request a 32bit 64MB bounce buffer region */
uint64_t efi_bounce_buffer_addr = 0xffffffff;
- if (efi_allocate_pages(1, EFI_LOADER_DATA,
+ if (efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, EFI_LOADER_DATA,
(64 * 1024 * 1024) >> EFI_PAGE_SHIFT,
&efi_bounce_buffer_addr) != EFI_SUCCESS)
return -1;