[PATCH] efi_loader: esrt: Remove incorrect invocations of EFI_CALL macro

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Apr 14 12:43:08 CEST 2021


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 <sughosh.ganu at linaro.org>

Thanks for reviewing the ESRT code.

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>


More information about the U-Boot mailing list