AM275 FreeRTOS SDK  10.01.00
APIs for MMU for ARMv8 (ARM A53, TI C75)

Introduction

For more details and example usage, see MMU for ARMv8 (ARM A53, TI C75)

Data Structures

struct  MmuP_MapAttrs
 Attribute's to apply for a MMU region. More...
 
struct  MmuP_Config
 MMU config structure, this used by SysConfig and not to be used by end-users directly. More...
 
struct  MmuP_RegionConfig
 Region config structure, this used by SysConfig and not to be used by end-users directly. More...
 

Functions

void MmuP_MapAttrs_init (MmuP_MapAttrs *attrs)
 Set default values to MmuP_MapAttrs. More...
 
void MmuP_enable ()
 Enable MMU sub-system. More...
 
void MmuP_disable (void)
 Disable MMU sub-system. More...
 
uint32_t MmuP_isEnabled ()
 Check if MMU sub-system is enabled. More...
 
int32_t MmuP_map (uintptr_t vaddr, uintptr_t paddr, uint32_t size, MmuP_MapAttrs *mapAttrs)
 Setup a region in the MMU. More...
 
void MmuP_init ()
 Initialize MMU sub-system, called by SysConfig, not to be called by end users. More...
 

Enumerations

enum  MmuP_AccessPerm { MMUP_ACCESS_PERM_PRIV_RW_USER_NONE = 0x0, MMUP_ACCESS_PERM_PRIV_RW_USER_RW = 0x1, MMUP_ACCESS_PERM_PRIV_RO_USER_NONE = 0x2, MMUP_ACCESS_PERM_PRIV_RO_USER_RO = 0x3 }
 Enum's to represent different types of access permissions that are possible for a given MMU region. More...
 
enum  MmuP_Shareable { MMUP_SHARABLE_NONE = 0x0, MMUP_SHARABLE_OUTER = 0x2, MMUP_SHARABLE_INNER = 0x3 }
 Enum's to represent MMU region sharable status. More...
 
enum  MmuP_AttrIndx {
  MMUP_ATTRINDX_MAIR0 = 0, MMUP_ATTRINDX_MAIR1, MMUP_ATTRINDX_MAIR2, MMUP_ATTRINDX_MAIR3,
  MMUP_ATTRINDX_MAIR4, MMUP_ATTRINDX_MAIR5, MMUP_ATTRINDX_MAIR6, MMUP_ATTRINDX_MAIR7
}
 Enum's to represent MMU attribute index. More...
 

Enumeration Type Documentation

◆ MmuP_AccessPerm

Enum's to represent different types of access permissions that are possible for a given MMU region.

Enumerator
MMUP_ACCESS_PERM_PRIV_RW_USER_NONE 

RW Permission in privileged mode only

MMUP_ACCESS_PERM_PRIV_RW_USER_RW 

RW Permission in privileged and user mode

MMUP_ACCESS_PERM_PRIV_RO_USER_NONE 

RD Permission for privileged mode and access bllocked for user mode

MMUP_ACCESS_PERM_PRIV_RO_USER_RO 

All access are blocked

◆ MmuP_Shareable

Enum's to represent MMU region sharable status.

Enumerator
MMUP_SHARABLE_NONE 

Not shareable

MMUP_SHARABLE_OUTER 

Outer shareable

MMUP_SHARABLE_INNER 

Inner shareable

◆ MmuP_AttrIndx

Enum's to represent MMU attribute index.

Enumerator
MMUP_ATTRINDX_MAIR0 
MMUP_ATTRINDX_MAIR1 
MMUP_ATTRINDX_MAIR2 
MMUP_ATTRINDX_MAIR3 
MMUP_ATTRINDX_MAIR4 
MMUP_ATTRINDX_MAIR5 
MMUP_ATTRINDX_MAIR6 
MMUP_ATTRINDX_MAIR7 

Function Documentation

◆ MmuP_MapAttrs_init()

void MmuP_MapAttrs_init ( MmuP_MapAttrs attrs)

Set default values to MmuP_MapAttrs.

Strongly recommended to be called before seting values in MmuP_MapAttrs

Parameters
attrs[out] parameter structure to set to default

◆ MmuP_enable()

void MmuP_enable ( )

Enable MMU sub-system.

◆ MmuP_disable()

void MmuP_disable ( void  )

Disable MMU sub-system.

◆ MmuP_isEnabled()

uint32_t MmuP_isEnabled ( )

Check if MMU sub-system is enabled.

Returns
0: MMU sub-system is disabled, 1: MMU sub-system is enabled

◆ MmuP_map()

int32_t MmuP_map ( uintptr_t  vaddr,
uintptr_t  paddr,
uint32_t  size,
MmuP_MapAttrs mapAttrs 
)

Setup a region in the MMU.

Note
Recommended to disable MMU and disable cache before setting up MMU regions
Parameters
vaddr[in] virtual address of region to setup, MUST aligned to granule size
paddr[in] physical address of region to setup, MUST aligned to granule size
size[in] region size, MUST aligned to granule size
mapAttrs[in] map attrs, see MmuP_MapAttrs

◆ MmuP_init()

void MmuP_init ( )

Initialize MMU sub-system, called by SysConfig, not to be called by end users.