|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Go to the source code of this file.
Classes | |
| struct | ARM_MPU_Region_t |
| Struct for a single MPU Region. More... | |
Macros | |
| #define | ARM_MPU_ARMV8_H |
| #define | ARM_MPU_ATTR_DEVICE ( 0U ) |
| Attribute for device memory (outer only). | |
| #define | ARM_MPU_ATTR_NON_CACHEABLE ( 4U ) |
| Attribute for non-cacheable, normal memory. | |
| #define | ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) |
| Attribute for normal memory (outer and inner). | |
| #define | ARM_MPU_ATTR_DEVICE_nGnRnE (0U) |
| Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement. | |
| #define | ARM_MPU_ATTR_DEVICE_nGnRE (1U) |
| Device memory type non Gathering, non Re-ordering, Early Write Acknowledgement. | |
| #define | ARM_MPU_ATTR_DEVICE_nGRE (2U) |
| Device memory type non Gathering, Re-ordering, Early Write Acknowledgement. | |
| #define | ARM_MPU_ATTR_DEVICE_GRE (3U) |
| Device memory type Gathering, Re-ordering, Early Write Acknowledgement. | |
| #define | ARM_MPU_ATTR(O, I) |
| Memory Attribute. | |
| #define | ARM_MPU_SH_NON (0U) |
| Normal memory non-shareable. | |
| #define | ARM_MPU_SH_OUTER (2U) |
| Normal memory outer shareable. | |
| #define | ARM_MPU_SH_INNER (3U) |
| Normal memory inner shareable. | |
| #define | ARM_MPU_AP_(RO, NP) |
| Memory access permissions. | |
| #define | ARM_MPU_RBAR(BASE, SH, RO, NP, XN) |
| Region Base Address Register value. | |
| #define | ARM_MPU_RLAR(LIMIT, IDX) |
| Region Limit Address Register value. | |
Functions | |
| __STATIC_INLINE void | ARM_MPU_Enable (uint32_t MPU_Control) |
| Enable the MPU. | |
| __STATIC_INLINE void | ARM_MPU_Disable (void) |
| Disable the MPU. | |
| __STATIC_INLINE void | ARM_MPU_SetMemAttrEx (MPU_Type *mpu, uint8_t idx, uint8_t attr) |
| Set the memory attribute encoding to the given MPU. | |
| __STATIC_INLINE void | ARM_MPU_SetMemAttr (uint8_t idx, uint8_t attr) |
| Set the memory attribute encoding. | |
| __STATIC_INLINE void | ARM_MPU_ClrRegionEx (MPU_Type *mpu, uint32_t rnr) |
| Clear and disable the given MPU region of the given MPU. | |
| __STATIC_INLINE void | ARM_MPU_ClrRegion (uint32_t rnr) |
| Clear and disable the given MPU region. | |
| __STATIC_INLINE void | ARM_MPU_SetRegionEx (MPU_Type *mpu, uint32_t rnr, uint32_t rbar, uint32_t rlar) |
| Configure the given MPU region of the given MPU. | |
| __STATIC_INLINE void | ARM_MPU_SetRegion (uint32_t rnr, uint32_t rbar, uint32_t rlar) |
| Configure the given MPU region. | |
| __STATIC_INLINE void | ARM_MPU_OrderedMemcpy (volatile uint32_t *dst, const uint32_t *__RESTRICT src, uint32_t len) |
| Memcpy with strictly ordered memory access, e.g. | |
| __STATIC_INLINE void | ARM_MPU_LoadEx (MPU_Type *mpu, uint32_t rnr, ARM_MPU_Region_t const *table, uint32_t cnt) |
| Load the given number of MPU regions from a table to the given MPU. | |
| __STATIC_INLINE void | ARM_MPU_Load (uint32_t rnr, ARM_MPU_Region_t const *table, uint32_t cnt) |
| Load the given number of MPU regions from a table. | |
| #define ARM_MPU_AP_ | ( | RO, | |
| NP ) |
Memory access permissions.
| RO | Read-Only: Set to 1 for read-only memory. |
| NP | Non-Privileged: Set to 1 for non-privileged memory. |
Definition at line 80 of file mpu_armv8.h.
| #define ARM_MPU_ARMV8_H |
Definition at line 32 of file mpu_armv8.h.
| #define ARM_MPU_ATTR | ( | O, | |
| I ) |
Memory Attribute.
| O | Outer memory attributes |
| I | O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes |
Definition at line 65 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_DEVICE ( 0U ) |
Attribute for device memory (outer only).
Definition at line 35 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_DEVICE_GRE (3U) |
Device memory type Gathering, Re-ordering, Early Write Acknowledgement.
Definition at line 59 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_DEVICE_nGnRE (1U) |
Device memory type non Gathering, non Re-ordering, Early Write Acknowledgement.
Definition at line 53 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_DEVICE_nGnRnE (0U) |
Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement.
Definition at line 50 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_DEVICE_nGRE (2U) |
Device memory type non Gathering, Re-ordering, Early Write Acknowledgement.
Definition at line 56 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_MEMORY_ | ( | NT, | |
| WB, | |||
| RA, | |||
| WA ) |
Attribute for normal memory (outer and inner).
| NT | Non-Transient: Set to 1 for non-transient data. |
| WB | Write-Back: Set to 1 to use write-back update policy. |
| RA | Read Allocation: Set to 1 to use cache allocation on read miss. |
| WA | Write Allocation: Set to 1 to use cache allocation on write miss. |
Definition at line 46 of file mpu_armv8.h.
| #define ARM_MPU_ATTR_NON_CACHEABLE ( 4U ) |
Attribute for non-cacheable, normal memory.
Definition at line 38 of file mpu_armv8.h.
| #define ARM_MPU_RBAR | ( | BASE, | |
| SH, | |||
| RO, | |||
| NP, | |||
| XN ) |
Region Base Address Register value.
| BASE | The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned. |
| SH | Defines the Shareability domain for this memory region. |
| RO | Read-Only: Set to 1 for a read-only memory region. |
| NP | Non-Privileged: Set to 1 for a non-privileged memory region. \oaram XN eXecute Never: Set to 1 for a non-executable memory region. |
Definition at line 89 of file mpu_armv8.h.
| #define ARM_MPU_RLAR | ( | LIMIT, | |
| IDX ) |
Region Limit Address Register value.
| LIMIT | The limit address bits [31:5] for this memory region. The value is one extended. |
| IDX | The attribute index to be associated with this memory region. |
Definition at line 99 of file mpu_armv8.h.
| #define ARM_MPU_SH_INNER (3U) |
Normal memory inner shareable.
Definition at line 74 of file mpu_armv8.h.
| #define ARM_MPU_SH_NON (0U) |
Normal memory non-shareable.
Definition at line 68 of file mpu_armv8.h.
| #define ARM_MPU_SH_OUTER (2U) |
Normal memory outer shareable.
Definition at line 71 of file mpu_armv8.h.
| __STATIC_INLINE void ARM_MPU_ClrRegion | ( | uint32_t | rnr | ) |
Clear and disable the given MPU region.
| rnr | Region number to be cleared. |
Definition at line 234 of file mpu_armv8.h.
References __STATIC_INLINE, ARM_MPU_ClrRegionEx(), and MPU.
| __STATIC_INLINE void ARM_MPU_ClrRegionEx | ( | MPU_Type * | mpu, |
| uint32_t | rnr ) |
Clear and disable the given MPU region of the given MPU.
| mpu | Pointer to MPU to be used. |
| rnr | Region number to be cleared. |
Definition at line 225 of file mpu_armv8.h.
References __STATIC_INLINE, MPU_Type::RLAR, and MPU_Type::RNR.
Referenced by ARM_MPU_ClrRegion().
| __STATIC_INLINE void ARM_MPU_Disable | ( | void | ) |
Disable the MPU.
Definition at line 143 of file mpu_armv8.h.
References __DMB, __DSB, __ISB, __STATIC_INLINE, MPU, MPU_CTRL_ENABLE_Msk, SCB, and SCB_SHCSR_MEMFAULTENA_Msk.
| __STATIC_INLINE void ARM_MPU_Enable | ( | uint32_t | MPU_Control | ) |
Enable the MPU.
| MPU_Control | Default access permissions for unconfigured regions. |
Definition at line 130 of file mpu_armv8.h.
References __DMB, __DSB, __ISB, __STATIC_INLINE, MPU, MPU_CTRL_ENABLE_Msk, SCB, and SCB_SHCSR_MEMFAULTENA_Msk.
| __STATIC_INLINE void ARM_MPU_Load | ( | uint32_t | rnr, |
| ARM_MPU_Region_t const * | table, | ||
| uint32_t | cnt ) |
Load the given number of MPU regions from a table.
| rnr | First region number to be configured. |
| table | Pointer to the MPU configuration table. |
| cnt | Amount of regions to be configured. |
Definition at line 334 of file mpu_armv8.h.
References __STATIC_INLINE, ARM_MPU_LoadEx(), and MPU.
| __STATIC_INLINE void ARM_MPU_LoadEx | ( | MPU_Type * | mpu, |
| uint32_t | rnr, | ||
| ARM_MPU_Region_t const * | table, | ||
| uint32_t | cnt ) |
Load the given number of MPU regions from a table to the given MPU.
| mpu | Pointer to the MPU registers to be used. |
| rnr | First region number to be configured. |
| table | Pointer to the MPU configuration table. |
| cnt | Amount of regions to be configured. |
Definition at line 304 of file mpu_armv8.h.
References __STATIC_INLINE, ARM_MPU_OrderedMemcpy(), MPU_TYPE_RALIASES, MPU_Type::RBAR, and MPU_Type::RNR.
Referenced by ARM_MPU_Load().
| __STATIC_INLINE void ARM_MPU_OrderedMemcpy | ( | volatile uint32_t * | dst, |
| const uint32_t *__RESTRICT | src, | ||
| uint32_t | len ) |
Memcpy with strictly ordered memory access, e.g.
used by code in ARM_MPU_LoadEx()
| dst | Destination data is copied to. |
| src | Source data is copied from. |
| len | Amount of data words to be copied. |
Definition at line 289 of file mpu_armv8.h.
References __RESTRICT, and __STATIC_INLINE.
Referenced by ARM_MPU_LoadEx().
| __STATIC_INLINE void ARM_MPU_SetMemAttr | ( | uint8_t | idx, |
| uint8_t | attr ) |
Set the memory attribute encoding.
| idx | The attribute index to be set [0-7] |
| attr | The attribute value to be set. |
Definition at line 205 of file mpu_armv8.h.
References __STATIC_INLINE, ARM_MPU_SetMemAttrEx(), and MPU.
| __STATIC_INLINE void ARM_MPU_SetMemAttrEx | ( | MPU_Type * | mpu, |
| uint8_t | idx, | ||
| uint8_t | attr ) |
Set the memory attribute encoding to the given MPU.
| mpu | Pointer to the MPU to be configured. |
| idx | The attribute index to be set [0-7] |
| attr | The attribute value to be set. |
Definition at line 188 of file mpu_armv8.h.
References __STATIC_INLINE, MPU_Type::MAIR, and reg.
Referenced by ARM_MPU_SetMemAttr().
| __STATIC_INLINE void ARM_MPU_SetRegion | ( | uint32_t | rnr, |
| uint32_t | rbar, | ||
| uint32_t | rlar ) |
Configure the given MPU region.
| rnr | Region number to be configured. |
| rbar | Value for RBAR register. |
| rlar | Value for RLAR register. |
Definition at line 267 of file mpu_armv8.h.
References __STATIC_INLINE, ARM_MPU_SetRegionEx(), and MPU.
| __STATIC_INLINE void ARM_MPU_SetRegionEx | ( | MPU_Type * | mpu, |
| uint32_t | rnr, | ||
| uint32_t | rbar, | ||
| uint32_t | rlar ) |
Configure the given MPU region of the given MPU.
| mpu | Pointer to MPU to be used. |
| rnr | Region number to be configured. |
| rbar | Value for RBAR register. |
| rlar | Value for RLAR register. |
Definition at line 255 of file mpu_armv8.h.
References __STATIC_INLINE, MPU_Type::RBAR, MPU_Type::RLAR, and MPU_Type::RNR.
Referenced by ARM_MPU_SetRegion().