summaryrefslogtreecommitdiff
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-03-25 17:34:34 -0400
committerTom Rini <trini@konsulko.com>2023-03-25 17:34:34 -0400
commitfde439219ff53a46bdd5dff69e049ccd4be57310 (patch)
tree423643707fad940e0845cbebf74d545b05b3d336 /cmd/bootefi.c
parent4b635046b5e92e419fbd1bf93e5b0ef86dbcadc2 (diff)
parent93e3364804ffd4a5d4a0df9c750a1859f9fe298b (diff)
Merge tag 'efi-next-20230325' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request for efi-next-20230325 Documenation: * add man-page for efi command UEFI: * Let EFI app call ExitBootServices() before legacy booting kernel * Support zboot and bootm in the EFI app * Let efi command show configuration tables * Support booting a 64-bit kernel from 64-bit EFI app * Allocate device-tree copy from high memory * simplify efi_str_to_u16()
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 6618335ddf9..8aa15a64c83 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -204,25 +204,12 @@ static efi_status_t copy_fdt(void **fdtp)
fdt_pages = efi_size_in_pages(fdt_totalsize(fdt) + 0x3000);
fdt_size = fdt_pages << EFI_PAGE_SHIFT;
- /*
- * Safe fdt location is at 127 MiB.
- * On the sandbox convert from the sandbox address space.
- */
- new_fdt_addr = (uintptr_t)map_sysmem(fdt_ram_start + 0x7f00000 +
- fdt_size, 0);
- ret = efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS,
+ ret = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES,
EFI_ACPI_RECLAIM_MEMORY, fdt_pages,
&new_fdt_addr);
if (ret != EFI_SUCCESS) {
- /* If we can't put it there, put it somewhere */
- new_fdt_addr = (ulong)memalign(EFI_PAGE_SIZE, fdt_size);
- ret = efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS,
- EFI_ACPI_RECLAIM_MEMORY, fdt_pages,
- &new_fdt_addr);
- if (ret != EFI_SUCCESS) {
- log_err("ERROR: Failed to reserve space for FDT\n");
- goto done;
- }
+ log_err("ERROR: Failed to reserve space for FDT\n");
+ goto done;
}
new_fdt = (void *)(uintptr_t)new_fdt_addr;
memcpy(new_fdt, fdt, fdt_totalsize(fdt));