CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
StandardClint Class Reference

Driver for using the (old) RISC-V Core-Local Interrupt (CLINT) controller (as opposed to the newer CLIC) to provide timer signals. More...

#include <platform-timer.hh>

Inheritance diagram for StandardClint:
Collaboration diagram for StandardClint:

Static Public Member Functions

static void init ()
 Initialise the interface.
static uint64_t time ()
static void setnext (uint64_t nextTime)
 Set the timer comparison for next interrupt to given value.
static uint64_t next ()
 Returns the time at which the next timer is scheduled.
static void clear ()
 Set the timer comparator to a value that should never trigger an interrupt.

Detailed Description

Driver for using the (old) RISC-V Core-Local Interrupt (CLINT) controller (as opposed to the newer CLIC) to provide timer signals.

Note that CLIC can run in CLINT-compatible mode, so we don't need to support CLIC for a while, it has a lot of features that are overkill for most embedded devices.

Definition at line 17 of file platform-timer.hh.

Member Function Documentation

◆ clear()

void StandardClint::clear ( )
inlinestatic

Set the timer comparator to a value that should never trigger an interrupt.

Note: we rely on the fact that mtimeh should never reach maximum value in plausible time-frame.

Definition at line 101 of file platform-timer.hh.

◆ init()

void StandardClint::init ( )
inlinestatic

◆ next()

uint64_t StandardClint::next ( )
inlinestatic

Returns the time at which the next timer is scheduled.

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

◆ setnext()

void StandardClint::setnext ( uint64_t nextTime)
inlinestatic

Set the timer comparison for next interrupt to given value.

Note that CLINT does not need any action to acknowledge the interrupt. Writing to it is enough to clear the interrupt. Interrupts must be disabled when calling this function.

the high 32 bits of the 64-bit MTIME register

Definition at line 64 of file platform-timer.hh.

◆ time()

uint64_t StandardClint::time ( )
inlinestatic

Definition at line 41 of file platform-timer.hh.


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