Skip to content

Commit

Permalink
Don't pass on SPECIAL_NONE interrupt.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
jonathanpallant committed Jan 28, 2025
1 parent 9418750 commit 0229d45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gicv2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/gicv3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl GicV3 {
/// Returns `None` if there is no pending interrupt of sufficient priority.
pub fn get_and_acknowledge_interrupt() -> Option<IntId> {
let intid = read_icc_iar1_el1() as u32;
if intid == IntId::SPECIAL_START {
if IntId(intid) == IntId::SPECIAL_NONE {
None
} else {
Some(IntId(intid))
Expand Down

0 comments on commit 0229d45

Please # to comment.