|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
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>


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. | |
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.
|
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.
|
inlinestatic |
Initialise the interface.
Definition at line 23 of file platform-timer.hh.
References CHERI::Capability< T, IsSealedT >::address(), CHERI::Capability< T, IsSealedT >::bounds(), and MMIO_CAPABILITY.
|
inlinestatic |
Returns the time at which the next timer is scheduled.
Definition at line 85 of file platform-timer.hh.
|
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.
|
inlinestatic |
Definition at line 41 of file platform-timer.hh.