From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] cmd: env: extend "env [set|print] -e" to manage UEFI variables
Date: Sun, 6 Oct 2019 21:42:30 -0400 [thread overview]
Message-ID: <20191007014230.GD15735@bill-the-cat> (raw)
In-Reply-To: <20191007004745.GQ18778@linaro.org>
On Mon, Oct 07, 2019 at 09:47:46AM +0900, AKASHI Takahiro wrote:
> On Sat, Oct 05, 2019 at 08:53:39AM +0200, Heinrich Schuchardt wrote:
> > On 10/4/19 3:20 AM, AKASHI Takahiro wrote:
> > >With this patch, when setting UEFI variable with "env set -e" command,
> > >we will be able to
> > >- specify vendor guid with "-guid guid",
> > >- specify variable attributes, BOOTSERVICE_ACCESS, RUNTIME_ACCESS,
> > > respectively with "-bs" and "-rt",
> > >- append a value instead of overwriting with "-a",
> > >- use memory as variable's value instead of explicit values given
> > > at the command line with "-i address,size"
> > >
> > >If guid is not explicitly given, default value will be used.
> > >
> > >When "-at" is given, a variable should be authenticated with
> > >appropriate signature database before setting or modifying its value.
> > >(Authentication is not supported yet though.)
> >
> > Didn't you remove this in v2?
>
> It was an editorial error, which also existed in v2 commit message.
>
> > >
> > >Meanwhile, "env print -e," will be modified so that it will dump
> > >a variable's value only if '-v' (verbose) is specified.
> > >
> > >Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >
> > This does not work as expected:
> >
> > => setenv -e -guid 0123456789abcdef0123456789abcdef -bs ARGONAUT hello world
> > => printenv -e
> > OsIndicationsSupported:
> > EFI_GLOBAL_VARIABLE_GUID: BS|RT, DataSize = 0x8
> > PlatformLang:
> > EFI_GLOBAL_VARIABLE_GUID: NV|BS|RT, DataSize = 0x6
> > PlatformLangCodes:
> > EFI_GLOBAL_VARIABLE_GUID: BS|RT, DataSize = 0x6
> > RuntimeServicesSupported:
> > EFI_GLOBAL_VARIABLE_GUID: BS|RT, DataSize = 0x2
> >
> > Neither do I see an error nor is the variable set.
>
> You have an incorrect guid format, so env_set_efi() should
> return CMD_RET_USAGE, but mistakenly returns CMD_RET_FAILURE.
>
> > The patch increases the size of u-boot.bin by 2216 bytes for qemu-arm64.
> > Tom is always asking me how we can stop the size increase in the UEFI
> > sub-system.
> >
> > Why do we need this patch? This functionality is already available via
> > the UEFI shell.
>
> Such a question should have been made before initially "-e" option
> has been introduced a long time ago.
>
> * As far as we have "-e" option, this new patch is a natural extension.
> * Why do we have to reply on external apps? We should have a minimum
> self-contained command set to manage UEFI as part of U-Boot.
> * "-i" is used in secure boot pytest.
There is a difficult balance to find here. On the one hand, there is
the argument (that I find compelling) which is that we want EFI loader
support enabled, by default, on architectures where there is EFI support
as it provides a consistent interface between ${random board} and ${off
the shelf SW stack}. On the other hand, since this is a feature that's
being enabled on a big majority of our platforms we need to be extremely
wary of code size increases.
So while I do think that some defconfigs (qemu* for example, and
sandbox) should be fine to enable everything on (especially sandbox as
there's where coverity runs), most configs should only get 'default y'
via Kconfig for things required to load the common EFI applications.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191006/656e041b/attachment.sig>
next prev parent reply other threads:[~2019-10-07 1:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 1:20 [U-Boot] [PATCH v3] cmd: env: extend "env [set|print] -e" to manage UEFI variables AKASHI Takahiro
2019-10-05 6:53 ` Heinrich Schuchardt
2019-10-07 0:47 ` AKASHI Takahiro
2019-10-07 1:42 ` Tom Rini [this message]
2019-10-07 5:02 ` AKASHI Takahiro
2019-10-07 15:43 ` Tom Rini
2019-10-07 16:45 ` Heinrich Schuchardt
2019-10-08 0:05 ` AKASHI Takahiro
2019-10-13 15:38 ` Heinrich Schuchardt
2019-10-15 0:41 ` AKASHI Takahiro
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=20191007014230.GD15735@bill-the-cat \
--to=trini@konsulko.com \
--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