[edk2] [PATCH v1 edk2-platforms 3/8] Sgi575: AcpiTables: Use PCDs for virtio disk

Vijayenthiran Subramaniam vijayenthiran.subramaniam at arm.com
Tue Dec 4 01:12:24 PST 2018


From: Daniil Egranov <daniil.egranov at arm.com>

Use PCDs instead of hardcoded values for virtio disk in DSDT.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Daniil Egranov <daniil.egranov at arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf |  4 ++++
 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl      | 10 ++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
index 59ccb79b6475..e236b940a802 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
@@ -55,4 +55,8 @@ [FixedPcd]
   gArmTokenSpaceGuid.PcdPciBusMin
   gArmTokenSpaceGuid.PcdPciBusMax
 
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
+  gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
+
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
index 509cd7cd4262..833f5b44b6a8 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
@@ -104,8 +104,14 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI", EFI_ACPI_ARM_OEM
     Name (_CCA, 1)    // mark the device coherent
 
     Name (_CRS, ResourceTemplate() {
-      Memory32Fixed (ReadWrite, 0x1c130000, 0x10000)
-      Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 202 }
+      Memory32Fixed (
+        ReadWrite,
+        FixedPcdGet32 (PcdVirtioBlkBaseAddress),
+        FixedPcdGet32 (PcdVirtioBlkSize)
+      )
+      Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
+        FixedPcdGet32 (PcdVirtioBlkInterrupt)
+      }
     })
   }
 }
-- 
2.7.4



More information about the edk2-devel mailing list