30#include <kernel/types.h>
94bool mmu_map(vaddr_t virt, paddr_t physical,
int prot);
107bool mmu_map_range(vaddr_t virt, paddr_t physical,
size_t size,
int prot);
#define IS_ERR(_x)
Check if an integer can be interpreted as an error.
Definition: error.h:83
paddr_t mmu_find_physical(vaddr_t)
Find the physical mapping of a virtual address.
Definition: mmu.c:427
void mmu_clone(paddr_t destination)
Clone the current MMU inside another one.
Definition: mmu.c:232
mmu_prot
Protection flags passed to the mmu's functions.
Definition: mmu.h:38
bool mmu_map(vaddr_t virt, paddr_t physical, int prot)
Map a virtual address to a physical one.
Definition: mmu.c:272
void mmu_unmap_range(vaddr_t start, vaddr_t end)
Unmap a range of virtual addresses.
Definition: mmu.c:409
void mmu_destroy(paddr_t mmu)
Release the MMU's page_directory.
Definition: mmu.c:224
paddr_t mmu_unmap(vaddr_t virt)
Unmap a virtual address.
Definition: mmu.c:375
error_t mmu_copy_on_write(vaddr_t)
Try to remap a potential copy-on-write mapping.
Definition: mmu.c:441
void mmu_identity_map(paddr_t start, paddr_t end, int prot)
Perform identity mapping inside a given virtual address range.
Definition: mmu.c:422
paddr_t mmu_new(void)
Allocate and initialize a new page directory.
Definition: mmu.c:198
bool mmu_init(void)
Initialize the MMU's paging system.
Definition: mmu.c:511
bool mmu_map_range(vaddr_t virt, paddr_t physical, size_t size, int prot)
Map a range of virtual addresses to physical ones.
Definition: mmu.c:331
static bool mmu_is_mapped(vaddr_t addr)
Definition: mmu.h:149
void mmu_load(paddr_t mmu)
Replace the current page directory.
Definition: mmu.c:180
@ PROT_READ
Definition: mmu.h:41
@ PROT_WRITE
Definition: mmu.h:43
@ PROT_EXEC
Definition: mmu.h:40
@ PROT_NONE
Definition: mmu.h:39
@ PROT_KERNEL
Definition: mmu.h:44