[−][src]Struct sunrise_kernel::paging::cross_process::CrossProcessMapping
A struct representing a UserLand mapping mirrored in KernelSpace.
Fields
kernel_address: VirtualAddress
The KernelLand address it was remapped to. Has the desired offset.
len: usize
Length of the region that was requested to be remapped. Note that the actual remapped region may be larger (since a Page Table mapping might need to be at least 4KB).
mapping: Mapping
The frames this mapping covers.
Implementations
impl CrossProcessMapping
[src]
pub fn mirror_mapping(
mapping: &Mapping,
offset: usize,
len: usize
) -> Result<CrossProcessMapping, KernelError>
[src]
mapping: &Mapping,
offset: usize,
len: usize
) -> Result<CrossProcessMapping, KernelError>
Creates an CrossProcessMapping
.
Remaps a subsection of the mapping in KernelLand.
The offset is a byte offset in the Mapping's underlying physical frames. If the mapping already had an offset, those are summed. For instance, a mapping with 3 frames and an offset at 0x1000, mirror_mapped with an offset of 0x1000, will result in mirror mapping from the third frame.
The length is a byte length to mirror map. It's allowed to be smaller than the length of the underlying mapping.
Error
- Error if the mapping is not Shared, as only refcounted mappings can be owned.
- Error if
offset
+len
>mapping
length. - Error if
offset
+len
would overflow. - Error if
len
is 0.
Panics
- Panics if
mapping.phys_offset()
+offset
overflows.
pub fn addr(&self) -> VirtualAddress
[src]
The address of the region asked to be remapped.
pub fn len(&self) -> usize
[src]
The length of the region asked to be remapped.
Trait Implementations
impl Debug for CrossProcessMapping
[src]
impl Drop for CrossProcessMapping
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CrossProcessMapping
impl Send for CrossProcessMapping
impl Sync for CrossProcessMapping
impl Unpin for CrossProcessMapping
impl !UnwindSafe for CrossProcessMapping
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,
fn borrow_mut(&mut self) -> &mut T
[src]
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.
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>,