@@ -19,7 +19,6 @@ [Defines]
DEFINE DO_XGBE = 1
DEFINE NUM_CORES = 8
-DEFINE DO_PSCI = 1
DEFINE DO_ISCP = 1
DEFINE DO_KCS = 1
DEFINE DO_FLASHER = FALSE
@@ -457,12 +456,6 @@ [PcdsFixedAtBuild.common]
#
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1
-!if $(DO_PSCI)
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE
-!else
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|FALSE
-!endif
-
!if $(DO_ISCP)
gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE
!else
@@ -431,7 +431,6 @@ [PcdsFixedAtBuild.common]
#
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE
gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE
# SMBIOS 3.0 only
@@ -18,7 +18,6 @@
[Defines]
DEFINE NUM_CORES = 4
-DEFINE DO_PSCI = 1
DEFINE DO_ISCP = 1
DEFINE DO_KCS = 1
DEFINE DO_FLASHER = FALSE
@@ -428,12 +427,6 @@ [PcdsFixedAtBuild.common]
## ACPI (no tables < 4GB)
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
-!if $(DO_PSCI)
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE
-!else
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|FALSE
-!endif
-
!if $(DO_ISCP)
gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE
!else
@@ -82,8 +82,6 @@ [FixedPcd]
gAmdStyxTokenSpaceGuid.PcdSbsaWakeUpGSIV
gAmdStyxTokenSpaceGuid.PcdSbsaWatchDogGSIV
gAmdStyxTokenSpaceGuid.PcdSocCoresPerCluster
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion
gAmdStyxTokenSpaceGuid.PcdSata1PortCount
@@ -73,7 +73,7 @@ STATIC EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt = {
FADT_FLAGS, // UINT32 Flags
NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg
0, // UINT8 ResetValue
- 0, // UINT16 ArmBootArch
+ EFI_ACPI_5_1_ARM_PSCI_COMPLIANT, // UINT16 ArmBootArch
1, // UINT8 MinorVersion
0, // UINT64 XFirmwareCtrl
0, // UINT64 XDsdt
@@ -96,9 +96,6 @@ FadtTable (
VOID
)
{
- if (FixedPcdGetBool (PcdPsciOsSupport) && FixedPcdGetBool (PcdTrustedFWSupport)) {
- AcpiFadt.ArmBootArch = EFI_ACPI_5_1_ARM_PSCI_COMPLIANT;
- }
return (EFI_ACPI_DESCRIPTION_HEADER *) &AcpiFadt;
}
@@ -89,17 +89,12 @@ [PcdsFixedAtBuild]
gAmdStyxTokenSpaceGuid.PcdSbsaWatchDogGSIV|369|UINT32|0x00050008
# Trusted-Firmware
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport|TRUE|BOOLEAN|0x00060000
gAmdStyxTokenSpaceGuid.PcdTrustedFWMemoryBase|0x8000000000|UINT64|0x00060001
gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize|0xE80000|UINT64|0x0006002
# ISCP
gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE|BOOLEAN|0x00070000
- # PSCI
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE|BOOLEAN|0x00080000
- gAmdStyxTokenSpaceGuid.PcdPsciCpuOnContext|0|UINT64|0x00080001
-
# Cores Per cluster
gAmdStyxTokenSpaceGuid.PcdSocCoresPerCluster|2|UINT32|0x00090000
@@ -33,7 +33,6 @@
STATIC AMD_MP_CORE_INFO_PROTOCOL mAmdMpCoreInfoProtocol = { 0 };
-STATIC AMD_MP_BOOT_PROTOCOL mAmdMpBootProtocol = { 0 };
STATIC AMD_MP_BOOT_INFO mAmdMpBootInfo = { 0 };
@@ -56,13 +55,6 @@ AmdStyxGetMpParkingBase (
OUT UINTN *MpParkingSize
);
-STATIC
-VOID
-AmdStyxParkSecondaryCore (
- ARM_CORE_INFO *ArmCoreInfo,
- EFI_PHYSICAL_ADDRESS SecondaryEntry
- );
-
#pragma pack(push, 1)
typedef struct _PMU_INFO {
@@ -94,8 +86,6 @@ PlatInitDxeEntryPoint (
)
{
EFI_STATUS Status;
- EFI_PHYSICAL_ADDRESS MpParkingBase;
- UINTN MpParkingSize;
ARM_CORE_INFO *ArmCoreInfoTable;
UINTN ArmCoreCount;
EFI_HANDLE Handle = NULL;
@@ -120,39 +110,6 @@ PlatInitDxeEntryPoint (
);
ASSERT_EFI_ERROR (Status);
- // Install MP-Boot Protocol
- if (!FixedPcdGetBool (PcdPsciOsSupport) &&
- FixedPcdGetBool (PcdTrustedFWSupport)) {
- // Allocate Parking area (4KB-aligned, 4KB per core) as Reserved memory
- MpParkingBase = 0;
- MpParkingSize = ArmCoreCount * SIZE_4KB;
- Status = gBS->AllocatePages (AllocateAnyPages, EfiReservedMemoryType,
- EFI_SIZE_TO_PAGES (MpParkingSize),
- &MpParkingBase);
- if (EFI_ERROR (Status) || MpParkingBase == 0) {
- DEBUG ((EFI_D_ERROR, "Warning: Failed to allocate MpParkingBase."));
- } else {
- mAmdMpBootInfo.MpParkingBase = MpParkingBase;
- mAmdMpBootInfo.MpParkingSize = MpParkingSize;
- mAmdMpBootInfo.ArmCoreInfoTable = ArmCoreInfoTable;
- mAmdMpBootInfo.ArmCoreCount = ArmCoreCount;
-
- mAmdMpBootProtocol.ParkSecondaryCore = AmdStyxParkSecondaryCore;
- mAmdMpBootProtocol.MpBootInfo = &mAmdMpBootInfo;
-
- Status = gBS->InstallProtocolInterface (
- &Handle,
- &gAmdMpBootProtocolGuid,
- EFI_NATIVE_INTERFACE,
- (VOID *)&mAmdMpBootProtocol
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "Warning: Failed to install MP-Boot Protocol."));
- gBS->FreePages (MpParkingBase, EFI_SIZE_TO_PAGES (MpParkingSize));
- }
- }
- }
-
return Status;
}
@@ -208,30 +165,3 @@ AmdStyxGetMpParkingBase (
*MpParkingSize = mAmdMpBootInfo.MpParkingBase;
return mAmdMpBootInfo.MpParkingBase;
}
-
-
-STATIC
-VOID
-AmdStyxParkSecondaryCore (
- ARM_CORE_INFO *ArmCoreInfo,
- EFI_PHYSICAL_ADDRESS SecondaryEntry
- )
-{
- ARM_SMC_ARGS SmcRegs = {0};
- UINTN MpId;
-
- MpId = GET_MPID (ArmCoreInfo->ClusterId, ArmCoreInfo->CoreId);
-
- SmcRegs.Arg0 = ARM_SMC_ID_PSCI_CPU_ON_AARCH64;
- SmcRegs.Arg1 = MpId;
- SmcRegs.Arg2 = SecondaryEntry;
- SmcRegs.Arg3 = FixedPcdGet64 (PcdPsciCpuOnContext);
- ArmCallSmc (&SmcRegs);
-
- if (SmcRegs.Arg0 == ARM_SMC_PSCI_RET_SUCCESS ||
- SmcRegs.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
- DEBUG ((EFI_D_ERROR, "CPU[MpId] = 0x%X at RUN state.\n", MpId));
- } else {
- DEBUG ((EFI_D_ERROR, "Warning: Could not transition CPU[MpId] = 0x%X to RUN state.\n", MpId));
- }
-}
@@ -51,12 +51,6 @@ [Guids]
[Protocols]
gAmdMpCoreInfoProtocolGuid ## PRODUCER
- gAmdMpBootProtocolGuid ## PRODUCER
-
-[FixedPcd]
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport
- gAmdStyxTokenSpaceGuid.PcdPsciCpuOnContext
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
[Depex]
TRUE
@@ -68,7 +68,6 @@ [Pcd]
[FixedPcd]
gAmdStyxTokenSpaceGuid.PcdIscpSupport
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
gAmdStyxTokenSpaceGuid.PcdCpuIdRegister
[Depex]
@@ -127,36 +127,34 @@ MemoryPeim (
Base = PcdGet64 (PcdSystemMemoryBase);
Size = PcdGet64 (PcdSystemMemorySize);
- if (FixedPcdGetBool (PcdTrustedFWSupport)) {
-
- //
- // For now, we assume that the trusted firmware region is at the base of
- // system memory, since that is much easier to deal with.
- //
- ASSERT (Base == PcdGet64 (PcdTrustedFWMemoryBase));
-
- Base += PcdGet64 (PcdTrustedFWMemorySize);
- Size -= PcdGet64 (PcdTrustedFWMemorySize);
-
- // Reserved Trusted Firmware region
- BuildResourceDescriptorHob (
- EFI_RESOURCE_SYSTEM_MEMORY,
- ( EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_TESTED ),
- PcdGet64 (PcdTrustedFWMemoryBase),
- PcdGet64 (PcdTrustedFWMemorySize)
- );
-
- BuildMemoryAllocationHob (
- PcdGet64 (PcdTrustedFWMemoryBase),
- PcdGet64 (PcdTrustedFWMemorySize),
- EfiReservedMemoryType
- );
- }
+
+ //
+ // For now, we assume that the trusted firmware region is at the base of
+ // system memory, since that is much easier to deal with.
+ //
+ ASSERT (Base == PcdGet64 (PcdTrustedFWMemoryBase));
+
+ Base += PcdGet64 (PcdTrustedFWMemorySize);
+ Size -= PcdGet64 (PcdTrustedFWMemorySize);
+
+ // Reserved Trusted Firmware region
+ BuildResourceDescriptorHob (
+ EFI_RESOURCE_SYSTEM_MEMORY,
+ ( EFI_RESOURCE_ATTRIBUTE_PRESENT |
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_TESTED ),
+ PcdGet64 (PcdTrustedFWMemoryBase),
+ PcdGet64 (PcdTrustedFWMemorySize)
+ );
+
+ BuildMemoryAllocationHob (
+ PcdGet64 (PcdTrustedFWMemoryBase),
+ PcdGet64 (PcdTrustedFWMemorySize),
+ EfiReservedMemoryType
+ );
// Declare system memory
BuildResourceDescriptorHob (
@@ -69,7 +69,6 @@ [FixedPcd]
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
gAmdStyxTokenSpaceGuid.PcdTrustedFWMemoryBase
gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize
@@ -42,6 +42,3 @@ [LibraryClasses]
PcdLib
BaseLib
ArmSmcLib
-
-[FixedPcd]
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
@@ -51,8 +51,6 @@ [Pcd]
[FixedPcd]
gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset
gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment
- gAmdStyxTokenSpaceGuid.PcdPsciOsSupport
- gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
gAmdStyxTokenSpaceGuid.PcdSata1PortCount
[Guids]
The Styx platform theoretically supports running in an environment where no ARM Trusted Firmware is running in EL3 and PSCI is not implemented. This is not a configuration that we aim to support, and so let's remove the code that implements this, especially because it is essentially dead code and unmaintained. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 7 -- Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 - Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 7 -- Silicon/AMD/Styx/AcpiTables/AcpiTables.inf | 2 - Silicon/AMD/Styx/AcpiTables/Fadt.c | 5 +- Silicon/AMD/Styx/AmdStyx.dec | 5 -- Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c | 70 -------------------- Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf | 6 -- Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf | 1 - Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c | 58 ++++++++-------- Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf | 1 - Silicon/AMD/Styx/Library/ResetSystemLib/ResetSystemLib.inf | 3 - Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 2 - 13 files changed, 29 insertions(+), 139 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel