Move TSS load to boot.s
This commit is contained in:
parent
bb36ab3656
commit
e0eb1a92be
@ -63,6 +63,9 @@ _start:
|
||||
|
||||
# GDT, paging, and other features
|
||||
call gdt_install
|
||||
# load the TSS which is in the 6th entry of the GDT
|
||||
movw $0x28, %ax
|
||||
ltr %ax
|
||||
|
||||
boot_kernel:
|
||||
# enter high-level kernel (C)
|
||||
|
@ -67,7 +67,4 @@ void gdt_install() {
|
||||
sizeof(tss), 0x89, 0x40);
|
||||
|
||||
gdt_flush(&gdtr);
|
||||
|
||||
// load the TSS
|
||||
tss_load();
|
||||
}
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "structs.h"
|
||||
|
||||
extern void gdt_flush(struct segreg *gdtr);
|
||||
extern void tss_load();
|
||||
void gdt_entry_set(struct segdesc *entry, uint32_t base,
|
||||
uint32_t limit, uint8_t access, uint8_t gran);
|
||||
void gdt_install();
|
||||
|
@ -35,13 +35,3 @@ gdt_flush:
|
||||
gdt_flush_end:
|
||||
popl %ebp
|
||||
ret
|
||||
|
||||
.global tss_load
|
||||
.type tss_load,@function
|
||||
tss_load:
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
movw $0x28, %ax
|
||||
ltr %ax
|
||||
popl %ebp
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user