Adjust this function to use addresses rather than pointers, so that it
doesn't have to use mapmem.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 lib/efi_loader/efi_dt_fixup.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/efi_loader/efi_dt_fixup.c b/lib/efi_loader/efi_dt_fixup.c
index 0dac94b0c6c..ddb0d1f8fce 100644
--- a/lib/efi_loader/efi_dt_fixup.c
+++ b/lib/efi_loader/efi_dt_fixup.c
@@ -9,7 +9,6 @@
 #include <efi_loader.h>
 #include <efi_rng.h>
 #include <fdtdec.h>
-#include <mapmem.h>
 
 const efi_guid_t efi_guid_dt_fixup_protocol = EFI_DT_FIXUP_PROTOCOL_GUID;
 
@@ -21,14 +20,11 @@ const efi_guid_t efi_guid_dt_fixup_protocol = 
EFI_DT_FIXUP_PROTOCOL_GUID;
  * @nomap:     indicates that the memory range shall not be accessed by the
  *             UEFI payload
  */
-static void efi_reserve_memory(u64 addr, u64 size, bool nomap)
+static void efi_reserve_memory(ulong addr, ulong size, bool nomap)
 {
        int type;
        efi_uintn_t ret;
 
-       /* Convert from sandbox address space. */
-       addr = (uintptr_t)map_sysmem(addr, 0);
-
        if (nomap)
                type = EFI_RESERVED_MEMORY_TYPE;
        else
@@ -36,7 +32,7 @@ static void efi_reserve_memory(u64 addr, u64 size, bool nomap)
 
        ret = efi_add_memory_map(addr, size, type);
        if (ret != EFI_SUCCESS)
-               log_err("Reserved memory mapping failed addr %llx size %llx\n",
+               log_err("Reserved memory mapping failed addr %lx size %lx\n",
                        addr, size);
 }
 
-- 
2.43.0

Reply via email to