From 0229d452017b9bcda7b89eec470d3aaaa8c1bc28 Mon Sep 17 00:00:00 2001 From: Jonathan Pallant Date: Tue, 28 Jan 2025 11:08:05 +0000 Subject: [PATCH] Don't pass on SPECIAL_NONE interrupt. Currently it witholds SPECIAL_START, which is actually SPECIAL_SECURE. This appears to be a typo, but I'm happy to be corrected (in which case I will have to deal with SPECIAL_NONE in my application). --- src/gicv2.rs | 2 +- src/gicv3.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gicv2.rs b/src/gicv2.rs index b39edef..cfaeb85 100644 --- a/src/gicv2.rs +++ b/src/gicv2.rs @@ -181,7 +181,7 @@ impl GicV2 { unsafe { intid = (&raw mut (*self.gicc).aiar).read_volatile() as u32; } - if intid == IntId::SPECIAL_START { + if IntId(intid) == IntId::SPECIAL_NONE { None } else { Some(IntId(intid)) diff --git a/src/gicv3.rs b/src/gicv3.rs index c5c07e7..07c1035 100644 --- a/src/gicv3.rs +++ b/src/gicv3.rs @@ -302,7 +302,7 @@ impl GicV3 { /// Returns `None` if there is no pending interrupt of sufficient priority. pub fn get_and_acknowledge_interrupt() -> Option { let intid = read_icc_iar1_el1() as u32; - if intid == IntId::SPECIAL_START { + if IntId(intid) == IntId::SPECIAL_NONE { None } else { Some(IntId(intid))