RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs
armv7-pmsa.h File Reference

This header file provides the API to manage an Arm PMSAv7 based Memory Protection Unit (MPU). More...

#include <rtems/score/aarch32-system-registers.h>
#include <rtems/score/assert.h>
#include <rtems/score/cpu.h>

Go to the source code of this file.

Data Structures

struct  ARMV7_PMSA_Region
 The region definition is used to initialize the Memory Protection Unit (MPU). More...
 

Macros

#define ARMV7_PMSA_TEXT_SECTION
 
#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)
 

Typedefs

typedef struct ARMV7_PMSA_Region ARMV7_PMSA_Region
 The region definition is used to initialize the Memory Protection Unit (MPU).
 

Detailed Description

This header file provides the API to manage an Arm PMSAv7 based Memory Protection Unit (MPU).