From patchwork Sun Sep 23 14:26:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 147332 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1825359ljw; Sun, 23 Sep 2018 07:27:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Zutf5EH+8avCPs8a9y/p4G96XUCAODVyhaIpjkN80ekKsf22WCcyrv1HfAbvsuLbDT0Fq X-Received: by 2002:a50:91ad:: with SMTP id g42-v6mr1903437eda.43.1537712828710; Sun, 23 Sep 2018 07:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537712828; cv=none; d=google.com; s=arc-20160816; b=LQPUgiC4GLGenbsXWAKBgs9P50ev2YACGC3emTh5Ty8LYOFxDcKyyfhtKRYqJhzvAZ mfemViAHiRqr0FKh8Td1cF0XonldaOCUWnFS554AitgAKUt2+fysSEaGZav5Y/PJ8DH9 emYp4StE1LdzvTT19LHRWP+lXGuANE8Wn7agpxsB++J/GhgKhXAVZHDwNglpYa8VM9hm CfpKF3+vgjpaNVlQWcexntwj+xtuEufaHFuMI4Iacl/XbfNJW6ufoxUtdvazgwrF5Bf7 uI115jFSDy0rGep1cRCyHBRCgjnQsEYcHCudyDfD//CS3I68RjDmXN7eeZ9Ok89DUlzr Lzfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from; bh=GdBeazJECIPl5adVXJ7U+ZjcnqcaPUJ8YxADHbC2/hU=; b=n8RwBtGERGEttmSr3phv9DkVbuMG7tuthr6MeZyL60u1Jqahc/H5wa5+P6zRfb+OiX 1ZLsYXH+LWBwteOC5m+DGRZt3NdiuxlV+r9RznHmXdhxKVQrgsGSoN+5kGgAquzGadPC BgNsw2spfTGKPEukaKUAkVykNGldOeKOyDltDxDDSrMHLcx6L2SyJ87RL01KSXiUU9Ox P362KVAKL9EZ329cT0PSVmyL0YDmwM9aJQDitPYdhHzzC1Plf4/xldhftWNtk8Nslewd 4jQ8TvBbLbqWypAdCaCbBtkGbKp47CmwcAT+dx6FT2tHh+DDXF9lQqUDffT/CAwXhask wMVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id t18-v6si2383161edf.80.2018.09.23.07.27.07; Sun, 23 Sep 2018 07:27:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id B9157C21C57; Sun, 23 Sep 2018 14:27:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D69BCC21DB3; Sun, 23 Sep 2018 14:27:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7FE44C21DAF; Sun, 23 Sep 2018 14:27:00 +0000 (UTC) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 40093C21C57 for ; Sun, 23 Sep 2018 14:27:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E6653AE29; Sun, 23 Sep 2018 14:26:59 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Sun, 23 Sep 2018 16:26:58 +0200 Message-Id: <20180923142658.47002-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH] efi_loader: Fix loaded_image handle passing from EL3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Mark Kettenis --- 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);