From patchwork Fri Oct 2 17:11:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 293175 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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 C9092C4363C for ; Fri, 2 Oct 2020 17:11:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FC8120758 for ; Fri, 2 Oct 2020 17:11:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="AHIBOjdQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbgJBRL2 (ORCPT ); Fri, 2 Oct 2020 13:11:28 -0400 Received: from mout.gmx.net ([212.227.17.22]:38737 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgJBRL2 (ORCPT ); Fri, 2 Oct 2020 13:11:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601658680; bh=63H9pOiH0+7afFaplsAsPhAJR6vHQUiql917hmAqUC4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=AHIBOjdQrMnUSdVEpEelxmJ0npV7i+cfWWBZpd6MXVvFQY+HVm4duv1WSEclNWJrW na5XrKkpugfVIrDGvUE4f/dLVJnT5g153nRdkc9WPZhxCff8fUaMHymb4hwcAa+MCD jF9sK+FPAfQIc6VfM/EoTqalSl5zwCrAI0eleQmQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from workstation4.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MWAOQ-1jvBXx43li-00XgCU; Fri, 02 Oct 2020 19:11:20 +0200 From: Heinrich Schuchardt To: Ard Biesheuvel Cc: Jonathan Corbet , linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Fr?= =?utf-8?q?an=C3=A7ois_Ozog?= , Ilias Apalodimas , Heinrich Schuchardt Subject: [PATCH 1/1] docs: admin-guide: fdt and initrd load in EFI stub Date: Fri, 2 Oct 2020 19:11:12 +0200 Message-Id: <20201002171112.22738-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:9fZxmnWDuYGgQgNcRpM+wK+ePCFLSvRfmJIcmYW0YkFQZN49Tsg yaKZn5ZsBMZQ5LRjl//11nXeogKaa2pU5bf/SogphX0yOLPONPcEdGytZxFXXjna8RU7Hyh 0WFxYbNbsN5hE8khpQgI+Tb8CgrX0uDxkfS6eao8jsA1ToID86fjUTVe9TVxa7LdtOqGlOr 8gljEF1Tn6HkC1hkYERBw== X-UI-Out-Filterresults: notjunk:1; V03:K0:4lfLB/DNw+M=:GCTPZBTTs4ZmwZ+lZr0j9j uScruu1n/2XPrZWcdyK2iG/MY5HrVtJ7wznHNHAyuKUfsVGuz7cVePf8d7authL+lu2Xh7T4q sR17or3373rFET5LBE87NmpiK2sjAaFmpDxsABqYhTvLg0lLaJf4bs7eDQRoAp+PrMtsp5rdz M/g4Mt6TDxVPeooKpYrytcK3dgW/AWgBK46GMXm0nTX7OsUN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OiZJjcNylfpGeF5ZjELEXKjeRPQ== Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Describe how a device tree and an initial RAM disk can be passed to the EFI Boot Stub. Signed-off-by: Heinrich Schuchardt --- Documentation/admin-guide/efi-stub.rst | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) -- 2.28.0 diff --git a/Documentation/admin-guide/efi-stub.rst b/Documentation/admin-guide/efi-stub.rst index 833edb0d0bc4..86f50a33884c 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. +* 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. + +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. + +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.