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 v5 00/19] efi_loader: non-volatile variables support
Date: Fri, 1 Nov 2019 15:04:36 +0900	[thread overview]
Message-ID: <20191101060434.GV10448@linaro.org> (raw)
In-Reply-To: <20191029132819.35759240034@gemini.denx.de>

Wolfgang,

I would like to focus on the critical and most arguable point in this email.

On Tue, Oct 29, 2019 at 02:28:19PM +0100, Wolfgang Denk wrote:
> Dear Takahiro,
> 
> In message <20191028011435.GP10448@linaro.org> you wrote:
> >
> > > Can you please at least comment on the size impact?  How much does
> > > the code size grow on everage, especially for SPL?
> >
> > Well, from the next version as I will make a drastic change as far as
> > I follow your suggestion below.
> 
> OK.
> 
> > Okay, I see but I hope that you should have said so much earlier.
> > My patch (v5) has been stranded almost two months without any comments.
> 
> I have said so uin lcear and unmistakable words when discussion was
> to add me as maintainer for environment code.  I cannot commit to
> such a position as I don't have enough time available.
> 
> > > > > > > > * Non-volatile feature is not implemented in a general form and must be
> > > > > > > >   implemented by users in their sub-systems.
> > > > > 
> > > > > I don't understand what this means, or why such a decision was made.
> > > > > Which sub-systems do you have in mind here?
> > > >
> > > > UEFI sub-system/library.
> > > 
> > > What needs to be done to have this - say - for U-Boot context?
> > >
> > > > > What prevented you from implementing a solution to works for all of
> > > > > us?
> > > 
> > > ?
> >
> > At least for me or UEFI, nothing more, other than a *context*, is needed
> > to meet the requirement.
> > If some one really want to have such(?) a feature, he or she can on top
> > of my patch.
> > I believe that my attitude here is fair enough.
> 
> I would appreciate if you could actually answer my questions.  there
> are two of them:
> 
> You write: "Non-volatile feature is not implemented in a general
> form and must be implemented by users in their sub-systems."
> 
> Q1: Why did you not implement this feature in a generic way, so it
>     is automatically available to all sub-systems that support
>     contexts?
> 
> Q2: What exactly needs to be done, which code needs to be writtenm,
>     to implement this feature - say - for U-Boot context?
> 
> 
> > So do you always admit the following coding?
> > ===8<===
> >   (in some UEFI function)
> >   ...
> >   old_ctx = env_set_context(ctx_uefi);
> >   env_set(var, value);
> >   env_set_context(old_ctx);
> >   ...
> > ===>8===
> 
> This is even worse, as instead of adding a single argument to a
> function call you are adding two full fucntion calls.
> 
> But why would that be needed?
> 
> U-Boot is strictly single tasking.  You always know what the current
> context is, and nobody will change it behind your back.
> 
> And UEFI functions are not being called in random places, they are
> limited to a small set of UEFI commands, right?  So why do you not
> just enter UEFI context when you start executing UEFI code, and
> restore the rpevious state when returning to non-UEFI U-Boot?

Can you elaborate What you mean by "entering UEFI context"?

What I'm thinking of here is that we would add one more member field, which
is a pointer to my "env_context," in GD and change it in env_set_context().
This can be defined even as an inline function.
(My other patches, at least patch#1 to #6, can be used almost as they are.)

I don't see why you deny such a simple solution with lots of flexibility.

-Takahiro Akashi

> Or am I missing something?
> 
> > > > > You don't seriously expect to have patches which cause
> > > > > "incomprehensible memory corruption" to be included into mainline?
> > > >
> > > > It will be just a matter of time for debugging.
> > > 
> > > It might be difficult to find willing testers under such
> > > circumstances.  I would not want to run code with serious known
> > > bugs.
> >
> > I believe that the issue is independent from the basic approach
> > that we are now discussing.
> 
> The reason of this problem must be understood and the bug fixed
> before it can go into mainline.
> 
> > > I think this is a new feature that needs to be tested.  You focus on
> > > UEFI + FAT and I don't know if UEFI + non-FAT makes sense, but at
> > > least (1) non-UEFI + FAT and (2) non-UEFI + non-FAT are
> > > configurations which must be tested - absolute minimum is at least
> > > one example implementation. My suggestion would be to use something
> > > that is not file system based, but using plain storage, say a board
> > > which has the environment in SPI NOR flash.
> >
> > What do you mean by "non-UEFI"? Disabling UEFI, or testing U-Boot environment
> > variables on no-FAT device?
> > If the latter, I have tested it with flash (on qemu).
> 
> We need to test if the new context code works (and does not cause
> problems) on systems where UEFI is not enabled.
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Don't you know anything? I should have thought anyone knows that  who
> knows anything about anything...      - Terry Pratchett, _Soul Music_

  reply	other threads:[~2019-11-01  6:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05  8:21 [U-Boot] [PATCH v5 00/19] efi_loader: non-volatile variables support AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 01/19] env: extend interfaces allowing for env contexts AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 02/19] env: define env context for U-Boot environment AKASHI Takahiro
2019-09-05 19:43   ` Heinrich Schuchardt
2019-09-06  0:41     ` AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 03/19] env: nowhere: rework with new env interfaces AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 04/19] env: flash: support multiple env contexts AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 05/19] env: fat: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 06/19] hashtable: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 07/19] api: converted with new env interfaces AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 08/19] arch: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 09/19] board: " AKASHI Takahiro
2019-09-05 12:02   ` Lukasz Majewski
2019-09-06  0:34     ` AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 10/19] cmd: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 11/19] common: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 12/19] disk: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 13/19] drivers: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 14/19] fs: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 15/19] lib: converted with new env interfaces (except efi_loader) AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 16/19] net: converted with new env interfaces AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 17/19] post: " AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 18/19] env, efi_loader: define env context for UEFI variables AKASHI Takahiro
2019-09-05 19:37   ` Heinrich Schuchardt
2019-09-06  0:54     ` AKASHI Takahiro
2019-09-05  8:21 ` [U-Boot] [PATCH v5 19/19] efi_loader: variable: rework with new env interfaces AKASHI Takahiro
2019-09-05  8:31 ` [U-Boot] [PATCH v5 00/19] efi_loader: non-volatile variables support AKASHI Takahiro
2019-10-01  6:28 ` AKASHI Takahiro
2019-10-23  6:53   ` AKASHI Takahiro
2019-10-25  7:06     ` Wolfgang Denk
2019-10-25  7:56       ` AKASHI Takahiro
2019-10-25 13:25         ` Wolfgang Denk
2019-10-28  1:14           ` AKASHI Takahiro
2019-10-29 13:28             ` Wolfgang Denk
2019-11-01  6:04               ` AKASHI Takahiro [this message]
2019-11-04 16:00                 ` Wolfgang Denk
2019-11-04 16:16                   ` Tom Rini
2019-11-05  5:18                   ` 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=20191101060434.GV10448@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.