From: Adrian Herrera Date: Thu, 22 Aug 2019 13:20:36 +0000 (+0100) Subject: dev-arm: Gicv3 ITS device tree autogen X-Git-Tag: v19.0.0.0~593 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aec83a6451c78f64de5656c2f4075b7453020425;p=gem5.git dev-arm: Gicv3 ITS device tree autogen This patch adds device tree automatic generation for Gicv3 ITS. Change-Id: Ic01500ffa691b331f527c5c2c785ff715660b0c2 Reviewed-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20609 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg Tested-by: kokoro --- diff --git a/src/dev/arm/Gic.py b/src/dev/arm/Gic.py index e1a8a78db..eec6e95c2 100644 --- a/src/dev/arm/Gic.py +++ b/src/dev/arm/Gic.py @@ -187,6 +187,15 @@ class Gicv3Its(BasicPioDevice): # ID_bits [12:8] = 0b11111: ITS supports 31 EventID bits gits_typer = Param.UInt64(0x30023F01, "GITS_TYPER RO value") + def generateDeviceTree(self, state): + node = self.generateBasicPioDeviceNode(state, "gic-its", self.pio_addr, + self.pio_size) + node.appendCompatible(["arm,gic-v3-its"]) + node.append(FdtProperty("msi-controller")) + node.append(FdtPropertyWords("#msi-cells", [1])) + + return node + class Gicv3(BaseGic): type = 'Gicv3' cxx_header = "dev/arm/gic_v3.hh" @@ -254,4 +263,7 @@ class Gicv3(BaseGic): node.appendPhandle(self) + # Generate the ITS device tree + node.append(self.its.generateDeviceTree(self._state)) + yield node