Karg  v0.2.0
The kernel of CargOS
vm.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <types.h>
4 
5 #define VM_FLAG_READABLE 0x1
6 #define VM_FLAG_WRITABLE 0x2
7 #define VM_FLAG_EXECUTABLE 0x4
8 #define VM_FLAG_USER 0x8
9 
10 void *vm_create_page_table(void);
11 i32 vm_map_page(void *page_table, usize virt, void *phys, u32 flags);
12 i32 vm_virt_to_phys(void *page_table, usize virt, usize *phys);
__INT32_TYPE__ i32
Definition: types.h:15
__UINTPTR_TYPE__ usize
Definition: types.h:28
__UINT32_TYPE__ u32
Definition: types.h:5
void * vm_create_page_table(void)
Definition: vm.c:38
i32 vm_virt_to_phys(void *page_table, usize virt, usize *phys)
Definition: vm.c:75
i32 vm_map_page(void *page_table, usize virt, void *phys, u32 flags)
Definition: vm.c:46