[edk2] [PATCH v2 edk2-platforms 4/8] Sgi575: AcpiTables: Add entry for virtio network device

Vijayenthiran Subramaniam vijayenthiran.subramaniam at arm.com
Fri Dec 14 08:58:15 PST 2018


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

SGI575 include an instance of the virtio network device. So add
a representation for it in the ACPI tables.

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

diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
index e236b940a802..c666ea9d51c7 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
@@ -58,5 +58,8 @@ [FixedPcd]
   gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
   gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
   gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
+  gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
+  gArmSgiTokenSpaceGuid.PcdVirtioNetSize
+  gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
 
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
index 833f5b44b6a8..36bc8c3809a0 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
@@ -114,4 +114,22 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI", EFI_ACPI_ARM_OEM
       }
     })
   }
+
+  // VIRTIO NET
+  Device (VR01) {
+    Name (_HID, "LNRO0005")
+    Name (_UID, 1)
+    Name (_CCA, 1)    // mark the device coherent
+
+    Name (_CRS, ResourceTemplate() {
+      Memory32Fixed (
+        ReadWrite,
+        FixedPcdGet32 (PcdVirtioNetBaseAddress),
+        FixedPcdGet32 (PcdVirtioNetSize)
+      )
+      Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
+        FixedPcdGet32 (PcdVirtioNetInterrupt)
+      }
+    })
+  }
 }
-- 
2.7.4



More information about the edk2-devel mailing list