summaryrefslogtreecommitdiff
path: root/src/dev/arm/Gic.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-03-23 18:49:57 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-06-07 12:36:44 +0000
commit409fbc653f5177f9f1da91877591a27b27302a3b (patch)
tree654a2b987fb207ea16e18254020d01ba4386c150 /src/dev/arm/Gic.py
parent60600f09c25255b3c8f72da7fb49100e2682093a (diff)
downloadgem5-409fbc653f5177f9f1da91877591a27b27302a3b.tar.xz
dev-arm: Add a GIC interrupt adaptor
Add GIC-based interrupt adaptor implementations that support PPI (ArmPPI) and SPI (ArmSPI) delivery. In addition to being useful for "normal" memory-mapped devices, the PPI adaptor makes it possible to use the same device model to generate both PPIs and SPIs (e.g., the PMU). Change-Id: I73d6591c168040faef2443430c4f1da10c387a2a Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2521 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/dev/arm/Gic.py')
-rw-r--r--src/dev/arm/Gic.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/dev/arm/Gic.py b/src/dev/arm/Gic.py
index bc7794af7..5f756639e 100644
--- a/src/dev/arm/Gic.py
+++ b/src/dev/arm/Gic.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2013 ARM Limited
+# Copyright (c) 2012-2013, 2017-2018 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -49,6 +49,23 @@ class BaseGic(PioDevice):
platform = Param.Platform(Parent.any, "Platform this device is part of.")
+class ArmInterruptPin(SimObject):
+ type = 'ArmInterruptPin'
+ cxx_header = "dev/arm/base_gic.hh"
+ abstract = True
+
+ platform = Param.Platform(Parent.any, "Platform with interrupt controller")
+ num = Param.UInt32("Interrupt number in GIC")
+
+class ArmSPI(ArmInterruptPin):
+ type = 'ArmSPI'
+ cxx_header = "dev/arm/base_gic.hh"
+
+class ArmPPI(ArmInterruptPin):
+ type = 'ArmPPI'
+ cxx_header = "dev/arm/base_gic.hh"
+
+
class Pl390(BaseGic):
type = 'Pl390'
cxx_header = "dev/arm/gic_pl390.hh"