[edk2,edk2-platforms,01/11] Silicon/AMD/Styx/Iort: drop conditionally included XGBE nodes

Message ID 20181211183514.20948-2-ard.biesheuvel@linaro.org
State New
Headers show
Series
  • final set of Styx cleanups
Related show

Commit Message

Ard Biesheuvel Dec. 11, 2018, 6:35 p.m.
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(-)

-- 
2.19.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch

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,