diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-03-14 10:59:34 +0100 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-03-17 08:29:52 +0100 |
commit | fef907b2e4406da8addebd7fefb6fd87ca7875ab (patch) | |
tree | 8ce49789df0ff087f7cf314f385f8c00b80891ad /cmd/bootefi.c | |
parent | a4df9d8ab848ea4ff10b247ae435b0a14bbbd066 (diff) | |
download | u-boot-fef907b2e4406da8addebd7fefb6fd87ca7875ab.tar.gz u-boot-fef907b2e4406da8addebd7fefb6fd87ca7875ab.tar.bz2 u-boot-fef907b2e4406da8addebd7fefb6fd87ca7875ab.zip |
efi_loader: create reservations after ft_board_setup
Some memory reservations are made in ft_board_setup(). Ensure that we
create reserved memory map entries after ft_board_setup().
The downside of this patch is that if bootefi is called multiple times with
an devicetree argument superfluous reservations for the old copies of the
device tree will exist. But that is still better than missing a reservation.
Deleting the superfluous reservations is not possible because reservations
in the memory map are rounded to page size and may be coallesced.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r-- | cmd/bootefi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 24fc42ae89..522ed28d6a 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -263,9 +263,6 @@ efi_status_t efi_install_fdt(void *fdt) return EFI_LOAD_ERROR; } - /* Create memory reservations as indicated by the device tree */ - efi_carve_out_dt_rsv(fdt); - /* Prepare device tree for payload */ ret = copy_fdt(&fdt); if (ret) { @@ -278,6 +275,9 @@ efi_status_t efi_install_fdt(void *fdt) return EFI_LOAD_ERROR; } + /* Create memory reservations as indicated by the device tree */ + efi_carve_out_dt_rsv(fdt); + /* Install device tree as UEFI table */ ret = efi_install_configuration_table(&efi_guid_fdt, fdt); if (ret != EFI_SUCCESS) { |