aboutsummaryrefslogtreecommitdiff
path: root/defs/x86_64-linker.ld
Commit message (Collapse)AuthorAge
* chore: cleanupsTianhao Wang2024-06-11
| | | | Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* chore: add v2p and p2v conversion wrt. id mappingTianhao Wang2024-06-11
| | | | Also renamed a few symbols to avoid confusion.
* mm: provide high memory kernel mapping in asm code.Tianhao Wang2024-06-11
| | | | | | | | | | | | | | | | | we use the first pml4 entry (+one pdp table) to map phy 0~512G to virt 0~512G for init code. This doesn't change. For the kernel to work in higher half memory, we also need to create mapping for it. We take the 256th entry of pml4 entry (hence one additional pdp table). Entry 0~63 are mapped to to the physical memory (with offset 0xffff_8000_0000_0000) Entry 64~127 are not used Entry 128~191 are mapped to the kernel image (text and code) (with offset 0xffff_8020_0000_0000) details in docs/mem_layout.txt
* mm: add stack based PMATianhao Wang2024-06-11
| | | | | | | use 8MiB reserved array to manage up to 4GiB of physical memory (4K Pages only) Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* multiboot: basic support for multiboot infoTianhao Wang2024-06-11
| | | | | | | | well, it's not trivial to use bios function because thanks to grub + multiboot, we are already in protected mode when the startup code takes control. Also the MB info is easier to play with than BIOS (or ACPI) Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* choreTianhao Wang2024-06-11
|
* startup: define multiboot headers in linker scriptTianhao Wang2024-06-11
|
* linker: "optimize" section arrangementsTianhao Wang2024-06-11
| | | | | | | 1. throw vectors in a custom ".reserved" section 2. throw idt in a NOLOAD ".reserved_0" section: save some binary size (like .bss) since we don't care for its initial value. 3. squash all ".data.*" sections from rust into ".data"
* split idt and vectors from startup codeTianhao Wang2024-06-11
|
* linker: explicitly provide ___BSS* symbolsTianhao Wang2024-06-11
|
* rework linker scriptTianhao Wang2024-06-11
|
* rename `compiler` directory to `defs`Tianhao Wang2024-06-11
the name `compiler` is ambiguous