|
Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
|
Distinct Armv7-M and Armv8-M MPU encoding mechanisms. More...
Go to the source code of this file.
Data Structures | |
| struct | nx_arch_mpu_v7_region_t |
| Armv7-M region fields, without an implicit memory policy. More... | |
| struct | nx_arch_mpu_v7_encoding_t |
| Armv7-M words targeting the caller-selected RNR, not RBAR.VALID. More... | |
| struct | nx_arch_mpu_v8_region_t |
| Armv8-M fields; limit is the exact inclusive final byte. More... | |
| struct | nx_arch_mpu_v8_encoding_t |
| Armv8-M words retaining its separate MAIR indirection. More... | |
Functions | |
| nx_arch_result_t | nx_arch_mpu_v7_encode (const nx_arch_mpu_v7_region_t *region, nx_arch_mpu_v7_encoding_t *encoding) |
| Encode an exact Armv7-M region without accessing hardware. | |
| nx_arch_result_t | nx_arch_mpu_v8_encode (const nx_arch_mpu_v8_region_t *region, nx_arch_mpu_v8_encoding_t *encoding) |
| Encode an exact Armv8-M region without accessing hardware. | |
| nx_arch_result_t | nx_arch_mpu_v7_program (uint32_t index, const nx_arch_mpu_v7_region_t *region) |
| Program one disabled-MPU Armv7-M region in this world. | |
| nx_arch_result_t | nx_arch_mpu_v8_program (uint32_t index, const nx_arch_mpu_v8_region_t *region) |
| Program one disabled-MPU Armv8-M region in this world. | |
| nx_arch_result_t | nx_arch_mpu_v8_attribute_set (uint32_t index, uint32_t attribute) |
| Update one Armv8-M MAIR byte without changing its neighbors. | |
Distinct Armv7-M and Armv8-M MPU encoding mechanisms.
Definition in file mpu.h.
| nx_arch_result_t nx_arch_mpu_v7_encode | ( | const nx_arch_mpu_v7_region_t * | region, |
| nx_arch_mpu_v7_encoding_t * | encoding ) |
Encode an exact Armv7-M region without accessing hardware.
| [in] | region | Size exponent 5..32, aligned base, AP 0/1/2/3/5/6, TEX 0..7 and raw S/C/B bits. Subregion mask is at most 255 and must be zero for sizes below 256 bytes. A 4 GiB region has base zero. Reserved/implementation-defined TEX/C/B encodings are rejected, never truncated or rounded. |
| [out] | encoding | RBAR and enabled RASR; unchanged on failure. |
| nx_arch_result_t nx_arch_mpu_v7_program | ( | uint32_t | index, |
| const nx_arch_mpu_v7_region_t * | region ) |
Program one disabled-MPU Armv7-M region in this world.
| [in] | index | Region number below actual MPU_TYPE.DREGION. |
| [in] | region | Fields validated by nx_arch_mpu_v7_encode. |
| nx_arch_result_t nx_arch_mpu_v8_attribute_set | ( | uint32_t | index, |
| uint32_t | attribute ) |
Update one Armv8-M MAIR byte without changing its neighbors.
| [in] | index | Attribute slot 0..7. |
| [in] | attribute | Architectural MAIR byte, at most 255. Device encodings are 0x00/0x04/0x08/0x0c; Normal memory uses nonzero outer/inner nibbles other than reserved 0x8. |
| nx_arch_result_t nx_arch_mpu_v8_encode | ( | const nx_arch_mpu_v8_region_t * | region, |
| nx_arch_mpu_v8_encoding_t * | encoding ) |
Encode an exact Armv8-M region without accessing hardware.
| [in] | region | 32-byte aligned base, inclusive limit ending in 0x1f, base not above limit, AP 0..3, SH 0/2/3 and MAIR index 0..7. The caller owns the corresponding MAIR policy. |
| [out] | encoding | RBAR and enabled RLAR; unchanged on failure. |
| nx_arch_result_t nx_arch_mpu_v8_program | ( | uint32_t | index, |
| const nx_arch_mpu_v8_region_t * | region ) |
Program one disabled-MPU Armv8-M region in this world.
| [in] | index | Region number below actual MPU_TYPE.DREGION. |
| [in] | region | Fields validated by nx_arch_mpu_v8_encode. |