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);
types.h
i32
__INT32_TYPE__ i32
Definition:
types.h:15
usize
__UINTPTR_TYPE__ usize
Definition:
types.h:28
u32
__UINT32_TYPE__ u32
Definition:
types.h:5
vm_create_page_table
void * vm_create_page_table(void)
Definition:
vm.c:38
vm_virt_to_phys
i32 vm_virt_to_phys(void *page_table, usize virt, usize *phys)
Definition:
vm.c:75
vm_map_page
i32 vm_map_page(void *page_table, usize virt, void *phys, u32 flags)
Definition:
vm.c:46
include
mm
vm.h
Generated by
1.9.1