pub type MPU = MPU<16, 32>;
Aliased Type§
struct MPU { /* private fields */ }
Implementations
Trait Implementations
Source§impl<const NUM_REGIONS: usize, const MIN_REGION_SIZE: usize> MPU for MPU<NUM_REGIONS, MIN_REGION_SIZE>
impl<const NUM_REGIONS: usize, const MIN_REGION_SIZE: usize> MPU for MPU<NUM_REGIONS, MIN_REGION_SIZE>
Source§type MpuConfig = CortexMConfig<NUM_REGIONS>
type MpuConfig = CortexMConfig<NUM_REGIONS>
MPU-specific state that defines a particular configuration for the MPU.
That is, this should contain all of the required state such that the
implementation can be passed an object of this type and it should be
able to correctly and entirely configure the MPU. Read more
Source§fn enable_app_mpu(&self)
fn enable_app_mpu(&self)
Enables the MPU for userspace apps. Read more
Source§fn disable_app_mpu(&self)
fn disable_app_mpu(&self)
Disables the MPU for userspace apps. Read more
Source§fn number_total_regions(&self) -> usize
fn number_total_regions(&self) -> usize
Returns the maximum number of regions supported by the MPU.
Source§fn new_config(
&self,
) -> Option<<MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig>
fn new_config( &self, ) -> Option<<MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig>
Creates a new empty MPU configuration. Read more
Source§fn reset_config(
&self,
config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig,
)
fn reset_config( &self, config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig, )
Resets an MPU configuration. Read more
Source§fn allocate_region(
&self,
unallocated_memory_start: *const u8,
unallocated_memory_size: usize,
min_region_size: usize,
permissions: Permissions,
config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig,
) -> Option<Region>
fn allocate_region( &self, unallocated_memory_start: *const u8, unallocated_memory_size: usize, min_region_size: usize, permissions: Permissions, config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig, ) -> Option<Region>
Allocates a new MPU region. Read more
Source§fn remove_memory_region(
&self,
region: Region,
config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig,
) -> Result<(), ()>
fn remove_memory_region( &self, region: Region, config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig, ) -> Result<(), ()>
Removes an MPU region within app-owned memory. Read more
Source§fn allocate_app_memory_region(
&self,
unallocated_memory_start: *const u8,
unallocated_memory_size: usize,
min_memory_size: usize,
initial_app_memory_size: usize,
initial_kernel_memory_size: usize,
permissions: Permissions,
config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig,
) -> Option<(*const u8, usize)>
fn allocate_app_memory_region( &self, unallocated_memory_start: *const u8, unallocated_memory_size: usize, min_memory_size: usize, initial_app_memory_size: usize, initial_kernel_memory_size: usize, permissions: Permissions, config: &mut <MPU<NUM_REGIONS, MIN_REGION_SIZE> as MPU>::MpuConfig, ) -> Option<(*const u8, usize)>
Chooses the location for a process’s memory, and allocates an MPU region
covering the app-owned part. Read more