* [PATCH edk2-platforms 00/11] final set of Styx cleanups
@ 2018-12-11 18:35 Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 01/11] Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes Ard Biesheuvel
` (11 more replies)
0 siblings, 12 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
I promise :-)
This gets rid of the last build config options passed via the command
line into the preprocessor, and replaces them with PCD references.
Ard Biesheuvel (11):
Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes
Platform/SoftIron/Overdrive1000Board: remove dead XGBE references
Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with
PCD
Silicon/AMD/Styx/PlatInitPei: replace XGBE CPP conditional with PCD
Silicon/AMD/Styx/StyxDtbLoaderLib: replace XGBE CPP conditional with
PCD
Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines
Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support
Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate
SSDT
Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with
PCD
Platform/Styx: get rid of DO_KCS preprocessor macro
Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon
Silicon/AMD/Styx/AmdStyx.dec | 1 +
.../AMD/OverdriveBoard/OverdriveBoard.dsc | 15 +-----
Platform/LeMaker/CelloBoard/CelloBoard.dsc | 8 ---
.../Overdrive1000Board/Overdrive1000Board.dsc | 10 +---
.../AMD/OverdriveBoard/OverdriveBoard.fdf | 2 -
.../Overdrive1000Board/Overdrive1000Board.fdf | 8 ---
.../AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 ++
.../Styx/Drivers/PlatInitPei/PlatInitPei.inf | 1 +
.../StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 2 +
.../Drivers/AcpiPlatformDxe/AcpiPlatform.c | 19 +++----
.../Styx/Drivers/PlatInitPei/PlatInitPei.c | 41 ++++++++-------
.../StyxDtbLoaderLib/StyxDtbLoaderLib.c | 50 ++++++++-----------
.../AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl | 25 ----------
.../Styx/Drivers/AcpiPlatformDxe/Iort.aslc | 8 ---
.../Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl | 47 +++++++++++++++++
15 files changed, 108 insertions(+), 132 deletions(-)
create mode 100644 Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl
--
2.19.2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 01/11] Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 02/11] Platform/SoftIron/Overdrive1000Board: remove dead XGBE references Ard Biesheuvel
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
The I/O Remapping Table (IORT) does not require that each device of
which it describes the I/O remapping actually exists in the namespace.
So let's simplify the code by always including the XGBE nodes, and
just let them be unused if the platform does not include XGBE controllers.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Iort.aslc | 8 --------
1 file changed, 8 deletions(-)
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Iort.aslc b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Iort.aslc
index 7723a4ddade3..073b994bc505 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Iort.aslc
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Iort.aslc
@@ -60,12 +60,10 @@ typedef struct {
STYX_SMMU_NODE PciSmmuNode;
STYX_RC_NODE PciRcNode;
-#if DO_XGBE
STYX_SMMU_NODE Eth0SmmuNode;
STYX_NC_NODE Eth0NamedNode;
STYX_SMMU_NODE Eth1SmmuNode;
STYX_NC_NODE Eth1NamedNode;
-#endif
STYX_SMMU_NODE Sata0SmmuNode;
STYX_NC_NODE Sata0NamedNode;
@@ -147,11 +145,7 @@ STATIC STYX_IO_REMAPPING_STRUCTURE AcpiIort = {
AMD_ACPI_HEADER(EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,
STYX_IO_REMAPPING_STRUCTURE,
EFI_ACPI_IO_REMAPPING_TABLE_REVISION),
-#if DO_XGBE
10, // NumNodes
-#else
- 6, // NumNodes
-#endif
sizeof(EFI_ACPI_6_0_IO_REMAPPING_TABLE), // NodeOffset
0 // Reserved
}, {
@@ -180,7 +174,6 @@ STATIC STYX_IO_REMAPPING_STRUCTURE AcpiIort = {
}, {
__STYX_ID_MAPPING(0x0, 0xffff, 0x0, PciSmmuNode, 0x0),
}
-#if DO_XGBE
}, {
// Eth0SmmuNode
__STYX_SMMU_NODE(STYX_ETH0_SMMU_BASE,
@@ -265,7 +258,6 @@ STATIC STYX_IO_REMAPPING_STRUCTURE AcpiIort = {
__STYX_ID_MAPPING_SINGLE(0x1E, Eth1SmmuNode),
__STYX_ID_MAPPING_SINGLE(0x1F, Eth1SmmuNode),
}
-#endif
}, {
// Sata0SmmuNode
__STYX_SMMU_NODE(STYX_SATA0_SMMU_BASE,
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 02/11] Platform/SoftIron/Overdrive1000Board: remove dead XGBE references
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 01/11] Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 03/11] Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with PCD Ard Biesheuvel
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
Remove the references to the XGBE SNP drivers, which are inside a
!ifdef() that never gets enabled anyway.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf | 8 --------
1 file changed, 8 deletions(-)
diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf
index 9ba98dd83767..0cf558e189ed 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf
@@ -175,14 +175,6 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(DO_XGBE)
- #
- # SNP support
- #
- INF Silicon/AMD/Styx/AmdModulePkg/SnpDxe/SnpDxePort0.inf
- INF Silicon/AMD/Styx/AmdModulePkg/SnpDxe/SnpDxePort1.inf
-!endif
-
#
# Marvell Ethernet Driver (Overdrive 1000)
#
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 03/11] Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with PCD
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 01/11] Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 02/11] Platform/SoftIron/Overdrive1000Board: remove dead XGBE references Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 04/11] Silicon/AMD/Styx/PlatInitPei: " Ard Biesheuvel
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
We already have a boolean PCD that tells us whether XGBE support should
be enabled, so use it instead of C preprocessor conditionals.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf | 1 +
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c | 13 ++++---------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
index be885d6aea90..d27431343f4b 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -68,6 +68,7 @@
gAmdStyxTokenSpaceGuid.PcdSocCpuId
[FixedPcd]
+ gAmdModulePkgTokenSpaceGuid.PcdXgbeEnable
gAmdStyxTokenSpaceGuid.PcdCntControlBase
gAmdStyxTokenSpaceGuid.PcdCntReadBase
gAmdStyxTokenSpaceGuid.PcdCntCTLBase
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
index 9c17c38a04bf..9c8c8b09d4a4 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
@@ -43,7 +43,6 @@
STATIC EFI_ACPI_TABLE_PROTOCOL *mAcpiTableProtocol;
STATIC AMD_MP_CORE_INFO_PROTOCOL *mAmdMpCoreInfoProtocol;
-#if DO_XGBE
STATIC CONST UINT8 mDefaultMacPackageA[] = {
0x12, 0xe, 0x6, 0xa, 0x2, 0xa, 0xa1, 0xa, 0xa2, 0xa, 0xa3, 0xa, 0xa4, 0xa, 0xa5
@@ -91,8 +90,6 @@ PatchAmlPackage (
}
}
-#endif
-
STATIC
VOID
EnableAvailableCores (
@@ -135,10 +132,7 @@ InstallSystemDescriptionTables (
EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort;
EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER *Madt;
EFI_ACPI_5_1_GIC_STRUCTURE *GicC;
-
-#if DO_XGBE
UINT8 MacPackage[sizeof(mDefaultMacPackageA)];
-#endif
CpuId = PcdGet32 (PcdSocCpuId);
@@ -158,7 +152,10 @@ InstallSystemDescriptionTables (
break;
case SIGNATURE_64 ('S', 't', 'y', 'x', 'X', 'g', 'b', 'e'):
-#if DO_XGBE
+ if (!FixedPcdGetBool (PcdXgbeEnable)) {
+ continue;
+ }
+
//
// Patch the SSDT binary with the correct MAC addresses
//
@@ -173,8 +170,6 @@ InstallSystemDescriptionTables (
(UINT8 *)Table, TableSize);
break;
-#endif
- continue;
default:
switch (Table->Signature) {
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 04/11] Silicon/AMD/Styx/PlatInitPei: replace XGBE CPP conditional with PCD
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (2 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 03/11] Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with PCD Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 05/11] Silicon/AMD/Styx/StyxDtbLoaderLib: " Ard Biesheuvel
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
We already have a boolean PCD that tells us whether XGBE support should
be enabled, so use it instead of C preprocessor conditionals.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf | 1 +
Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c | 41 ++++++++++----------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf
index b8829a4a9c3e..99cf01347ab7 100644
--- a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf
+++ b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf
@@ -58,6 +58,7 @@
gAmdStyxMpCoreInfoGuid ## PRODUCER
[Pcd]
+ gAmdModulePkgTokenSpaceGuid.PcdXgbeEnable
gArmTokenSpaceGuid.PcdSystemMemorySize
gArmPlatformTokenSpaceGuid.PcdCoreCount
gAmdStyxTokenSpaceGuid.PcdSocCoreCount
diff --git a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c
index 3cd650eee36b..932be55b600a 100644
--- a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c
+++ b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c
@@ -121,10 +121,8 @@ PlatInitPeiEntryPoint (
AMD_MEMORY_RANGE_DESCRIPTOR IscpMemDescriptor = {0};
ISCP_FUSE_INFO IscpFuseInfo = {0};
ISCP_CPU_RESET_INFO CpuResetInfo = {0};
-#if DO_XGBE == 1
ISCP_MAC_INFO MacAddrInfo = {0};
UINTN MacSize;
-#endif
UINTN CpuCoreCount, CpuMap, CpuMapSize;
UINTN Index, CoreNum;
UINT32 *CpuIdReg = (UINT32 *)FixedPcdGet32 (PcdCpuIdRegister);
@@ -217,27 +215,28 @@ PlatInitPeiEntryPoint (
DEBUG ((EFI_D_ERROR, "SystemMemorySize = %ld\n", PcdGet64 (PcdSystemMemorySize)));
-#if DO_XGBE == 1
- // Get MAC Address from ISCP
- Status = PeiIscpPpi->ExecuteGetMacAddressTransaction (
- PeiServices, &MacAddrInfo );
- ASSERT_EFI_ERROR (Status);
- MacSize = sizeof(MacAddrInfo.MacAddress0);
- Status = PcdSetPtrS (PcdEthMacA, &MacSize, MacAddrInfo.MacAddress0);
- ASSERT_EFI_ERROR (Status);
- Status = PcdSetPtrS (PcdEthMacB, &MacSize, MacAddrInfo.MacAddress1);
- ASSERT_EFI_ERROR (Status);
+ if (FixedPcdGetBool (PcdXgbeEnable)) {
+ // Get MAC Address from ISCP
+ Status = PeiIscpPpi->ExecuteGetMacAddressTransaction (
+ PeiServices, &MacAddrInfo );
+ ASSERT_EFI_ERROR (Status);
- DEBUG ((EFI_D_ERROR, "EthMacA = %02x:%02x:%02x:%02x:%02x:%02x\n",
- ((UINT8 *)PcdGetPtr (PcdEthMacA))[0], ((UINT8 *)PcdGetPtr (PcdEthMacA))[1],
- ((UINT8 *)PcdGetPtr (PcdEthMacA))[2], ((UINT8 *)PcdGetPtr (PcdEthMacA))[3],
- ((UINT8 *)PcdGetPtr (PcdEthMacA))[4], ((UINT8 *)PcdGetPtr (PcdEthMacA))[5]));
- DEBUG ((EFI_D_ERROR, "EthMacB = %02x:%02x:%02x:%02x:%02x:%02x\n",
- ((UINT8 *)PcdGetPtr (PcdEthMacB))[0], ((UINT8 *)PcdGetPtr (PcdEthMacB))[1],
- ((UINT8 *)PcdGetPtr (PcdEthMacB))[2], ((UINT8 *)PcdGetPtr (PcdEthMacB))[3],
- ((UINT8 *)PcdGetPtr (PcdEthMacB))[4], ((UINT8 *)PcdGetPtr (PcdEthMacB))[5]));
-#endif
+ MacSize = sizeof(MacAddrInfo.MacAddress0);
+ Status = PcdSetPtrS (PcdEthMacA, &MacSize, MacAddrInfo.MacAddress0);
+ ASSERT_EFI_ERROR (Status);
+ Status = PcdSetPtrS (PcdEthMacB, &MacSize, MacAddrInfo.MacAddress1);
+ ASSERT_EFI_ERROR (Status);
+
+ DEBUG ((EFI_D_ERROR, "EthMacA = %02x:%02x:%02x:%02x:%02x:%02x\n",
+ ((UINT8 *)PcdGetPtr (PcdEthMacA))[0], ((UINT8 *)PcdGetPtr (PcdEthMacA))[1],
+ ((UINT8 *)PcdGetPtr (PcdEthMacA))[2], ((UINT8 *)PcdGetPtr (PcdEthMacA))[3],
+ ((UINT8 *)PcdGetPtr (PcdEthMacA))[4], ((UINT8 *)PcdGetPtr (PcdEthMacA))[5]));
+ DEBUG ((EFI_D_ERROR, "EthMacB = %02x:%02x:%02x:%02x:%02x:%02x\n",
+ ((UINT8 *)PcdGetPtr (PcdEthMacB))[0], ((UINT8 *)PcdGetPtr (PcdEthMacB))[1],
+ ((UINT8 *)PcdGetPtr (PcdEthMacB))[2], ((UINT8 *)PcdGetPtr (PcdEthMacB))[3],
+ ((UINT8 *)PcdGetPtr (PcdEthMacB))[4], ((UINT8 *)PcdGetPtr (PcdEthMacB))[5]));
+ }
// Let other PEI modules know we're done!
Status = (*PeiServices)->InstallPpi (PeiServices, &mPlatInitPpiDescriptor);
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 05/11] Silicon/AMD/Styx/StyxDtbLoaderLib: replace XGBE CPP conditional with PCD
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (3 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 04/11] Silicon/AMD/Styx/PlatInitPei: " Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 06/11] Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines Ard Biesheuvel
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
We already have a boolean PCD that tells us whether XGBE support should
be enabled, so use it instead of C preprocessor conditionals.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 1 +
Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c | 39 +++++++-------------
2 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
index 87cdcb3e6b25..af57ab24f084 100644
--- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
+++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
@@ -50,6 +50,7 @@
gArmTokenSpaceGuid.PcdSystemMemoryBase
[FixedPcd]
+ gAmdModulePkgTokenSpaceGuid.PcdXgbeEnable
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset
gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment
diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
index b1e4984d3fd0..db7d9b077c32 100644
--- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
+++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
@@ -161,8 +161,6 @@ SetDeviceStatus (
}
}
-#if DO_XGBE
-
#define MAC_ADDRESS_BYTES 6
STATIC
@@ -192,8 +190,6 @@ SetMacAddress (
}
}
-#endif
-
STATIC
VOID
DisableSmmu (
@@ -242,7 +238,6 @@ SetSocIdStatus (
{
UINT32 SocId;
BOOLEAN IsRevB1;
- BOOLEAN DisableXgbeSmmus;
SocId = PcdGet32 (PcdSocCpuId);
IsRevB1 = (SocId & STYX_SOC_VERSION_MASK) >= STYX_SOC_VERSION_B1;
@@ -267,13 +262,7 @@ SetSocIdStatus (
DisableSmmu (Fdt, "iommus", "/smb/smmu@e0c00000", "/smb/sata@e0d00000");
}
-#if DO_XGBE
- DisableXgbeSmmus = !PcdGetBool (PcdEnableSmmus);
-#else
- DisableXgbeSmmus = TRUE;
-#endif
-
- if (DisableXgbeSmmus) {
+ if (!FixedPcdGetBool (PcdXgbeEnable) || !PcdGetBool (PcdEnableSmmus)) {
DisableSmmu (Fdt, "iommus", "/smb/smmu@e0600000", "/smb/xgmac@e0700000");
DisableSmmu (Fdt, "iommus", "/smb/smmu@e0800000", "/smb/xgmac@e0900000");
}
@@ -285,20 +274,20 @@ SetXgbeStatus (
IN VOID *Fdt
)
{
-#if DO_XGBE
- SetDeviceStatus (Fdt, "xgmac@e0700000", TRUE);
- SetDeviceStatus (Fdt, "phy@e1240800", TRUE);
- SetDeviceStatus (Fdt, "xgmac@e0900000", TRUE);
- SetDeviceStatus (Fdt, "phy@e1240c00", TRUE);
+ if (FixedPcdGetBool (PcdXgbeEnable)) {
+ SetDeviceStatus (Fdt, "xgmac@e0700000", TRUE);
+ SetDeviceStatus (Fdt, "phy@e1240800", TRUE);
+ SetDeviceStatus (Fdt, "xgmac@e0900000", TRUE);
+ SetDeviceStatus (Fdt, "phy@e1240c00", TRUE);
- SetMacAddress (Fdt, "xgmac@e0700000", PcdGetPtr (PcdEthMacA));
- SetMacAddress (Fdt, "xgmac@e0900000", PcdGetPtr (PcdEthMacB));
-#else
- SetDeviceStatus (Fdt, "xgmac@e0700000", FALSE);
- SetDeviceStatus (Fdt, "phy@e1240800", FALSE);
- SetDeviceStatus (Fdt, "xgmac@e0900000", FALSE);
- SetDeviceStatus (Fdt, "phy@e1240c00", FALSE);
-#endif
+ SetMacAddress (Fdt, "xgmac@e0700000", PcdGetPtr (PcdEthMacA));
+ SetMacAddress (Fdt, "xgmac@e0900000", PcdGetPtr (PcdEthMacB));
+ } else {
+ SetDeviceStatus (Fdt, "xgmac@e0700000", FALSE);
+ SetDeviceStatus (Fdt, "phy@e1240800", FALSE);
+ SetDeviceStatus (Fdt, "xgmac@e0900000", FALSE);
+ SetDeviceStatus (Fdt, "phy@e1240c00", FALSE);
+ }
}
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 06/11] Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (4 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 05/11] Silicon/AMD/Styx/StyxDtbLoaderLib: " Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 07/11] Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support Ard Biesheuvel
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
Now that all code relies on the PCD rather than the DO_XGBE macro,
get rid of it.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 9 ++-------
Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 2 --
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 3b680e22cd36..fb524cfc5490 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -17,7 +17,6 @@
################################################################################
[Defines]
-DEFINE DO_XGBE = 1
DEFINE NUM_CORES = 8
DEFINE DO_KCS = 1
DEFINE DO_FLASHER = FALSE
@@ -272,8 +271,8 @@ DEFINE DO_CAPSULE = FALSE
*_*_*_ASLPP_FLAGS = $(ARCHCC_FLAGS)
*_*_*_ASLCC_FLAGS = $(ARCHCC_FLAGS)
- GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_XGBE=$(DO_XGBE) -DDO_KCS=$(DO_KCS)
- GCC:*_*_AARCH64_PP_FLAGS = -DDO_XGBE=$(DO_XGBE) -DDO_KCS=$(DO_KCS)
+ GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_KCS=$(DO_KCS)
+ GCC:*_*_AARCH64_PP_FLAGS = -DDO_KCS=$(DO_KCS)
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
@@ -465,7 +464,6 @@ DEFINE DO_CAPSULE = FALSE
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!if $(DO_XGBE)
gAmdModulePkgTokenSpaceGuid.PcdXgbeEnable|TRUE
gAmdModulePkgTokenSpaceGuid.PcdPort0PhyMode|0
@@ -480,7 +478,6 @@ DEFINE DO_CAPSULE = FALSE
[PcdsPatchableInModule]
gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
gAmdModulePkgTokenSpaceGuid.PcdXgbeRev|2
-!endif
[PcdsPatchableInModule]
# PCIe Configuration: x4x4
@@ -654,13 +651,11 @@ DEFINE DO_CAPSULE = FALSE
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
-!if $(DO_XGBE)
#
# SNP support
#
Silicon/AMD/Styx/AmdModulePkg/SnpDxe/SnpDxePort0.inf
Silicon/AMD/Styx/AmdModulePkg/SnpDxe/SnpDxePort1.inf
-!endif
#
# Networking stack
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index b5c03034a44a..31b9e18d3c29 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -181,13 +181,11 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
-!if $(DO_XGBE)
#
# SNP support
#
INF Silicon/AMD/Styx/AmdModulePkg/SnpDxe/SnpDxePort0.inf
INF Silicon/AMD/Styx/AmdModulePkg/SnpDxe/SnpDxePort1.inf
-!endif
#
# Networking stack
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 07/11] Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (5 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 06/11] Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 08/11] Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate SSDT Ard Biesheuvel
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
In order to get rid of another CPP macro, introduce a boolean PCD
that we will set in the platform to enable IPMI/KCS support.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/AmdStyx.dec | 1 +
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 2 ++
Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 2 ++
3 files changed, 5 insertions(+)
diff --git a/Silicon/AMD/Styx/AmdStyx.dec b/Silicon/AMD/Styx/AmdStyx.dec
index c2e691cb5ea4..dedc15565984 100644
--- a/Silicon/AMD/Styx/AmdStyx.dec
+++ b/Silicon/AMD/Styx/AmdStyx.dec
@@ -103,3 +103,4 @@
[PcdsFixedAtBuild,PcdsDynamic]
gAmdStyxTokenSpaceGuid.PcdEnableSmmus|FALSE|BOOLEAN|0xe0000000
+ gAmdStyxTokenSpaceGuid.PcdEnableKcs|FALSE|BOOLEAN|0xe0000001
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index fb524cfc5490..17c936be5085 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -462,6 +462,8 @@ DEFINE DO_CAPSULE = FALSE
# map the stack as non-executable when entering the DXE phase
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
+ gAmdStyxTokenSpaceGuid.PcdEnableKcs|TRUE
+
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
gAmdModulePkgTokenSpaceGuid.PcdXgbeEnable|TRUE
diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index 5264346a375c..d7eb5f87afa1 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -429,6 +429,8 @@ DEFINE DO_FLASHER = FALSE
# map the stack as non-executable when entering the DXE phase
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
+ gAmdStyxTokenSpaceGuid.PcdEnableKcs|TRUE
+
[PcdsPatchableInModule]
# PCIe Configuration: x4x2x2 (=2 See Include/FDKGionb.h)
gAmdModulePkgTokenSpaceGuid.PcdPcieCoreConfiguration|2
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 08/11] Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate SSDT
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (6 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 07/11] Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 09/11] Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with PCD Ard Biesheuvel
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
Move the IPMI/KCS device node from the DSDT into its own SSDT, and only
install it if we have support for KCS enabled in the platform.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 +
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c | 5 +++
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl | 25 -----------
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl | 47 ++++++++++++++++++++
4 files changed, 54 insertions(+), 25 deletions(-)
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
index d27431343f4b..f231e0b2ee75 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -39,6 +39,7 @@
Pptt.aslc
Spcr.aslc
SsdtB1.asl
+ SsdtKcs.asl
SsdtXgbe.asl
[Packages]
@@ -74,6 +75,7 @@
gAmdStyxTokenSpaceGuid.PcdCntCTLBase
gAmdStyxTokenSpaceGuid.PcdCntBase0
gAmdStyxTokenSpaceGuid.PcdCntEL0Base0
+ gAmdStyxTokenSpaceGuid.PcdEnableKcs
gAmdStyxTokenSpaceGuid.PcdGicVersion
gAmdStyxTokenSpaceGuid.PcdGicHypervisorInterruptInterfaceBase
gAmdStyxTokenSpaceGuid.PcdGicVirtualInterruptInterfaceBase
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
index 9c8c8b09d4a4..9b1428fc00eb 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
@@ -171,6 +171,11 @@ InstallSystemDescriptionTables (
break;
+ case SIGNATURE_64 ('S', 't', 'y', 'x', 'K', 'c', 's', ' '):
+ if (!FixedPcdGetBool (PcdEnableKcs)) {
+ continue;
+ }
+
default:
switch (Table->Signature) {
case EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE:
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
index 60288114aeab..118382371d73 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
@@ -295,31 +295,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "AMDINC", "SEATTLE ", 3)
})
}
-#if DO_KCS
- //
- // IPMI/KCS
- //
- Device (KCS0)
- {
- Name (_HID, "AMDI0300")
- Name (_CID, "IPI0001")
- Name (_STR, Unicode("IPMI_KCS"))
- Name (_UID, 0)
- Name (_CRS, ResourceTemplate() {
- Memory32Fixed(ReadWrite, 0xE0010000, 0x1) // KCS Data In/Out
- Memory32Fixed(ReadWrite, 0xE0010004, 0x1) // KCS Control/Status
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 421 } // GSIV
- })
- Method (_IFT) { // Interface Type
- Return ( 0x01) // IPMI KCS
- }
-
- Method (_SRV) { // Spec Revision
- Return (0x200) // IPMI Spec v2.0
- }
- }
-#endif // DO_KCS
-
//
// PCIe Root Bus
//
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl
new file mode 100644
index 000000000000..3cac427df2d6
--- /dev/null
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl
@@ -0,0 +1,47 @@
+/** @file
+
+ SSDT for IPMI controller
+
+ Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+
+DefinitionBlock ("SsdtKcs.aml", "SSDT", 2, "AMDINC", "StyxKcs ", 3)
+{
+ Scope (_SB)
+ {
+ //
+ // IPMI/KCS
+ //
+ Device (KCS0)
+ {
+ Name (_HID, "AMDI0300")
+ Name (_CID, "IPI0001")
+ Name (_STR, Unicode("IPMI_KCS"))
+ Name (_UID, 0)
+ Name (_CRS, ResourceTemplate() {
+ Memory32Fixed(ReadWrite, 0xE0010000, 0x1) // KCS Data In/Out
+ Memory32Fixed(ReadWrite, 0xE0010004, 0x1) // KCS Control/Status
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 421 } // GSIV
+ })
+ Method (_IFT) { // Interface Type
+ Return ( 0x01) // IPMI KCS
+ }
+
+ Method (_SRV) { // Spec Revision
+ Return (0x200) // IPMI Spec v2.0
+ }
+ }
+ }
+}
+
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 09/11] Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with PCD
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (7 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 08/11] Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate SSDT Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 10/11] Platform/Styx: get rid of DO_KCS preprocessor macro Ard Biesheuvel
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
Get rid of the CPP conditionals, and use the new boolean PCD for KCS
support instead.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 1 +
Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
index af57ab24f084..23c5e563bbb6 100644
--- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
+++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
@@ -54,6 +54,7 @@
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset
gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment
+ gAmdStyxTokenSpaceGuid.PcdEnableKcs
gAmdStyxTokenSpaceGuid.PcdSata1PortCount
[Guids]
diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
index db7d9b077c32..248eda7c8a95 100644
--- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
+++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
@@ -247,11 +247,12 @@ SetSocIdStatus (
SetDeviceStatus (Fdt, "gpio@e0020000", IsRevB1);
SetDeviceStatus (Fdt, "gpio@e0030000", IsRevB1);
SetDeviceStatus (Fdt, "gwdt@e0bb0000", IsRevB1);
-#if DO_KCS
- SetDeviceStatus (Fdt, "kcs@e0010000", IsRevB1);
-#else
- SetDeviceStatus (Fdt, "kcs@e0010000", FALSE);
-#endif
+
+ if (FixedPcdGetBool (PcdEnableKcs)) {
+ SetDeviceStatus (Fdt, "kcs@e0010000", IsRevB1);
+ } else {
+ SetDeviceStatus (Fdt, "kcs@e0010000", FALSE);
+ }
if (!PcdGetBool (PcdEnableSmmus)) {
DisableSmmu (Fdt, "iommu-map", "/smb/smmu@e0a00000", "/smb/pcie@f0000000");
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 10/11] Platform/Styx: get rid of DO_KCS preprocessor macro
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (8 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 09/11] Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with PCD Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 11/11] Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon Ard Biesheuvel
2018-12-12 22:23 ` [PATCH edk2-platforms 00/11] final set of Styx cleanups Leif Lindholm
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
Now that all code references the PCD instead, let's drop the macro
from all Styx platforms.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 8 --------
Platform/LeMaker/CelloBoard/CelloBoard.dsc | 8 --------
Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 8 --------
3 files changed, 24 deletions(-)
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 17c936be5085..3d0544cf74cd 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -18,7 +18,6 @@
[Defines]
DEFINE NUM_CORES = 8
-DEFINE DO_KCS = 1
DEFINE DO_FLASHER = FALSE
DEFINE DO_CAPSULE = FALSE
@@ -267,13 +266,6 @@ DEFINE DO_CAPSULE = FALSE
RVCT:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
- *_*_*_ASL_FLAGS = -tc -li -l -so
- *_*_*_ASLPP_FLAGS = $(ARCHCC_FLAGS)
- *_*_*_ASLCC_FLAGS = $(ARCHCC_FLAGS)
-
- GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_KCS=$(DO_KCS)
- GCC:*_*_AARCH64_PP_FLAGS = -DDO_KCS=$(DO_KCS)
-
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
index 6362ab5a17fb..a70f91bb02d5 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
@@ -18,7 +18,6 @@
[Defines]
DEFINE NUM_CORES = 4
-DEFINE DO_KCS = 0
DEFINE DO_FLASHER = FALSE
PLATFORM_NAME = Cello
@@ -256,13 +255,6 @@ DEFINE DO_FLASHER = FALSE
RVCT:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
- *_*_*_ASL_FLAGS = -tc -li -l -so
- *_*_*_ASLPP_FLAGS = $(ARCHCC_FLAGS)
- *_*_*_ASLCC_FLAGS = $(ARCHCC_FLAGS)
-
- GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_KCS=$(DO_KCS)
- GCC:*_*_AARCH64_PP_FLAGS = -DDO_KCS=$(DO_KCS)
-
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index d7eb5f87afa1..722c4adb7a72 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -18,7 +18,6 @@
[Defines]
DEFINE NUM_CORES = 4
-DEFINE DO_KCS = 1
DEFINE DO_FLASHER = FALSE
PLATFORM_NAME = Overdrive1000
@@ -254,13 +253,6 @@ DEFINE DO_FLASHER = FALSE
[BuildOptions]
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
- *_*_*_ASL_FLAGS = -tc -li -l -so
- *_*_*_ASLPP_FLAGS = $(ARCHCC_FLAGS)
- *_*_*_ASLCC_FLAGS = $(ARCHCC_FLAGS)
-
- GCC:*_*_AARCH64_ARCHCC_FLAGS = -DDO_KCS=$(DO_KCS)
- GCC:*_*_AARCH64_PP_FLAGS = -DDO_KCS=$(DO_KCS)
-
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH edk2-platforms 11/11] Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (9 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 10/11] Platform/Styx: get rid of DO_KCS preprocessor macro Ard Biesheuvel
@ 2018-12-11 18:35 ` Ard Biesheuvel
2018-12-12 22:23 ` [PATCH edk2-platforms 00/11] final set of Styx cleanups Leif Lindholm
11 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 18:35 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, alan, Ard Biesheuvel
Align the ACPI platform driver with the DT patching code, which only
enables the IPMI/KCS device node on B1 silicon (or later).
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
index 9b1428fc00eb..259a708b7c2c 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c
@@ -172,7 +172,8 @@ InstallSystemDescriptionTables (
break;
case SIGNATURE_64 ('S', 't', 'y', 'x', 'K', 'c', 's', ' '):
- if (!FixedPcdGetBool (PcdEnableKcs)) {
+ if (!FixedPcdGetBool (PcdEnableKcs) ||
+ (CpuId & STYX_SOC_VERSION_MASK) < STYX_SOC_VERSION_B1) {
continue;
}
--
2.19.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH edk2-platforms 00/11] final set of Styx cleanups
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
` (10 preceding siblings ...)
2018-12-11 18:35 ` [PATCH edk2-platforms 11/11] Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon Ard Biesheuvel
@ 2018-12-12 22:23 ` Leif Lindholm
2018-12-13 11:09 ` Ard Biesheuvel
11 siblings, 1 reply; 14+ messages in thread
From: Leif Lindholm @ 2018-12-12 22:23 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel, alan
On Tue, Dec 11, 2018 at 07:35:03PM +0100, Ard Biesheuvel wrote:
> I promise :-)
Yeah, right :)
> This gets rid of the last build config options passed via the command
> line into the preprocessor, and replaces them with PCD references.
>
> Ard Biesheuvel (11):
> Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes
> Platform/SoftIron/Overdrive1000Board: remove dead XGBE references
> Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with
> PCD
> Silicon/AMD/Styx/PlatInitPei: replace XGBE CPP conditional with PCD
> Silicon/AMD/Styx/StyxDtbLoaderLib: replace XGBE CPP conditional with
> PCD
> Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines
> Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support
> Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate
> SSDT
> Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with
> PCD
> Platform/Styx: get rid of DO_KCS preprocessor macro
> Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon
Nice bit of cleanup.
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> Silicon/AMD/Styx/AmdStyx.dec | 1 +
> .../AMD/OverdriveBoard/OverdriveBoard.dsc | 15 +-----
> Platform/LeMaker/CelloBoard/CelloBoard.dsc | 8 ---
> .../Overdrive1000Board/Overdrive1000Board.dsc | 10 +---
> .../AMD/OverdriveBoard/OverdriveBoard.fdf | 2 -
> .../Overdrive1000Board/Overdrive1000Board.fdf | 8 ---
> .../AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 ++
> .../Styx/Drivers/PlatInitPei/PlatInitPei.inf | 1 +
> .../StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 2 +
> .../Drivers/AcpiPlatformDxe/AcpiPlatform.c | 19 +++----
> .../Styx/Drivers/PlatInitPei/PlatInitPei.c | 41 ++++++++-------
> .../StyxDtbLoaderLib/StyxDtbLoaderLib.c | 50 ++++++++-----------
> .../AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl | 25 ----------
> .../Styx/Drivers/AcpiPlatformDxe/Iort.aslc | 8 ---
> .../Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl | 47 +++++++++++++++++
> 15 files changed, 108 insertions(+), 132 deletions(-)
> create mode 100644 Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl
>
> --
> 2.19.2
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH edk2-platforms 00/11] final set of Styx cleanups
2018-12-12 22:23 ` [PATCH edk2-platforms 00/11] final set of Styx cleanups Leif Lindholm
@ 2018-12-13 11:09 ` Ard Biesheuvel
0 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2018-12-13 11:09 UTC (permalink / raw)
To: Leif Lindholm; +Cc: edk2-devel@lists.01.org, Alan Ott
On Wed, 12 Dec 2018 at 23:23, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>
> On Tue, Dec 11, 2018 at 07:35:03PM +0100, Ard Biesheuvel wrote:
> > I promise :-)
>
> Yeah, right :)
>
> > This gets rid of the last build config options passed via the command
> > line into the preprocessor, and replaces them with PCD references.
> >
> > Ard Biesheuvel (11):
> > Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes
> > Platform/SoftIron/Overdrive1000Board: remove dead XGBE references
> > Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with
> > PCD
> > Silicon/AMD/Styx/PlatInitPei: replace XGBE CPP conditional with PCD
> > Silicon/AMD/Styx/StyxDtbLoaderLib: replace XGBE CPP conditional with
> > PCD
> > Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines
> > Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support
> > Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate
> > SSDT
> > Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with
> > PCD
> > Platform/Styx: get rid of DO_KCS preprocessor macro
> > Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon
>
> Nice bit of cleanup.
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>
Thanks
Pushed as 572a554e1db4..80dfc2ce18c6
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-12-13 11:09 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-11 18:35 [PATCH edk2-platforms 00/11] final set of Styx cleanups Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 01/11] Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 02/11] Platform/SoftIron/Overdrive1000Board: remove dead XGBE references Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 03/11] Silicon/AMD/Styx/AcpiPlatformDxe: replace XGBE CPP conditional with PCD Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 04/11] Silicon/AMD/Styx/PlatInitPei: " Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 05/11] Silicon/AMD/Styx/StyxDtbLoaderLib: " Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 06/11] Platform/AMD/OverdriveBoard: drop DO_XGBE C preprocessor defines Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 07/11] Silicon/AMD/Styx: introduce boolean PCD for KCS/IPMI support Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 08/11] Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate SSDT Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 09/11] Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with PCD Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 10/11] Platform/Styx: get rid of DO_KCS preprocessor macro Ard Biesheuvel
2018-12-11 18:35 ` [PATCH edk2-platforms 11/11] Silicon/AMD/Styx/AcpiPlatformDxe: disable KCS on pre-B1 silicon Ard Biesheuvel
2018-12-12 22:23 ` [PATCH edk2-platforms 00/11] final set of Styx cleanups Leif Lindholm
2018-12-13 11:09 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox