From: Takahiro Akashi <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/4] efi_loader: non-volatile variables support
Date: Fri, 7 Dec 2018 11:29:48 +0900 [thread overview]
Message-ID: <20181207022947.GC21466@linaro.org> (raw)
In-Reply-To: <CAFA6WYPOdLPGArT1NDzMgdkv8fZNUCu_ckEWPdnZ47drJJS=Wg@mail.gmail.com>
# My patch is more or less a RFC to raise attention.
On Wed, Dec 05, 2018 at 11:53:42AM +0530, Sumit Garg wrote:
> Hi Akashi,
>
> On Wed, 28 Nov 2018 at 11:28, AKASHI Takahiro
> <takahiro.akashi@linaro.org> wrote:
> >
> > As the subject suggested, this patch set allows any efi variable to be
> > volatile or non-volatile as UEFI specification describes.
> >
> > With my efishell patch[1] with patch #2, you can try as follows:
> > => efi setvar PlatformLang en
> > => efi setvar -nv BootNext =H0200
> > => env save
> >
>
> How do you expect usage of "EFI_VARIABLE_NON_VOLATILE" attribute to
> work during boot-time services as we don't have "env save" command
> option as a boot-time service?
>
> Take example scenario with EDK2 shell launched from u-boot and tries
> to set non-volatile efi variable.
I know the issue, but
> IMHO, support should be added to "efi_set_variable" to save variable
> with "EFI_VARIABLE_NON_VOLATILE" attribute to non volatile storage.
I also hesitate to implement such a behavior to efi_set_variable
as it ends up writing to flash every time. Please note that data on
storage is a sorted list in plain text and so updating it can be painful.
-Takahiro Akashi
> -Sumit
>
> > BootNext will be preserved across reboot, while PlatformLang not.
> >
> > Please note that, currently, setvar command does not automatically
> > append NON_VOLATILE attribute, while UEFI specification expects that
> > PlatformLang be non-volatile, you'd better also specify -nv for
> > this variable here.
> >
> > Patch #2/#3 depend on my efishell patch[1].
> > Patch #4 depends on my BootNext patch[2].
> >
> > Patch[1] and [2] have not been merged yet, so patch#1 can be applied
> > on its own.
> >
> > [1] https://lists.denx.de/pipermail/u-boot/2018-November/346450.html
> > [2] https://lists.denx.de/pipermail/u-boot/2018-November/349281.html
> >
> > AKASHI Takahiro (4):
> > efi_loader: support non-volatile variable behavior
> > cmd: efishell: support -nv option to setvar sub-command
> > cmd: efishell: make Boot####/BootOrder variable non-volatile
> > efi_loader: bootmgr: make BootNext non-volatile
> >
> > cmd/efishell.c | 20 ++++++++---
> > env/env.c | 4 +++
> > include/efi_loader.h | 1 +
> > lib/efi_loader/efi_bootmgr.c | 3 +-
> > lib/efi_loader/efi_variable.c | 64 +++++++++++++++++++++++++++++++++--
> > 5 files changed, 84 insertions(+), 8 deletions(-)
> >
> > --
> > 2.19.1
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
next prev parent reply other threads:[~2018-12-07 2:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 6:00 [U-Boot] [PATCH 0/4] efi_loader: non-volatile variables support AKASHI Takahiro
2018-11-28 6:00 ` [U-Boot] [PATCH 1/4] efi_loader: support non-volatile variable behavior AKASHI Takahiro
2018-12-11 18:37 ` Heinrich Schuchardt
2018-11-28 6:00 ` [U-Boot] [PATCH 2/4] cmd: efishell: support -nv option to setvar sub-command AKASHI Takahiro
2018-12-11 18:50 ` Heinrich Schuchardt
2018-11-28 6:00 ` [U-Boot] [PATCH 3/4] cmd: efishell: make Boot####/BootOrder variable non-volatile AKASHI Takahiro
2018-12-11 19:05 ` Heinrich Schuchardt
2018-11-28 6:00 ` [U-Boot] [PATCH 4/4] efi_loader: bootmgr: make BootNext non-volatile AKASHI Takahiro
2018-12-11 19:07 ` Heinrich Schuchardt
2018-12-05 6:23 ` [U-Boot] [PATCH 0/4] efi_loader: non-volatile variables support Sumit Garg
2018-12-07 2:29 ` Takahiro Akashi [this message]
2018-12-07 12:40 ` Sumit Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181207022947.GC21466@linaro.org \
--to=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox