github.com/icexin/eggos@v0.4.2-0.20220216025428-78b167e4f349/kernel/rt0.go (about) 1 package kernel 2 3 import ( 4 "github.com/icexin/eggos/drivers/multiboot" 5 "github.com/icexin/eggos/drivers/pic" 6 "github.com/icexin/eggos/drivers/uart" 7 "github.com/icexin/eggos/kernel/mm" 8 ) 9 10 //go:nosplit 11 func rt0() 12 13 //go:nosplit 14 func go_entry() 15 16 //go:nosplit 17 func wrmsr(reg uint32, value uintptr) 18 19 //go:nosplit 20 func rdmsr(reg uint32) (value uintptr) 21 22 //go:nosplit 23 func preinit(magic, mbiptr uintptr) { 24 simdInit() 25 gdtInit() 26 idtInit() 27 multiboot.Init(magic, mbiptr) 28 mm.Init() 29 uart.PreInit() 30 syscallInit() 31 trapInit() 32 threadInit() 33 pic.Init() 34 timerInit() 35 schedule() 36 }