[PATCH v2 1/3] cmd: fdt: move: Use map_sysmem to convert pointers
Simon Glass
sjg at chromium.org
Mon Feb 13 01:34:16 CET 2023
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>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
cmd/fdt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-dm, thanks!
More information about the U-Boot
mailing list