[Linaro-uefi,2/5] Platforms/AMD/Styx: add trusted fw binaries to STYX_EFI.fd build

Message ID 1463157431-22988-2-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel May 13, 2016, 4:37 p.m.
Reorganize the STYX_EFI.fd build definitions for Overdrive and Cello so
that it incorporates the trusted firmware image as well. This way, we
can flash STYX_EFI.fd directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf         | 11 +++++++----
 Platforms/AMD/Styx/Common/Varstore.fdf.inc           |  6 +++---
 Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf | 11 +++++++----
 3 files changed, 17 insertions(+), 11 deletions(-)

Patch

diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
index 22d0dfc1f17b..dd0e6b0e01fe 100644
--- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
+++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
@@ -25,13 +25,13 @@ 
 ################################################################################
 
 [FD.STYX_EFI]
-BaseAddress   = 0x8000E80000|gArmTokenSpaceGuid.PcdFdBaseAddress  # The base address of the Firmware in NOR Flash.
-Size          = 0x00300000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
+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
 
 # This one is tricky, it must be: BlockSize * NumBlocks = Size
 BlockSize     = 0x00001000
-NumBlocks     = 0x300
+NumBlocks     = 0x500
 
 ################################################################################
 #
@@ -49,7 +49,10 @@  NumBlocks     = 0x300
 #
 ################################################################################
 
-0x00000000|0x00260000
+0x00000000|0x00200000
+FILE = OpenPlatformPkg/Platforms/AMD/Styx/CelloBoard/Binary/TrustedFirmware.bin
+
+0x00200000|0x00260000
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT
 
diff --git a/Platforms/AMD/Styx/Common/Varstore.fdf.inc b/Platforms/AMD/Styx/Common/Varstore.fdf.inc
index 2456bb3eacba..1c48e994dafd 100644
--- a/Platforms/AMD/Styx/Common/Varstore.fdf.inc
+++ b/Platforms/AMD/Styx/Common/Varstore.fdf.inc
@@ -16,7 +16,7 @@ 
 #
 ##
 
-0x00260000|0x0000F000
+0x00460000|0x0000F000
 gAmdStyxTokenSpaceGuid.PcdFlashNvStorageOriginalBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
 DATA = {
   ## This is the EFI_FIRMWARE_VOLUME_HEADER
@@ -53,7 +53,7 @@  DATA = {
   0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 }
 
-0x0026F000|0x00001000
+0x0046F000|0x00001000
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
 DATA = {
   # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid         =
@@ -66,5 +66,5 @@  DATA = {
   0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 }
 
-0x00270000|0x00010000
+0x00470000|0x00010000
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
index 8f571307e048..30405551265f 100644
--- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
@@ -25,13 +25,13 @@ 
 ################################################################################
 
 [FD.STYX_EFI]
-BaseAddress   = 0x8000E80000|gArmTokenSpaceGuid.PcdFdBaseAddress  # The base address of the Firmware in NOR Flash.
-Size          = 0x00300000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
+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
 
 # This one is tricky, it must be: BlockSize * NumBlocks = Size
 BlockSize     = 0x00001000
-NumBlocks     = 0x300
+NumBlocks     = 0x500
 
 ################################################################################
 #
@@ -49,7 +49,10 @@  NumBlocks     = 0x300
 #
 ################################################################################
 
-0x00000000|0x00260000
+0x00000000|0x00200000
+FILE = OpenPlatformPkg/Platforms/AMD/Styx/OverdriveBoard/Binary/TrustedFirmware.bin
+
+0x00200000|0x00260000
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT