summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-03-04 01:10:13 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 21:30:14 -0400
commitdea2174d9d941db2ec64997779771a4b4c3527c2 (patch)
tree022730c8f59c7722d981c593177209818a88c7f1 /common
parentcc4a474873ecf79775bef6b2e73a8b0c7e13b95f (diff)
downloadtalos-obmc-uboot-dea2174d9d941db2ec64997779771a4b4c3527c2.tar.gz
talos-obmc-uboot-dea2174d9d941db2ec64997779771a4b4c3527c2.zip
efi_loader: Call fdt preparation functions
We have a nice framework around image fils to prepare a device tree for OS execution. That one patches in missing device tree nodes and fixes up the memory range bits. We need to call that one from the EFI boot path too to get all those nice fixups. This patch adds the call. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'common')
-rw-r--r--common/image-fdt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 8c3f3e6374..6cac7dbb7f 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -502,8 +502,9 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
fdt_fixup_ethernet(blob);
/* Delete the old LMB reservation */
- lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
- (phys_size_t)fdt_totalsize(blob));
+ if (lmb)
+ lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
+ (phys_size_t)fdt_totalsize(blob));
ret = fdt_shrink_to_minimum(blob);
if (ret < 0)
@@ -515,7 +516,8 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
fdt_set_totalsize(blob, of_size);
}
/* Create a new LMB reservation */
- lmb_reserve(lmb, (ulong)blob, of_size);
+ if (lmb)
+ lmb_reserve(lmb, (ulong)blob, of_size);
fdt_initrd(blob, *initrd_start, *initrd_end);
if (!ft_verify_fdt(blob))
OpenPOWER on IntegriCloud