diff options
Diffstat (limited to 'src/kernel/arch/amd64')
-rw-r--r-- | src/kernel/arch/amd64/boot.c | 2 | ||||
-rw-r--r-- | src/kernel/arch/amd64/linker.ld | 42 | ||||
-rw-r--r-- | src/kernel/arch/amd64/pagedir.c | 2 |
3 files changed, 44 insertions, 2 deletions
diff --git a/src/kernel/arch/amd64/boot.c b/src/kernel/arch/amd64/boot.c index c645fb6..337d23b 100644 --- a/src/kernel/arch/amd64/boot.c +++ b/src/kernel/arch/amd64/boot.c @@ -6,7 +6,7 @@ #include <kernel/arch/amd64/pci.h> #include <kernel/arch/amd64/tty/tty.h> #include <kernel/arch/generic.h> -#include <kernel/mem/alloc.h> +#include <kernel/malloc.h> #include <kernel/panic.h> #include <kernel/proc.h> diff --git a/src/kernel/arch/amd64/linker.ld b/src/kernel/arch/amd64/linker.ld new file mode 100644 index 0000000..a910d4e --- /dev/null +++ b/src/kernel/arch/amd64/linker.ld @@ -0,0 +1,42 @@ +ENTRY(_start) + +SECTIONS +{ + . = 0; + .shared BLOCK(4K) : ALIGN(4K) + { + *(.multiboot) + *(.shared) + _shared_len = .; + } + + . = 1M; + .text BLOCK(4K) : ALIGN(4K) + { + _kern_start = .; + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data) + } + _data_end = .; + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + + . += 16K; + _isr_big_stack = .; + + . += 16K; + _stack_top = .; + } + _bss_end = (. + 0xFFF) & ~0xFFF; /* aligned to 4K */ + pbitmap = _bss_end; + pbitmap_start = _bss_end; +} diff --git a/src/kernel/arch/amd64/pagedir.c b/src/kernel/arch/amd64/pagedir.c index 9250a01..d56a548 100644 --- a/src/kernel/arch/amd64/pagedir.c +++ b/src/kernel/arch/amd64/pagedir.c @@ -1,6 +1,6 @@ #include <kernel/arch/amd64/paging.h> #include <kernel/arch/generic.h> -#include <kernel/mem/alloc.h> +#include <kernel/malloc.h> #include <kernel/panic.h> #include <shared/mem.h> #include <stdint.h> |