diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-05-26 11:32:27 +0300 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-06-03 16:27:21 +0300 |
commit | e09159c86786929a728e3119726b10332226e6ea (patch) | |
tree | 7418c9fdab3aa7a93beb3946ffeb7ecad0e02d9f /lib/efi_loader/efi_memory.c | |
parent | fe5bc23f43341d19528b15aaf6e09f56975e1316 (diff) | |
download | u-boot-e09159c86786929a728e3119726b10332226e6ea.tar.xz |
efi_loader: avoid anonymous constants for AllocatePages
Do not use anonymous constants when calling efi_allocage_pages.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r-- | lib/efi_loader/efi_memory.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index d3302b6649..a4515c8981 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -337,7 +337,8 @@ void *efi_alloc(uint64_t len, int memory_type) 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; @@ -384,7 +385,8 @@ efi_status_t efi_allocate_pool(int pool_type, efi_uintn_t size, void **buffer) 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; @@ -515,7 +517,7 @@ int efi_memory_init(void) /* 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; |