From patchwork Sat Mar 13 21:47:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 399597 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2272280jai; Sat, 13 Mar 2021 13:47:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIg0TTc1o2zbGrQCAkX4mehtYyBYiioWi48HM9N07BdiU/sT5ePGmD2nK/6534YvVsEACO X-Received: by 2002:a05:6402:4405:: with SMTP id y5mr2719592eda.32.1615672070036; Sat, 13 Mar 2021 13:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615672070; cv=none; d=google.com; s=arc-20160816; b=Df7ZQErQgpaLV+yMvhVnH1DbCgmxt2td+doKSeaEdazbCph8b7XKYVIzWmUyyzk/c9 jKsjDca2irl2KVX2Nt5c2pYBRmCuHub5ZvS4lthgbVJKP6D9A6y3PRRh8Sta43j825YB 8V8udQGdL+CduJslMfbld/SPmtdUSvHICpXbkC+srw79OlhS1vcBmulnLKIUkqD7BSPi nSoYsfJP/jbqObaudARms4NGIUAXNgw7Db1f8axFn5kx6LpjYIP9QQROzRCOq8Ri+YM0 BCxUfrBhnpwiaFsvecAmOYBMOFJGcxDJKl9rZh1SrNBKTiHZaQHIardLGmKPYmWvzhSb Xqyg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=5Wo4WWnajR5PV/2sPBtGtsSQQw88MLDEQSr0M8J65M0=; b=t9NFkZVpOtDDM4uXJG35jmCesj4jHrh8Naxrrxbx5dm2JydU2fJaLQ9uVt66fHZqfL 29aTOQW0YWzNoshFNOe1s3qiUIlBCvvrHaAQEbIwMUYjBx5nd0eDVLughfmYuYHiNVip heaYWfuYo8gE3EAeCP844w4xU9H1Jz2fLrrWMYCIn5tF4Cl8VnyZkZU/kXf6ww7rNCJJ z62due+Ua0QSmAQFjdVxxFUZpPrL154xq72VwHE0haJB12TunRk7EchlxLo35PvQAurP F6J9cmF11cQxpuqu4ZuJO8k7VVPJWeGcFzosmUpqFjxpxxSjEeWYnaxNeGu8rt62CeMX RFww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yV6WF9X0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id ay27si7417118edb.171.2021.03.13.13.47.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 13:47:50 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yV6WF9X0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 2470A8280D; Sat, 13 Mar 2021 22:47:47 +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="yV6WF9X0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0605382816; Sat, 13 Mar 2021 22:47:46 +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-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 CE112827FA for ; Sat, 13 Mar 2021 22:47:42 +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-ed1-x52b.google.com with SMTP id h13so12901098eds.5 for ; Sat, 13 Mar 2021 13:47:42 -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:mime-version :content-transfer-encoding; bh=5Wo4WWnajR5PV/2sPBtGtsSQQw88MLDEQSr0M8J65M0=; b=yV6WF9X0FYsz3vgXP/uaFo33S7qjixWv5G61AxJK1tAlLOZvI8CJqj883XMxa7RqBa 7Ci+3r9i9YggNVo++913n+bWHdaqy1vmyk//SQaT5GeM7CPr3nxtvGGjp2K3c1hNbTQm YXrHhA/uNkijW/8E9cdRbkVPBuE5hYiD5J1hcG1GpYxhX4s0+c+4BPIqHo9PuiiFfqOn ttlYv/Sbg9KgGsaVBctIhRaY9JYg4L7/tDpkegkA245ibKwDbsOaecgFxX4PVWn3uP4S 6XIMasr7QYFRUBlQ5IsS08OQ06zDuJA+kV2Tjnnw2Y1EdyO3IECjQdqBLyiWoUviWgF1 R5Ww== 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:mime-version :content-transfer-encoding; bh=5Wo4WWnajR5PV/2sPBtGtsSQQw88MLDEQSr0M8J65M0=; b=GFANGGbXAUnz/siSEtgyvnCDZ+oKnPOQBR5rTTZFb2w05DOgWhbkSx5bISv7XhDadR i5328q8P3iO6ePEnC37fsm6jaiHV0KAN3MfU2znQT2j5aj6spTFCkBD7qC2xUp9IWmRZ tIyxnMVDADhaGMhflKbu64pw5oi6JIY352W8QnFRVq03vF6s9AGj1C8D55oX7c5o7ByQ om1d65uf6aFDFKnS1UDP1LE7q3g2+nm/6f6wYP/3++ulYCKvuj3rGUVXwAfNpwXIT5hH OSV5P6jFY8TW5oVWTgylfJxqAvGG79q8E7UkkYG75cFHrDhsPb0pbsy0F6ctO/vWHXcm JFuw== X-Gm-Message-State: AOAM530RhrfEDjA8QalDwbCk+ankGr/Ztib91Yp823Ju3d8Mqmi8X2ky 3pSchSRexr6R4ogimszoSMHhhg== X-Received: by 2002:a50:eb8f:: with SMTP id y15mr22032270edr.115.1615672062466; Sat, 13 Mar 2021 13:47:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 13:47:42 -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 0/6 v2] Loadfile2 for initrd loading Date: Sat, 13 Mar 2021 23:47:31 +0200 Message-Id: <20210313214738.3257922-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.30.2 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 Hi! This is v2 of [1] Changes since v1: - minor coding style fixes from Heinrich - changed the DP format. Instead of VenMedia - 0x01 - initrd, we skip the 0x01 between VenMedia and the first file. - final device path is stripped in efi_get_dp_from_boot() instead of get_initrd_fp() - Fixed comments on documentation [1] https://lists.denx.de/pipermail/u-boot/2021-March/443399.html Ilias Apalodimas (6): efi_selftest: Remove loadfile2 for initrd selftests efi_loader: Add device path related functions for initrd via Boot#### efi_loader: Introduce helper functions for EFI efi_loader: Replace config option for initrd loading efidebug: add multiple device path instances on Boot#### doc: Update uefi documentation for initrd loading options cmd/bootefi.c | 3 + cmd/efidebug.c | 194 ++++++++++++--- doc/board/emulation/qemu_capsule_update.rst | 4 +- doc/uefi/uefi.rst | 23 +- include/efi_helper.h | 15 ++ include/efi_loader.h | 7 + lib/efi_loader/Kconfig | 15 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_bootmgr.c | 19 +- lib/efi_loader/efi_device_path.c | 99 +++++++- lib/efi_loader/efi_helper.c | 133 +++++++++++ lib/efi_loader/efi_load_initrd.c | 189 +++++++++------ lib/efi_loader/efi_var_common.c | 33 +++ lib/efi_selftest/Makefile | 1 - lib/efi_selftest/efi_selftest_load_initrd.c | 221 ------------------ .../test_efi_capsule/test_capsule_firmware.py | 6 +- test/py/tests/test_efi_secboot/test_signed.py | 16 +- .../test_efi_secboot/test_signed_intca.py | 8 +- .../tests/test_efi_secboot/test_unsigned.py | 8 +- 19 files changed, 618 insertions(+), 377 deletions(-) create mode 100644 include/efi_helper.h create mode 100644 lib/efi_loader/efi_helper.c delete mode 100644 lib/efi_selftest/efi_selftest_load_initrd.c -- 2.30.1