aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-10 00:26:39 +0200
committerMarvin Borner2021-04-10 00:26:39 +0200
commit9655593d80e23d2ea3c091e3187e8e47b278bc3d (patch)
treef618723fd9d457147f4663d2d4990f69fabb2d48 /kernel/main.c
parenteeb88df1d501ccec4737c18dddb7ca0a1176304f (diff)
Gave procs own kernel stack (TSS)
Diffstat (limited to 'kernel/main.c')
-rw-r--r--kernel/main.c18
1 files changed, 12 insertions, 6 deletions
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 <syscall.h>
#include <timer.h>
-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