From patchwork Sat Mar 13 21:47:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 399602 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2272626jai; Sat, 13 Mar 2021 13:48:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMHVdANid63SkUFxAPU7pF4CPHN6NOcSB36S+OFWSUma+g47O+Fl9PVbjWko/rep4mAFLZ X-Received: by 2002:a05:6402:b85:: with SMTP id cf5mr22417172edb.248.1615672134019; Sat, 13 Mar 2021 13:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615672134; cv=none; d=google.com; s=arc-20160816; b=IPrSf5WfJRby4VxNBmxq8Df3nda+mD1FhVwVaE1VZhSTZoyKXFdV91IjkK5Olnxt1r DPjQErR/6qEfM1ir3bHtMr/KQ59tBUmK+eQpFfCOMeKhRsjanaILZLosGIRVr4xs5hXy HgwhXeLA9kZHJNApRl6/+hAgMM2jtrocxKbpNPicEcUehyphck+hkbPaUzBclLtO7jKf LHbLACzoDXxTHi/8F4nhQlqQoVD65Xs7aKMcOUWbpWipRhUKV/eLrpRuUOZi719ilwfZ ciluHb6Z8hSEnKiw5V1KKyR2Ycq0YlpuvMbs7Ugir79QY6sceX4GFFXf8pM2pbxj1pF8 GyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FxkpPXdXsM3xfARc7eQhez09/Ul33LMRKMFFVq0CSdQ=; b=HKi1m1Yp7BRoD+7zzST/+clWXTO5WOQBV+EUND4x0pbbTjR4fkPzvC/i3t6cDKiNXG ti4XIWn7bqBZ3HkkyWJGyLK6YtKLaewWZY/PKoUO15Uo5hHljQe4CO2sRoHOWcC6BKDe z8p1QTdW128DNdwTzRqTXvNUR7ZuRKZ/X/pPTumtskn5jQU6IUPQw7BfqeyLq5+cVGxQ 3w7DRTWZ2nwVBULvy+Y7mOMgJc3LvXPxOnqjcOTpy/8kOPbHkZqpKBzTcEBlEXTs0/PX wzFX13dRZbUrn0Ue33Qjj1mAxOOard+PTuYFjP/1eeCMKjF8/CtpZXp47o/qfcrymPBX bjtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Herv4LTj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id y13si4613530edc.327.2021.03.13.13.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 13:48:54 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Herv4LTj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B40C482884; Sat, 13 Mar 2021 22:48:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Herv4LTj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A6668286E; Sat, 13 Mar 2021 22:47:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA0C882806 for ; Sat, 13 Mar 2021 22:47:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x635.google.com with SMTP id dx17so60093670ejb.2 for ; Sat, 13 Mar 2021 13:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FxkpPXdXsM3xfARc7eQhez09/Ul33LMRKMFFVq0CSdQ=; b=Herv4LTj+7qiZTaNk2LNvKC5SU75QTylKZzpuHZPHXTdTvk1V9zhyWERI+iA02bsgw NtGzOaULkWOCCpmEPEBS0X7/sPLEWiFZowAlHMsR5VUS+1pgcoLzmilV/OBMQW9Ny8Yf ZQeTQlkkWkTEx4HRoXFQG3jH5QwxtxNsdegN72SRGrEJk2xg78ohNGb+QDRih7YiRRod pWr4qt/+Ua7b9wUv25N/MfsLP2HjSP70IGVUkMgCaCJQy6JXMrmlKMywZY4oriSGmUa3 JC/qMfrqlXhft9quTGXjvWSEl//5ZdVPZreRYIBhhUw1oPFEvFR930ficm6OKU9E02NN hlMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FxkpPXdXsM3xfARc7eQhez09/Ul33LMRKMFFVq0CSdQ=; b=YLXTCd9wY16gijiH5ca7305NO64wB9A60pF5RCog2TnShkHGDDlFHTAOdZSM/vb97B AOihnUVfXfwBPQvMb4Pe1yKxp2BiDqF2yPQMtq3UfmSKq9UIRUOp83suFTF5zMgRmyK8 DJXB82wZVSA3bNRmNt9mgbGoqVYVIhrHA14vngaz9jQaplL2lDDdPeBnhN+C1VzmGfI8 6idmqCwuGVO6DHShBLXHm3gYCrqZyeF5RwZ6q/zlGqpVrUZkzSWfXprrnzR00gsC/CKx BwVKcE+SWoTcf4j9nD1NnAqoZ0D1G3xeDSbhXUwEgdot0LxZQ3qnuUF+UA449CtwZzLr AEsg== X-Gm-Message-State: AOAM530HoIKIujum5ACxzEz75hvi/Q7yFCtLyKM0yEv3bq0h4+zN2PgS 31eHzazfQkiWWK82Jtq718KOKw== X-Received: by 2002:a17:906:4d44:: with SMTP id b4mr15831679ejv.338.1615672076415; Sat, 13 Mar 2021 13:47:56 -0800 (PST) Received: from apalos.home ([2a02:587:4647:e6c6:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id a9sm1571144eds.33.2021.03.13.13.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 13:47:56 -0800 (PST) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: takahiro.akashi@linaro.org, Ilias Apalodimas , Alexander Graf , Sughosh Ganu , u-boot@lists.denx.de Subject: [PATCH 6/6 v2] doc: Update uefi documentation for initrd loading options Date: Sat, 13 Mar 2021 23:47:37 +0200 Message-Id: <20210313214738.3257922-7-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210313214738.3257922-1-ilias.apalodimas@linaro.org> References: <20210313214738.3257922-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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.102.4 at phobos.denx.de X-Virus-Status: Clean Document the command line options for efidebug and initrd loading Signed-off-by: Ilias Apalodimas --- doc/uefi/uefi.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) -- 2.30.1 diff --git a/doc/uefi/uefi.rst b/doc/uefi/uefi.rst index b3494c22e073..76402bc5cfaa 100644 --- a/doc/uefi/uefi.rst +++ b/doc/uefi/uefi.rst @@ -180,6 +180,12 @@ Set up boot parameters on your board:: efidebug boot add -b 1 HELLO mmc 0:1 /helloworld.efi.signed "" +Since kernel 5.7 there's an alternative way of loading an initrd using +LoadFile2 protocol if CONFIG_EFI_LOAD_FILE2_INITRD is enabled. +The initrd path can be specified with:: + + efidebug boot add -b ABE0 'kernel' mmc 0:1 Image -i mmc 0:1 initrd + Now your board can run the signed image via the boot manager (see below). You can also try this sequence by running Pytest, test_efi_secboot, on the sandbox @@ -484,7 +490,20 @@ The load file 2 protocol can be used by the Linux kernel to load the initial RAM disk. U-Boot can be configured to provide an implementation with:: EFI_LOAD_FILE2_INITRD=y - EFI_INITRD_FILESPEC=interface dev:part path_to_initrd + +When the options is enabled the user can add the initrd path with the efidebug +command. +The Boot#### option has a FilePathList[] in it's EFI_LOAD_OPTION. +The first element of the array (FilePathList[0]) is the loded image. +When an initrd is specified the Device Path for the initrd is denoted by a +VenMedia node with the EFI_INITRD_MEDIA_GUID. Each entry of the array is +terminated by the 'end of entire device path' subtype. If the user wants to +define multiple initrds those must by separated by the 'end of this instance' +identifier of the end node (0x01). + +So our final format of the FilePathList[] is:: + + Loaded image - end node (0xff) - VenMedia - initrd1 - end node (0x01) initrd2 - end node (0xff) Links -----