This group provides support functions to manage an Arm PMSAv7 (Protected Memory System Architecture) based Memory Protection Unit (MPU).
More...
|
file | armv7-pmsa.h |
| This header file provides the API to manage an Arm PMSAv7 based Memory Protection Unit (MPU).
|
|
|
#define | ARMV7_RGNR_REGION_SHIFT 0 |
|
#define | ARMV7_RGNR_REGION_MASK 0xffU |
|
#define | ARMV7_RGNR_REGION_GET(_reg) (((_reg)&ARMV7_RGNR_REGION_MASK) >> ARMV7_RGNR_REGION_SHIFT) |
|
#define | ARMV7_RGNR_REGION_SET(_reg, _val) |
|
#define | ARMV7_RGNR_REGION(_val) (((_val) << ARMV7_RGNR_REGION_SHIFT) & ARMV7_RGNR_REGION_MASK) |
|
#define | ARMV7_RSR_EN 0x1U |
|
#define | ARMV7_RSR_RSIZE_SHIFT 1 |
|
#define | ARMV7_RSR_RSIZE_MASK 0x3eU |
|
#define | ARMV7_RSR_RSIZE_GET(_reg) (((_reg)&ARMV7_RSR_RSIZE_MASK) >> ARMV7_RSR_RSIZE_SHIFT) |
|
#define | ARMV7_RSR_RSIZE_SET(_reg, _val) |
|
#define | ARMV7_RSR_RSIZE(_val) (((_val) << ARMV7_RSR_RSIZE_SHIFT) & ARMV7_RSR_RSIZE_MASK) |
|
#define | ARMV7_RSR_SD_SHIFT 8 |
|
#define | ARMV7_RSR_SD_MASK 0xff00U |
|
#define | ARMV7_RSR_SD_GET(_reg) (((_reg)&ARMV7_RSR_SD_MASK) >> ARMV7_RSR_SD_SHIFT) |
|
#define | ARMV7_RSR_SD_SET(_reg, _val) |
|
#define | ARMV7_RSR_SD(_val) (((_val) << ARMV7_RSR_SD_SHIFT) & ARMV7_RSR_SD_MASK) |
|
#define | ARMV7_RACR_B 0x1U |
|
#define | ARMV7_RACR_C 0x2U |
|
#define | ARMV7_RACR_S 0x4U |
|
#define | ARMV7_RACR_TEX_0 0x8U |
|
#define | ARMV7_RACR_TEX_1 0x10U |
|
#define | ARMV7_RACR_TEX_2 0x20U |
|
#define | ARMV7_RACR_AP_0 0x100U |
|
#define | ARMV7_RACR_AP_1 0x200U |
|
#define | ARMV7_RACR_AP_2 0x400U |
|
#define | ARMV7_RACR_XN 0x1000U |
|
#define | ARMV7_PMSA_READ_ONLY_CACHED |
|
#define | ARMV7_PMSA_READ_ONLY_UNCACHED (ARMV7_RACR_TEX_0 | ARMV7_RACR_AP_0 | ARMV7_RACR_AP_2) |
|
#define | ARMV7_PMSA_READ_WRITE_CACHED (ARMV7_RACR_TEX_0 | ARMV7_RACR_C | ARMV7_RACR_B | ARMV7_RACR_AP_0) |
|
#define | ARMV7_PMSA_READ_WRITE_UNCACHED (ARMV7_RACR_TEX_0 | ARMV7_RACR_AP_0) |
|
#define | ARMV7_PMSA_READ_WRITE_SHARED (ARMV7_RACR_TEX_0 | ARMV7_RACR_S | ARMV7_RACR_AP_0) |
|
#define | ARMV7_PMSA_SHAREABLE_DEVICE (ARMV7_RACR_B | ARMV7_RACR_AP_0) |
|
#define | ARMV7_PMSA_NON_SHAREABLE_DEVICE (ARMV7_RACR_TEX_1 | ARMV7_RACR_AP_0) |
|
This group provides support functions to manage an Arm PMSAv7 (Protected Memory System Architecture) based Memory Protection Unit (MPU).
◆ ARMV7_PMSA_READ_ONLY_CACHED
#define ARMV7_PMSA_READ_ONLY_CACHED |
Value: (ARMV7_RACR_TEX_0 | ARMV7_RACR_C | ARMV7_RACR_B | ARMV7_RACR_AP_0 | \
ARMV7_RACR_AP_2)
◆ ARMV7_RGNR_REGION_SET
#define ARMV7_RGNR_REGION_SET |
( |
|
_reg, |
|
|
|
_val |
|
) |
| |
Value: (((_reg) & ~ARMV7_RGNR_REGION_MASK) | \
(((_val) << ARMV7_RGNR_REGION_SHIFT) & ARMV7_RGNR_REGION_MASK))
◆ ARMV7_RSR_RSIZE_SET
#define ARMV7_RSR_RSIZE_SET |
( |
|
_reg, |
|
|
|
_val |
|
) |
| |
Value: (((_reg) & ~ARMV7_RSR_RSIZE_MASK) | \
(((_val) << ARMV7_RSR_RSIZE_SHIFT) & ARMV7_RSR_RSIZE_MASK))
◆ ARMV7_RSR_SD_SET
#define ARMV7_RSR_SD_SET |
( |
|
_reg, |
|
|
|
_val |
|
) |
| |
Value: (((_reg) & ~ARMV7_RSR_SD_MASK) | \
(((_val) << ARMV7_RSR_SD_SHIFT) & ARMV7_RSR_SD_MASK))
◆ ARMV7_PMSA_Region
The region definition is used to initialize the Memory Protection Unit (MPU).
A region is empty if the size is zero.