[U-Boot] [PATCH v2 1/1] efi_loader: efi_add_runtime_mmio()

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Dec 19 21:42:58 UTC 2018


The first parameter of efi_add_runtime_mmio() is a pointer to a
pointer. This should be reflected both in the signature and in the
documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
v2
	Correct the commit message and title. This patch changes
	efi_add_runtime_mmio().
---
 include/efi_loader.h         | 2 +-
 lib/efi_loader/efi_runtime.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/efi_loader.h b/include/efi_loader.h
index 53f08161ab..0581c0940d 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -483,7 +483,7 @@ void __efi_runtime efi_update_table_header_crc32(struct efi_table_hdr *table);
 
 /* Call this with mmio_ptr as the _pointer_ to a pointer to an MMIO region
  * to make it available at runtime */
-efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len);
+efi_status_t efi_add_runtime_mmio(void **mmio_ptr, u64 len);
 
 /* Boards may provide the functions below to implement RTS functionality */
 
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 95844efdb0..377a4fe602 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -502,11 +502,12 @@ static efi_status_t EFIAPI efi_set_virtual_address_map(
  * This function adds a memory-mapped IO region to the memory map to make it
  * available at runtime.
  *
- * @mmio_ptr:		address of the memory-mapped IO region
+ * @mmio_ptr:		pointer to a pointer to the start of the memory-mapped
+ *			IO region
  * @len:		size of the memory-mapped IO region
  * Returns:		status code
  */
-efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len)
+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;
-- 
2.19.2



More information about the U-Boot mailing list