AquilaOS documentation
How it works, and its code
Toggle main menu visibility
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
*/
25
void
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. */
29
buddy_set_unusable
(
X86_TRAMPOLINE
,
X86_TRAMPOLINE_SIZE
);
30
31
pmap_init
();
32
}
boot.h
arch.h
panic.h
system.h
cpu.h
mm.h
pmap.h
buddy.h
buddy_set_unusable
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.h - Multiboot header file.
pmap_init
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
arch_mm_setup
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
smp.h
X86_TRAMPOLINE_SIZE
#define X86_TRAMPOLINE_SIZE
Definition
smp.h:9
X86_TRAMPOLINE
#define X86_TRAMPOLINE
Definition
smp.h:8
string.h
kernel
arch
i386
mm
mm.c
Generated by
1.18.0