Since the full image we build now contains the Trusted Firmware as well, update the image names to better reflect that:
STYX_EFI.fd => STYX_ROM.fd FVMAIN_COMPACT.Fv => STYX_EFI.Fv
Since the Trusted Firmware image is fairly static, and the varstore region that follows the EFI image in the ROM image typically does not always need to be updated when the EFI code is, it is possible to only flash STYX_EFI.Fv at an offset of 2 MB into the SPI flash.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheuvel@linaro.org ---
There is one slight snag with reusing the varstore, and that is that the UiApp or Shell entries will be recreated if the respective binaries appear at different offsets in memory, and the stale ones are not removed.
However, this not only happens if you reuse the varstore with a new build, but even if you run, e.g., the same QEMU build but change the memory size. IOW, this is a generic issue that should be fixed on the BDS side (and not only for the shell), so I guess that should not block this patch.
Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf index 30405551265f..dc1b6074778f 100644 --- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf +++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf @@ -24,7 +24,7 @@ # ################################################################################
-[FD.STYX_EFI] +[FD.STYX_ROM] BaseAddress = 0x8000C80000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in NOR Flash. Size = 0x00500000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device ErasePolarity = 1 @@ -54,7 +54,7 @@ FILE = OpenPlatformPkg/Platforms/AMD/Styx/OverdriveBoard/Binary/TrustedFirmware.
0x00200000|0x00260000 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize -FV = FVMAIN_COMPACT +FV = STYX_EFI
!include OpenPlatformPkg/Platforms/AMD/Styx/Common/Varstore.fdf.inc
@@ -241,7 +241,7 @@ READ_LOCK_STATUS = TRUE # INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxRngDxe/StyxRngDxe.inf
-[FV.FVMAIN_COMPACT] +[FV.STYX_EFI] FvAlignment = 16 ERASE_POLARITY = 1 MEMORY_MAPPED = TRUE