1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00
Achilleas Anagnostopoulos cc4364f55c Pass the virtual page offset for the kernel to kernel.Kmain
Ths page offset is defined in arch/XXX/constants.inc and needs to be
passed to the kernel so we can correctly calculate the physical frame
addresses that correspond to the ELF section virtual memory addresses.
2017-07-13 00:08:40 +01:00

16 lines
472 B
Go

package main
import "gopheros/kernel/kmain"
var multibootInfoPtr uintptr
// main makes a dummy call to the actual kernel main entrypoint function. It
// is intentionally defined to prevent the Go compiler from optimizing away the
// real kernel code.
//
// A global variable is passed as an argument to Kmain to prevent the compiler
// from inlining the actual call and removing Kmain from the generated .o file.
func main() {
kmain.Kmain(multibootInfoPtr, 0, 0, 0)
}