CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
StandardPlic< MaxIntrID, SourceID, Priority > Class Template Reference

Driver for the standard RISC-V Platform-Local Interrupt Controller (PLIC). More...

#include <platform-plic.hh>

Inheritance diagram for StandardPlic< MaxIntrID, SourceID, Priority >:
Collaboration diagram for StandardPlic< MaxIntrID, SourceID, Priority >:

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.

Detailed Description

template<size_t MaxIntrID, typename SourceID, typename Priority>
class StandardPlic< MaxIntrID, SourceID, Priority >

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.

Constructor & Destructor Documentation

◆ StandardPlic()

template<size_t MaxIntrID, typename SourceID, typename Priority>
StandardPlic< MaxIntrID, SourceID, Priority >::StandardPlic ( )
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.

Member Function Documentation

◆ interrupt_claim()

template<size_t MaxIntrID, typename SourceID, typename Priority>
std::optional< SourceID > StandardPlic< MaxIntrID, SourceID, Priority >::interrupt_claim ( )
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.

◆ interrupt_complete()

template<size_t MaxIntrID, typename SourceID, typename Priority>
void StandardPlic< MaxIntrID, SourceID, Priority >::interrupt_complete ( SourceID src)
inline

Tell the interrupt controller we've handled a specified interrupt ID.

Definition at line 108 of file platform-plic.hh.

◆ interrupt_disable()

template<size_t MaxIntrID, typename SourceID, typename Priority>
void StandardPlic< MaxIntrID, SourceID, Priority >::interrupt_disable ( SourceID src)
inline

Disable the specified interrupt.

Definition at line 73 of file platform-plic.hh.

◆ interrupt_enable()

template<size_t MaxIntrID, typename SourceID, typename Priority>
void StandardPlic< MaxIntrID, SourceID, Priority >::interrupt_enable ( SourceID src)
inline

Enable the specified interrupt.

Definition at line 61 of file platform-plic.hh.

◆ priority_set()

template<size_t MaxIntrID, typename SourceID, typename Priority>
void StandardPlic< MaxIntrID, SourceID, Priority >::priority_set ( SourceID src,
Priority prio )
inline

Set the priority of the specified interrupt.

Definition at line 85 of file platform-plic.hh.


The documentation for this class was generated from the following file: