|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
Class for interacting with the shadow bitmap. More...
#include <bitmap_direct.hh>

Public Member Functions | |
| 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) |
Protected Member Functions | |
| 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 | |
| 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) |
Class for interacting with the shadow bitmap.
This bitmap controls the behaviour of a hardware load barrier, which will invalidate capabilities in the register file if they point revoked memory. Only memory that is intended for use as a heap is required to use the load barrier and so the revocation bitmap is not required to span the whole of the address space.
Template arguments are the size of the value to be used for reads and updates, which may vary depending on the width of the interface to the shadow memory, and the base address of the memory covered by the shadow bitmap.
This currently assumes that all revocable memory is in a single contiguous region.
Definition at line 31 of file bitmap_direct.hh.
|
inlineprotected |
Initialise this class with a capability to the shadow bitmap.
Definition at line 51 of file bitmap_direct.hh.
References MMIO_CAPABILITY.
Referenced by Ibex::HardwareRevoker< WordT, TCMBaseAddr >::init().
|
inline |
Clear a single shadow bit for an address.
Definition at line 215 of file bitmap_direct.hh.
References mark_one().
|
inline |
Clear a range of shadow bits, from base to top.
This takes a pair of addresses rather than a capability since a precisely-bounded capability to the region in question would not be round-trippable through memory, even if the allocator could construct such a thing (since it retains elevated access to the heap region).
Definition at line 237 of file bitmap_direct.hh.
References mark_range().
|
inline |
Definition at line 243 of file bitmap_direct.hh.
|
inlineprotected |
Set or clear the single shadow bit for an address.
| fill | true to set, false to clear the bit |
Definition at line 94 of file bitmap_direct.hh.
Referenced by mark_clear_one(), and mark_set_one().
|
inlineprotected |
Set or clear the shadow bits for all addresses within [base, top).
| Fill | true to set, false to clear the bits |
Definition at line 124 of file bitmap_direct.hh.
Referenced by mark_clear_range(), and mark_set_range().
|
inline |
Set a single shadow bit for an address.
Definition at line 207 of file bitmap_direct.hh.
References CHERI::Capability< T, IsSealedT >::address(), and mark_one().
|
inline |
Set a range of shadow bits, from cap's base to its top.
Definition at line 223 of file bitmap_direct.hh.
References CHERI::Capability< T, IsSealedT >::base(), mark_range(), and CHERI::Capability< T, IsSealedT >::top().
|
inlinestaticconstexprprotected |
Definition at line 72 of file bitmap_direct.hh.
|
inlinestaticconstexprprotected |
Definition at line 66 of file bitmap_direct.hh.
|
inlinestaticconstexprprotected |
Definition at line 56 of file bitmap_direct.hh.
|
inlinestaticconstexprprotected |
Definition at line 61 of file bitmap_direct.hh.