1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

Pass kernel start/end physical address to Kmain

This commit is contained in:
Achilleas Anagnostopoulos
2017-06-17 08:18:07 +01:00
parent ad0bf0a4ca
commit c81fd8b758
4 changed files with 14 additions and 3 deletions

View File

@@ -13,12 +13,12 @@ import (
// allocated by the assembly code.
//
// The rt0 code passes the address of the multiboot info payload provided by the
// bootloader.
// bootloader as well as the physical addresses for the kernel start/end.
//
// Kmain is not expected to return. If it does, the rt0 code will halt the CPU.
//
//go:noinline
func Kmain(multibootInfoPtr uintptr) {
func Kmain(multibootInfoPtr, kernelStart, kernelEnd uintptr) {
multiboot.SetInfoPtr(multibootInfoPtr)
hal.InitTerminal()