From: Giacomo Travaglini Date: Mon, 25 Feb 2019 17:05:09 +0000 (+0000) Subject: dev-arm: Set/Unset dma coherent mode from python X-Git-Tag: v19.0.0.0~1014 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61f0e7e2676a54579cf104a385e0f6fa97266e4b;p=gem5.git 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/16748 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- 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