From 4e75e35a3339349e63c461aaaf283e753316d06c Mon Sep 17 00:00:00 2001 From: wmin0 Date: Tue, 20 Feb 2024 16:50:27 +0800 Subject: [PATCH] dev-arm: Remove the dependency of Platform for ArmSigInterruptPin (#878) ArmSigInterruptPin don't send the interrupt to GIC. Instead it sends the interrupt to the irq specified in Param. When using ArmSigInterruptPin, we shouldn't ask users to provide "Platform" since it doesn't need it. To reduce the confusion, this change removes the dependency of Platform for ArmSigInterruptPin. Change-Id: I0ee507ed1c08b4fa6d3e384e28732f3acb4f6892 --- src/dev/arm/Gic.py | 1 + src/dev/arm/base_gic.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dev/arm/Gic.py b/src/dev/arm/Gic.py index 6cb03c8cb9..8b2a564564 100644 --- a/src/dev/arm/Gic.py +++ b/src/dev/arm/Gic.py @@ -155,6 +155,7 @@ class ArmSigInterruptPin(ArmInterruptPin): cxx_class = "gem5::ArmSigInterruptPinGen" irq = IntSourcePin("Interrupt pin") + platform = NULL class GicV2(BaseGic): diff --git a/src/dev/arm/base_gic.cc b/src/dev/arm/base_gic.cc index 5694c37399..59c3aae17b 100644 --- a/src/dev/arm/base_gic.cc +++ b/src/dev/arm/base_gic.cc @@ -154,7 +154,6 @@ ArmInterruptPin::ArmInterruptPin( : threadContext(tc), platform(dynamic_cast(p.platform)), intNum(p.num), triggerType(p.int_type), _active(false) { - fatal_if(!platform, "Interrupt not connected to a RealView platform"); } void @@ -190,6 +189,7 @@ ArmSPI::ArmSPI( const ArmSPIParams &p) : ArmInterruptPin(p, nullptr) { + fatal_if(!platform, "Interrupt not connected to a RealView platform"); } void @@ -210,6 +210,7 @@ ArmPPI::ArmPPI( const ArmPPIParams &p, ThreadContext *tc) : ArmInterruptPin(p, tc) { + fatal_if(!platform, "Interrupt not connected to a RealView platform"); } void