Browse Source
Merge pull request #1579 from tebartsch/plic-threshold-masking
PLIC: Implement threshold masking
pull/1655/head
Andrew Waterman
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
9 additions and
0 deletions
-
riscv/plic.cc
|
|
|
@ -113,6 +113,15 @@ uint32_t plic_t::context_best_pending(const plic_context_t *c) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/*
|
|
|
|
From Spec 1.0.0: 6. Priority Thresholds |
|
|
|
The PLIC will mask all PLIC interrupts of a priority less than or equal to |
|
|
|
threshold. |
|
|
|
*/ |
|
|
|
if (best_id_prio <= c->priority_threshold) { |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
return best_id; |
|
|
|
} |
|
|
|
|
|
|
|
|