]> git.corax.cc Git - corax/commitdiff
Remove the kernel stack from the struct cpu structure, since each task will be alloca...
authorMatthias Kruk <m@m10k.eu>
Thu, 19 Sep 2019 10:05:46 +0000 (19:05 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 19 Sep 2019 10:05:46 +0000 (19:05 +0900)
kernel/arch/boot.S
kernel/arch/cpu.h
kernel/arch/defs.h

index 41b855149e4be26ebe657057311850dcccacfcd7..c4d85179e85b5dd348206dff6465a644fcb0f4b4 100644 (file)
@@ -36,8 +36,8 @@ _mb_header:
 
 loader:
     cli
-    movl    $_cpu, %esp
-    addl    $STACK0_TOP, %esp
+       movl    $0x200000, %esp
+       movl    %esp, %ebp
        movl    %esp, %ebp
     pushl   %eax
     pushl   %ebx
index 3b20b9aa97ccdbcd9ab66114ce71b7617bc8b53c..53a671fe23743308b8327a9139e2e0bc0de88041 100644 (file)
@@ -133,7 +133,6 @@ struct stack_frame {
 } __attribute__((packed));
 
 struct cpu {
-    u8_t                    cpu_stack0[STACK0_SIZE];
     segment_descriptor_t    cpu_gdt[GDT_ENTRIES];
     segment_descriptor_t    cpu_idt[IDT_ENTRIES];
     tss32_t                 cpu_tss;
index cc2b14bf0cfe156e7a7f47543385df6ab5054a39..c0a6f0ef246a428d2217ee8625817076bac5b68e 100644 (file)
 #define GDT_ENTRIES 16
 #define IDT_ENTRIES 256
 
-#define STACK0_SIZE CONFIG_KERNEL_STACK_SIZE
-#define STACK0_TOP  STACK0_SIZE
-#define GDT_OFFSET  STACK0_SIZE
+#define GDT_OFFSET  0
 #define IDT_OFFSET  (GDT_OFFSET + (GDT_ENTRIES * 8))
 #define TSS_OFFSET  (IDT_OFFSET + (IDT_ENTRIES * 8))
 #define TSS_SIZE    102
 
+/* FIXME: Should this be RPL_USER for RPL_DRIVER / RPL_SYSTEM tasks? */
 #define TSS_SEL     (0x48 | RPL_USER)
 
 #define CR0_PG_BIT      0x80000000