CPU Architecture Armv8 Memory Protection Unit (MPU) API

Module: CPU Architecture API

More…

Structures

Name

struct

Arch_MpuArmv8_RegionType
MPU region configuration.

Types

Name

typedef uint32_t

Arch_MpuArmv8_AccessPermType
Access permission attribute for MPU regions See [Arch_MpuArmv8_AccessPermType_] or [Arch_MpuArmv8_El2AccessPermType_] (for EL2-controlled MPU regions) for list of possible values.

typedef uint32_t

Arch_MpuArmv8_ShareabilityType
Shareability attribute for Normal memory regions See [Arch_MpuArmv8_ShareabilityType_] for list of possible values.

Functions

Name

int32_t

Arch_MpuArmv8_El2ConfigMemoryAttributes(const uint8_t * attributeArrPtr, uint8_t numAttributes)
Configure memory attribute values for EL2-controlled MPU.

int32_t

Arch_MpuArmv8_El2ConfigRegions(const Arch_MpuArmv8_RegionType * regionArrPtr, uint32_t numRegions)
Configure EL2-controlled MPU regions.

void

Arch_MpuArmv8_El2Enable(bool enableBackgroundRegion)
Enable the EL2-controlled MPU.

void

Arch_MpuArmv8_El2Disable(void )
Disable the EL2-controlled MPU.

int32_t

Arch_MpuArmv8_ConfigMemoryAttributes(const uint8_t * attributeArrPtr, uint8_t numAttributes)
Configure memory attribute values.

int32_t

Arch_MpuArmv8_ConfigRegions(const Arch_MpuArmv8_RegionType * regionArrPtr, uint32_t numRegions)
Configure MPU regions.

void

Arch_MpuArmv8_Enable(bool enableBackgroundRegion)
Enable the MPU.

void

Arch_MpuArmv8_Disable(void )
Disable the MPU.

Defines

Name

Arch_MpuArmv8_El1ConfigMemoryAttributes(attributeArrPtr, numAttributes)
Configure memory attribute values for EL1-controlled MPU.

Arch_MpuArmv8_El1ConfigRegions(regionArrPtr, numRegions)
Configure MPU regions for EL1-controlled MPU.

Arch_MpuArmv8_El1Enable(enableBackgroundRegion)
Enable the EL1-controlled MPU.

Arch_MpuArmv8_El1Disable()
Disable the EL1-controlled MPU.

ARCH_MPU_ARMV8_ERROR_NONE
No error.

ARCH_MPU_ARMV8_ERROR_INVALID_INSTANCE
Invalid instance.

ARCH_MPU_ARMV8_ERROR_INVALID_PARAMS
Invalid params.

ARCH_MPU_ARMV8_ERROR_UNSUPPORTED_FEATURE
Feature not supported by underlying architecture.

ARCH_MPU_ARMV8_ERROR_UNALIGNED_ADDRESS
Address alignment requirements not met.

ARCH_MPU_ARMV8_ERROR_INVALID_REGION_SIZE
Invalid region size.

ARCH_MPU_ARMV8_ERROR_INVALID_ACCESS_PERM
Invalid access permission.

ARCH_MPU_ARMV8_ERROR_INVALID_SHAREABILITY
Invalid shareability.

ARCH_MPU_ARMV8_ERROR_INVALID_MEM_ATTR_IDX
Invalid mem attribute index.

ARCH_MPU_ARMV8_ERROR_INVALID_NUM_REGIONS
Invalid no. of regions.

ARCH_MPU_ARMV8_MAIR_DEVICE
(0b0000) Device

ARCH_MPU_ARMV8_MAIR_OUTER_WT_TRANSIENT
(0b00RW) Normal Outer Write-Through transient (RW != 00)

ARCH_MPU_ARMV8_MAIR_OUTER_NON_CACHEABLE
(0b0100) Normal Outer Non-Cacheable

ARCH_MPU_ARMV8_MAIR_OUTER_WB_TRANSIENT
(0b01RW) Normal Outer Write-Back transient (RW != 00)

ARCH_MPU_ARMV8_MAIR_OUTER_WT_NON_TRANSIENT
(0b10RW) Normal Outer Write-Through non-transient

ARCH_MPU_ARMV8_MAIR_OUTER_WB_NON_TRANSIENT
(0b11RW) Normal Outer Write-Back non-transient

ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRNE
(0b00) Device-nGnRnE memory

ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRE
(0b01) Device-nGnRE memory

ARCH_MPU_ARMV8_MAIR_DEVICE_NGRE
(0b10) Device-nGRE memory

ARCH_MPU_ARMV8_MAIR_DEVICE_GRE
(0b11) Device-GRE memory

ARCH_MPU_ARMV8_MAIR_INNER_WT_TRANSIENT
(0b00RW) Normal Inner Write-Through transient (RW != 00)

ARCH_MPU_ARMV8_MAIR_INNER_NON_CACHEABLE
(0b0100) Normal Inner Non-Cacheable

ARCH_MPU_ARMV8_MAIR_INNER_WB_TRANSIENT
(0b01RW) Normal Inner Write-Back transient (RW != 00)

ARCH_MPU_ARMV8_MAIR_INNER_WT_NON_TRANSIENT
(0b10RW) Normal Inner Write-Through non-transient

ARCH_MPU_ARMV8_MAIR_INNER_WB_NON_TRANSIENT
(0b11RW) Normal Inner Write-Back non-transient

ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_WRITE
(0b01) Write allocate only (R=0, W=1)

ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ
(0b10) Read allocate only (R=1, W=0)

ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ_WRITE
(0b11) Read/Write allocate (R=1, W=1)

ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_WRITE
(0b01) Write allocate only (R=0, W=1)

ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ
(0b10) Read allocate only (R=1, W=0)

ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ_WRITE
(0b11) Read/Write allocate (R=1, W=1)

ARCH_MPU_ARMV8_MEMORY_PERIPHERALS
Peripheral MMRs.

ARCH_MPU_ARMV8_MEMORY_CACHED
Cached Memory.

ARCH_MPU_ARMV8_MEMORY_NON_CACHED
Non-cached Memory.

ARCH_MPU_ARMV8_ACCESS_PERM_RW_PRIV
(0b00) Read/write by privileged code only

ARCH_MPU_ARMV8_ACCESS_PERM_RW_ANY
(0b01) Read/write by any privilege level

ARCH_MPU_ARMV8_ACCESS_PERM_RO_PRIV
(0b10) Read-only by privileged code only

ARCH_MPU_ARMV8_ACCESS_PERM_RO_ANY
(0b11) Read-only by any privilege level

ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RW_EL2
(0b00) Read/write at EL2, no access at EL1 or EL0

ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RW_ANY
(0b01) Read/write at EL2, EL1 and EL0

ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RO_EL2
(0b10) Read-only at EL2, no access at EL1 or EL0

ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RO_ANY
(0b11) Read-only at EL2, EL1 and EL0

ARCH_MPU_ARMV8_SHAREABILITY_NONE
Non-shareable (0b00)

ARCH_MPU_ARMV8_SHAREABILITY_OUTER
Outer shareable (0b10)

ARCH_MPU_ARMV8_SHAREABILITY_INNER
Inner shareable (0b11)

ARCH_MPU_ARMV8_ACCESS_PERM_MAX
Max value for Arch_MpuArmv8_AccessPermType.

Detailed Description

This includes APIs for initializing, configuring and enabling Armv8 Protected Memory System Architecture (PMSAv8) Memory Protection Unit (MPU).

Notes,

  • Arch_MpuArmv8_ConfigMemoryAttributes can be used to setup various memory attributes to be used for the MPU regions.

    • Various defines under [Arch_MpuArmv8_MairType] can be used to form the MAIR attribute value. Also [Arch_MpuArmv8_PredefinedMemoryType] can be used directly for common memory types.

    • Each attribute value is 8-bits wide and up to 8 attributes can be defined. Example usage:


uint8_t attributesArr[4] = {
    ARCH_MPU_ARMV8_MEMORY_PERIPHERALS, // Attr indx 0
    ARCH_MPU_ARMV8_MEMORY_NON_CACHED,  // Attr indx 1
    ARCH_MPU_ARMV8_MEMORY_CACHED,      // Attr indx 2
    // Attr indx 3: Normal, Outer Write-Back Transient Read Write alloc,
    //                      Inner Write-Back Transient Read Write alloc
    (ARCH_MPU_ARMV8_MAIR_OUTER_WB_TRANSIENT | ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ_WRITE) |
    (ARCH_MPU_ARMV8_MAIR_INNER_WB_TRANSIENT | ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ_WRITE)
};

Arch_MpuArmv8_ConfigMemoryAttributes(attributesArr, 4U);

For cacheable transient memory types, either or both Read/Write allocation policy bits should be used. Otherwise, undesired side effects may occur.

CPU architecture specific notes,

  • R52,

  • M33,

    • Uses Armv8-M PMSAv8 Memory protection unit

    • The region base address should be aligned on a 32-byte boundary. The minimum size for a region is 32 bytes and the size should be a multiple of 32-bytes.

    • EL2 specific APIs are not supported and typedefs are NA.

      • Usage of the APIs will cause linking errors.

    • All APIs should be used only from privileged mode.

      • This is due to MPU register access restrictions - Privileged access only.

Types Documentation

typedef Arch_MpuArmv8_AccessPermType

typedef uint32_t Arch_MpuArmv8_AccessPermType;

Access permission attribute for MPU regions See [Arch_MpuArmv8_AccessPermType_] or [Arch_MpuArmv8_El2AccessPermType_] (for EL2-controlled MPU regions) for list of possible values.

typedef Arch_MpuArmv8_ShareabilityType

typedef uint32_t Arch_MpuArmv8_ShareabilityType;

Shareability attribute for Normal memory regions See [Arch_MpuArmv8_ShareabilityType_] for list of possible values.

Functions Documentation

function Arch_MpuArmv8_El2ConfigMemoryAttributes

int32_t Arch_MpuArmv8_El2ConfigMemoryAttributes(
    const uint8_t * attributeArrPtr,
    uint8_t numAttributes
)

Configure memory attribute values for EL2-controlled MPU.

Parameters:

  • attributeArrPtr Pointer to array containing HMAIR attribute values.

  • numAttributes Number of attribute entries in the array.

Return: [Arch_MpuArmv8_ErrorType]

Programs the HMAIR registers with the provided array of attribute values.

function Arch_MpuArmv8_El2ConfigRegions

int32_t Arch_MpuArmv8_El2ConfigRegions(
    const Arch_MpuArmv8_RegionType * regionArrPtr,
    uint32_t numRegions
)

Configure EL2-controlled MPU regions.

Parameters:

  • regionArrPtr Pointer to array of EL2 region configuration structures.

  • numRegions Number of regions to configure.

Return: [Arch_MpuArmv8_ErrorType]

Programs all EL2-controlled MPU regions using the provided array of region configuration structures.

function Arch_MpuArmv8_El2Enable

void Arch_MpuArmv8_El2Enable(
    bool enableBackgroundRegion
)

Enable the EL2-controlled MPU.

Parameters:

  • enableBackgroundRegion Flag to enable background region (default memory map for EL2 access)

function Arch_MpuArmv8_El2Disable

void Arch_MpuArmv8_El2Disable(
    void 
)

Disable the EL2-controlled MPU.

function Arch_MpuArmv8_ConfigMemoryAttributes

int32_t Arch_MpuArmv8_ConfigMemoryAttributes(
    const uint8_t * attributeArrPtr,
    uint8_t numAttributes
)

Configure memory attribute values.

Parameters:

  • attributeArrPtr Pointer to array containing MAIR attribute values.

  • numAttributes Number of attribute entries in the array.

Return: [Arch_MpuArmv8_ErrorType]

Programs the MAIR registers with the provided array of attribute values.

function Arch_MpuArmv8_ConfigRegions

int32_t Arch_MpuArmv8_ConfigRegions(
    const Arch_MpuArmv8_RegionType * regionArrPtr,
    uint32_t numRegions
)

Configure MPU regions.

Parameters:

  • regionArrPtr Pointer to array of region configuration structures.

  • numRegions Number of regions to configure.

Return: [Arch_MpuArmv8_ErrorType]

Precondition: Arch_MpuArmv8_ConfigMemoryAttributes

Programs all MPU regions using the provided array of region configuration structures.

function Arch_MpuArmv8_Enable

void Arch_MpuArmv8_Enable(
    bool enableBackgroundRegion
)

Enable the MPU.

Parameters:

  • enableBackgroundRegion Flag to enable background region (default memory map for privileged access)

function Arch_MpuArmv8_Disable

void Arch_MpuArmv8_Disable(
    void 
)

Disable the MPU.

Macros Documentation

define Arch_MpuArmv8_El1ConfigMemoryAttributes

#define Arch_MpuArmv8_El1ConfigMemoryAttributes(
    attributeArrPtr,
    numAttributes
)
Arch_MpuArmv8_ConfigMemoryAttributes((attributeArrPtr), (numAttributes))

Configure memory attribute values for EL1-controlled MPU.

Parameters:

  • attributeArrPtr Pointer to array containing MAIR attribute values.

  • numAttributes Number of attribute entries in the array.

Return: [Arch_MpuArmv8_ErrorType]

Programs the MAIR registers with the provided array of attribute values.

define Arch_MpuArmv8_El1ConfigRegions

#define Arch_MpuArmv8_El1ConfigRegions(
    regionArrPtr,
    numRegions
)
Arch_MpuArmv8_ConfigRegions((regionArrPtr), (numRegions))

Configure MPU regions for EL1-controlled MPU.

Parameters:

  • regionArrPtr Pointer to array of EL1 region configuration structures.

  • numRegions Number of regions to configure.

Return: [Arch_MpuArmv8_ErrorType]

Programs all EL1-controlled MPU regions using the provided array of region configuration structures.

define Arch_MpuArmv8_El1Enable

#define Arch_MpuArmv8_El1Enable(
    enableBackgroundRegion
)
Arch_MpuArmv8_Enable((enableBackgroundRegion))

Enable the EL1-controlled MPU.

Parameters:

  • enableBackgroundRegion Flag to enable background region (default memory map for EL1 access)

define Arch_MpuArmv8_El1Disable

#define Arch_MpuArmv8_El1Disable(
    
)
Arch_MpuArmv8_Disable()

Disable the EL1-controlled MPU.

define ARCH_MPU_ARMV8_ERROR_NONE

#define ARCH_MPU_ARMV8_ERROR_NONE (0)

No error.

define ARCH_MPU_ARMV8_ERROR_INVALID_INSTANCE

#define ARCH_MPU_ARMV8_ERROR_INVALID_INSTANCE (1)

Invalid instance.

define ARCH_MPU_ARMV8_ERROR_INVALID_PARAMS

#define ARCH_MPU_ARMV8_ERROR_INVALID_PARAMS (2)

Invalid params.

define ARCH_MPU_ARMV8_ERROR_UNSUPPORTED_FEATURE

#define ARCH_MPU_ARMV8_ERROR_UNSUPPORTED_FEATURE (3)

Feature not supported by underlying architecture.

define ARCH_MPU_ARMV8_ERROR_UNALIGNED_ADDRESS

#define ARCH_MPU_ARMV8_ERROR_UNALIGNED_ADDRESS (4)

Address alignment requirements not met.

define ARCH_MPU_ARMV8_ERROR_INVALID_REGION_SIZE

#define ARCH_MPU_ARMV8_ERROR_INVALID_REGION_SIZE (5)

Invalid region size.

define ARCH_MPU_ARMV8_ERROR_INVALID_ACCESS_PERM

#define ARCH_MPU_ARMV8_ERROR_INVALID_ACCESS_PERM (6)

Invalid access permission.

define ARCH_MPU_ARMV8_ERROR_INVALID_SHAREABILITY

#define ARCH_MPU_ARMV8_ERROR_INVALID_SHAREABILITY (7)

Invalid shareability.

define ARCH_MPU_ARMV8_ERROR_INVALID_MEM_ATTR_IDX

#define ARCH_MPU_ARMV8_ERROR_INVALID_MEM_ATTR_IDX (8)

Invalid mem attribute index.

define ARCH_MPU_ARMV8_ERROR_INVALID_NUM_REGIONS

#define ARCH_MPU_ARMV8_ERROR_INVALID_NUM_REGIONS (9)

Invalid no. of regions.

define ARCH_MPU_ARMV8_MAIR_DEVICE

#define ARCH_MPU_ARMV8_MAIR_DEVICE (uint32_t)((uint32_t)0x0U << 4U)

(0b0000) Device

define ARCH_MPU_ARMV8_MAIR_OUTER_WT_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_OUTER_WT_TRANSIENT (uint32_t)((uint32_t)0x0U << 4U)

(0b00RW) Normal Outer Write-Through transient (RW != 00)

define ARCH_MPU_ARMV8_MAIR_OUTER_NON_CACHEABLE

#define ARCH_MPU_ARMV8_MAIR_OUTER_NON_CACHEABLE (uint32_t)((uint32_t)0x4U << 4U)

(0b0100) Normal Outer Non-Cacheable

define ARCH_MPU_ARMV8_MAIR_OUTER_WB_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_OUTER_WB_TRANSIENT (uint32_t)((uint32_t)0x4U << 4U)

(0b01RW) Normal Outer Write-Back transient (RW != 00)

define ARCH_MPU_ARMV8_MAIR_OUTER_WT_NON_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_OUTER_WT_NON_TRANSIENT (uint32_t)((uint32_t)0x8U << 4U)

(0b10RW) Normal Outer Write-Through non-transient

define ARCH_MPU_ARMV8_MAIR_OUTER_WB_NON_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_OUTER_WB_NON_TRANSIENT (uint32_t)((uint32_t)0xCU << 4U)

(0b11RW) Normal Outer Write-Back non-transient

define ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRNE

#define ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRNE (uint32_t)((uint32_t)0x0U << 2U)

(0b00) Device-nGnRnE memory

define ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRE

#define ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRE (uint32_t)((uint32_t)0x1U << 2U)

(0b01) Device-nGnRE memory

define ARCH_MPU_ARMV8_MAIR_DEVICE_NGRE

#define ARCH_MPU_ARMV8_MAIR_DEVICE_NGRE (uint32_t)((uint32_t)0x2U << 2U)

(0b10) Device-nGRE memory

define ARCH_MPU_ARMV8_MAIR_DEVICE_GRE

#define ARCH_MPU_ARMV8_MAIR_DEVICE_GRE (uint32_t)((uint32_t)0x3U << 2U)

(0b11) Device-GRE memory

define ARCH_MPU_ARMV8_MAIR_INNER_WT_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_INNER_WT_TRANSIENT (0x0U)

(0b00RW) Normal Inner Write-Through transient (RW != 00)

define ARCH_MPU_ARMV8_MAIR_INNER_NON_CACHEABLE

#define ARCH_MPU_ARMV8_MAIR_INNER_NON_CACHEABLE (0x4U)

(0b0100) Normal Inner Non-Cacheable

define ARCH_MPU_ARMV8_MAIR_INNER_WB_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_INNER_WB_TRANSIENT (0x4U)

(0b01RW) Normal Inner Write-Back transient (RW != 00)

define ARCH_MPU_ARMV8_MAIR_INNER_WT_NON_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_INNER_WT_NON_TRANSIENT (0x8U)

(0b10RW) Normal Inner Write-Through non-transient

define ARCH_MPU_ARMV8_MAIR_INNER_WB_NON_TRANSIENT

#define ARCH_MPU_ARMV8_MAIR_INNER_WB_NON_TRANSIENT (0xCU)

(0b11RW) Normal Inner Write-Back non-transient

define ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_WRITE

#define ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_WRITE (uint32_t)((uint32_t)0x1U << 4U)

(0b01) Write allocate only (R=0, W=1)

define ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ

#define ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ (uint32_t)((uint32_t)0x2U << 4U)

(0b10) Read allocate only (R=1, W=0)

define ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ_WRITE

#define ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ_WRITE (uint32_t)((uint32_t)0x3U << 4U)

(0b11) Read/Write allocate (R=1, W=1)

define ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_WRITE

#define ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_WRITE (0x1U)

(0b01) Write allocate only (R=0, W=1)

define ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ

#define ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ (0x2U)

(0b10) Read allocate only (R=1, W=0)

define ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ_WRITE

#define ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ_WRITE (0x3U)

(0b11) Read/Write allocate (R=1, W=1)

define ARCH_MPU_ARMV8_MEMORY_PERIPHERALS

#define ARCH_MPU_ARMV8_MEMORY_PERIPHERALS (ARCH_MPU_ARMV8_MAIR_DEVICE | ARCH_MPU_ARMV8_MAIR_DEVICE_NGNRNE)

Peripheral MMRs.

define ARCH_MPU_ARMV8_MEMORY_CACHED

#define ARCH_MPU_ARMV8_MEMORY_CACHED     (ARCH_MPU_ARMV8_MAIR_OUTER_WB_NON_TRANSIENT | ARCH_MPU_ARMV8_MAIR_OUTER_ALLOC_READ_WRITE) | \
        (ARCH_MPU_ARMV8_MAIR_INNER_WB_NON_TRANSIENT | ARCH_MPU_ARMV8_MAIR_INNER_ALLOC_READ_WRITE)

Cached Memory.

define ARCH_MPU_ARMV8_MEMORY_NON_CACHED

#define ARCH_MPU_ARMV8_MEMORY_NON_CACHED     (ARCH_MPU_ARMV8_MAIR_OUTER_NON_CACHEABLE | ARCH_MPU_ARMV8_MAIR_INNER_NON_CACHEABLE)

Non-cached Memory.

define ARCH_MPU_ARMV8_ACCESS_PERM_RW_PRIV

#define ARCH_MPU_ARMV8_ACCESS_PERM_RW_PRIV (0x0U)

(0b00) Read/write by privileged code only

define ARCH_MPU_ARMV8_ACCESS_PERM_RW_ANY

#define ARCH_MPU_ARMV8_ACCESS_PERM_RW_ANY (0x1U)

(0b01) Read/write by any privilege level

define ARCH_MPU_ARMV8_ACCESS_PERM_RO_PRIV

#define ARCH_MPU_ARMV8_ACCESS_PERM_RO_PRIV (0x2U)

(0b10) Read-only by privileged code only

define ARCH_MPU_ARMV8_ACCESS_PERM_RO_ANY

#define ARCH_MPU_ARMV8_ACCESS_PERM_RO_ANY (0x3U)

(0b11) Read-only by any privilege level

define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RW_EL2

#define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RW_EL2 (0x0U)

(0b00) Read/write at EL2, no access at EL1 or EL0

define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RW_ANY

#define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RW_ANY (0x1U)

(0b01) Read/write at EL2, EL1 and EL0

define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RO_EL2

#define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RO_EL2 (0x2U)

(0b10) Read-only at EL2, no access at EL1 or EL0

define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RO_ANY

#define ARCH_MPU_ARMV8_EL2_ACCESS_PERM_RO_ANY (0x3U)

(0b11) Read-only at EL2, EL1 and EL0

define ARCH_MPU_ARMV8_SHAREABILITY_NONE

#define ARCH_MPU_ARMV8_SHAREABILITY_NONE (0x0U)

Non-shareable (0b00)

define ARCH_MPU_ARMV8_SHAREABILITY_OUTER

#define ARCH_MPU_ARMV8_SHAREABILITY_OUTER (0x2U)

Outer shareable (0b10)

define ARCH_MPU_ARMV8_SHAREABILITY_INNER

#define ARCH_MPU_ARMV8_SHAREABILITY_INNER (0x3U)

Inner shareable (0b11)

define ARCH_MPU_ARMV8_ACCESS_PERM_MAX

#define ARCH_MPU_ARMV8_ACCESS_PERM_MAX (0x3U)

Max value for Arch_MpuArmv8_AccessPermType.