Giacomo Travaglini has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/36235 )
Change subject: dev-arm, fastmodel: Rewrite Gic.interruptCells
......................................................................
dev-arm, fastmodel: Rewrite Gic.interruptCells
The affinity number (aka PPI partition) is used differently
in GICv2 and GICv3. In GICv2 it is ORed to the triggering type
(3rd cell), whereas it is encoded in the 4th cell in GICv3
Change-Id: I36e45d4ec5fb39befa1a271b531dfed2d8e56c10
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
---
M src/arch/arm/fastmodel/GIC/FastModelGIC.py
M src/dev/arm/Gic.py
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/arch/arm/fastmodel/GIC/FastModelGIC.py
b/src/arch/arm/fastmodel/GIC/FastModelGIC.py
index ddcf728..3298be9 100644
--- a/src/arch/arm/fastmodel/GIC/FastModelGIC.py
+++ b/src/arch/arm/fastmodel/GIC/FastModelGIC.py
@@ -514,7 +514,7 @@
return ranges
- def interruptCells(self, int_type, int_num, int_flag):
+ def interruptCells(self, int_type, int_num, int_trigger,
int_affinity=0):
"""
Interupt cells generation helper:
Following specifications described in
@@ -525,7 +525,7 @@
assert len(prop) >= 3
prop[0] = int_type
prop[1] = int_num
- prop[2] = int_flag
+ prop[2] = int_trigger
return prop
def generateDeviceTree(self, state):
@@ -552,7 +552,7 @@
node.append(FdtPropertyWords("reg", regs))
# Maintenance interrupt (PPI 25).
node.append(FdtPropertyWords("interrupts",
- self.interruptCells(1, 9, 0xf04)))
+ self.interruptCells(1, 9, 0x4)))
node.appendPhandle(self)
diff --git a/src/dev/arm/Gic.py b/src/dev/arm/Gic.py
index 17a553f..bcd8d75 100644
--- a/src/dev/arm/Gic.py
+++ b/src/dev/arm/Gic.py
@@ -60,7 +60,7 @@
gicv_iidr = Param.UInt32(0,
"VM CPU Interface Identification Register")
- def interruptCells(self, int_type, int_num, int_flag):
+ def interruptCells(self, int_type, int_num, int_trigger,
int_affinity=0):
"""
Interupt cells generation helper:
Following specifications described in
@@ -68,7 +68,7 @@
Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
"""
assert self._state.interrupt_cells == 3
- return [ int_type, int_num, int_flag ]
+ return [ int_type, int_num, int_affinity | int_trigger ]
class ArmInterruptType(ScopedEnum):
"""
@@ -237,7 +237,7 @@
gicv4 = Param.Bool(True, "GICv4 extension available")
- def interruptCells(self, int_type, int_num, int_flag):
+ def interruptCells(self, int_type, int_num, int_trigger,
int_affinity=0):
"""
Interupt cells generation helper:
Following specifications described in
@@ -248,7 +248,7 @@
assert len(prop) >= 3
prop[0] = int_type
prop[1] = int_num
- prop[2] = int_flag
+ prop[2] = int_trigger
return prop
def generateDeviceTree(self, state):
@@ -272,7 +272,7 @@
node.append(FdtPropertyWords("reg", regs))
node.append(FdtPropertyWords("interrupts",
- self.interruptCells(1, int(self.maint_int.num)-16, 0xf04)))
+ self.interruptCells(1, int(self.maint_int.num)-16, 0x4)))
node.appendPhandle(self)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/36235
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I36e45d4ec5fb39befa1a271b531dfed2d8e56c10
Gerrit-Change-Number: 36235
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s