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

Go to the source code of this file.

Macros

#define kpa_to_kva_guest(x)   (((x) - KERN_PA_BASE) + KERN_GUEST_BASE)
 
#define round_next_page_size(x)   x = (((x % 0x1000) == 0) ? ((x / 0x1000) * 0x1000) : (((x / 0x1000) + 1) * 0x1000))
 
#define kpa_map_4k(x)   x = (((x % 0x1000) == 0) ? x : ( x - (x % 0x1000)))
 

Functions

void sw_seterrno (int x)
 
int ptable_block_map (struct ptable *, unsigned long, pa_t, unsigned int)
 
int ptable_block_unmap (struct ptable *, unsigned long)
 
int ptable_page_map (struct ptable *, unsigned long, pa_t, unsigned int)
 
int ptable_page_unmap (struct ptable *, unsigned long)
 
void ptable_ptf_init (void)
 
int mmap_block_map_generic (struct ptable *, unsigned long, pa_t, unsigned long, unsigned int)
 
int mmap_block_unmap_generic (struct ptable *, unsigned long, unsigned long)
 
int mmap_page_map_generic (struct ptable *, unsigned long, pa_t, unsigned long, unsigned int)
 
int mmap_page_unmap_generic (struct ptable *, unsigned long, unsigned long)
 
void dev_va_pool_init (unsigned long, unsigned long)
 
unsigned long dev_va_alloc (unsigned long)
 

Variables

struct ptable pt_kernel
 

Macro Definition Documentation

#define kpa_map_4k (   x)    x = (((x % 0x1000) == 0) ? x : ( x - (x % 0x1000)))
#define kpa_to_kva_guest (   x)    (((x) - KERN_PA_BASE) + KERN_GUEST_BASE)
#define round_next_page_size (   x)    x = (((x % 0x1000) == 0) ? ((x / 0x1000) * 0x1000) : (((x / 0x1000) + 1) * 0x1000))

Function Documentation

unsigned long dev_va_alloc ( unsigned long  size)
Parameters
long
Returns
Parameters
size
Returns
void dev_va_pool_init ( unsigned long  start,
unsigned long  end 
)
Parameters
long
long
start
end
int mmap_block_map_generic ( struct ptable pt,
unsigned long  va,
pa_t  pa,
unsigned long  size,
unsigned int  ptf 
)
Parameters
@paramlong
pa_t
long
int
Returns
Parameters
pt
va
pa
size
ptf
Returns
int mmap_block_unmap_generic ( struct ptable pt,
unsigned long  va,
unsigned long  size 
)
Parameters
@paramlong
long
Returns
Parameters
pt
va
size
Returns
int mmap_page_map_generic ( struct ptable pt,
unsigned long  va,
pa_t  pa,
unsigned long  size,
unsigned int  ptf 
)
Parameters
@paramlong
pa_t
long
int
Returns
Parameters
pt
va
pa
size
ptf
Returns
int mmap_page_unmap_generic ( struct ptable pt,
unsigned long  va,
unsigned long  size 
)
Parameters
@paramlong
long
Returns
Parameters
pt
va
size
Returns
int ptable_block_map ( struct ptable pt,
unsigned long  va,
pa_t  pa,
unsigned int  ptf 
)
Parameters
@paramlong
pa_t
int
Returns
Parameters
pt
va
pa
ptf
Returns
int ptable_block_unmap ( struct ptable pt,
unsigned long  va 
)
Parameters
@paramlong
Returns
Parameters
pt
va
Returns
int ptable_page_map ( struct ptable pt,
unsigned long  va,
pa_t  pa,
unsigned int  ptf 
)
Parameters
@paramlong
pa_t
int
Returns
Parameters
pt
va
pa
ptf
Returns
int ptable_page_unmap ( struct ptable pt,
unsigned long  va 
)
Parameters
@paramlong
Returns
Parameters
pt
va
Returns
void ptable_ptf_init ( void  )
void sw_seterrno ( int  x)

Variable Documentation

struct ptable pt_kernel