My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions | Variables
mem_mng.h File Reference
#include <sw_types.h>
#include <mmap.h>

Go to the source code of this file.

Classes

struct  mem_info
 This structure has information about the memory regions in the secure world. More...
 

Functions

void sw_meminfo_init (struct mem_info *, struct mem_info *)
 Initializes the address space in secure world by allocating and mapping the required pages. More...
 
va_t sw_page_alloc (u32 size, struct mem_info *)
 Allocates physical pages for the required size. More...
 
int sw_page_free (va_t vir_addr, u32 size, struct mem_info *)
 Frees the pages. More...
 

Variables

struct mem_info sw_mem_info
 

Function Documentation

void sw_meminfo_init ( struct mem_info info,
struct mem_info p 
)

Initializes the address space in secure world by allocating and mapping the required pages.

Returns
Returns the address of the secure world page table
va_t sw_page_alloc ( u32  size,
struct mem_info info 
)

Allocates physical pages for the required size.

Parameters
size
Returns
Parameters
sizeSize of the memory to be allocated
Returns
Returns the address of the memory allocated
int sw_page_free ( va_t  vir_addr,
u32  size,
struct mem_info info 
)

Frees the pages.

Parameters
phy_addr
size
Returns
Parameters
phy_addrstart address of the pages to be freed
sizeSize of the memory to be freed
Returns
Returns zero on success

Variable Documentation

struct mem_info sw_mem_info