[PATCH v3 23/28] efi_loader: Update efi_add_runtime_mmio() to pass an address

Simon Glass sjg at chromium.org
Thu Nov 28 20:12:39 CET 2024


Now that efi_add_memory_map() takes an address rather than a pointer,
do the mapping in this function.

This is fix#4/4 for: Update efi_add_memory_map() to use address

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 lib/efi_loader/efi_runtime.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 9d3b940afbd..37ed5963e2b 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -13,6 +13,7 @@
 #include <efi_variable.h>
 #include <log.h>
 #include <malloc.h>
+#include <mapmem.h>
 #include <rtc.h>
 #include <asm/global_data.h>
 #include <u-boot/crc.h>
@@ -930,7 +931,7 @@ out:
 efi_status_t efi_add_runtime_mmio(void **mmio_ptr, u64 len)
 {
 	struct efi_runtime_mmio_list *newmmio;
-	uint64_t addr = *(uintptr_t *)mmio_ptr;
+	u64 addr = map_to_sysmem(*mmio_ptr);
 	efi_status_t ret;
 
 	ret = efi_add_memory_map(addr, len, EFI_MMAP_IO);
-- 
2.34.1



More information about the U-Boot mailing list