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: 3286d223fd7 ("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
..
2024-10-11 11:44:48 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-10-21 17:52:52 -06:00
2024-09-12 17:35:37 +02:00
2024-07-15 12:12:18 -06:00
2024-10-11 11:44:48 -06:00
2024-11-14 18:14:05 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-11-12 19:09:52 -06:00
2024-07-19 16:48:07 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-10-16 11:11:56 -06:00
2024-10-14 17:58:28 -06:00
2019-12-06 16:44:20 -05:00
2020-08-24 14:11:31 -04:00
2024-07-15 12:12:18 -06:00
2024-11-13 08:14:23 -06:00
2024-10-11 11:44:47 -06:00
2024-06-30 13:58:31 +02:00
2022-01-19 18:11:34 +01:00
2024-10-14 17:58:30 -06:00
2024-11-13 08:16:41 -06:00
2019-05-05 08:48:50 -04:00