diff options
author | Heinrich Schuchardt | 2023-12-22 16:01:56 +0100 |
---|---|---|
committer | Tom Rini | 2023-12-22 10:36:50 -0500 |
commit | 4b151562bb8e54160adedbc6a1c0c749c00a2f84 (patch) | |
tree | 3a28317292fd019c6d6ca545be4975a87ba07b9f /boot | |
parent | 7c4647b8fb448ac658a9bc726681ad9e75e6b9e8 (diff) |
bootmeth: pass size to efi_binary_run()
If we call efi_binary_run() with size parameter set to zero, we get an error
Not a PE-COFF file
Fill the missing value.
Fixes: 1373ffde52e1 ("Merge tag 'v2024.01-rc5' into next")
Fixes: 7017fc54a5bc ("bootmeth: use efi_loader interfaces instead of bootefi command")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'boot')
-rw-r--r-- | boot/bootmeth_efi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 00060f7d25a..c4eb331d69e 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -454,12 +454,12 @@ static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow) if (bflow->flags & BOOTFLOWF_USE_BUILTIN_FDT) { log_debug("Booting with built-in fdt\n"); - if (efi_binary_run(map_sysmem(kernel, 0), 0, + if (efi_binary_run(map_sysmem(kernel, 0), bflow->size, EFI_FDT_USE_INTERNAL)) return log_msg_ret("run", -EINVAL); } else { log_debug("Booting with external fdt\n"); - if (efi_binary_run(map_sysmem(kernel, 0), 0, + if (efi_binary_run(map_sysmem(kernel, 0), bflow->size, map_sysmem(fdt, 0))) return log_msg_ret("run", -EINVAL); } |