
13 Jan
2022
13 Jan
'22
7:41 a.m.
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@canonical.com
arch/riscv/lib/crt0_riscv_efi.S | 10 ---------- 1 file changed, 10 deletions(-)
LGTM, Reviewed-by: Leo Yu-Chi Liang ycliang@andestech.com
p.s. Out of curiosity, could "change the value (0x6) to (0x10) of the NumberOfRvaAndSizes" also fix the problem ?
Best regards, Leo