SysMem

Struct SysMem 

Source
pub struct SysMem;

Implementations§

Source§

impl SysMem

Source

pub const OP_CREATE: u8 = 1u8

Source

pub const OP_GET: u8 = 2u8

Source

pub const OP_PUT: u8 = 3u8

Source

pub const OP_MAP: u8 = 4u8

Source

pub const OP_UNMAP: u8 = 5u8

Source

pub const OP_REMAP: u8 = 6u8

Source

pub const OP_QUERY: u8 = 7u8

Source

pub const OP_DEBUG: u8 = 8u8

Source

pub const OP_RECLAIM: u8 = 9u8

Source

pub const F_READABLE: u32 = 1u32

Source

pub const F_WRITABLE: u32 = 2u32

Source

pub const F_MMIO: u32 = 4u32

Source

pub const F_CONTIGUOUS: u32 = 8u32

Source

pub const F_SHARE_SELF: u32 = 16u32

Source

pub const F_LAZY: u32 = 32u32

Source

pub const F_LOG_UTF8: u32 = 1u32

Source

pub const F_QUERY_STATS: u32 = 1u32

Source

pub const PAGE_SIZE_SMALL: u64 = 4_096u64

Source

pub const PAGE_SIZE_MID: u64 = 2_097_152u64

Source

pub const PAGE_SIZE_LARGE: u64 = 1_073_741_824u64

Source

pub const PAGE_SIZE_SMALL_LOG2: u64 = 12u64

Source

pub const PAGE_SIZE_MID_LOG2: u64 = 21u64

Source

pub const PAGE_SIZE_LARGE_LOG2: u64 = 30u64

Source

pub const PAGE_TYPE_SMALL: u64 = 1u64

Source

pub const PAGE_TYPE_MID: u64 = 2u64

Source

pub const PAGE_TYPE_LARGE: u64 = 3u64

Source

pub const MAX_ADDRESS_SPACE_SIZE_LOG2: u64 = 46u64

Source

pub fn map( address_space: SysHandle, flags: u32, phys_addr: u64, virt_addr: u64, page_size: u64, num_pages: u64, ) -> Result<u64, ErrorCode>

Source

pub fn map2( address_space: SysHandle, flags: u32, phys_addr: u64, virt_addr: u64, page_size: u64, num_pages: u64, ) -> Result<(u64, u64), ErrorCode>

Source

pub fn unmap( address_space: SysHandle, flags: u32, phys_addr: u64, virt_addr: u64, ) -> Result<(), ErrorCode>

Source

pub fn virt_to_phys(virt_addr: u64) -> Result<u64, ErrorCode>

Source

pub fn alloc(page_size: u64, num_pages: u64) -> Result<u64, ErrorCode>

Source

pub fn alloc_contiguous_pages(size: u64) -> Result<u64, ErrorCode>

Source

pub fn free(virt_addr: u64) -> Result<(), ErrorCode>

Source

pub fn mmio_map(phys_addr: u64, size: u64) -> Result<u64, ErrorCode>

Source

pub fn log(msg: &str) -> Result<(), ErrorCode>

Source

pub fn query_stats() -> Result<MemoryStats, ErrorCode>

Source

pub fn reclaim(handle: SysHandle) -> Result<(), ErrorCode>

Auto Trait Implementations§

§

impl Freeze for SysMem

§

impl RefUnwindSafe for SysMem

§

impl Send for SysMem

§

impl Sync for SysMem

§

impl Unpin for SysMem

§

impl UnwindSafe for SysMem

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.