diff mbox series

efi_loader: Fix loaded_image handle passing from EL3

Message ID 20180923142658.47002-1-agraf@suse.de
State Accepted
Commit 24638a1f2109f61834b212b1be73dd21da411e63
Headers show
Series efi_loader: Fix loaded_image handle passing from EL3 | expand

Commit Message

Alexander Graf Sept. 23, 2018, 2:26 p.m. UTC
When running in EL3 mode on AArch64, we have to first drop to EL2
to execute a UEFI payload. When dropping down, the arguments to
the entry point have to stay identical to the ones for normal entry
though.

In commit ea54ad59286 ("efi_loader: pass handle of loaded image")
we incorrectly changed that logic and had the el3 entry path diverge.
Fix it up by syncing it back to what it's supposed to be.

Fixes: ea54ad59286 ("efi_loader: pass handle of loaded image")
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 cmd/bootefi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Kettenis Sept. 23, 2018, 6:30 p.m. UTC | #1
> From: Alexander Graf <agraf@suse.de>
> Date: Sun, 23 Sep 2018 16:26:58 +0200
> 
> When running in EL3 mode on AArch64, we have to first drop to EL2
> to execute a UEFI payload. When dropping down, the arguments to
> the entry point have to stay identical to the ones for normal entry
> though.
> 
> In commit ea54ad59286 ("efi_loader: pass handle of loaded image")
> we incorrectly changed that logic and had the el3 entry path diverge.
> Fix it up by syncing it back to what it's supposed to be.

That matches what is done for armv7.

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

> Fixes: ea54ad59286 ("efi_loader: pass handle of loaded image")
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  cmd/bootefi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index 5fc054c9da..6395d4b9b0 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -408,7 +408,7 @@ static efi_status_t do_bootefi_exec(void *efi,
>  
>  		/* Move into EL2 and keep running there */
>  		armv8_switch_to_el2((ulong)entry,
> -				    (ulong)&loaded_image_info_obj.handle,
> +				    (ulong)loaded_image_info_obj.handle,
>  				    (ulong)&systab, 0, (ulong)efi_run_in_el2,
>  				    ES_TO_AARCH64);
>  
> -- 
> 2.12.3
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
diff mbox series

Patch

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 5fc054c9da..6395d4b9b0 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -408,7 +408,7 @@  static efi_status_t do_bootefi_exec(void *efi,
 
 		/* Move into EL2 and keep running there */
 		armv8_switch_to_el2((ulong)entry,
-				    (ulong)&loaded_image_info_obj.handle,
+				    (ulong)loaded_image_info_obj.handle,
 				    (ulong)&systab, 0, (ulong)efi_run_in_el2,
 				    ES_TO_AARCH64);