paging at boot works now!!!!

This commit is contained in:
Justus Wolff
2026-04-05 03:16:50 +02:00
parent ef151a8385
commit fd968a06ce
5 changed files with 105 additions and 50 deletions

View File

@@ -1,30 +1,25 @@
ENTRY(_start)
KERNEL_VIRT_BASE = 0xC0000000;
KERNEL_PHYS_BASE = 0x00100000;
SECTIONS {
. = ALIGN(8);
.boot : {
KEEP(*(.multiboot))
. = KERNEL_VIRT_BASE;
.text : AT(KERNEL_PHYS_BASE) {
*(.text)
}
. = 1M; /* Load kernel at 1MB */
.text BLOCK(4K) : ALIGN(4K)
{
*(.text)
}
.rodata : AT(KERNEL_PHYS_BASE + (ADDR(.rodata) - KERNEL_VIRT_BASE)) {
*(.rodata)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data : AT(KERNEL_PHYS_BASE + (ADDR(.data) - KERNEL_VIRT_BASE)) {
*(.data)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
.bss : AT(KERNEL_PHYS_BASE + (ADDR(.bss) - KERNEL_VIRT_BASE)) {
*(COMMON)
*(.bss)
}
}