From 409fbc653f5177f9f1da91877591a27b27302a3b Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 23 Mar 2017 18:49:57 +0000 Subject: 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 Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/2521 Reviewed-by: Giacomo Travaglini --- src/dev/arm/Gic.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/dev/arm/Gic.py') 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" -- cgit v1.2.3