-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel.ld
More file actions
39 lines (32 loc) · 914 Bytes
/
Copy pathkernel.ld
File metadata and controls
39 lines (32 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ENTRY(boot)
SECTIONS {
. = 0x80200000;
__kernel_base = .;
.text :{
KEEP(*(.text.boot));
*(.text .text.*);
}
.rodata : ALIGN(4) {
*(.rodata .rodata.*);
}
.data : ALIGN(4) {
*(.data .data.*);
}
.bss : ALIGN(4) {
__bss = .;
*(.bss .bss.* .sbss .sbss.*);
__bss_end = .;
}
/* Stack do kernel*/
. = ALIGN(4);
. += 128 * 1024; /* 128KB */
__stack_top = .;
/* Memória livre*/
. = ALIGN(4096); /* A gente alinha em 4096 pra ficar mais fácil de ler: 0x1000
e uma página de memória geralmente é 4KB*/
__free_ram = .;
. += 64 * 1024 * 1024; /* 64MiB */
__free_ram_end = .; /* NOTE: Por que só 64Mib?*/
/* TODO: Alocar esse espaço de forma dinâmica ao
* inicializar o computador, não em compile-time*/
}