All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/7] efi_loader: load saved non-volatile variables at init
Date: Wed, 5 Jun 2019 09:58:17 +0900	[thread overview]
Message-ID: <20190605005816.GL27279@linaro.org> (raw)
In-Reply-To: <d4bd0380-c504-7eec-950b-6f53b1b067fa@gmx.de>

On Tue, Jun 04, 2019 at 11:38:27PM +0200, Heinrich Schuchardt wrote:
> On 6/4/19 8:52 AM, AKASHI Takahiro wrote:
> >Data cache will be read in from persistent storage after (re)boot
> >to restore UEFI non-volatile variables.
> >
> >Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >---
> >  lib/efi_loader/efi_setup.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> >diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
> >index 8691d686d29d..45d6aca051f3 100644
> >--- a/lib/efi_loader/efi_setup.c
> >+++ b/lib/efi_loader/efi_setup.c
> >@@ -8,6 +8,7 @@
> >  #include <common.h>
> >  #include <bootm.h>
> >  #include <efi_loader.h>
> >+#include <environment.h>
> >
> >  #define OBJ_LIST_NOT_INITIALIZED 1
> >
> >@@ -102,6 +103,11 @@ efi_status_t efi_init_obj_list(void)
> >  	/* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */
> >  	switch_to_non_secure_mode();
> >
> >+#ifdef CONFIG_EFI_VARIABLE_USE_ENV
> 
> No clue what ENV refers to here as we are not talking about U-Boot
> environment variables anymore. How about CONFIG_EFI_PERSISTENT_VARIABLES.

It will be trivial once you take a look at "menuconfig."

> 
> >+	/* Load non-volatile variables */
> >+	env_efi_load();
> 
> Can't we make env_efi_load() a __weak function which does nothing. If we
> have a backend, that backend replaces the weak function. That way we
> restrict the config variables to the Makefile.

This is a discussion.
There can be different approaches here, so
I would like to deter to a developer who will implement a next
backing storage (other than U-Boot env), which is likely to be
Standalone MM services for secure boot.
Unfortunately I'm not responsible for that(StMM).

I hope that some Linaro engineers may have comments here.

Thanks,
-Takahiro Akashi

> Regards
> 
> Heinrich
> 
> >+#endif
> >+
> >  	/* Define supported languages */
> >  	ret = efi_init_platform_lang();
> >  	if (ret != EFI_SUCCESS)
> >
> 

  reply	other threads:[~2019-06-05  0:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  6:52 [U-Boot] [PATCH v3 0/7] efi_loader: non-volatile variables support AKASHI Takahiro
2019-06-04  6:52 ` [U-Boot] [PATCH v3 1/7] env: save UEFI non-volatile variables in dedicated storage AKASHI Takahiro
2019-06-04 21:09   ` Heinrich Schuchardt
2019-06-05  0:36     ` AKASHI Takahiro
2019-06-11 10:59   ` Ilias Apalodimas
2019-06-12  5:23     ` AKASHI Takahiro
2019-06-04  6:52 ` [U-Boot] [PATCH v3 2/7] efi_loader: variable: support non-volatile attribute AKASHI Takahiro
2019-06-04 21:15   ` Heinrich Schuchardt
2019-06-04  6:52 ` [U-Boot] [PATCH v3 3/7] efi_loader: variable: split UEFI variables from U-Boot environment AKASHI Takahiro
2019-06-04 21:31   ` Heinrich Schuchardt
2019-06-05  0:48     ` AKASHI Takahiro
2019-06-04  6:52 ` [U-Boot] [PATCH v3 4/7] efi_loader: load saved non-volatile variables at init AKASHI Takahiro
2019-06-04 21:38   ` Heinrich Schuchardt
2019-06-05  0:58     ` AKASHI Takahiro [this message]
2019-06-04  6:52 ` [U-Boot] [PATCH v3 5/7] efi_loader: bootmgr: make BootNext non-volatile AKASHI Takahiro
2019-06-04 21:46   ` Heinrich Schuchardt
2019-06-11 10:19   ` Ilias Apalodimas
2019-06-04  6:52 ` [U-Boot] [PATCH v3 6/7] cmd: efidebug: make some boot variables non-volatile AKASHI Takahiro
2019-06-04 21:45   ` Heinrich Schuchardt
2019-06-11 10:20   ` Ilias Apalodimas
2019-06-04  6:52 ` [U-Boot] [PATCH v3 7/7] cmd: env: add -nv option for UEFI non-volatile variable AKASHI Takahiro
2019-06-04 21:53   ` Heinrich Schuchardt
2019-06-25  6:47 ` [U-Boot] [PATCH v3 0/7] efi_loader: non-volatile variables support Wolfgang Denk

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=20190605005816.GL27279@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.