Trait kernel::platform::mpu::MPU [] [src]

pub trait MPU {
    fn enable_mpu(&self);
fn disable_mpu(&self);
fn create_region(
        region_num: usize,
        start: usize,
        len: usize,
        execute: ExecutePermission,
        access: AccessPermission
    ) -> Option<Region>;
fn set_mpu(&self, region: Region); }

Required Methods

Enable the MPU.

Both privileged and unprivileged code are subject to the constraints of the active MPU regions. However, while unprivileged code cannot access any memory space that is is not explicitly authorized to, privileged code can access all unprotected (background) memory.

Completely disable the MPU.

Creates a new MPU-specific memory protection region

region_num: an MPU region number 0-7 start_addr: the region base address. Lower bits will be masked according to the region size. len : region size as a PowerOfTwo (e.g. 16 for 64KB) execute : whether to enable code execution from this region ap : access permissions as defined in Table 4.47 of the user guide.

Sets the base address, size and access attributes of the given MPU region number.

Implementors