From 9655593d80e23d2ea3c091e3187e8e47b278bc3d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 10 Apr 2021 00:26:39 +0200 Subject: Gave procs own kernel stack (TSS) --- kernel/main.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'kernel/main.c') diff --git a/kernel/main.c b/kernel/main.c index faac719..ab5fde8 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -19,18 +19,24 @@ #include #include -extern u32 __stack_chk_guard; -u32 __stack_chk_guard; +PROTECTED extern u32 __stack_chk_guard; +PROTECTED u32 __stack_chk_guard; -int kernel_main(struct mem_info *mem_info, struct vid_info *vid_info); // Decl -int kernel_main(struct mem_info *mem_info, struct vid_info *vid_info) +PROTECTED u32 tss_entry = 0; +PROTECTED u32 boot_drive = 0; + +int kernel_main(struct boot_info *boot); // Decl +int kernel_main(struct boot_info *boot) { // Serial connection serial_install(); serial_print("\nKernel was compiled at " __TIME__ " on " __DATE__ "\n"); serial_print("Serial connected.\n"); - memory_install(mem_info, vid_info); + tss_entry = boot->tss; + boot_drive = boot->drive; + + memory_install(boot); memory_switch_dir(virtual_kernel_dir()); cpu_enable_features(); @@ -49,7 +55,7 @@ int kernel_main(struct mem_info *mem_info, struct vid_info *vid_info) rtc_install(); keyboard_install(); mouse_install(); - fb_install(vid_info); + fb_install(boot->vid); /* net_install(); */ // Enable drivers -- cgit v1.2.3