Karg  v0.2.0
The kernel of CargOS
vm.h File Reference
#include <types.h>

Go to the source code of this file.

Macros

#define VM_FLAG_READABLE   0x1
 
#define VM_FLAG_WRITABLE   0x2
 
#define VM_FLAG_EXECUTABLE   0x4
 
#define VM_FLAG_USER   0x8
 

Functions

void * vm_create_page_table (void)
 
i32 vm_map_page (void *page_table, usize virt, void *phys, u32 flags)
 
i32 vm_virt_to_phys (void *page_table, usize virt, usize *phys)
 

Macro Definition Documentation

◆ VM_FLAG_EXECUTABLE

#define VM_FLAG_EXECUTABLE   0x4

◆ VM_FLAG_READABLE

#define VM_FLAG_READABLE   0x1

◆ VM_FLAG_USER

#define VM_FLAG_USER   0x8

◆ VM_FLAG_WRITABLE

#define VM_FLAG_WRITABLE   0x2

Function Documentation

◆ vm_create_page_table()

void* vm_create_page_table ( void  )

◆ vm_map_page()

i32 vm_map_page ( void *  page_table,
usize  virt,
void *  phys,
u32  flags 
)

◆ vm_virt_to_phys()

i32 vm_virt_to_phys ( void *  page_table,
usize  virt,
usize phys 
)