From patchwork Tue Jan 15 02:54:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 155599 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4383053jaa; Mon, 14 Jan 2019 18:54:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN6MPUVsyeP9pLo8xkxRT8pCJCCSA6gklOtIgeNa0DPI6ls9maSXPB4oOO04bAfrg9EuS5ik X-Received: by 2002:a17:906:3da2:: with SMTP id y2-v6mr1434613ejh.160.1547520886500; Mon, 14 Jan 2019 18:54:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547520886; cv=none; d=google.com; s=arc-20160816; b=AI32FaAbpId5FQE20sEJMKJwFBvd/cLbv26wHreu2NaQnbgA687TltBUzS6i3MJvGK r/I5j/f5/AsKlhFddb0POssy4QD64MYIyub9KV6lMLxllN4MhQoIeFzfqRiU/cmMn9Vn o43pmG3qidgqOa+4bUrq0KPw7SURCuiiyVWvdGLDDrasEJnJblZsNzlygACt2WxS8571 0kGcXWzZV7w96SKzb8iGounbUsKq+UiKtBKyhO3oaX27RaydaVMBOEJpHjbxydoG5QMn hZTvXRhBE1oX9QIAHTzz+ETFN7PrcBx2+MMoNg9Bp5wiS2Rm5MOTBiUlB5T/FijCVxvE D+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:dkim-signature; bh=44BdUtDCYEEmN4dfdWRz+PoNMbqrzR9LlrCKJ8v4vB0=; b=hgxdNe7WbCwb+Wx9QZZC7QYGLu8aaancsB5dWvRwxaCCobNsqwHmxFpjkodXLdSsDF frzxBh1SB7P7WtewfW2zDYAAWcwPpNJ9ZClgfCJaQzaAN7eRU+pDkEtAKg9KyKOU29RJ ijRz+1PJcaitceW/tjQpnRKhK92AN4Hk7KpydSTIuEOj21VQK+xM+c51Y0/kWzyIc+qk psvTLm4ItQhj+eOpJBUxeLJ/y2KBDMPkKelYgmw3WVfnWC5o1vWh/19c3R3UOPGSP5MH nDohF0HpJGhHYDMnyVpFhMX4pVh6lRJt3tTCptkcT+fTQNnqqgckr48o/XsqZQgdwt0+ voGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZwqZiw6L; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id p25-v6si3514660ejg.328.2019.01.14.18.54.46; Mon, 14 Jan 2019 18:54:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZwqZiw6L; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 173CFC222C4; Tue, 15 Jan 2019 02:54:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 562B1C21D65; Tue, 15 Jan 2019 02:54:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C574AC21FAB; Tue, 15 Jan 2019 02:54:34 +0000 (UTC) Received: from mail-yw1-f65.google.com (mail-yw1-f65.google.com [209.85.161.65]) by lists.denx.de (Postfix) with ESMTPS id A55AFC21FCF for ; Tue, 15 Jan 2019 02:54:33 +0000 (UTC) Received: by mail-yw1-f65.google.com with SMTP id k188so506297ywa.6 for ; Mon, 14 Jan 2019 18:54:33 -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=fm/DWqPt2rg8j3njhUGo898b5cpOfx7S4ad5U8BtZf8=; b=ZwqZiw6LYkzxAh1wFwpnPflKfm9yj9T13O2wdcY2Hpo+nCkXe7z913ZsUm39kZ//BA Llucnj+PKL/BHtLUOpY/3vemi/Ha6NvFyg1zDbhwIqN7yZMxMUS7TdC7SoyqN8R5QNuK WooQNCQbo+asZ6AntW0VmWbQWDhfQ9LA5KWnU= 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=fm/DWqPt2rg8j3njhUGo898b5cpOfx7S4ad5U8BtZf8=; b=FkC6eW4bpL3htTRf3yZpv0pXloFrQA5r1XZhDmi8ktRdpR+gC+dngL9IXq8XMaNGwx rwzgbvDR768mzU4KxJeHE8ljRDC3HKaNEHhBoHtR9CYj0LsmMxrL7RwcuIrgZf15aXhi JddRNJkXkCD89GRjIIlI1dEaZ49VZ1U5XkEgJTW2/sPG6a3+4nxWJ/QETO81e14yCoev e0Frwfk8vtpCQaQMmgzqGCNT0X6C+WaESP3hzSZxV/mlDUJXBhrtRO7ZYk9QrhKyztGA wa8ZkNqkpvqo1Cv9Q8J6wdtFiqUpiGGzI6DJ3nJQwy2TJrWkNP/vfPLGJyz0R+i8HRvf NrEQ== X-Gm-Message-State: AJcUukfpWw9e+3wu50alu7nxTH6tww3TR9+SIUK2OZmRj+9xmaeNd4XW tkM7aWapTnPjCzpM1538k+q3hQ== X-Received: by 2002:a0d:e1d6:: with SMTP id k205mr1317046ywe.78.1547520872650; Mon, 14 Jan 2019 18:54:32 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id n10sm726137ywc.48.2019.01.14.18.54.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 18:54:32 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, agraf@suse.de, xypron.glpk@gmx.de Date: Tue, 15 Jan 2019 11:54:32 +0900 Message-Id: <20190115025437.11966-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 0/5] efi_loader: run a specific efi application more easily X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This patch is a result from re-organizing my previous patches; a combination of [1] and part of [2] so as to solely provide several ways of executing a specific efi application explicitly. * bootmanager via BootNext variable * bootefi with boot id * run -e with BootXXXX variable Changes in v2 (Jan 15, 2019) * not specify any attributes when deleting BootNext variable in efi_bootmgr_load() * introduce EFI_BOOTMGR_DEFAULT_ORDER macro on behalf of BootOrder for use in efi_bootmgr_load() * simplify the code around efi_handle_fdt() in do_bootefi() * add do_bootefi_run() and call it at "run -e" so that we don't have to export internal efi helper functions [1] https://lists.denx.de/pipermail/u-boot/2018-November/349281.html [2] https://lists.denx.de/pipermail/u-boot/2018-November/346450.html AKASHI Takahiro (5): efi_loader: bootmgr: support BootNext and BootCurrent variable behavior efi_loader: bootmgr: allow for running a given load option cmd: bootefi: carve out fdt parameter handling cmd: bootefi: run an EFI application of a specific load option cmd: run: add "-e" option to run an EFI application cmd/bootefi.c | 114 +++++++++++++++++++++++++++-------- cmd/nvedit.c | 9 ++- common/cli.c | 10 +++ include/command.h | 3 + include/efi_loader.h | 5 +- lib/efi_loader/efi_bootmgr.c | 43 ++++++++++++- 6 files changed, 156 insertions(+), 28 deletions(-)