summaryrefslogtreecommitdiff
path: root/cmd/booti.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/booti.c')
-rw-r--r--cmd/booti.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmd/booti.c b/cmd/booti.c
index 1a57fe91397..e6f67d6e136 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -6,6 +6,7 @@
#include <bootm.h>
#include <command.h>
+#include <env.h>
#include <image.h>
#include <irq_func.h>
#include <lmb.h>
@@ -29,6 +30,7 @@ static int booti_start(struct bootm_info *bmi)
uint8_t *temp;
ulong dest;
ulong dest_end;
+ phys_addr_t ep_addr;
unsigned long comp_len;
unsigned long decomp_len;
int ctype;
@@ -87,7 +89,14 @@ static int booti_start(struct bootm_info *bmi)
images->os.start = relocated_addr;
images->os.end = relocated_addr + image_size;
- lmb_reserve(images->ep, le32_to_cpu(image_size), LMB_NONE);
+ ep_addr = (phys_addr_t)images->ep;
+ ret = lmb_alloc_mem(LMB_MEM_ALLOC_ADDR, 0, &ep_addr,
+ le32_to_cpu(image_size), LMB_NONE);
+ if (ret) {
+ printf("Failed to allocate memory for the image at %#llx\n",
+ (unsigned long long)images->ep);
+ return 1;
+ }
/*
* Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not