Struct acpi::PhysicalMapping [−][src]
pub struct PhysicalMapping<H, T> where
H: AcpiHandler, { /* fields omitted */ }
Expand description
Describes a physical mapping created by AcpiHandler::map_physical_region
and unmapped by
AcpiHandler::unmap_physical_region
. The region mapped must be at least size_of::<T>()
bytes, but may be bigger.
Implementations
pub unsafe fn new(
physical_start: usize,
virtual_start: NonNull<T>,
region_length: usize,
mapped_length: usize,
handler: H
) -> PhysicalMapping<H, T>
pub unsafe fn new(
physical_start: usize,
virtual_start: NonNull<T>,
region_length: usize,
mapped_length: usize,
handler: H
) -> PhysicalMapping<H, T>
Construct a new PhysicalMapping
.
mapped_length
may differ from region_length
if padding is added for alignment.
Safety
This function must only be called by an AcpiHandler
of type H
to make sure that it’s safe to unmap the mapping.
virtual_start
must be a valid pointer.region_length
must be equal to or larger thansize_of::<T>()
.handler
must be the sameAcpiHandler
that created the mapping.
Trait Implementations
Auto Trait Implementations
impl<H, T> !Sync for PhysicalMapping<H, T>
impl<H, T> Unpin for PhysicalMapping<H, T> where
H: Unpin,