[PATCH 4/8] efi_loader: Correct bounce-buffer setup
Simon Glass
sjg at chromium.org
Mon Jan 6 15:47:51 CET 2025
This should set the bounce buffer to a pointer, not an address. Fix it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
lib/efi_loader/efi_memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 2e197e94edd..9374f77d3b7 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -837,11 +837,11 @@ int efi_memory_init(void)
uint64_t efi_bounce_buffer_addr = 0xffffffff;
if (efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, EFI_BOOT_SERVICES_DATA,
- (64 * 1024 * 1024) >> EFI_PAGE_SHIFT,
+ SZ_64M >> EFI_PAGE_SHIFT,
&efi_bounce_buffer_addr) != EFI_SUCCESS)
return -1;
- efi_bounce_buffer = (void*)(uintptr_t)efi_bounce_buffer_addr;
+ efi_bounce_buffer = map_sysmem(efi_bounce_buffer_addr, SZ_64M);
#endif
return 0;
--
2.34.1
More information about the U-Boot
mailing list