Redo and improve thread scheduling startup.
[pintos-anon] / src / threads / loader.S
index 41289d1281f82ac3ccd6a62a2199f9ecbbaa2d8c..d67af3858f2cbefd592742c1dbab02827f4e00f2 100644 (file)
@@ -1,6 +1,5 @@
 #include "loader.h"
 #include "mmu.h"
-#include "gdt.h"
        
 ##############################################################################
 # Kernel loader.
@@ -182,9 +181,10 @@ read_sector:
        
 ##### Jump to kernel entry point.
 
-       movl $LOADER_PHYS_BASE + LOADER_BASE, %esp
+       movl $LOADER_PHYS_BASE + 0x20000, %esp
        movl $LOADER_PHYS_BASE + LOADER_KERN_BASE, %eax
-       jmp *%eax
+       call *%eax
+       jmp panic
 
 ##### GDT