[PATCH v2 09/32] cmd: fdt: Map address returned from fdt get addr to sysmem

Simon Glass sjg at chromium.org
Wed Mar 8 23:16:59 CET 2023

The address returned from 'fdt get addr' command must be mapped
into sysmem, as this is a working FDT. Access to this address
without mapping it would lead to crash e.g. in sandbox.

The following command triggers the crash:
./u-boot -Dc 'fdt addr $fdtcontroladdr ; fdt get addr var / compatible
; md $var'

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
Reviewed-by: Simon Glass <sjg at chromium.org>
Cc: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
V2: Add RB from Simon
 cmd/fdt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to u-boot-dm/next, thanks!

More information about the U-Boot mailing list