#include <common.h>
#include <command.h>
#include <efi_loader.h>
+#include <env.h>
#include <mapmem.h>
#include <net.h>
#include <net/tftp.h>
struct lmb lmb;
phys_size_t max_size;
- lmb_init_and_reserve(&lmb, gd->bd->bi_dram[0].start,
- gd->bd->bi_dram[0].size, (void *)gd->fdt_blob);
+ lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
- max_size = lmb_get_unreserved_size(&lmb, load_addr);
+ max_size = lmb_get_free_size(&lmb, load_addr);
if (!max_size)
return -1;