summaryrefslogtreecommitdiff
path: root/src/dev/arm
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2019-02-25 17:05:09 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2019-03-26 12:53:44 +0000
commit61f0e7e2676a54579cf104a385e0f6fa97266e4b (patch)
tree2a2ff4532756ac45b338f08933806017e439c18d /src/dev/arm
parentca4c0a168ae3a48fe97f0c132fefbf606d925bb8 (diff)
downloadgem5-61f0e7e2676a54579cf104a385e0f6fa97266e4b.tar.xz
dev-arm: Set/Unset dma coherent mode from python
With this patch it will be possible to automatically enable/disable the dma-coherent property for the GenericArmPciHost autogenerated DTB. This has been done by adding the _dma_coherent param. Change-Id: I1759fced74e42410462637ca77997a351314a90a Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/16748 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/arm')
-rw-r--r--src/dev/arm/RealView.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index af19f3bbd..35bc86227 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -121,6 +121,10 @@ class GenericArmPciHost(GenericPciHost):
int_base = Param.Unsigned("PCI interrupt base")
int_count = Param.Unsigned("Maximum number of interrupts used by this host")
+ # This python parameter can be used in configuration scripts to turn
+ # on/off the fdt dma-coherent flag when doing dtb autogeneration
+ _dma_coherent = True
+
def generateDeviceTree(self, state):
local_state = FdtState(addr_cells=3, size_cells=2, cpu_cells=1)
intterrupt_cells = 1
@@ -182,7 +186,8 @@ class GenericArmPciHost(GenericPciHost):
m5.fatal("Unsupported PCI interrupt policy " +
"for Device Tree generation")
- node.append(FdtProperty("dma-coherent"))
+ if self._dma_coherent:
+ node.append(FdtProperty("dma-coherent"))
yield node