From patchwork Mon Jun 13 09:38:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 581410 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp1797608max; Mon, 13 Jun 2022 02:38:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx/gB0o7wxQpeim5YsEhIeMFmHPRXnv9jsrV258GW8NrGB4g5Q7WgRkQMXfXH7L2NKrH3d X-Received: by 2002:a05:6638:329e:b0:331:e8ae:7d9d with SMTP id f30-20020a056638329e00b00331e8ae7d9dmr15368597jav.274.1655113104644; Mon, 13 Jun 2022 02:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655113104; cv=none; d=google.com; s=arc-20160816; b=HaPgKoT2t+1TyiEcVSJlB2qZfmL4+81PN+cnuSyQ4c3FGlN9lRooaOWH9F0K2RbOxU VWrL9mGaHpmaq0a9zXF/FuAG8ORQE0eTPHH7DDiCCuFrBAux8xVnpBiW/KaUWeCYOxqh LT2P0mgBOYpQcG/OvOIgU1vO6OlGAQRttVlt65u9WXt6VBQYh6/7JMuuIyPsvjoWQvpp erfjPtKm7DliOZPPq2sTSZQDrw7ONkvlSYSz4Ll11KKiYCtkw7vw2y7MpaF70p1F85lt bUgOWP2TkLa86CcZ62/psmVhlSUYSSgEW5pcIq+enl3+tQn8SggqaeU8IRQJodU5andq Kz8w== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=+Zk9Czp9WPQyC1dHKmeltbso7SEMQZxA4Or+WGAn6qI=; b=n0V1DHITbJQUAqNQZBR9seakJSh3WLW6QWssOz+KuHPfFbH9HNkZBIk1aO3OhFJNxi 8g05qd+VpJAfpVrdt2+U3Yz22PxxxP0Q99MwwOxJD16Y1byMcRO2qipaAKLf+0eagYLZ uX47UlChAtCd7q49q92rbGcxLv3IR3nerEXUqARslYJ4Tx5ZAymJyDsQUM1oKaGlRN05 hRRR1mqJjKqMJNwUTBf+D6JfXuRfsggB8O3Cy+2+6fr2v8tiMo0WnDENnQjyTvsfVeTF iipSuK2iQVLqsrnvlUW+Xtos8SOfwsRnyq5JLWhKVCpWrtMWA815woIyZEedEradLcQW oMCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mhJon1Rk; 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 i13-20020a05663813cd00b003321f8352basi11953701jaj.37.2022.06.13.02.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 02:38:24 -0700 (PDT) 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=mhJon1Rk; 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 48144842F8; Mon, 13 Jun 2022 11:38:20 +0200 (CEST) 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="mhJon1Rk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4589F80585; Mon, 13 Jun 2022 11:38:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (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 80CCA80585 for ; Mon, 13 Jun 2022 11:38:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pl1-x632.google.com with SMTP id t2so4641977pld.4 for ; Mon, 13 Jun 2022 02:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+Zk9Czp9WPQyC1dHKmeltbso7SEMQZxA4Or+WGAn6qI=; b=mhJon1RkUcd6CtJ2GpGC09G352fm4ekQqUHII6jKUD1QrnpoVQK0teI9r3eHlsHlb9 YPJ5Zg4YEwJIoH5bORQEDK9E9K43fdOi2HEFi9nJgazoeFVH64t+OGckH14TiQak7uiB e9f7bSDJ+dnC8yUA8AfxP1QDvA0UhXKrK4pc7ukwJ5H/GQd5Y3VFxHZMXxEIxp/OFE5x ZKqkUOTk+Bs99Bt8yAnT1q1eSNaEWcP2cD1TNCdB4SafSB8D8PHxHcx2AE6WTX+M9lFL ULXXnKIYi4NJt9GzS7vuNJQj1n9txZyDMhawuPvyWLCpZsJxjeMqzI3jOo8zLXXddPEX zFGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+Zk9Czp9WPQyC1dHKmeltbso7SEMQZxA4Or+WGAn6qI=; b=ddYYZE1qI//InBFQo8/CeoDo1mib3d7Vt38YNwVAk+Qa1Em99pVXpuwfo4hqlnc5r6 JWkOdnS9KT30c92aKN3MZFKw/ETPLNklz0Hq9jzCUmsM9IgfSzjbUO/kOiSwvUwUYw7a ctJypuj70vDX8hpJ3JGi+G2jyzTeB+RsiZWpZaYsCFb1H40uzu/QvsZ0NYvFedzbIe54 0quqobAoiwjvsAoqIrp9FII3fSL4oSagOx2S0dVnZYJ4DkMydeJmrjTZKFLO/Azygo/S woslcM0KDovOqg5ARamb2vFSqzwHVXGrbOKAfdCwk/RwT0fWsK42QyLggVAaJrClb2HV dIsQ== X-Gm-Message-State: AOAM531yslr13gquJ2tyRRIlnaKgzwTdqrGAmg1Xg8GHyGrlGG5lclXK AgmRcWA1svHFv+NFeBss2T2g4ZL0EdbaQw== X-Received: by 2002:a17:902:ed53:b0:166:3e43:7522 with SMTP id y19-20020a170902ed5300b001663e437522mr56887638plb.170.1655113093600; Mon, 13 Jun 2022 02:38:13 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id q6-20020a170902a3c600b00163f7935772sm4629227plb.46.2022.06.13.02.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 02:38:13 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis , Masahisa Kojima Subject: [PATCH v7 0/9] enable menu-driven UEFI variable maintenance Date: Mon, 13 Jun 2022 18:38:44 +0900 Message-Id: <20220613093853.23865-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean This series add the menu-driven UEFI boot variable maintenance and removable media support in bootmenu. Different from previous version, thie series adds a new U-Boot command "efimenu" to invoke the UEFI boot-related variable maintenance menu. Note that menu-driven UEFI Secure Boot key management patch series will follow. [Major Changes] - rebased to v2022.07-rc4 - there is detailed changelog in each commit Masahisa Kojima (9): efi_loader: expose END device path node efimenu: menu-driven addition of UEFI boot option efimenu: add "Edit Boot Option" menu entry menu: add KEY_PLUS and KEY_MINUS handling efimenu: add "Change Boot Order" menu entry efimenu: add "Delete Boot Option" menu entry bootmenu: add removable media entries doc:bootmenu: add description for UEFI boot support doc:efimenu: add documentation for efimenu command cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/bootmenu.c | 99 +- cmd/efimenu.c | 1824 ++++++++++++++++++++++++++++++ common/menu.c | 6 + doc/usage/cmd/bootmenu.rst | 74 ++ doc/usage/cmd/efimenu.rst | 50 + doc/usage/index.rst | 1 + include/efi_loader.h | 63 ++ include/efi_menu.h | 91 ++ include/menu.h | 2 + lib/efi_loader/efi_boottime.c | 52 +- lib/efi_loader/efi_console.c | 78 ++ lib/efi_loader/efi_device_path.c | 2 +- lib/efi_loader/efi_disk.c | 11 + lib/efi_loader/efi_file.c | 75 +- 16 files changed, 2385 insertions(+), 51 deletions(-) create mode 100644 cmd/efimenu.c create mode 100644 doc/usage/cmd/efimenu.rst create mode 100644 include/efi_menu.h