github.com/icexin/eggos@v0.4.2-0.20220216025428-78b167e4f349/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 }