From d6e3c058d62befd034ec47cbcd57ae02d97ba1db Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 19 Sep 2021 21:20:11 +0200 Subject: call sysenter_setup before kmain_early makes the code slightly simpler, imo --- src/kernel/arch/i386/boot.c | 3 --- src/kernel/arch/i386/boot.s | 1 + src/kernel/arch/i386/sysenter.h | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 src/kernel/arch/i386/sysenter.h (limited to 'src') diff --git a/src/kernel/arch/i386/boot.c b/src/kernel/arch/i386/boot.c index 522361e..57f8ff5 100644 --- a/src/kernel/arch/i386/boot.c +++ b/src/kernel/arch/i386/boot.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include @@ -15,8 +14,6 @@ void kmain_early(struct multiboot_info *multiboot) { gdt_init(); tty_const("idt..."); idt_init(); - tty_const("sysenter..."); - sysenter_setup(); { // find the init module struct multiboot_mod *module = &multiboot->mods[0]; diff --git a/src/kernel/arch/i386/boot.s b/src/kernel/arch/i386/boot.s index e6eb26f..0101b40 100644 --- a/src/kernel/arch/i386/boot.s +++ b/src/kernel/arch/i386/boot.s @@ -3,6 +3,7 @@ .type _start, @function _start: mov $_bss_end, %esp // the stack is at the top of bss + call sysenter_setup push %ebx // address of the Multiboot struct call kmain_early diff --git a/src/kernel/arch/i386/sysenter.h b/src/kernel/arch/i386/sysenter.h deleted file mode 100644 index b731c67..0000000 --- a/src/kernel/arch/i386/sysenter.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -void sysenter_setup(void); -- cgit v1.2.3