pub struct MappingDecl {
pub security_label: SecurityLabel,
pub name: String,
pub mem_region: String,
pub vaddr: Option<Address>,
pub perms: Permission,
pub cached: bool,
pub mem_region_offset: usize,
pub vaddr_offset: usize,
pub span: Range<usize>,
}Expand description
Memory mapping declaration.
§Mapping Declaration (.fi)
Maps a declared memory region into this protection domain’s virtual address space.
[High|Low] Mapping name(memRegion [, vaddr], "perms" [, cached]);| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
memRegion | ident | yes | — | Name of a MemoryRegion declared in the .fis file |
vaddr | hex | no | auto | Virtual address; auto-allocated if omitted |
"perms" | string | yes | — | Permission string: "r", "rw", "rx", "rwx", "x", "wx" |
cached | bool | no | true | Whether the mapping uses the CPU cache |
The security label must be ≥ the mapped region’s label (no High→Low downgrade).
Mapping ring_buf(ring_buffer_outer, 0x3_000_000, "rw"); // fixed vaddr
Mapping pkt_buf(packet_buffer_outer, "rw", true); // auto vaddr, cached
High Mapping secret(high_region, "r"); // High mapping
Low Mapping io(mmio_region, 0x2_000_000, "rw", false); // uncached MMIOLanguage reference: Mappings.
Fields§
§security_label: SecurityLabelInformation flow security label (defaults to Low).
name: StringMapping name.
mem_region: StringName of the memory region to map.
vaddr: Option<Address>Optional fixed virtual address.
perms: PermissionAccess permissions (r, rw, rx, rwx, etc.).
cached: boolWhether the mapping is cached.
mem_region_offset: usizeByte offset of mem_region identifier in the source.
vaddr_offset: usizeByte offset of the vaddr value (or closing paren if absent).
span: Range<usize>Byte span of the entire declaration in the source.
Trait Implementations§
Source§impl Clone for MappingDecl
impl Clone for MappingDecl
Source§fn clone(&self) -> MappingDecl
fn clone(&self) -> MappingDecl
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 MappingDecl
impl Debug for MappingDecl
Source§impl Display for MappingDecl
impl Display for MappingDecl
Auto Trait Implementations§
impl Freeze for MappingDecl
impl RefUnwindSafe for MappingDecl
impl Send for MappingDecl
impl Sync for MappingDecl
impl Unpin for MappingDecl
impl UnsafeUnpin for MappingDecl
impl UnwindSafe for MappingDecl
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.