The S32 SDK provides Peripheral Driver for the Memory Protection Unit (MPU) module of S32 SDK devices.
The memory protection unit (MPU) provides hardware access control for all memory references generated in the device.
Hardware background
The MPU concurrently monitors all system bus transactions and evaluates their appropriateness using pre-programmed region descriptors that define memory spaces and their access rights. Memory references that have sufficient access control rights are allowed to complete, while references that are not mapped to any region descriptor or have insufficient rights are terminated with a protection error response.
The MPU implements a two-dimensional hardware array of memory region descriptors and the crossbar slave ports to continuously monitor the legality of every memory reference generated by each bus master in the system.
The feature set includes:
- 16 program-visible 128-bit region descriptors, accessible by four 32-bit words each
- Each region descriptor defines a modulo-32 byte space, aligned anywhere in memory
- Region sizes can vary from 32 bytes to 4 Gbytes
- Two access control permissions defined in a single descriptor word
- Masters 0–3: read, write, and execute attributes for supervisor and user accesses
- Masters 4–7: read and write attributes
- Hardware-assisted maintenance of the descriptor valid bit minimizes coherency issues
- Alternate programming model view of the access control permissions word
- Priority given to granting permission over denying access for overlapping region descriptors
- Detects access protection errors if a memory reference does not hit in any memory region, or if the reference is illegal in all hit memory regions. If an access error occurs, the reference is terminated with an error response, and the MPU inhibits the bus cycle being sent to the targeted slave device.
- Error registers, per slave port, capture the last faulting address, attributes, and other information
- Global MPU enable/disable control bit
|
| MPU Driver |
| Memory Protection Unit Peripheral Driver.
|
|