github.com/jspc/eggos@v0.5.1-0.20221028160421-556c75c878a5/kernel/rt0.go (about)

     1  package kernel
     2  
     3  import (
     4  	"github.com/jspc/eggos/drivers/multiboot"
     5  	"github.com/jspc/eggos/drivers/pic"
     6  	"github.com/jspc/eggos/drivers/uart"
     7  	"github.com/jspc/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  }