Struct zircon_object::vm::VmAddressRegion [−][src]
Virtual Memory Address Regions
Implementations
impl VmAddressRegion
[src]
pub fn new_root() -> Arc<Self>
[src]
Create a new root VMAR.
pub fn new_kernel() -> Arc<Self>
[src]
Create a kernel root VMAR.
pub fn allocate_at(
self: &Arc<Self>,
offset: usize,
len: usize,
flags: VmarFlags,
align: usize
) -> ZxResult<Arc<Self>>
[src]
self: &Arc<Self>,
offset: usize,
len: usize,
flags: VmarFlags,
align: usize
) -> ZxResult<Arc<Self>>
Create a child VMAR at the offset
.
pub fn allocate(
self: &Arc<Self>,
offset: Option<usize>,
len: usize,
flags: VmarFlags,
align: usize
) -> ZxResult<Arc<Self>>
[src]
self: &Arc<Self>,
offset: Option<usize>,
len: usize,
flags: VmarFlags,
align: usize
) -> ZxResult<Arc<Self>>
Create a child VMAR with optional offset
.
pub fn map_at(
&self,
vmar_offset: usize,
vmo: Arc<VmObject>,
vmo_offset: usize,
len: usize,
flags: MMUFlags
) -> ZxResult<VirtAddr>
[src]
&self,
vmar_offset: usize,
vmo: Arc<VmObject>,
vmo_offset: usize,
len: usize,
flags: MMUFlags
) -> ZxResult<VirtAddr>
Map the vmo
into this VMAR at given offset
.
pub fn map(
&self,
vmar_offset: Option<usize>,
vmo: Arc<VmObject>,
vmo_offset: usize,
len: usize,
flags: MMUFlags
) -> ZxResult<VirtAddr>
[src]
&self,
vmar_offset: Option<usize>,
vmo: Arc<VmObject>,
vmo_offset: usize,
len: usize,
flags: MMUFlags
) -> ZxResult<VirtAddr>
Map the vmo
into this VMAR.
pub fn map_ext(
&self,
vmar_offset: Option<usize>,
vmo: Arc<VmObject>,
vmo_offset: usize,
len: usize,
permissions: MMUFlags,
flags: MMUFlags,
overwrite: bool,
map_range: bool
) -> ZxResult<VirtAddr>
[src]
&self,
vmar_offset: Option<usize>,
vmo: Arc<VmObject>,
vmo_offset: usize,
len: usize,
permissions: MMUFlags,
flags: MMUFlags,
overwrite: bool,
map_range: bool
) -> ZxResult<VirtAddr>
Map the vmo
into this VMAR.
pub fn unmap(&self, addr: VirtAddr, len: usize) -> ZxResult
[src]
Unmaps all VMO mappings and destroys all sub-regions within the absolute range
including addr
and ending before exclusively at addr + len
.
Any sub-region that is in the range must be fully in the range
(i.e. partial overlaps are an error).
If a mapping is only partially in the range, the mapping is split and the requested
portion is unmapped.
pub fn protect(&self, addr: usize, len: usize, flags: MMUFlags) -> ZxResult
[src]
Change protections on a subset of the region of memory in the containing address space. If the requested range overlaps with a subregion, protect() will fail.
pub fn destroy(self: &Arc<Self>) -> ZxResult
[src]
Unmap all mappings within the VMAR, and destroy all sub-regions of the region.
pub fn clear(&self) -> ZxResult
[src]
Unmap all mappings and destroy all sub-regions of VMAR.
pub fn table_phys(&self) -> PhysAddr
[src]
Get physical address of the underlying page table.
pub fn addr(&self) -> usize
[src]
Get start address of this VMAR.
pub fn is_dead(&self) -> bool
[src]
Whether this VMAR is dead.
pub fn is_alive(&self) -> bool
[src]
Whether this VMAR is alive.
pub fn get_info(&self) -> VmarInfo
[src]
Get information of this VmAddressRegion
pub fn get_flags(&self) -> VmarFlags
[src]
Get VmarFlags of this VMAR.
pub fn dump(&self)
[src]
Dump all mappings recursively.
pub fn vdso_base_addr(&self) -> Option<usize>
[src]
Get base address of vdso.
pub fn handle_page_fault(&self, vaddr: VirtAddr, flags: MMUFlags) -> ZxResult
[src]
Handle page fault happened on this VMAR.
The fault virtual address is vaddr
and the reason is in flags
.
pub fn fork_from(&self, src: &Arc<Self>) -> ZxResult
[src]
Clone the entire address space and VMOs from source VMAR. (For Linux fork)
pub fn get_task_stats(&self) -> TaskStatsInfo
[src]
Returns statistics about memory used by a task.
pub fn read_memory(&self, vaddr: usize, buf: &mut [u8]) -> ZxResult<usize>
[src]
Read from address space.
Return the actual number of bytes read.
pub fn write_memory(&self, vaddr: usize, buf: &[u8]) -> ZxResult<usize>
[src]
Write to address space.
Return the actual number of bytes written.
pub fn find_mapping(&self, vaddr: usize) -> Option<Arc<VmMapping>>
[src]
Find mapping of vaddr
Trait Implementations
impl Debug for VmAddressRegion
[src]
impl KernelObject for VmAddressRegion
[src]
fn id(&self) -> KoID
[src]
fn type_name(&self) -> &str
[src]
fn name(&self) -> String
[src]
fn set_name(&self, name: &str)
[src]
fn signal(&self) -> Signal
[src]
fn signal_set(&self, signal: Signal)
[src]
fn signal_clear(&self, signal: Signal)
[src]
fn signal_change(&self, clear: Signal, set: Signal)
[src]
fn add_signal_callback(&self, callback: SignalHandler)
[src]
fn get_child(&self, _id: KoID) -> ZxResult<Arc<dyn KernelObject>>
[src]
fn peer(&self) -> ZxResult<Arc<dyn KernelObject>>
[src]
fn related_koid(&self) -> KoID
[src]
fn allowed_signals(&self) -> Signal
[src]
impl VmarExt for VmAddressRegion
[src]
Auto Trait Implementations
impl !RefUnwindSafe for VmAddressRegion
impl Send for VmAddressRegion
impl Sync for VmAddressRegion
impl Unpin for VmAddressRegion
impl !UnwindSafe for VmAddressRegion
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,