summaryrefslogtreecommitdiff
path: root/kernel/boot.s
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/boot.s')
-rw-r--r--kernel/boot.s14
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/boot.s b/kernel/boot.s
index 98732f6..96f0e43 100644
--- a/kernel/boot.s
+++ b/kernel/boot.s
@@ -2,8 +2,11 @@ global gdt
global idt
global kboot
global register_isr
+extern con_init
+extern hd_init
extern kmain
extern paging_init
+extern printk
extern syscall_init
extern timer_init
extern traps_init
@@ -24,10 +27,18 @@ kboot:
; WARNING: don't change this without changing the corresponding
; entries in the TSS constructor in sched.c
mov esp, 0x80000
- ; setup descriptor tables
+ ; setup descriptor tables and enable paging
call flush_gdt
call paging_init
call flush_idt
+ ; initialize the console
+ call con_init
+ ; add this point, we can display *some* output
+ push .msg
+ call printk
+ add esp, 4
+ ; initialize the disk interface
+ call hd_init
; last minute setup, then transfer to kmain
call timer_init
call kmain
@@ -35,6 +46,7 @@ kboot:
; disable interrupts and halt the system.
cli
hlt
+.msg: db "Kernel booting...", 10, 0
gdt:
; null descriptor