public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Masami Hiramatsu" <masami.hiramatsu@linaro.org>
To: Ard Biesheuvel <ardb@kernel.org>, Leif Lindholm <leif@nuviainc.com>
Cc: devel@edk2.groups.io,
	Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>,
	Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: [PATCH v3 6/6] [edk2-platforms] Platform/DeveloperBox: Expand NvStorage sizes
Date: Fri, 10 Dec 2021 15:51:21 +0900	[thread overview]
Message-ID: <163911908077.561661.9441962088868389919.stgit@localhost> (raw)
In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost>

Add "EXPAND_NVSTORAGE" build option to 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.

Note that this is not compatible with previous variable layout
on NOR flash, if this option is enabled, the
PcdLowestSupportedFirmwareVersion is set to 0x400 (1024).
Since the DeveloperBox platform uses the "BUILD_NUMBER" build
option for the firmware version (PcdFirmwareRevision),
firmware builder must ensure followings;

 - if the EXPAND_NVSTORAGE=1, BUILD_NUMBER must be bigger than
   1024,
 - Or, the BUILD_NUMBER must be less than 1024.


Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reported-by: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
---
 Changes in v3:
  - Expand the NvStorage size with build option.
  - Update the PcdLowestSupportedFirmwareVersion.
---
 .../Socionext/DeveloperBox/DeveloperBox.dsc.inc    |    9 ++++++++-
 Silicon/Socionext/SynQuacer/SynQuacer.dec          |    4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
index c034c0a32c..40d0baaa30 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
@@ -280,12 +280,19 @@
   gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress|0x08000000
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x08400000
+!if $(EXPAND_NVSTORAGE) == 1
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00080000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08480000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00080000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08500000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00080000
+!else
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08410000
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08420000
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000
-
+!endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId|"SNI   "
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId|0x52434155514e5953 # SYNQUACR
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x4f524e4c # LNRO
diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec b/Silicon/Socionext/SynQuacer/SynQuacer.dec
index 401ac4e78d..bccb88bcca 100644
--- a/Silicon/Socionext/SynQuacer/SynQuacer.dec
+++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec
@@ -41,7 +41,11 @@
   gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|62500000|UINT32|0x00000005
 
   # for capsule update
+!if $(EXPAND_NVSTORAGE) == 1
+  gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x00000400
+!else
   gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x00000009
+!endif
 
   # for SMBIOS Type17
   gSynQuacerTokenSpaceGuid.PcdStoredSpdDDR4Address|0|UINT32|0x0000000A


  parent reply	other threads:[~2021-12-10  6:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  6:50 [PATCH v3 0/6] Series short description Masami Hiramatsu
2021-12-10  6:50 ` [PATCH v3 1/6] [edk2-platforms] Silicon/SynQuacerI2cDxe: Wait for bus ready Masami Hiramatsu
2021-12-10  6:50 ` [PATCH v3 2/6] [edk2-platforms] Silicon/Socionext/SynQuacer: Fix GenericWatchdog interrupt number Masami Hiramatsu
2021-12-10  6:50 ` [PATCH v3 3/6] [edk2-platforms] Silicon/Socionext/SynQuacer: Fix to read watchdog parameters with correct width Masami Hiramatsu
2021-12-10  6:51 ` [PATCH v3 4/6] [edk2-platforms] Silicon/SynQuacerPlatformFlashAccessLib: Fix the number of erase blocks Masami Hiramatsu
2021-12-10  6:51 ` [PATCH v3 5/6] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table Masami Hiramatsu
2022-05-23  4:58   ` Masahisa Kojima
     [not found]   ` <16F1A3225F3A2D28.18186@groups.io>
2022-07-12  1:42     ` [edk2-devel] " Masahisa Kojima
2022-07-22 16:54       ` Ard Biesheuvel
2021-12-10  6:51 ` Masami Hiramatsu [this message]
     [not found] ` <16BF521F7F10ACBB.29912@groups.io>
2021-12-13  9:15   ` [edk2-devel] [PATCH v3 6/6] [edk2-platforms] Platform/DeveloperBox: Expand NvStorage sizes 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=163911908077.561661.9441962088868389919.stgit@localhost \
    --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