summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-12 08:27:50 -0700
committerTom Rini <trini@konsulko.com>2023-12-13 18:39:05 -0500
commitdbdc9c6aefbf5f90777584ab2f914b34ddfc23e5 (patch)
treec4bb7df8b11b451fdb165b4c6003c875fce059fd /boot
parent79e9727f152f4e0ea46ffe2da74d6fc2574e4c98 (diff)
downloadu-boot-dbdc9c6aefbf5f90777584ab2f914b34ddfc23e5.tar.gz
u-boot-dbdc9c6aefbf5f90777584ab2f914b34ddfc23e5.tar.bz2
u-boot-dbdc9c6aefbf5f90777584ab2f914b34ddfc23e5.zip
fdt: Move ft_verify_fdt() before the final fixups
Move this check before the FDT fixups so that we can use a livetree after this point. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/image-fdt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 3e007d2b89..2b166c0ff9 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -639,6 +639,10 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
if (fdt_initrd(blob, *initrd_start, *initrd_end))
goto err;
+ if (!ft_verify_fdt(blob))
+ goto err;
+
+ /* after here we are using a livetree */
if (!of_live_active() && CONFIG_IS_ENABLED(EVENT)) {
struct event_ft_fixup fixup;
@@ -667,9 +671,6 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
if (lmb)
lmb_reserve(lmb, map_to_sysmem(blob), of_size);
- if (!ft_verify_fdt(blob))
- goto err;
-
#if defined(CONFIG_ARCH_KEYSTONE)
if (IS_ENABLED(CONFIG_OF_BOARD_SETUP))
ft_board_setup_ex(blob, gd->bd);