[PATCH v5 20/23] efi_loader: Correct address-usage in copy_fdt()
Simon Glass
sjg at chromium.org
Wed Dec 11 14:54:14 CET 2024
Update this function to work correctly with sandbox
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
lib/efi_loader/efi_helper.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
index fd89ef6036f..72902a5ade3 100644
--- a/lib/efi_loader/efi_helper.c
+++ b/lib/efi_loader/efi_helper.c
@@ -486,12 +486,11 @@ static efi_status_t copy_fdt(void **fdtp)
log_err("Failed to reserve space for FDT\n");
goto done;
}
- /* TODO(sjg): This does not work on sandbox */
- new_fdt = (void *)(uintptr_t)new_fdt_addr;
+ new_fdt = map_sysmem(new_fdt_addr, fdt_size);
memcpy(new_fdt, fdt, fdt_totalsize(fdt));
fdt_set_totalsize(new_fdt, fdt_size);
- *fdtp = (void *)(uintptr_t)new_fdt_addr;
+ *fdtp = new_fdt;
done:
return ret;
}
--
2.34.1
More information about the U-Boot
mailing list