u-boot/arch/sandbox/cpu
Simon Glass e46e4d6fd7 sandbox: efi_loader: Correct use of addresses as pointers
The cache-flush function is incorrect which causes a crash in the
remoteproc tests with arm64.

Fix both problems by using map_sysmem() to convert an address to a
pointer and map_to_sysmem() to convert a pointer to an address.

Also update the image-loader's cache-flushing logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 3286d223fd ("sandbox: implement invalidate_icache_all()")
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Changes in v6:
- Re-introduce

Changes in v2:
- Drop message about EFI_LOADER

arch/sandbox/cpu/cache.c              |  8 +++++++-
 drivers/remoteproc/rproc-elf-loader.c | 18 +++++++++++-------
 lib/efi_loader/efi_image_loader.c     |  3 ++-
 3 files changed, 20 insertions(+), 9 deletions(-)

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-12-02 16:34:30 -06:00
..
cache.c sandbox: efi_loader: Correct use of addresses as pointers 2024-12-02 16:34:30 -06:00
cpu.c sandbox: Add a way to show the sandbox memory-mapping 2024-11-03 21:27:12 -06:00
eth-raw-os.c sandbox: missing return value checks in eth-raw-os 2024-04-12 08:53:31 -06:00
Makefile arch: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:47 -06:00
os.c sandbox: Return error code from read/write/seek 2024-08-09 16:03:19 -06:00
sdl.c sandbox: Audit config.h and common.h usage 2023-12-21 08:54:37 -05:00
spl.c sandbox_spl: Restrict use of UPL when not enabled 2024-10-18 14:10:22 -06:00
start.c sandbox: Add a -N flag to control on-host behaviour 2024-11-09 10:00:15 +01:00
state.c sandbox: Change the range used for memory-mapping tags 2024-09-18 13:01:00 -06:00
u-boot-spl.lds
u-boot.lds sandbox: cleanup linker scripts and sections 2024-07-03 07:36:33 +01:00