|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
Driver for the standard RISC-V Platform-Local Interrupt Controller (PLIC). More...
#include <platform-plic.hh>


Public Member Functions | |
| StandardPlic () | |
| Constructor. | |
| void | interrupt_enable (SourceID src) |
| Enable the specified interrupt. | |
| void | interrupt_disable (SourceID src) |
| Disable the specified interrupt. | |
| void | priority_set (SourceID src, Priority prio) |
| Set the priority of the specified interrupt. | |
| std::optional< SourceID > | interrupt_claim () |
| Fetch the interrupt number that fired and prevent it from firing. | |
| void | interrupt_complete (SourceID src) |
| Tell the interrupt controller we've handled a specified interrupt ID. | |
Driver for the standard RISC-V Platform-Local Interrupt Controller (PLIC).
MaxIntrID is the largest interrupt number that is used. SourceID and Priority are the types used for interrupt source numbers and priorities, respectively.
Definition at line 19 of file platform-plic.hh.
|
inline |
Constructor.
Initialises the interrupt controller with all interrupts disabled.
Definition at line 26 of file platform-plic.hh.
References CHERI::Capability< T, IsSealedT >::address(), CHERI::Capability< T, IsSealedT >::bounds(), and MMIO_CAPABILITY.
|
inline |
Fetch the interrupt number that fired and prevent it from firing.
If two or more interrupts have fired then this will return the highest-priority one.
If no interrupt has fired (for example, because the interrupt line on the core was raised spuriously) then this returns stdd:nullopt.
Definition at line 98 of file platform-plic.hh.
|
inline |
Tell the interrupt controller we've handled a specified interrupt ID.
Definition at line 108 of file platform-plic.hh.
|
inline |
Disable the specified interrupt.
Definition at line 73 of file platform-plic.hh.
|
inline |
Enable the specified interrupt.
Definition at line 61 of file platform-plic.hh.
|
inline |
Set the priority of the specified interrupt.
Definition at line 85 of file platform-plic.hh.