summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r--lib/efi_loader/efi_memory.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index ff0edf30ff..95f9ff0a14 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -8,12 +8,11 @@
#include <common.h>
#include <efi_loader.h>
+#include <inttypes.h>
#include <malloc.h>
+#include <watchdog.h>
#include <asm/global_data.h>
-#include <linux/libfdt_env.h>
#include <linux/list_sort.h>
-#include <inttypes.h>
-#include <watchdog.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -292,7 +291,7 @@ efi_status_t efi_allocate_pages(int type, int memory_type,
uint64_t addr;
switch (type) {
- case 0:
+ case EFI_ALLOCATE_ANY_PAGES:
/* Any page */
addr = efi_find_free_memory(len, gd->start_addr_sp);
if (!addr) {
@@ -300,7 +299,7 @@ efi_status_t efi_allocate_pages(int type, int memory_type,
break;
}
break;
- case 1:
+ case EFI_ALLOCATE_MAX_ADDRESS:
/* Max address */
addr = efi_find_free_memory(len, *memory);
if (!addr) {
@@ -308,7 +307,7 @@ efi_status_t efi_allocate_pages(int type, int memory_type,
break;
}
break;
- case 2:
+ case EFI_ALLOCATE_ADDRESS:
/* Exact address, reserve it. The addr is already in *memory. */
addr = *memory;
break;