My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
cpu_mmu.c File Reference
#include <cache.h>
#include <cpu.h>
#include <page_table.h>
#include <cpu_mmu.h>
#include <sw_mem_functions.h>
#include <sw_assert.h>

Functions

void mmu_init (void)
 MMU initialization routine. More...
 
void set_domain (u8 domain, access_type access)
 Set access domain. More...
 
void mmu_insert_pt0 (u32 addr)
 Set TTBR0 register. More...
 
void mmu_insert_pt1 (u32 *addr)
 Set TTBR1 register. More...
 
u32 * mmu_get_pt0 ()
 Get TTBR0 register value. More...
 
u32 * mmu_get_pt1 ()
 Get TTBR1 register value. More...
 
void mmu_enable_virt_addr ()
 Enable virtual address space for secure kernel. More...
 
void mmu_disable_virt_addr ()
 Disable virtual address space of secure kernel. More...
 
bool is_mmu_enabled ()
 Returns whether MMU is enabled or not. More...
 
pa_t va_to_pa (va_t va)
 Returns the physical address of virtual address based on secure world page table. More...
 
pa_t va_to_pa_ns (va_t va)
 Returns the physical address of virtual address based on non-secure world page table. More...
 
void cpu_mmu_enable (void)
 Initialize and enable MMU. More...
 

Variables

u32 * pagetable_addr
 

Function Documentation

void cpu_mmu_enable ( void  )

Initialize and enable MMU.

bool is_mmu_enabled ( void  )

Returns whether MMU is enabled or not.

Returns
MMU enabled flag
void mmu_disable_virt_addr ( void  )

Disable virtual address space of secure kernel.

void mmu_enable_virt_addr ( void  )

Enable virtual address space for secure kernel.

u32* mmu_get_pt0 ( void  )

Get TTBR0 register value.

Returns
TTBR0 register value
u32* mmu_get_pt1 ( void  )

Get TTBR1 register value.

Returns
TTBR0 register value
void mmu_init ( void  )

MMU initialization routine.

void mmu_insert_pt0 ( u32  addr)

Set TTBR0 register.

Parameters
addrValue to set for TTBR0 register
void mmu_insert_pt1 ( u32 *  addr)

Set TTBR1 register.

Parameters
addrValue to set for TTBR1 register
void set_domain ( u8  domain,
access_type  access 
)

Set access domain.

Parameters
domainDomain
accessDomain access type
pa_t va_to_pa ( va_t  va)

Returns the physical address of virtual address based on secure world page table.

Parameters
vaVirtual address
Returns
Physical address
pa_t va_to_pa_ns ( va_t  va)

Returns the physical address of virtual address based on non-secure world page table.

Parameters
vaVirtual address
Returns
Physical address

Variable Documentation

u32* pagetable_addr