summaryrefslogtreecommitdiff
path: root/arch/i386/boot/boot.s
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/boot/boot.s')
-rw-r--r--arch/i386/boot/boot.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/i386/boot/boot.s b/arch/i386/boot/boot.s
index 792a790..842519f 100644
--- a/arch/i386/boot/boot.s
+++ b/arch/i386/boot/boot.s
@@ -68,8 +68,26 @@ _start:
movl $stack_top, %esp
+ call tty_init
+ call gdt_install
call kernel_main
cli
1: hlt
jmp 1b
+
+.global flush_gdt
+.type flush_gdt, @function
+
+flush_gdt:
+ cli
+ movl 4(%esp), %eax
+ lgdt (%eax)
+ movw $0x10, %ax
+ movw %ax, %ds
+ movw %ax, %es
+ movw %ax, %fs
+ movw %ax, %gs
+ movw %ax, %ss
+ jmp $0x08, $.flush
+.flush: ret