pub struct MemoryMapSection { /* private fields */ }

Implementations

Construct a MemoryMapSection for normal read/write memory access.

  • All endpoints must be aligned to 1MiB blocks (0x???0_0000).

  • virtual_range must not be empty.

  • virtual_range must be a strict subset of 0..0x1_0000_0000.

  • physical_start is of type u64, but using a large physical address (> 4GiB) isn’t supported yet.

The memory section is configured as a read/writable (but not executable) Normal memory with a Outer and Inner Write-Back, Write-Allocate attribute.

Examples
use r3_port_arm::MemoryMapSection;

// Map VA `0x2000_0000..0x2800_0000` to PA `0xc000_0000.0xc800_0000`
MemoryMapSection::new(0x2000_0000..0x2800_0000, 0xc000_0000);

This function panics if an invalid parameter is supplied.

// Empty range
MemoryMapSection::new(0x2000_0000..0x2000_0000, 0xc000_0000);
// VA is not in range `0..0x1_0000_0000`
MemoryMapSection::new(0x9000_0000..0x11000_0000, 0xc000_0000);

Modify the memory attribute for a Device memory, returning the modified self.

Change the sharability, returning the modified self.

Change the executability, returning the modified self.

Change the writability, returning the modified self.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.