]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: bdinfo: Map fdt_blob and new_fdt to sysmem
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 22 Apr 2023 13:01:31 +0000 (15:01 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 3 May 2023 22:30:46 +0000 (18:30 -0400)
Map fdt_blob and new_fdt to sysmem, otherwise $fdtcontroladdr
and bdinfo output do not match and the bdinfo output address
is not a valid address accessible via sandbox memory accessors.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/bdinfo.c

index f709904c51678a62b48051251cc93420916f0e4d..78cb41f076035966b6367f45e7e780959d7a7d06 100644 (file)
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <lmb.h>
+#include <mapmem.h>
 #include <net.h>
 #include <video.h>
 #include <vsprintf.h>
@@ -128,8 +129,8 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
                print_eth(0);
                printf("IP addr     = %s\n", env_get("ipaddr"));
        }
-       bdinfo_print_num_l("fdt_blob", (ulong)gd->fdt_blob);
-       bdinfo_print_num_l("new_fdt", (ulong)gd->new_fdt);
+       bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob));
+       bdinfo_print_num_l("new_fdt", (ulong)map_to_sysmem(gd->new_fdt));
        bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size);
        if (IS_ENABLED(CONFIG_VIDEO))
                show_video_info();