From patchwork Sat Oct 3 06:37:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 267391 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=unavailable 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 584DCC4727E for ; Sat, 3 Oct 2020 06:38:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21C5C206A5 for ; Sat, 3 Oct 2020 06:38:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="MR2S4uqJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725781AbgJCGiO (ORCPT ); Sat, 3 Oct 2020 02:38:14 -0400 Received: from mout.gmx.net ([212.227.17.20]:47939 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725681AbgJCGiO (ORCPT ); Sat, 3 Oct 2020 02:38:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601707074; bh=md0r0m36JBviEhAlMywLuogQp9PqQBA26y2UxZb0WKw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MR2S4uqJT6zeEuMKunqAU8seXGD3k5im+o8JRx+AyzgzgMsGEcD8Koam5EqTpkEGi DKl47rQfF9z5WXK53+nFUAmNArPXCRTUC2t3//VRvzA8D8LcCTelrot4I4Ffhurubz HJYsllbeYRAS9/3sJ1z43gqo076pqTEp8G1Md0fE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MulmF-1khESP2Q1j-00roqy; Sat, 03 Oct 2020 08:37:54 +0200 From: Heinrich Schuchardt To: Ard Biesheuvel Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Atish Patra , Heinrich Schuchardt Subject: [PATCH v2 1/2] docs: admin-guide: fdt and initrd load in EFI stub Date: Sat, 3 Oct 2020 08:37:24 +0200 Message-Id: <20201003063725.8698-2-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201003063725.8698-1-xypron.glpk@gmx.de> References: <20201003063725.8698-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:GPrLsj9lxvHLBZU79XBKoGh3Tqybvf/pk+6ebZSYKfl9LsWZe9M BCkoXUBoP42pRKZvaX+A+f7GpZGLX8NUkJ00fdbt2e/rt22sk+FwjNk9mtxZSRZFSn5F4rw 8+ff7EHNinTQyOmdS5699oVnFYj+nzycp57KzC3APNGuh9q5SlCZlj5EKYdAE3W/4+AFaAZ VTNluNFlCUWY/fn2r0nNw== X-UI-Out-Filterresults: notjunk:1; V03:K0:LQMjD0Ttnxc=:yjwDY+VJpjraaTbaIxLNtR UhWnTe+z00u8DzzGXQQsnF4y56JE6nS6AHEu5UXA0KG/dj2lEhhYzKP+Dw236eAMiT8gdU5aM IRhTjAz1HXwbOgL/Sc341q6i8M8nX9ctxs/eDdgU6np6kxj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IRySDwewAiapDtnirTEGN5UOELsCaA7GSNwTAbDiEirwLS77Jjbwe4Qb2yVm cUV0sj1rMxiFjnkuJVBHBc1z6HxD1CRxaIIkAhQ== 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 --- v2: mention EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER (thx Atish) --- 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..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. + +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. From patchwork Sat Oct 3 06:37:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 267392 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 3A572C4363D for ; Sat, 3 Oct 2020 06:38:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF09F206A5 for ; Sat, 3 Oct 2020 06:38:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="g55jZzqA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725766AbgJCGiO (ORCPT ); Sat, 3 Oct 2020 02:38:14 -0400 Received: from mout.gmx.net ([212.227.17.21]:41065 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgJCGiO (ORCPT ); Sat, 3 Oct 2020 02:38:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601707075; bh=XRD1G/FKH5P14Qoexkz4KABtNAoyURyyM07p9s6A2yA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=g55jZzqAXpsVo9RbgbGMro15/KEK4AFcMWrdbwImz473pZtOmJaiJwbz//1jX4CW9 Qij0VWSkZKiofX6EHL6No0kxRzRb+qu94tofYJs0DxbjcYBEA9LyNd8pIuFiNfEl6V Stzs5swGlR/ESB2/krromLiah2I3ihqbn0ADvd4s= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MvbG2-1ki3Gu4AmU-00seKf; Sat, 03 Oct 2020 08:37:55 +0200 From: Heinrich Schuchardt To: Ard Biesheuvel Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Atish Patra , Heinrich Schuchardt Subject: [PATCH v2 2/2] docs: admin-guide: EFI stub to main Linux handoff Date: Sat, 3 Oct 2020 08:37:25 +0200 Message-Id: <20201003063725.8698-3-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201003063725.8698-1-xypron.glpk@gmx.de> References: <20201003063725.8698-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:i+31IZulvm+Hkm7Jgc9slA5QQmVL8UwmQXplGyx3R1TkJGbBspR XPqhfjvk+xyIKZzg6xGtnym6LYGj2X/c3mml0ZtXvQELo7AglFu2XZuDPIWWAitvE8yDNgw 84P5xxAjcRL80fFpZUmqUIxVt9IYKZSBnVte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0YIjMTEQ8fdGXi7DRr2U5dKzj42MuvuAUBryBx0VolVg88+uFYPQsCMBVdLWpn1OKHNhUOr iQjYnMEIYv6DYGn6uaZUpKb/LwpcHvIHxW4cI/AKK8wfKASPts3ytwC5PRirceBStfhYPriYz sjbjt86kxYQePZGEIbHU97ghXOhwNtUl/JgIBL4VLwzD4cn1P2MILACsW6k4gX2MFa/m4TIyQ RqKtzI5HN9D9NIOLnYwodw09fBMmv0VPrne6BDi0DK6H8AQRxUFmTgx+qEJq8OrxFi+8CnTzR bdm3EpoI15W6Up1/dCwYXGh/BIDeNLYwYfe0cnw== Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Describe the handoff from the EFI stub to the main Linux kernel. Signed-off-by: Heinrich Schuchardt --- v2: new patch --- Documentation/admin-guide/efi-stub.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.28.0 diff --git a/Documentation/admin-guide/efi-stub.rst b/Documentation/admin-guide/efi-stub.rst index 4965dec48af4..669602ff4515 100644 --- a/Documentation/admin-guide/efi-stub.rst +++ b/Documentation/admin-guide/efi-stub.rst @@ -133,3 +133,15 @@ described above. This option is only available if CONFIG_EFI_ARMSTUB_DTB_LOADER=y and secure boot is disabled. + +Handoff to main Linux kernel +---------------------------- + +Currently the EFI stub enters the main Linux kernel via the same entry points +that are used when booting without UEFI. This might change in future versions. +For a description of these entry points see: + +* for arm :doc:`/arm/booting` +* for arm64 :doc:`/arm64/booting` +* for riscv :doc:`/riscv/index` +* for x86 :doc:`/x86/boot`