Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/31614 )
Change subject: dev-arm: Gicv3 maintenance interrupt never cleared
......................................................................
dev-arm: Gicv3 maintenance interrupt never cleared
The maintenance interrupt is a level sensitive interrupt though it has
been treated as edge triggered so far.
In order to be level sensitive, it needs to be cleared once the condition
which led to its generation are not valid anymore.
Change-Id: I9af9f4bf27622a7961393b00a145d6c9835d738b
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31614
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/arm/gic_v3_cpu_interface.cc
1 file changed, 9 insertions(+), 4 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/dev/arm/gic_v3_cpu_interface.cc
b/src/dev/arm/gic_v3_cpu_interface.cc
index 5e1f871..5499e38 100644
--- a/src/dev/arm/gic_v3_cpu_interface.cc
+++ b/src/dev/arm/gic_v3_cpu_interface.cc
@@ -79,6 +79,8 @@
Gicv3CPUInterface::setThreadContext(ThreadContext *tc)
{
maintenanceInterrupt = gic->params()->maint_int->get(tc);
+ fatal_if(maintenanceInterrupt->num() >=
redistributor->irqPending.size(),
+ "Invalid maintenance interrupt number\n");
}
bool
@@ -2078,10 +2080,13 @@
ICH_HCR_EL2 ich_hcr_el2 =
isa->readMiscRegNoEffect(MISCREG_ICH_HCR_EL2);
- if (ich_hcr_el2.En) {
- if (maintenanceInterruptStatus()) {
- maintenanceInterrupt->raise();
- }
+ const bool maint_pending = redistributor->irqPending[
+ maintenanceInterrupt->num()];
+
+ if (ich_hcr_el2.En && !maint_pending && maintenanceInterruptStatus()) {
+ maintenanceInterrupt->raise();
+ } else if (maint_pending) {
+ maintenanceInterrupt->clear();
}
if (signal_IRQ) {
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/31614
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: I9af9f4bf27622a7961393b00a145d6c9835d738b
Gerrit-Change-Number: 31614
Gerrit-PatchSet: 5
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
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