public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build
@ 2023-04-11 13:46 Rebecca Cran
  2023-04-11 13:46 ` [PATCH edk2-platforms 1/2] Platform/ARM/JunoPkg: Bump the FV size to 2MB Rebecca Cran
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rebecca Cran @ 2023-04-11 13:46 UTC (permalink / raw)
  To: devel, Ard Biesheuvel, Thomas Abraham, Sami Mujawar,
	Leif Lindholm, Michael D Kinney
  Cc: Rebecca Cran

The current FV size of 996KB for the Juno platform is rather restrictive
nowadays: a NOOPT build can be made to fit, but when enabling HTTPS boot
the firmware size becomes far too large even with an optimized DEBUG build.

Since the size value is rather arbitrary, bump it to 2MB: a build with
HTTPS boot and dynamic framework pkg uses around 72%, giving plenty of
headroom for future growth.

Since the NOOPT build makes source-level debugging via Arm Development
Studio so much more useful, enable it in the .dsc file.

Rebecca Cran (2):
  Platform/ARM/JunoPkg: Bump the FV size to 2MB
  Platform/ARM/JunoPkg: Enable the NOOPT build

 Platform/ARM/JunoPkg/ArmJuno.dsc |  2 +-
 Platform/ARM/JunoPkg/ArmJuno.fdf | 15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH edk2-platforms 1/2] Platform/ARM/JunoPkg: Bump the FV size to 2MB
  2023-04-11 13:46 [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build Rebecca Cran
@ 2023-04-11 13:46 ` Rebecca Cran
  2023-04-11 13:46 ` [PATCH edk2-platforms 2/2] Platform/ARM/JunoPkg: Enable the NOOPT build Rebecca Cran
  2023-04-12 11:28 ` [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable " Ard Biesheuvel
  2 siblings, 0 replies; 4+ messages in thread
From: Rebecca Cran @ 2023-04-11 13:46 UTC (permalink / raw)
  To: devel, Ard Biesheuvel, Thomas Abraham, Sami Mujawar,
	Leif Lindholm, Michael D Kinney
  Cc: Rebecca Cran

Increase the FV size from 996KB to 2MB. This allows more features to be
accommodated in the firmware image, such as HTTPS boot. It also allows a
NOOPT build to be added, which is useful for source-level debugging.

Add a comment explaining that the size chosen doesn't reflect the actual
size of the Flash Device but is instead selected to reduce the amount of
time needed to copy the image to the target.

Update the BlockSize and NumBlocks to reflect the 256KB block size of
the main area on the Juno R2.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 Platform/ARM/JunoPkg/ArmJuno.fdf | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf
index 836d3cde8781..0c5a50e968e1 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.fdf
+++ b/Platform/ARM/JunoPkg/ArmJuno.fdf
@@ -18,14 +18,21 @@
 #
 ################################################################################
 
+# The Size value is rather arbitrary, and doesn't reflect the actual size of the FLASH Device,
+# but is instead chosen to accommodate a normal build while reducing the amount of time required
+# to copy the image to the target.
+#
+# Juno R2 has a 64MB NOR flash split into 2 areas: the main area is 65280KB (0x3FC0000) with
+# a 256KB block size.
+
 [FD.BL33_AP_UEFI]
 BaseAddress   = 0xE0000000|gArmTokenSpaceGuid.PcdFdBaseAddress  # The base address of the Firmware in NOR Flash.
-Size          = 0x000F9000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
+Size          = 0x00200000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
 ErasePolarity = 1
 
 # This one is tricky, it must be: BlockSize * NumBlocks = Size
-BlockSize     = 0x00001000
-NumBlocks     = 0xF9
+BlockSize     = 0x00040000
+NumBlocks     = 0x0008
 
 ################################################################################
 #
@@ -43,7 +50,7 @@ [FD.BL33_AP_UEFI]
 #
 ################################################################################
 
-0x00000000|0x000F9000
+0x00000000|0x00200000
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH edk2-platforms 2/2] Platform/ARM/JunoPkg: Enable the NOOPT build
  2023-04-11 13:46 [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build Rebecca Cran
  2023-04-11 13:46 ` [PATCH edk2-platforms 1/2] Platform/ARM/JunoPkg: Bump the FV size to 2MB Rebecca Cran
@ 2023-04-11 13:46 ` Rebecca Cran
  2023-04-12 11:28 ` [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable " Ard Biesheuvel
  2 siblings, 0 replies; 4+ messages in thread
From: Rebecca Cran @ 2023-04-11 13:46 UTC (permalink / raw)
  To: devel, Ard Biesheuvel, Thomas Abraham, Sami Mujawar,
	Leif Lindholm, Michael D Kinney
  Cc: Rebecca Cran

Enable the NOOPT build for the Juno platform. This is useful for
source-level debugging.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 Platform/ARM/JunoPkg/ArmJuno.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc
index 8cb2d54bccaa..1ea0aba2655f 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.dsc
+++ b/Platform/ARM/JunoPkg/ArmJuno.dsc
@@ -21,7 +21,7 @@ [Defines]
   OUTPUT_DIRECTORY               = Build/ArmJuno
 !endif
   SUPPORTED_ARCHITECTURES        = AARCH64|ARM
-  BUILD_TARGETS                  = DEBUG|RELEASE
+  BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
   FLASH_DEFINITION               = Platform/ARM/JunoPkg/ArmJuno.fdf
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build
  2023-04-11 13:46 [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build Rebecca Cran
  2023-04-11 13:46 ` [PATCH edk2-platforms 1/2] Platform/ARM/JunoPkg: Bump the FV size to 2MB Rebecca Cran
  2023-04-11 13:46 ` [PATCH edk2-platforms 2/2] Platform/ARM/JunoPkg: Enable the NOOPT build Rebecca Cran
@ 2023-04-12 11:28 ` Ard Biesheuvel
  2 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2023-04-12 11:28 UTC (permalink / raw)
  To: Rebecca Cran
  Cc: devel, Ard Biesheuvel, Thomas Abraham, Sami Mujawar,
	Leif Lindholm, Michael D Kinney

On Tue, 11 Apr 2023 at 15:46, Rebecca Cran <rebecca@bsdio.com> wrote:
>
> The current FV size of 996KB for the Juno platform is rather restrictive
> nowadays: a NOOPT build can be made to fit, but when enabling HTTPS boot
> the firmware size becomes far too large even with an optimized DEBUG build.
>
> Since the size value is rather arbitrary, bump it to 2MB: a build with
> HTTPS boot and dynamic framework pkg uses around 72%, giving plenty of
> headroom for future growth.
>
> Since the NOOPT build makes source-level debugging via Arm Development
> Studio so much more useful, enable it in the .dsc file.
>
> Rebecca Cran (2):
>   Platform/ARM/JunoPkg: Bump the FV size to 2MB
>   Platform/ARM/JunoPkg: Enable the NOOPT build
>

Thanks

Pushed as df82411375c5..9ca87c716f8a

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-12 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11 13:46 [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build Rebecca Cran
2023-04-11 13:46 ` [PATCH edk2-platforms 1/2] Platform/ARM/JunoPkg: Bump the FV size to 2MB Rebecca Cran
2023-04-11 13:46 ` [PATCH edk2-platforms 2/2] Platform/ARM/JunoPkg: Enable the NOOPT build Rebecca Cran
2023-04-12 11:28 ` [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable " Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox