diff options
Diffstat (limited to 'src/kernel/arch')
-rw-r--r-- | src/kernel/arch/generic.h | 4 | ||||
-rw-r--r-- | src/kernel/arch/i386/boot.s | 2 | ||||
-rw-r--r-- | src/kernel/arch/i386/gdt/gdt.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/arch/generic.h b/src/kernel/arch/generic.h index e06ac27..46782f8 100644 --- a/src/kernel/arch/generic.h +++ b/src/kernel/arch/generic.h @@ -6,8 +6,8 @@ // some code assumes that it's a power of 2 #define PAGE_SIZE 4096 -// src/arch/i386/boot.s -extern char stack_top; +// linker.ld +extern char _bss_end; __attribute__((noreturn)) void halt_cpu(); diff --git a/src/kernel/arch/i386/boot.s b/src/kernel/arch/i386/boot.s index 74de9b7..e6eb26f 100644 --- a/src/kernel/arch/i386/boot.s +++ b/src/kernel/arch/i386/boot.s @@ -2,7 +2,7 @@ .global _start .type _start, @function _start: - mov $stack_top, %esp + mov $_bss_end, %esp // the stack is at the top of bss push %ebx // address of the Multiboot struct call kmain_early diff --git a/src/kernel/arch/i386/gdt/gdt.c b/src/kernel/arch/i386/gdt/gdt.c index 2935e6e..e4cd3ef 100644 --- a/src/kernel/arch/i386/gdt/gdt.c +++ b/src/kernel/arch/i386/gdt/gdt.c @@ -80,7 +80,7 @@ static void gdt_prepare() { // tss memset(&TSS, 0, sizeof(TSS)); TSS.ss0 = SEG_r0data << 3; // kernel data segment - TSS.esp0 = (uintptr_t) &stack_top; + TSS.esp0 = (uintptr_t) &_bss_end; GDT[SEG_TSS] = (struct gdt_entry) { .limit_low = sizeof(TSS), |