From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH 3/5 v2] cmd: efidebug: Add support for querying UEFI variable storage
Date: Tue, 12 May 2020 07:02:55 +0300 [thread overview]
Message-ID: <20200512040255.GA38441@apalos.home> (raw)
In-Reply-To: <d90b87a3-b0f7-142f-6ad6-6e7ad2034d40@gmx.de>
On Mon, May 11, 2020 at 08:54:04PM +0200, Heinrich Schuchardt wrote:
> On 5/11/20 8:14 PM, Ilias Apalodimas wrote:
> > With the previous patches that use OP-TEE and StandAloneMM for UEFI
> > variable storage we've added functionality for efi_query_variable_info.
> > So let's add the relevant command to efidebug and retrieve information
> > about the container used to store UEFI variables
> >
> > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>
> For now attributes (e.g. EFI_VARIABLE_NON_VOLATILE) cannot be passed to
> the 'efidebug query' sub-command instead a fixed value is used. We can
> add attributes on the command line later.
Good point, I'll add it on the commit message for v3
>
> > ---
> > cmd/efidebug.c | 44 +++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 43 insertions(+), 1 deletion(-)
> >
> > diff --git a/cmd/efidebug.c b/cmd/efidebug.c
> > index d8a76d78a388..a3980772c934 100644
> > --- a/cmd/efidebug.c
> > +++ b/cmd/efidebug.c
> > @@ -1160,6 +1160,44 @@ static int do_efi_test(cmd_tbl_t *cmdtp, int flag,
> > return cp->cmd(cmdtp, flag, argc, argv);
> > }
> >
> > +/**
> > + * do_efi_query_info() - QueryVariableInfo EFI service
> > + *
> > + * @cmdtp: Command table
> > + * @flag: Command flag
> > + * @argc: Number of arguments
> > + * @argv: Argument array
> > + * Return: CMD_RET_SUCCESS on success,
> > + * CMD_RET_USAGE or CMD_RET_FAILURE on failure
> > + *
> > + * Implement efidebug "test" sub-command.
> > + */
> > +
> > +static int do_efi_query_info(cmd_tbl_t *cmdtp, int flag,
> > + int argc, char * const argv[])
> > +{
> > + efi_status_t ret;
> > + u32 attr = EFI_VARIABLE_BOOTSERVICE_ACCESS |
> > + EFI_VARIABLE_RUNTIME_ACCESS |
> > + EFI_VARIABLE_NON_VOLATILE;
>
> As we do not support variables at runtime currently shouldn't we remove
> EFI_VARIABLE_RUNTIME_ACCESS from the default value? I could do that when
> merging.
We can still add variables marked as runtime in U-Boot's cmd line although we
don't support those in Linux. So I'd keep that flag on the defaults.
>
> Otherwise:
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
Regards
/Ilias
next prev parent reply other threads:[~2020-05-12 4:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 18:13 [PATCH 0/6 v2] EFI variable support via OP-TEE Ilias Apalodimas
2020-05-11 18:13 ` [PATCH 1/5 v2] efi_loader: Add headers for EDK2 StandAloneMM communication Ilias Apalodimas
2020-05-11 19:39 ` Heinrich Schuchardt
2020-05-12 4:15 ` Ilias Apalodimas
2020-05-12 4:34 ` Ilias Apalodimas
2020-05-11 18:14 ` [PATCH 2/5 v2] efi_loader: Implement EFI variable handling via OP-TEE Ilias Apalodimas
2020-05-13 6:14 ` Heinrich Schuchardt
2020-05-13 8:10 ` Ilias Apalodimas
2020-05-15 11:55 ` Heinrich Schuchardt
2020-05-15 12:08 ` Ilias Apalodimas
2020-05-11 18:14 ` [PATCH 3/5 v2] cmd: efidebug: Add support for querying UEFI variable storage Ilias Apalodimas
2020-05-11 18:54 ` Heinrich Schuchardt
2020-05-12 4:02 ` Ilias Apalodimas [this message]
2020-05-11 18:14 ` [PATCH 4/5 v2] MAINTAINERS: Add maintainer for EFI variables via OP-TEE Ilias Apalodimas
2020-05-11 18:39 ` Heinrich Schuchardt
2020-05-11 18:14 ` [PATCH 5/5 v2] doc: uefi.rst: Add OP-TEE variable storage config options Ilias Apalodimas
2020-05-11 18:38 ` Heinrich Schuchardt
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=20200512040255.GA38441@apalos.home \
--to=ilias.apalodimas@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