CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
Ibex::HardwareRevoker< WordT, TCMBaseAddr > Class Template Reference
Inheritance diagram for Ibex::HardwareRevoker< WordT, TCMBaseAddr >:
Collaboration diagram for Ibex::HardwareRevoker< WordT, TCMBaseAddr >:

Public Member Functions

void init ()
 Initialise a revoker instance.
uint32_t system_epoch_get ()
 Returns the revocation epoch.
template<bool AllowPartial = false>
uint32_t has_revocation_finished_for_epoch (uint32_t epoch)
 Queries whether the specified revocation epoch has finished, or, if AllowPartial is true, that it has (at least) started.
void system_bg_revoker_kick ()
 Start a revocation sweep.
bool wait_for_completion (TimeoutArgument timeout, uint32_t epoch)
 Block until the revocation epoch specified by epoch has completed.
const uint32_t * interrupt_futex ()
 Reveal the interrupt futex word.
void request_interrupt ()
 Request the delivery of an IRQ when the revoker finishes its current scan.
Public Member Functions inherited from Revocation::BitmapDirect< WordT, TCMBaseAddr >
void mark_set_one (CHERI::Capability< void > cap)
 Set a single shadow bit for an address.
void mark_clear_one (ptraddr_t address)
 Clear a single shadow bit for an address.
void mark_set_range (CHERI::Capability< void > cap)
 Set a range of shadow bits, from cap's base to its top.
void mark_clear_range (ptraddr_t base, ptraddr_t top)
 Clear a range of shadow bits, from base to top.
bool mark_get (size_t addr)

Static Public Attributes

static constexpr bool IsAsynchronous = true
 This is an asynchronous hardware revoker.

Additional Inherited Members

Protected Member Functions inherited from Revocation::BitmapDirect< WordT, TCMBaseAddr >
void init ()
 Initialise this class with a capability to the shadow bitmap.
void mark_one (ptraddr_t address, bool fill)
 Set or clear the single shadow bit for an address.
template<bool Fill>
void mark_range (ptraddr_t base, ptraddr_t top)
 Set or clear the shadow bits for all addresses within [base, top).
Static Protected Member Functions inherited from Revocation::BitmapDirect< WordT, TCMBaseAddr >
static constexpr size_t shadow_offset_bits (ptraddr_t addr)
static constexpr size_t shadow_word_index (size_t offsetBits)
static constexpr WordT shadow_mask_bits_below_address (ptraddr_t addr)
static constexpr WordT shadow_mask_bits_above_address (ptraddr_t addr)

Detailed Description

template<typename WordT, ptraddr_t TCMBaseAddr>
class Ibex::HardwareRevoker< WordT, TCMBaseAddr >

Definition at line 28 of file platform-hardware_revoker.hh.

Member Function Documentation

◆ has_revocation_finished_for_epoch()

template<typename WordT, ptraddr_t TCMBaseAddr>
template<bool AllowPartial = false>
uint32_t Ibex::HardwareRevoker< WordT, TCMBaseAddr >::has_revocation_finished_for_epoch ( uint32_t epoch)
inline

Queries whether the specified revocation epoch has finished, or, if AllowPartial is true, that it has (at least) started.

epoch must be even, as memory leaves quarantine only when revocation is not in progress.

Definition at line 153 of file platform-hardware_revoker.hh.

References system_epoch_get().

Referenced by wait_for_completion().

◆ init()

template<typename WordT, ptraddr_t TCMBaseAddr>
void Ibex::HardwareRevoker< WordT, TCMBaseAddr >::init ( )
inline

Initialise a revoker instance.

These two symbols mark the region that needs revocation. We revoke capabilities everywhere from the start of compartment globals to the end of the heap.

Definition at line 86 of file platform-hardware_revoker.hh.

References Revocation::BitmapDirect< WordT, TCMBaseAddr >::init(), interrupt_futex_get(), and STATIC_SEALED_VALUE.

◆ interrupt_futex()

template<typename WordT, ptraddr_t TCMBaseAddr>
const uint32_t * Ibex::HardwareRevoker< WordT, TCMBaseAddr >::interrupt_futex ( )
inline

Reveal the interrupt futex word.

This is deliberately not part of the core/allocator/revoker.h IsHardwareRevokerDevice concept and should be used only in testing and other extenuating circumstances.

Definition at line 237 of file platform-hardware_revoker.hh.

◆ request_interrupt()

template<typename WordT, ptraddr_t TCMBaseAddr>
void Ibex::HardwareRevoker< WordT, TCMBaseAddr >::request_interrupt ( )
inline

Request the delivery of an IRQ when the revoker finishes its current scan.

This is deliberately not part of the core/allocator/revoker.h IsHardwareRevokerDevice concept and should be used only in testing and other extenuating circumstances.

Definition at line 250 of file platform-hardware_revoker.hh.

◆ system_bg_revoker_kick()

template<typename WordT, ptraddr_t TCMBaseAddr>
void Ibex::HardwareRevoker< WordT, TCMBaseAddr >::system_bg_revoker_kick ( )
inline

Start a revocation sweep.

Definition at line 180 of file platform-hardware_revoker.hh.

References system_epoch_get().

Referenced by wait_for_completion().

◆ system_epoch_get()

template<typename WordT, ptraddr_t TCMBaseAddr>
uint32_t Ibex::HardwareRevoker< WordT, TCMBaseAddr >::system_epoch_get ( )
inline

Returns the revocation epoch.

This is the number of revocations that have started.

Definition at line 140 of file platform-hardware_revoker.hh.

Referenced by has_revocation_finished_for_epoch(), and system_bg_revoker_kick().

◆ wait_for_completion()

template<typename WordT, ptraddr_t TCMBaseAddr>
bool Ibex::HardwareRevoker< WordT, TCMBaseAddr >::wait_for_completion ( TimeoutArgument timeout,
uint32_t epoch )
inline

Block until the revocation epoch specified by epoch has completed.

Definition at line 194 of file platform-hardware_revoker.hh.

References futex_timed_wait(), has_revocation_finished_for_epoch(), and system_bg_revoker_kick().

Member Data Documentation

◆ IsAsynchronous

template<typename WordT, ptraddr_t TCMBaseAddr>
bool Ibex::HardwareRevoker< WordT, TCMBaseAddr >::IsAsynchronous = true
staticconstexpr

This is an asynchronous hardware revoker.

Definition at line 81 of file platform-hardware_revoker.hh.


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