pub struct TORRegionSpec { /* private fields */ }
Expand description
A RISC-V PMP memory region specification, configured in TOR mode.
This type checks that the supplied start
and end
addresses meet the
RISC-V TOR requirements, namely that
- the region’s start address is aligned to a 4-byte boundary
- the region’s end address is aligned to a 4-byte boundary
- the region is at least 4 bytes long
By accepting this type, PMP implementations can rely on these requirements to be verified.
Implementations§
Source§impl TORRegionSpec
impl TORRegionSpec
Sourcepub fn new(start: *const u8, end: *const u8) -> Option<Self>
pub fn new(start: *const u8, end: *const u8) -> Option<Self>
Construct a new TORRegionSpec
This method accepts a start
and end
address. It returns
Some(region)
when all constraints specified in the TORRegionSpec
’s
documentation are satisfied, otherwise None
.
Sourcepub fn start(&self) -> *const u8
pub fn start(&self) -> *const u8
Retrieve the start address of this TORRegionSpec
.
Sourcepub fn end(&self) -> *const u8
pub fn end(&self) -> *const u8
Retrieve the end address of this TORRegionSpec
.
Trait Implementations§
Source§impl Clone for TORRegionSpec
impl Clone for TORRegionSpec
Source§fn clone(&self) -> TORRegionSpec
fn clone(&self) -> TORRegionSpec
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TORRegionSpec
impl Debug for TORRegionSpec
impl Copy for TORRegionSpec
Auto Trait Implementations§
impl Freeze for TORRegionSpec
impl RefUnwindSafe for TORRegionSpec
impl !Send for TORRegionSpec
impl !Sync for TORRegionSpec
impl Unpin for TORRegionSpec
impl UnwindSafe for TORRegionSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more