pub struct MemoryRegionDecl {
pub security_label: SecurityLabel,
pub name: String,
pub size: Address,
pub page_size: PageSize,
pub phys_addr: Option<Address>,
pub span: Range<usize>,
}Expand description
Memory region declaration.
§MemoryRegion Declaration (.fis)
Declares a shared memory region available for mapping into one or more protection domains.
[High|Low] MemoryRegion name(size [, pageSize] [, physAddr]);| Parameter | Type | Required | Description |
|---|---|---|---|
size | hex | yes | Total size in bytes; must be a multiple of pageSize |
pageSize | hex | no | 0x1000 (4 KiB, default) or 0x200000 (2 MiB); use , to skip and still provide physAddr |
physAddr | hex | no | Fixed physical address for MMIO; must be page-aligned |
MemoryRegion buf(0x1000); // 4 KiB, Low
High MemoryRegion secret(0x200000, 0x200000); // 2 MiB large page, High
MemoryRegion mmio(0x1000, 0x1000, 0xFE00_0000); // MMIO at fixed phys addr
MemoryRegion dev(0x1000, , 0xFE00_0000); // skip pageSize (default 4 KiB)Language reference: Memory Region Declarations.
Fields§
§security_label: SecurityLabelInformation flow security label (defaults to Low).
name: StringRegion name (referenced by mappings).
size: AddressTotal size in bytes.
page_size: PageSizePage granularity (defaults to 4KiB).
phys_addr: Option<Address>Optional fixed physical address for device MMIO.
span: Range<usize>Byte span of the entire declaration in the source.
Trait Implementations§
Source§impl Clone for MemoryRegionDecl
impl Clone for MemoryRegionDecl
Source§fn clone(&self) -> MemoryRegionDecl
fn clone(&self) -> MemoryRegionDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemoryRegionDecl
impl Debug for MemoryRegionDecl
Source§impl Display for MemoryRegionDecl
impl Display for MemoryRegionDecl
Auto Trait Implementations§
impl Freeze for MemoryRegionDecl
impl RefUnwindSafe for MemoryRegionDecl
impl Send for MemoryRegionDecl
impl Sync for MemoryRegionDecl
impl Unpin for MemoryRegionDecl
impl UnsafeUnpin for MemoryRegionDecl
impl UnwindSafe for MemoryRegionDecl
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.