AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
mm.c
Go to the documentation of this file.
1
4
5#include <core/system.h>
6#include <core/string.h>
7#include <core/panic.h>
8#include <core/arch.h>
9
10#include <cpu/cpu.h>
11
12#include <boot/multiboot.h>
13#include <boot/boot.h>
14
15#include <cpu/smp.h>
16#include <mm/buddy.h>
17#include <mm/pmap.h>
18#include <mm/mm.h>
19
20/*
21 * Finishes setting up memory at boot, once `mm_setup()` has set up the
22 * page structures and the buddy allocator: it keeps the trampoline's
23 * pages out of the allocator, and takes over the boot page tables.
24 */
25void arch_mm_setup(void)
26{
27 /* Never give out the trampoline's pages, where the other CPUs start:
28 * they are in conventional memory, which is free on PCs. */
30
31 pmap_init();
32}
void buddy_set_unusable(paddr_t paddr, size_t size)
Marks a range of physical memory as not free, at boot, before the first allocation: the kernel,...
Definition buddy.c:212
multiboot.h - Multiboot header file.
void pmap_init(void)
Takes over the boot page tables as the kernel's, at boot, and makes the page tables of the kernel's h...
Definition pmap.c:195
void arch_mm_setup(void)
Finishes setting up memory at boot, once mm_setup() has set up the page structures and the buddy allo...
Definition pmap.c:514
#define X86_TRAMPOLINE_SIZE
Definition smp.h:9
#define X86_TRAMPOLINE
Definition smp.h:8