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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB317C433EF for ; Wed, 8 Sep 2021 18:22:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1571860ED8 for ; Wed, 8 Sep 2021 18:22:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1571860ED8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 935BC8343A; Wed, 8 Sep 2021 20:22:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="bTLVuder"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D37083435; Wed, 8 Sep 2021 20:22:38 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 23AB483435 for ; Wed, 8 Sep 2021 20:22:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1631125352; bh=/8aPVLOlXmFpDZFIORXuBIvUcT+wNgx/bUmKXKUNGXo=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=bTLVuderIOqeBkoGb00NE8YB992qu04WHME8V1TgvUDx6Uylz8dDlOQK7tU/GbrHk c4+3+ZxEiwai67LG80xsCcIvAvLmB/+WgUmyyniW/8xRSngUqGo+ddbr27KXxQQYI1 9g9BLVfoMjOL/LThWSDeovGyb+o06Qe2r0Kw9nsc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.55] ([88.152.144.157]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M5fIW-1mHxPW0ZMw-0079OK; Wed, 08 Sep 2021 20:22:32 +0200 Subject: Re: [PATCH 24/35] x86: Allow booting a kernel from the EFI app To: Simon Glass Cc: Ilias Apalodimas , Bin Meng , Tom Rini , Christian Melki , U-Boot Mailing List References: <20210908133405.696481-1-sjg@chromium.org> <20210908133405.696481-9-sjg@chromium.org> From: Heinrich Schuchardt Message-ID: <2d41cecd-a8e9-51d9-6dbc-ac0edf8f1eb4@gmx.de> Date: Wed, 8 Sep 2021 20:22:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210908133405.696481-9-sjg@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ZO/JLJLauAinUcf+4ATQ0OL9qORLrJ8xz6PQIdqMrmro3fbjtfZ MYSArSPaAYrRForwFSboIT9Co56bvgBU2HIYz3aM4m3s1KpocYTd4hcZn9m7Bd6vRetFjz5 8QSjeO2z/r4Ek4YKI0GJUGbIncpOAovag34o1Lhexdhaie+UbQ0AsNtZWr5IADl1uvQmgvI qI76clh/WP5WQ+h9TuksA== X-UI-Out-Filterresults: notjunk:1;V03:K0:g/kRPRY30UM=:S7giUg7Vv0DYjbWtWxJm4G RSYShMn+wB7UR4//v6DjeQkgLeELouR3KfzrppDGndxgUXo4ZA8kgHe6YxWeONCSbZ1Uz9QmD QtebOepkKQfXp6sqrFvvY0ZQ6M5t1tDV15G9ztxJAhFso1olnBZAdo1CNDKwuSl9OKtk9g1cK jYOrk+8EitIwxBknuWnVqM8zqfz0qGKg3ckzVLJVFWMDlKexKgLYT3lbXD5fx8L8/EYUne7YQ xhI3TwGWwfBHvfl/K/NOSK+u8v4PdxsoFmdc/M7ztGx0BFr4u7zSq1EXNJL45FciZ5TynB9eH iQLevoFMmQ7BwblvhyyPhbtm0nwLWs7lIwP8NQCxSY9IFQ8czrgLlVCbWcj/M96a8H2GeHiQ9 bkHRsOxHPVnUBDYTXjONtHIp/uBmk2BtqsHyq/R4VpmU9hEmubNM/h2uv3kTXc7/AqnanjOaQ XQ5CSeqzPvMTFD1ye3/JdZF6QpLqUY3ruBj2Y+MVsC5G50IE6Beh8aOMTHYTlxq5cFGc1iPto QIT31pUcWa4e1ioqTakUenPBgMnctsAdnQqX0h2su2+GgErHQfgEHvWjBXj2YgQCOWtU2eDIB pogtcm55YNN5PXat1j3PqP2E6a8BHY+AHyPS0aEi6WmmICl2uIc9g85zqVe9iAFpKKTrNetr1 EwZyZYCxLwcoZJ45xZkXHIisGptReh78cHo8cWaLGbnX0e7cXu+QiJHZh/U6AkQN+zIxKqCn0 NsANq8S7Gn+YBChRSMFVtQeJlpZuQ6h6d7W0ZeRzYNv+k/CvtUJI9jFBnG2fk347xbCHzIYun 4lx6IqWooEJXrk+tONW+pmFoWBiv4JfJvwYWUl16uQw+2Od0a3vt0D+W+2N5Ohtr3rnkSsXoG ti+065FSA0BWmfEF3OebUjFY/4sHcaqou6uOZ2XLxg0op1L0vVrm0/zoM/TmRk2AzTLLL48c0 Wd0gbWi9YgSN+hgtJJogebCgOIboPk7uId/V2oXb12XFkUk3xNp2y9yR333dqDeZ7C1mfAe5y /5C0G/avxC+IlBvoHR73z+MZe5Y3vsJXOvEg5kS4S71rN3UEtm9KgDWi3Cu55BrZAZdchfYf+ 63X2hsQjruSnFA= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 9/8/21 3:33 PM, Simon Glass wrote: > At present this is disabled, but it should work so long as the kernel do= es > not need EFI services. Enable it and add a note about remaining work. > > Signed-off-by: Simon Glass > --- > > arch/x86/lib/bootm.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c > index 733dd712570..ff0e9f6a085 100644 > --- a/arch/x86/lib/bootm.c > +++ b/arch/x86/lib/bootm.c > @@ -179,10 +179,14 @@ int boot_linux_kernel(ulong setup_base, ulong load= _address, bool image_64bit) > * U-Boot is setting them up that way for itself in > * arch/i386/cpu/cpu.c. > * > - * Note that we cannot currently boot a kernel while running as > - * an EFI application. Please use the payload option for that. > + * Note: this is incomplete for EFI kernels! > + * > + * This can boot a kernel while running as an EFI application, > + * but if the kernel requires EFI support then that support needs > + * to be enabled first (see EFI_LOADER). Also the EFI information > + * must enabled with setup_efi_info(). See setup_zimage() for > + * how this is done with the stub. Did you test launching an EFI application with EFI_LOADER from the EFI app? If you get it working, please provide a defconfig and a testcase that runs helloworld.efi. Best regards Heinrich > */ > -#ifndef CONFIG_EFI_APP > __asm__ __volatile__ ( > "movl $0, %%ebp\n" > "cli\n" > @@ -191,7 +195,6 @@ int boot_linux_kernel(ulong setup_base, ulong load_a= ddress, bool image_64bit) > [boot_params] "S"(setup_base), > "b"(0), "D"(0) > ); > -#endif > } > > /* We can't get to here */ >