github.com/jspc/eggos@v0.5.1-0.20221028160421-556c75c878a5/drivers/multiboot/multiboot.go (about) 1 package multiboot 2 3 import "unsafe" 4 5 var ( 6 enabled bool 7 BootInfo Info 8 ) 9 10 func Enabled() bool { 11 return enabled 12 } 13 14 func Init(magic uintptr, mbiptr uintptr) { 15 if magic != bootloaderMagic { 16 return 17 } 18 enabled = true 19 mbi := (*Info)(unsafe.Pointer(mbiptr)) 20 BootInfo = *mbi 21 }