[PATCH 1/3] cmd: fdt: move: Use map_sysmem to convert pointers
Simon Glass
sjg at chromium.org
Sun Jul 17 10:12:58 CEST 2022
On Tue, 5 Jul 2022 at 11:14, Andre Przywara <andre.przywara at arm.com> wrote:
>
> The "fdt move" subcommand was using the provided DTB addresses directly,
> without trying to "map" them into U-Boot's address space. This happened
> to work since on the vast majority of "real" platforms there is a simple
> 1:1 mapping of VA to PAs, so either value works fine.
>
> However this is not true on the sandbox, so the "fdt move" command fails
> there miserably:
> => fdt addr $fdtcontroladdr
> => cp.l $fdtcontroladdr $fdt_addr_r 40 # simple memcpy works
> => fdt move $fdtcontroladdr $fdt_addr_r
> Segmentation fault
>
> Use the proper "map_sysmem" call to convert PAs to VAs, to make this
> more robust in general and to enable operation in the sandbox.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
> cmd/fdt.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot-dm, thanks!
More information about the U-Boot
mailing list