diff options
Diffstat (limited to 'kernel/boot.s')
| -rw-r--r-- | kernel/boot.s | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/kernel/boot.s b/kernel/boot.s index 9d948cf..98732f6 100644 --- a/kernel/boot.s +++ b/kernel/boot.s @@ -2,7 +2,6 @@ global gdt global idt global kboot global register_isr -global tss extern kmain extern paging_init extern syscall_init @@ -23,7 +22,7 @@ kboot: cli ; put the stack pointer near the end of conventional memory ; WARNING: don't change this without changing the corresponding - ; entry in the TSS + ; entries in the TSS constructor in sched.c mov esp, 0x80000 ; setup descriptor tables call flush_gdt @@ -37,20 +36,6 @@ kboot: cli hlt -tss: - dd 0 - dd 0x80000 ; kernel stack pointer - dd 0x10 ; kernel stack segment - times 60 db 0 - dd 0x13 ; ES segment - dd 0x0B ; CS segment - dd 0x13 ; SS segment - dd 0x13 ; DS segment - dd 0x13 ; FS segment - dd 0x13 ; GS segment - times 8 db 0 -.end: - gdt: ; null descriptor dq 0 @@ -82,9 +67,8 @@ gdt: db 0xF2 db 0xCF db 0x00 - ; task state segment -.tss: - dq 0 ; we initialize this later + ; empty TSS slots for our C scheduler + times 64 dq 0 .end: gdtp: @@ -94,19 +78,6 @@ gdtp: flush_gdt: push ebp mov ebp, esp - ; initialize the TSS entry - mov eax, tss - mov [gdt.tss+2], ax - shr eax, 16 - mov [gdt.tss+4], al - mov [gdt.tss+7], ah - mov eax, (tss.end-tss-1) - mov [gdt.tss], ax - shr eax, 16 - and al, 0x0F - mov [gdt.tss+6], al - mov al, 0xE9 - mov [gdt.tss+5], al ; now, load the GDT lgdt [gdtp] mov ax, 0x10 @@ -117,9 +88,6 @@ flush_gdt: mov ss, ax jmp 0x08:.end .end: - ; initialize the task state register - mov ax, 0x002B - ltr ax pop ebp ret |
