AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
vmm.c
Go to the documentation of this file.
1
5
6#include <core/system.h>
7#include <core/arch.h>
8#include <core/panic.h>
9#include <mm/mm.h>
10#include <mm/vm.h>
11#include <ds/queue.h>
12#include <ds/hashmap.h>
13
14MALLOC_DEFINE(M_VM_AREF, "vm-aref", "anonymous virtual memory object reference");
15
16/* The kernel's address space. */
18
33
46
int mm_map(struct pmap *pmap, paddr_t paddr, vaddr_t vaddr, size_t size, int flags)
Maps a range of an address space, page by page.
Definition mm.c:161
void mm_unmap_full(struct pmap *pmap, vaddr_t vaddr, size_t size)
Unmaps every page of a range of an address space.
Definition mm.c:208
#define MALLOC_DEFINE(type, _name, _desc)
Definition kvmem.h:30
A mapping (map entry): a range of an address space, its permissions, and where its pages come from.
Definition vm.h:66
uint32_t flags
its permissions and flags (VM_*)
Definition vm.h:78
paddr_t paddr
physical memory to map all at once (vm_map()), or 0 for pages that come in on page faults
Definition vm.h:69
vaddr_t base
where the mapping starts in its address space
Definition vm.h:72
size_t size
its size
Definition vm.h:75
An address space: its mappings, and its page tables.
Definition vm.h:25
struct pmap * pmap
its page tables (the architecture's)
Definition vm.h:27
void vm_unmap_full(struct vm_space *vm_space, struct vm_entry *vm_entry)
Unmaps every page of a map entry's range.
Definition vmm.c:42
int vm_map(struct vm_space *vm_space, struct vm_entry *vm_entry)
Maps a map entry's whole range at once: its physical memory (paddr), or new pages of memory if it has...
Definition vmm.c:29
struct vm_space kvm_space
Definition vmm.c:17