[PATCH 1/1] riscv: revert Complete efi header for RV32/64

Leo Liang ycliang at andestech.com
Thu Jan 13 07:41:57 CET 2022


On Sun, Jan 09, 2022 at 06:38:55PM +0100, Heinrich Schuchardt wrote:
> EDK II refuses to load the EFI binaries created by U-Boot.
> The reason is an incorrect PE-COFF header. The number of
> data directories does not match NumberOfRvaAndSizes.
> This leads to a failed consistency check in
> PeCoffLoaderGetPeHeader():
> 
>     SizeOfOptionalHeader - HeaderWithoutDataDir) !=
>     NumberOfRvaAndSizes * sizeof(DATA_DIRECTORY))
> 
> Fixes: 9afaeec6ef8b ("riscv: Complete efi header for RV32/64")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  arch/riscv/lib/crt0_riscv_efi.S | 10 ----------
>  1 file changed, 10 deletions(-)

LGTM,
Reviewed-by: Leo Yu-Chi Liang <ycliang at andestech.com>

p.s. Out of curiosity, could "change the value (0x6) to (0x10) of the
NumberOfRvaAndSizes" also fix the problem ?

Best regards,
Leo


More information about the U-Boot mailing list