* [PATCH edk2-platforms 1/4] Platform/Cello, Overdrive: switch to split SCP and secure AP firmware images
2018-02-01 16:10 [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Ard Biesheuvel
@ 2018-02-01 16:10 ` Ard Biesheuvel
2018-02-01 16:10 ` [PATCH edk2-platforms 2/4] Platform/AMD/OverdriveBoard: cover secure firmware in capsule update Ard Biesheuvel
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2018-02-01 16:10 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, marc.zyngier, Ard Biesheuvel
Switch to the split prebuilt firmware image for the SCP and the AP
secure world. This allows Overdrive and Cello to share the latter
image, which we will update shortly.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 7 +++++--
Platform/LeMaker/CelloBoard/CelloBoard.fdf | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index b43e080adc1e..54f209571f0e 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -49,8 +49,11 @@ [FD.STYX_ROM]
#
################################################################################
-0x00000000|0x00200000
-FILE = Platform/AMD/OverdriveBoard/PreUefiFirmware.bin
+0x00000000|0x0004bb00
+FILE = Platform/AMD/OverdriveBoard/ScpFirmware.bin
+
+0x0004bb00|0x00020000
+FILE = Silicon/AMD/Styx/ArmTrustedFirmware.bin
0x00200000|0x00260000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.fdf b/Platform/LeMaker/CelloBoard/CelloBoard.fdf
index c4e6748b6a73..e3a0915f5de5 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.fdf
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.fdf
@@ -49,8 +49,11 @@ [FD.STYX_ROM]
#
################################################################################
-0x00000000|0x00200000
-FILE = Platform/LeMaker/CelloBoard/PreUefiFirmware.bin
+0x00000000|0x0004b300
+FILE = Platform/LeMaker/CelloBoard/ScpFirmware.bin
+
+0x0004b300|0x00020000
+FILE = Silicon/AMD/Styx/ArmTrustedFirmware.bin
0x00200000|0x00260000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 2/4] Platform/AMD/OverdriveBoard: cover secure firmware in capsule update
2018-02-01 16:10 [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Ard Biesheuvel
2018-02-01 16:10 ` [PATCH edk2-platforms 1/4] Platform/Cello, Overdrive: switch to split SCP and secure AP firmware images Ard Biesheuvel
@ 2018-02-01 16:10 ` Ard Biesheuvel
2018-02-01 16:10 ` [PATCH edk2-platforms 3/4] Platform/AMD/OverdriveBoard: enable ConsolePrefDxe Ard Biesheuvel
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2018-02-01 16:10 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, marc.zyngier, Ard Biesheuvel
Add the first part of the flash device (FD) to the capsule image so we
can update the secure and SCP firmware in one go along with the UEFI
firmware volume (FV).
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 3 ++-
Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini | 4 ++--
Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c | 12 ++++--------
Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf | 3 +--
4 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index 54f209571f0e..8ceee9552765 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -343,7 +343,7 @@ [FV.SystemFirmwareUpdateCargo]
READ_LOCK_STATUS = TRUE
FILE RAW = 642e4fcf-2df7-4415-8b70-a03909c57b55 { # PcdEdkiiSystemFirmwareFileGuid
- FV = STYX_EFI
+ FD = STYX_ROM
}
FILE RAW = ce57b167-b0e4-41e8-a897-5f4feb781d40 { # gEdkiiSystemFmpCapsuleDriverFvFileGuid
@@ -353,6 +353,7 @@ [FV.SystemFirmwareUpdateCargo]
FILE RAW = 812136D3-4D3A-433A-9418-29BB9BF78F6E { # gEdkiiSystemFmpCapsuleConfigFileGuid
Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
}
+ INF RuleOverride = FMP_IMAGE_DESC Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
[FmpPayload.FmpPayloadSystemFirmwarePkcs7]
IMAGE_HEADER_INIT_VERSION = 0x02
diff --git a/Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini b/Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
index c89e95f60fba..49b6480b4ed0 100644
--- a/Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
+++ b/Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
@@ -19,7 +19,7 @@ Update0 = StyxFvMain
[StyxFvMain]
FirmwareType = 0 # SystemFirmware
AddressType = 0 # 0 - relative address, 1 - absolute address.
-BaseAddress = 0x00200000 # Base address offset on flash
-Length = 0x00260000 # Length
+BaseAddress = 0x00000000 # Base address offset on flash
+Length = 0x00460000 # Length
ImageOffset = 0x00000000 # Image offset of this SystemFirmware image
FileGuid = 642e4fcf-2df7-4415-8b70-a03909c57b55 # PcdEdkiiSystemFirmwareFileGuid
diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
index a23500dd35dc..a94373bb4b53 100644
--- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
+++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
@@ -22,9 +22,7 @@
#include <Protocol/AmdIscpDxeProtocol.h>
-STATIC CONST UINT64 mFlashOffset = FixedPcdGet64 (PcdFvBaseAddress) -
- FixedPcdGet64 (PcdFdBaseAddress);
-STATIC CONST UINT64 mFlashMaxSize = FixedPcdGet64 (PcdFvSize);
+STATIC CONST UINT64 mFlashMaxSize = FixedPcdGet64 (PcdFdSize);
STATIC CONST UINTN mBlockSize = SIZE_64KB;
@@ -77,12 +75,10 @@ PerformFlashWrite (
return EFI_INVALID_PARAMETER;
}
- if (FlashAddress < mFlashOffset ||
- (FlashAddress + Length) > (mFlashOffset + mFlashMaxSize)) {
+ if ((FlashAddress + Length) > mFlashMaxSize) {
DEBUG ((DEBUG_ERROR,
- "%a: updated region [0x%lx, 0x%lx) outside of FV region [0x%lx, 0x%lx)\n",
- __FUNCTION__, FlashAddress, FlashAddress + Length, mFlashOffset,
- mFlashOffset + mFlashMaxSize));
+ "%a: updated region [0x%lx, 0x%lx) outside of FV region [0x0, 0x%lx)\n",
+ __FUNCTION__, FlashAddress, FlashAddress + Length, mFlashMaxSize));
return EFI_INVALID_PARAMETER;
}
diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf
index 411173f1f3c5..b54a2e90ff02 100644
--- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf
+++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf
@@ -40,8 +40,7 @@ [Protocols]
[FixedPcd]
gArmTokenSpaceGuid.PcdFdBaseAddress
- gArmTokenSpaceGuid.PcdFvBaseAddress
- gArmTokenSpaceGuid.PcdFvSize
+ gArmTokenSpaceGuid.PcdFdSize
[Depex]
gAmdIscpDxeProtocolGuid
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 3/4] Platform/AMD/OverdriveBoard: enable ConsolePrefDxe
2018-02-01 16:10 [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Ard Biesheuvel
2018-02-01 16:10 ` [PATCH edk2-platforms 1/4] Platform/Cello, Overdrive: switch to split SCP and secure AP firmware images Ard Biesheuvel
2018-02-01 16:10 ` [PATCH edk2-platforms 2/4] Platform/AMD/OverdriveBoard: cover secure firmware in capsule update Ard Biesheuvel
@ 2018-02-01 16:10 ` Ard Biesheuvel
2018-02-01 16:10 ` [PATCH edk2-platforms 4/4] Platform/Cello, Overdrive: set fw vendor PCD from FIRMWARE_VENDOR Ard Biesheuvel
2018-02-01 16:40 ` [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Leif Lindholm
4 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2018-02-01 16:10 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, marc.zyngier, Ard Biesheuvel
Add the ConsolePrefDxe driver so we can get the console on the framebuffer
rather than on the serial port.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 6 ++++++
Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 1 +
2 files changed, 7 insertions(+)
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 51d823892b17..a99a9a1062d4 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -298,6 +298,8 @@ [PcdsFeatureFlag.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|FALSE
+ gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
+
[PcdsFixedAtBuild.common]
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000
@@ -585,6 +587,10 @@ [Components.common]
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+ EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf {
+ <LibraryClasses>
+ FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+ }
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index 8ceee9552765..541d65ef753e 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -121,6 +121,7 @@ [FV.FvMain]
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+ INF EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 4/4] Platform/Cello, Overdrive: set fw vendor PCD from FIRMWARE_VENDOR
2018-02-01 16:10 [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Ard Biesheuvel
` (2 preceding siblings ...)
2018-02-01 16:10 ` [PATCH edk2-platforms 3/4] Platform/AMD/OverdriveBoard: enable ConsolePrefDxe Ard Biesheuvel
@ 2018-02-01 16:10 ` Ard Biesheuvel
2018-02-01 16:40 ` [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Leif Lindholm
4 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2018-02-01 16:10 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, marc.zyngier, Ard Biesheuvel
'AMD Seattle' is not a firmware vendor, nor is 'LeMaker Cello' So
let's do what other platforms do, and default to 'EDK II' unless
it is overridden at build time by setting FIRMWARE_VENDOR.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 +++-
Platform/LeMaker/CelloBoard/CelloBoard.dsc | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index a99a9a1062d4..21edcc8798f4 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -365,7 +365,9 @@ [PcdsFixedAtBuild.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
- gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"AMD Seattle"
+!ifdef $(FIRMWARE_VENDOR)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"$(FIRMWARE_VENDOR)"
+!endif
# Number of configured cores
gArmPlatformTokenSpaceGuid.PcdCoreCount|$(NUM_CORES)
diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
index fb9155ce3a0d..cf3df8651415 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
@@ -351,7 +351,9 @@ [PcdsFixedAtBuild.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
- gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"LeMaker Cello"
+!ifdef $(FIRMWARE_VENDOR)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"$(FIRMWARE_VENDOR)"
+!endif
# Number of configured cores
gArmPlatformTokenSpaceGuid.PcdCoreCount|$(NUM_CORES)
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates
2018-02-01 16:10 [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Ard Biesheuvel
` (3 preceding siblings ...)
2018-02-01 16:10 ` [PATCH edk2-platforms 4/4] Platform/Cello, Overdrive: set fw vendor PCD from FIRMWARE_VENDOR Ard Biesheuvel
@ 2018-02-01 16:40 ` Leif Lindholm
2018-02-06 9:57 ` Ard Biesheuvel
4 siblings, 1 reply; 7+ messages in thread
From: Leif Lindholm @ 2018-02-01 16:40 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel, alan, marc.zyngier
On Thu, Feb 01, 2018 at 04:10:04PM +0000, Ard Biesheuvel wrote:
> Patch #1 is the counterpart of the edk2-non-osi series I sent out just now,
> so builds will use the separate SCP and secure AP firmware images (the latter
> of which is now shared between Cello and Overdrive)
>
> Patch #2 modifies the Overdrive capsule definition so it covers these binary
> images as well.
>
> Patches #3 and #4 are otherwise unrelated minor changes.
>
> Ard Biesheuvel (4):
> Platform/Cello,Overdrive: switch to split SCP and secure AP firmware
> images
> Platform/AMD/OverdriveBoard: cover secure firmware in capsule update
> Platform/AMD/OverdriveBoard: enable ConsolePrefDxe
> Platform/Cello,Overdrive: set fw vendor PCD from FIRMWARE_VENDOR
For the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 10 +++++++++-
> Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 11 ++++++++---
> Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini | 4 ++--
> Platform/LeMaker/CelloBoard/CelloBoard.dsc | 4 +++-
> Platform/LeMaker/CelloBoard/CelloBoard.fdf | 7 +++++--
> Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c | 12 ++++--------
> Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf | 3 +--
> 7 files changed, 32 insertions(+), 19 deletions(-)
>
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates
2018-02-01 16:40 ` [PATCH edk2-platforms 0/4] Platform/Cello, Overdrive: various updates Leif Lindholm
@ 2018-02-06 9:57 ` Ard Biesheuvel
0 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2018-02-06 9:57 UTC (permalink / raw)
To: Leif Lindholm; +Cc: edk2-devel@lists.01.org, Alan Ott, Marc Zyngier
On 1 February 2018 at 16:40, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Thu, Feb 01, 2018 at 04:10:04PM +0000, Ard Biesheuvel wrote:
>> Patch #1 is the counterpart of the edk2-non-osi series I sent out just now,
>> so builds will use the separate SCP and secure AP firmware images (the latter
>> of which is now shared between Cello and Overdrive)
>>
>> Patch #2 modifies the Overdrive capsule definition so it covers these binary
>> images as well.
>>
>> Patches #3 and #4 are otherwise unrelated minor changes.
>>
>> Ard Biesheuvel (4):
>> Platform/Cello,Overdrive: switch to split SCP and secure AP firmware
>> images
>> Platform/AMD/OverdriveBoard: cover secure firmware in capsule update
>> Platform/AMD/OverdriveBoard: enable ConsolePrefDxe
>> Platform/Cello,Overdrive: set fw vendor PCD from FIRMWARE_VENDOR
>
> For the series:
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>
Thanks. Pushed as c733b7ef291f..4297639904aa
^ permalink raw reply [flat|nested] 7+ messages in thread