github.com/icexin/eggos@v0.4.2-0.20220216025428-78b167e4f349/eggos.go (about)

     1  package eggos
     2  
     3  import (
     4  	"runtime"
     5  
     6  	"github.com/icexin/eggos/console"
     7  	"github.com/icexin/eggos/drivers/cga/fbcga"
     8  	_ "github.com/icexin/eggos/drivers/e1000"
     9  	"github.com/icexin/eggos/drivers/kbd"
    10  	"github.com/icexin/eggos/drivers/pci"
    11  	"github.com/icexin/eggos/drivers/ps2/mouse"
    12  	"github.com/icexin/eggos/drivers/uart"
    13  	"github.com/icexin/eggos/drivers/vbe"
    14  	"github.com/icexin/eggos/fs"
    15  	"github.com/icexin/eggos/inet"
    16  	"github.com/icexin/eggos/kernel"
    17  )
    18  
    19  func kernelInit() {
    20  	// trap and syscall threads use two Ps,
    21  	// and the remainings are for other goroutines
    22  	runtime.GOMAXPROCS(6)
    23  
    24  	kernel.Init()
    25  	uart.Init()
    26  	kbd.Init()
    27  	mouse.Init()
    28  	console.Init()
    29  
    30  	fs.Init()
    31  	vbe.Init()
    32  	fbcga.Init()
    33  	pci.Init()
    34  	inet.Init()
    35  }
    36  
    37  func init() {
    38  	kernelInit()
    39  }