From: Heinrich Schuchardt Date: Wed, 14 Apr 2021 12:43:08 +0200 Subject: [PATCH] efi_loader: esrt: Remove incorrect invocations of EFI_CALL macro In-Reply-To: <20210414070825.20853-1-sughosh.ganu@linaro.org> References: <20210414070825.20853-1-sughosh.ganu@linaro.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 4/14/21 9:08 AM, Sughosh Ganu wrote: > Remove function invocations using the EFI_CALL macro for those > functions that do not have an EFI_ENTRY call in their definition. Such > functions can use u-boot api's which rely on u-boot global data(gd) > pointer. The Arm and RiscV architectures maintain a separate gd > pointer, one for u-boot, and a separate gd for the efi application. > > Calling a function through the EFI_CALL macro changes the gd pointer > to that used for the efi application, with u-boot gd being > unavailable. Any function then trying to dereference u-boot's gd will > result in an abort. > > Fix this issue by removing the EFI_CALL macro for all of such > functions which do not begin by an EFI_ENTRY function call. > > Signed-off-by: Sughosh Ganu Thanks for reviewing the ESRT code. Reviewed-by: Heinrich Schuchardt