public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	devel@edk2.groups.io,
	Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>,
	Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: Re: [PATCH 5/5] [edk2-platforms] Platform/DeveloperBox: Expand NvStorage sizes
Date: Mon, 29 Nov 2021 13:42:59 +0000	[thread overview]
Message-ID: <YaTY43vVqB3aPQjh@leviathan> (raw)
In-Reply-To: <CAA93ih1UHmMv6fSSHbPOBJpVRh+yKJ25hPN-V59G3jhLt0-ziw@mail.gmail.com>

On Sat, Nov 27, 2021 at 16:48:45 +0900, Masami Hiramatsu wrote:
> > On Fri, Nov 05, 2021 at 18:24:01 +0900, Masami Hiramatsu wrote:
> > > Expand NvStorage Variable size and FTW spare/working size
> > > for the DeveloperBox platform.
> > >
> > > Since the size of the NvStorage VariableSize is not enough
> > > large, FWTS uefirttime test, which updates the NV
> > > variables in runtime, failes. This expands the size to fix
> > > this issue.
> >
> > Does this change erase all existing variables?
> 
> Ah, indeed. It may need to erase all variables.

That is quite likely to lead to upset users.

> > If so, I think it is worth introducing this as a non-default build
> > option, in order to not wreck existing installations on a firmware
> > update.
> >
> > I think it would also be worth considering whether to update
> > PcdLowestSupportedFirmwareVersion. PcdFirmwareRevision
> > should definitely be updated.
> 
> I'm not sure about this point.
> You meant we should have 2 different revisions like a branch?
> - Branch A(current version): keep the variable area size the same.
> - Branch B(new version): expand the variable area.
> And a build option will change the branch by updating the
> PcdFirmwareRevision?

Not a branch - just that you need to explicitly build for the size of
flash area you want to use, and if you provide pre-built downloadable
ones - provide two variants.

This becomes a bit of a maintenance nightmare over time.

A better solution would be for the firmware to (somehow) resize the
parameter area - retaining existing values - if it encounters the
smaller version. I don't think we have an example of that.

PcdLowestSupportedFirmwareVersion still needs to be set, to the same
value as the new PcdFirmwareRevision, to prevent downgrading to a
version that does not support the larger size.

> Also PcdLowestSupportedFirmwareVersion you meant is
> in the capsule file?

I meant to change the Pcd value. That implements the change in
SystemFirmwareDescriptorTable.aslc.

Regards,

Leif

> Thank you,
> 
> 
> >
> > /
> >     Leif
> >
> > > Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
> > > Reported-by: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
> > > ---
> > >  .../Socionext/DeveloperBox/DeveloperBox.dsc.inc    |   10 +++++-----
> > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
> > > index 0a364bc457..3baf97ecc0 100644
> > > --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
> > > +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
> > > @@ -280,11 +280,11 @@
> > >    gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress|0x08000000
> > >
> > >    gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x08400000
> > > -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000
> > > -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08410000
> > > -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000
> > > -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08420000
> > > -  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000
> > > +  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00080000
> > > +  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08480000
> > > +  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00080000
> > > +  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08500000
> > > +  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00080000
> > >
> > >    gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId|"SNI   "
> > >    gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId|0x52434155514e5953 # SYNQUACR
> > >
> 
> 
> 
> -- 
> Masami Hiramatsu

  reply	other threads:[~2021-11-29 13:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  9:23 [PATCH 0/5] Series short description Masami Hiramatsu
2021-11-05  9:23 ` [PATCH 1/5] [RESEND][edk2-platforms] Silicon/SynQuacerI2cDxe: Wait for bus busy Masami Hiramatsu
2021-11-26 17:47   ` Leif Lindholm
2021-11-27  2:45     ` Masami Hiramatsu
2021-11-05  9:23 ` [PATCH 2/5] [edk2-platforms] Silicon/Socionext/SynQuacer: Fix GenericWatchdog interrupt number Masami Hiramatsu
2021-11-26 17:50   ` Leif Lindholm
2021-11-27  4:43     ` Masami Hiramatsu
2021-11-05  9:23 ` [PATCH 3/5] [edk2-platforms] Silicon/SynQuacerPlatformFlashAccessLib: Fix the number of erase blocks Masami Hiramatsu
2021-11-26 17:52   ` Leif Lindholm
2021-11-05  9:23 ` [PATCH 4/5] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table Masami Hiramatsu
2021-11-26 18:10   ` Leif Lindholm
2021-11-27  7:52     ` Masami Hiramatsu
2021-11-05  9:24 ` [PATCH 5/5] [edk2-platforms] Platform/DeveloperBox: Expand NvStorage sizes Masami Hiramatsu
2021-11-26 18:19   ` Leif Lindholm
2021-11-27  7:48     ` Masami Hiramatsu
2021-11-29 13:42       ` Leif Lindholm [this message]
2021-11-29 22:33         ` Masami Hiramatsu
     [not found]         ` <16BC25260C31EA7F.23256@groups.io>
2021-12-03  6:17           ` [edk2-devel] " Masami Hiramatsu
2021-11-25 11:19 ` [PATCH 0/5] Series short description Masami Hiramatsu
2021-11-25 16:40   ` Leif Lindholm
2021-11-26  0:58     ` Masami Hiramatsu

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-list 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=YaTY43vVqB3aPQjh@leviathan \
    --to=devel@edk2.groups.io \
    /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