From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 115ACC433F5 for ; Thu, 13 Jan 2022 06:42:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 59A71830CA; Thu, 13 Jan 2022 07:42:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 627AB830B3; Thu, 13 Jan 2022 07:42:37 +0100 (CET) Received: from ATCSQR.andestech.com (exmail.andestech.com [60.248.187.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DAB39830CA for ; Thu, 13 Jan 2022 07:42:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ycliang@andestech.com Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id 20D6g2ka058191; Thu, 13 Jan 2022 14:42:02 +0800 (GMT-8) (envelope-from ycliang@andestech.com) Received: from ubuntu01 (10.0.12.75) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Thu, 13 Jan 2022 14:42:02 +0800 Date: Thu, 13 Jan 2022 06:41:57 +0000 From: Leo Liang To: Heinrich Schuchardt CC: Subject: Re: [PATCH 1/1] riscv: revert Complete efi header for RV32/64 Message-ID: References: <20220109173855.239417-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220109173855.239417-1-heinrich.schuchardt@canonical.com> User-Agent: Mutt/2.0.5 (2021-01-21) X-Originating-IP: [10.0.12.75] X-DNSRBL: X-MAIL: ATCSQR.andestech.com 20D6g2ka058191 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 > --- > arch/riscv/lib/crt0_riscv_efi.S | 10 ---------- > 1 file changed, 10 deletions(-) LGTM, Reviewed-by: Leo Yu-Chi Liang p.s. Out of curiosity, could "change the value (0x6) to (0x10) of the NumberOfRvaAndSizes" also fix the problem ? Best regards, Leo