diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-01-19 01:21:22 +0300 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-01-23 01:09:14 +0300 |
commit | 17ff6f02f5ad64727e20b8ee4d751a942461ec76 (patch) | |
tree | a765c8f99c79b3395e76384c8e3eae28a5583f0c | |
parent | 8218f7b5fc33628e84581a46446e6f9a2b66e844 (diff) | |
download | u-boot-17ff6f02f5ad64727e20b8ee4d751a942461ec76.tar.xz |
efi_loader: store DT in EFI_RUNTIME_SERVICES_DATA memory
The device tree is needed at runtime. So we have to store it in
EFI_RUNTIME_SERVICES_DATA memory.
The UEFI spec recommends to store all configuration tables in
EFI_RUNTIME_SERVICES_DATA memory.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r-- | cmd/bootefi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 97a4f269ae..a30259c4c1 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -103,11 +103,11 @@ static void *copy_fdt(void *fdt) /* Safe fdt location is at 128MB */ new_fdt_addr = fdt_ram_start + (128 * 1024 * 1024) + fdt_size; - if (efi_allocate_pages(1, EFI_BOOT_SERVICES_DATA, fdt_pages, + if (efi_allocate_pages(1, EFI_RUNTIME_SERVICES_DATA, fdt_pages, &new_fdt_addr) != EFI_SUCCESS) { /* If we can't put it there, put it somewhere */ new_fdt_addr = (ulong)memalign(EFI_PAGE_SIZE, fdt_size); - if (efi_allocate_pages(1, EFI_BOOT_SERVICES_DATA, fdt_pages, + if (efi_allocate_pages(1, EFI_RUNTIME_SERVICES_DATA, fdt_pages, &new_fdt_addr) != EFI_SUCCESS) { printf("ERROR: Failed to reserve space for FDT\n"); return NULL; |