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=-16.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 30B90C4363D for ; Sat, 3 Oct 2020 08:29:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0443206CA for ; Sat, 3 Oct 2020 08:29:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZFoNAXvq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="atlaDx8a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0443206CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y2RczkIQYLHZAMMpHS87E4pijNOm57pgaQNWXvuBq7c=; b=ZFoNAXvqynCCq5IJDYkj9J0TS BnDHLjMs5HgK64TzmNM+ksPMK3wU8M1AUAv6BKXCoaBWBW8Ni0e+pBzBkmdTUEQC9/XZ7bCTBtYLU 3HauoLPsW71cGMRfLKqQFwAlKtto/scZriIbrc2Ri4CDtQVFU996jJeJSthT4Vm4zDsYioiO6eDJf Jvfi1xHTON7qIUO/hlZIyd7kM+95NTDV10MM9Mp6CRFnSFf0cEyqVcRbP6wyodnKpPa6CH2qVTqa2 sJ0/ZK6rj+d6JMasq/sDBS1fjuwbaTqhuR3ZzlfMlYGW6KHhKOve+UU8lR4fAbkuApI5QDKt6Cwlh +rl/4s5tQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOcv5-0004z9-JO; Sat, 03 Oct 2020 08:29:31 +0000 Received: from mout.gmx.net ([212.227.17.20]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOcv2-0004yj-QP for linux-riscv@lists.infradead.org; Sat, 03 Oct 2020 08:29:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601713760; bh=lvJ74/HMZn1UeZuLZsdlbA4t7dcnm4RjOEdqUPWQPuw=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=atlaDx8aB3Quu5lV6QnFyDXkQ+G0p8tc8dM1FQGJcGb6dWg/yJK4visN/7cK+gHQg d3sYOr78PZHG8qv2v+AolNUoxV4N6f66cLynX9FDZbuCdzSGlwjo8MZeDpjR65AtdM 6LblEgsCQ+U3uL8W6h8uLKEzMcoyhtlaGld8h5h8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.70] ([178.202.41.107]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MJmKX-1k5BI911YH-00K97J; Sat, 03 Oct 2020 10:29:20 +0200 Subject: Re: [PATCH v2 1/2] docs: admin-guide: fdt and initrd load in EFI stub To: Atish Patra , Ard Biesheuvel References: <20201003063725.8698-1-xypron.glpk@gmx.de> <20201003063725.8698-2-xypron.glpk@gmx.de> From: Heinrich Schuchardt Autocrypt: addr=xypron.glpk@gmx.de; prefer-encrypt=mutual; keydata= mQINBE2g3goBEACaikqtClH8OarLlauqv9d9CPndgghjEmi3vvPZJi4jvgrhmIUKwl7q79wG IATxJ1UOXIGgriwoBwoHdooOK33QNy4hkjiNFNrtcaNT7uig+BG0g40AxSwVZ/OLmSFyEioO BmRqz1Zdo+AQ5RzHpu49ULlppgdSUYMYote8VPsRcE4Z8My/LLKmd7lvCn1kvcTGcOS1hyUC 4tMvfuloIehHX3tbcbw5UcQkg4IDh4l8XUc7lt2mdiyJwJoouyqezO3TJpkmkayS3L7o7dB5 AkUwntyY82tE6BU4quRVF6WJ8GH5gNn4y5m3TMDl135w27IIDd9Hv4Y5ycK5sEL3N+mjaWlk 2Sf6j1AOy3KNMHusXLgivPO8YKcL9GqtKRENpy7n+qWrvyHA9xV2QQiUDF13z85Sgy4Xi307 ex0GGrIo54EJXZBvwIDkufRyN9y0Ql7AdPyefOTDsGq5U4XTxh6xfsEXLESMDKQMiVMI74Ec cPYL8blzdkQc1MZJccU+zAr6yERkUwo1or14GC2WPGJh0y/Ym9L0FhXVkq9e1gnXjpF3QIJh wqVkPm4Two93mAL+929ypFr48OIsN7j1NaNAy6TkteIoNUi09winG0tqU5+U944cBMleRQOa dw+zQK0DahH4MGQIU0EVos7lVjFetxPjoKJE9SPl/TCSc+e0RwARAQABtChIZWlucmljaCBT Y2h1Y2hhcmR0IDx4eXByb24uZ2xwa0BnbXguZGU+iQI4BBMB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E05QtYR/V6g8un6V2PqOs9WzaT/RB12YFcaeWlusa8Iqs Eg== Message-ID: <0c654506-9bb9-9aee-876e-8c1b8619eb67@gmx.de> Date: Sat, 3 Oct 2020 10:28:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:cafLk/FbnxoXjl7NcLX3IIkuN5mQUOns+Y/HSpKP5T1y4yhaOfp mzxQMjXOXnxBLRShSke7dK1DcBfGQNABTYOTxzTZnoqg2ojV36RRGVeZvOE6DNWIlKeYrBA GDmjl2GuKXzzOIQMCRGtl/fv77q6RzKDwFShSTeLOgrjY6AYPC6MV7XS5p3IsVwCumW0q3J 65O/6pCM7DNhGr8Uv6uBg== X-UI-Out-Filterresults: notjunk:1;V03:K0:wsuXkB2/sA4=:LwuBHHE3dlDXPKjCWWaFhv qUI2ZfO4LKmDcIKaikG5NTYaY2hRgfXU4kP/k8n58baRO5E76Sbd8YRCeKoSs8z+nUcxxX/Yw rh91ez+hTy0z5hZMHtaeqvvpNJ6j9aVjmNyFkCbHMtDl0XGeL3rk0rgXbw4D0NK2geJGVfSPc 654bfCcRjIR644RpoISlkqn+AAugRX3dtDVy+6A8CgjpmZPxTMYQ+iFzbVpvE4n2Vj5+wE+ax dYErhhQ+0CgihQX6D6NDJnYBHsbi3gnJbMTZFpK1/LmhlaHWZgFh2+anDQA5ZmP3xaSsiKKdh IeliFitgfb2QoqUlSLT9AyMxTDf3CNTJOZXpA54Z5zcqqK+m0kVvV4jo5L05eFYxztJtZ0HOl OEswR2c4e/V28cO98Wtd2txDvS8c6C1vRXAnbm77gvDBINZrgAJUrWu3DP2ONU1Rp4CKmIKUw wgjXVAdwuF+pTxX8BkF4lx4d1kfMCqnvSwtn8j6GXiia573+mY5b5XQa0hvyJjWEs1KUJn39Q qBvG/CotB0GmNsLcC4UEN4DzLdmh4LSQvQxaHTEv3kFT/3Q/aaL5o4/MQKFWWr+UX6/7Qw1Go /6+LEtUBmYN2ieQk8IX6almq3Nwb15BEcJB4eVuEjSJ1o5dzG8F0Q/sI5cZ6MMahOiPjiNSeN C2X1XBak3ULx7/rPxKT03apABdPtsY/CVZ+yPfoU4qqDtU85oppmzzMv4m9SvtC4+jc0lAKWM wk8/0ZsMc3YUIFPZ9fNnkCduzD3lM0asn73h29KpPZgHCvyu5JGB+8ZmA6YiS/Z5yPbv18RzE 1fpRM4+aL47Ph46u65ca6G88aB1pcJQ+JjaRCchnvK1kAKbDYVnwLbZd/i78HPbRWhMhxtDHD dayio6jOlvVSx2t3ZSRiN6Pldc6l6b0+92ZGuUVsbLimicJT7f9+gYdBSf/DrpokdRxnXHyK6 IJrXe703i2QFUXcznxlPb20nKbmnNgYaXuP3Qr72J+xEkVhE2+SIO+zejjsQpdVGdgt+7w7R+ YGR3XF1eQnqZUtEcMSyxfxTBRmn2ICN1RUQEjJwXq5sDAUEzag+5bcxKszOestzqT/x/AfmwV QF45vlyoRyHtH83kyffTCmYBXypvqT17Zp6Fz5snI5cucdgvoHUin8BQr7v7hGA6Fijywq1iG Lb2GFg1SD7qDPe5J7x1hRQv1uxMvO8UwSYHII7GeNPgkRcwKpjNFXKfBUsHrAysiPExveJnya 6L62NRznZMJVyS7hAs4yIRfurUWJ3sWg1LJni2Q24EovLGz2LLW3dfd8LTZTfdZCwvYgOoZgQ 58SpWFvXaBGkGWjNmejYLO9ckuTQN2OP3hCaaJM3D4xggD0PALuZ067V2GNg9CSXyow2FrDFL 7+pxAMgD8OdGpZ2Fu/a1g== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201003_042929_131996_DF8BF967 X-CRM114-Status: GOOD ( 34.41 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-efi , Jonathan Corbet , Linux Doc Mailing List , "linux-kernel@vger.kernel.org List" , Albert Ou , Palmer Dabbelt , Paul Walmsley , linux-riscv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 03.10.20 09:34, Atish Patra wrote: > On Fri, Oct 2, 2020 at 11:38 PM Heinrich Schuchardt wrote: >> >> Describe how a device tree and an initial RAM disk can be passed to the EFI >> Boot Stub. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> v2: >> mention EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER (thx Atish) >> --- >> Documentation/admin-guide/efi-stub.rst | 35 ++++++++++++++++++++++++++ >> 1 file changed, 35 insertions(+) >> >> diff --git a/Documentation/admin-guide/efi-stub.rst b/Documentation/admin-guide/efi-stub.rst >> index 833edb0d0bc4..4965dec48af4 100644 >> --- a/Documentation/admin-guide/efi-stub.rst >> +++ b/Documentation/admin-guide/efi-stub.rst >> @@ -38,6 +38,34 @@ arch/arm/boot/zImage should be copied to the system partition, and it >> may not need to be renamed. Similarly for arm64, arch/arm64/boot/Image >> should be copied but not necessarily renamed. >> >> +Passing an initial RAM disk to the EFI Boot Stub >> +------------------------------------------------ >> + >> +The following means sorted by decreasing priority can be used to provide an >> +initial RAM disk to the EFI Boot Stub: >> + >> +* The firmware may provide a UEFI Load File 2 Protocol. The stub will try to >> + load the RAM disk by calling the LoadFile() service of the protocol using >> + a vendor device path with the vendor GUID >> + 5568e427-0x68fc-4f3d-ac74-ca555231cc68. >> +* Next the EFI stub will try to load the file indicated by the "initrd=" command >> + line parameter if CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER is enabled. >> +* The prior boot stage may pass the location of the initial RAM disk via the >> + "linux,initrd-start" and "linux,initrd-end" properties of the "/chosen" node >> + of the device-tree. >> + > > Should we also specify which method is enabled by default for which > ARCH and recommended methods? The user relevant configuration is not the Linux' defconfig but what the distribution maintainer has baked. I doubt mentioning Linux' defaults is meaningful here. > > For example, It's recommended to use the LoadFile method for RISC-V > and new ARM systems. GRUB does not implement the LoadFile2 protocol yet. In U-Boot it is only good for testing. I am not aware of usability with unmodified EDK II. Why should we recommend anything before building the ecosystem that makes it useful? What is best may depend on the use case. There is nothing insecure in passing the initrd via "linux,initrd-start" and "linux,initrd-end" if you control the load options. The EBBR (https://github.com/arm-software/ebbr) might be a better place for a recommendation. > Existing ARM ones will continue to use the initrd argument as that's > the method enabled by default. Only if if the LoadFile2 protocol is not available because that has a higher priority for ARM, x86, and RISC-V. Should I consider my i.mx6 Wandboard Quad bought in 2013 "old" while it is running the U-Boot v2020.10-rc5, Linux v5.9-rc7, and Debian testing? A distinction between "old" and "new" systems seems irrelevant here. All are treated equal by the EFI stub. > >> +The first two items are inhibited by the "noinitrd" command line parameter. >> + >> +Passing a device-tree to the EFI Boot Stub >> +------------------------------------------ >> + >> +A device-tree can be passed to the EFI Boot Stub in decreasing priority using >> + >> +* command line option dtb= >> +* a UEFI configuration table with GUID b1b621d5-f19c-41a5-830b-d9152c69aae0. >> + > > I am just curious. Is there any specific reason why efistub tries to > load the dtb from the command line first > and loads from the config table only if it fails from the first approach ? As we disable dtb= in secure boot it would make sense to turn the priorities around for non-secure boot too. But this is beyond the scope of a documentation patch. Best regards Heinrich > >> +The command line option is only available if CONFIG_EFI_ARMSTUB_DTB_LOADER=y >> +and secure boot is disabled. >> >> Passing kernel parameters from the EFI shell >> -------------------------------------------- >> @@ -46,6 +74,10 @@ Arguments to the kernel can be passed after bzImage.efi, e.g.:: >> >> fs0:> bzImage.efi console=ttyS0 root=/dev/sda4 >> >> +The "noinitrd" option >> +--------------------- >> + >> +The "noinitrd" option stops the EFI stub from loading an initial RAM disk. >> >> The "initrd=" option >> -------------------- >> @@ -98,3 +130,6 @@ CONFIGURATION TABLE. >> >> "dtb=" is processed in the same manner as the "initrd=" option that is >> described above. >> + >> +This option is only available if CONFIG_EFI_ARMSTUB_DTB_LOADER=y and secure >> +boot is disabled. >> -- >> 2.28.0 >> >> >> _______________________________________________ >> linux-riscv mailing list >> linux-riscv@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-riscv > > > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv