[edk2,edk2-platforms,v3,17/18] Hisilicon/D06: Fix USB crash issue(4079)

Message ID 20190320080829.52003-18-ming.huang@linaro.org
State New
Headers show
Series
  • Fix issues and improve D0x
Related show

Commit Message

Ming Huang March 20, 2019, 8:08 a.m.
Last patch "Modify IORT" change revision id of node type 2 to 1,
and 4.19 later kernel will judge the revision id to get root pci
bridge DMA informations from IORT. As Hi1620 USB 2.0 don't support
64 bit DMA, but the DMA attribute get from IORT node type 2 is 64
bit. So add _DMA method in USB pci bridge 3 and pci bridge 8 to
fix usb crash when usb device is present issue.

https://bugs.linaro.org/show_bug.cgi?id=4079

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>

---
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl | 46 ++++++++++++++++++++
 1 file changed, 46 insertions(+)

-- 
2.9.5

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

Patch

diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
index 6dc380f27fa2..c1083dc16a2a 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
+++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
@@ -375,6 +375,29 @@  Device (PCI2)
 
   PCI_OSC_SUPPORT ()
 
+  Method(_DMA, 0, Serialized)
+  {
+    Return (ResourceTemplate()
+    {
+      QWORDMemory(
+      ResourceConsumer,
+      PosDecode,          // _DEC
+      MinFixed,           // _MIF
+      MaxFixed,           // _MAF
+      Prefetchable,       // _MEM
+      ReadWrite,          // _RW
+      0,                  // _GRA
+      0x00000000,         // _MIN
+      0xFFFFFFFF,         // _MAX
+      0x00000000,        // _TRA
+      0x100000000,         // _LEN
+      ,
+      ,
+      ,
+      )
+    })
+  }
+
   Method (_STA, 0x0, NotSerialized)
   {
     Return (0xf)
@@ -1077,6 +1100,29 @@  Device (PCI8)
     Return (0xf)
   }
 
+  Method(_DMA, 0, Serialized)
+  {
+    Return (ResourceTemplate()
+    {
+      QWORDMemory(
+      ResourceConsumer,
+      PosDecode,          // _DEC
+      MinFixed,           // _MIF
+      MaxFixed,           // _MAF
+      Prefetchable,       // _MEM
+      ReadWrite,          // _RW
+      0,                  // _GRA
+      0x00000000,         // _MIN
+      0xFFFFFFFF,         // _MAX
+      0x00000000,        // _TRA
+      0x100000000,         // _LEN
+      ,
+      ,
+      ,
+      )
+    })
+  }
+
   Method (_PXM, 0, NotSerialized)
   {
     Return(0x02)