efi_loader: round the memory area in efi_add_memory_map()
[oweals/u-boot.git] / lib / efi_loader / efi_runtime.c
index 4be51335bcb6e8263dc91a4476ed89443cf5ff4c..a28b291927c4e301aa4bf052043d9a0cc33bb3a7 100644 (file)
@@ -483,7 +483,7 @@ static __efi_runtime efi_status_t EFIAPI efi_convert_pointer_runtime(
 }
 
 /**
- * efi_convert_pointer_runtime() - convert from physical to virtual pointer
+ * efi_convert_pointer() - convert from physical to virtual pointer
  *
  * This function implements the ConvertPointer() runtime service until
  * the first call to SetVirtualAddressMap().
@@ -493,7 +493,7 @@ static __efi_runtime efi_status_t EFIAPI efi_convert_pointer_runtime(
  *
  * @debug_disposition: indicates if pointer may be converted to NULL
  * @address:           pointer to be converted
- * Return:             status code EFI_UNSUPPORTED
+ * Return:             status code
  */
 static __efi_runtime efi_status_t EFIAPI efi_convert_pointer(
                        efi_uintn_t debug_disposition, void **address)
@@ -784,11 +784,10 @@ out:
 efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len)
 {
        struct efi_runtime_mmio_list *newmmio;
-       u64 pages = (len + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
        uint64_t addr = *(uintptr_t *)mmio_ptr;
        efi_status_t ret;
 
-       ret = efi_add_memory_map(addr, pages, EFI_MMAP_IO, false);
+       ret = efi_add_memory_map(addr, len, EFI_MMAP_IO);
        if (ret != EFI_SUCCESS)
                return EFI_OUT_OF_RESOURCES;