Trait MappedDmaTarget

Source
pub unsafe trait MappedDmaTarget: Send + Sync {
    // Required methods
    fn base(&self) -> *const u8;
    fn len(&self) -> usize;
    fn pfns(&self) -> &[u64];
    fn pfn_bias(&self) -> u64;
}
Expand description

A mapped buffer that can be accessed by the host or the device.

§Safety

The implementor must ensure that the VA region from base()..base() + len() remains mapped for the lifetime.

Required Methods§

Source

fn base(&self) -> *const u8

The virtual address of the mapped memory.

Source

fn len(&self) -> usize

The length of the buffer in bytes.

Source

fn pfns(&self) -> &[u64]

4KB page numbers used to refer to the memory when communicating with the device.

Source

fn pfn_bias(&self) -> u64

The pfn_bias on confidential platforms (aka vTOM) applied to PFNs in Self::pfns(),

Implementors§