mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Currently, the kernel can write to 0xb80000 because this is part of the initial identify mapping set up by the rt0 code. When we establish new mappings for the kernel using its real VMA address then writes to the framebuffer will cause a page fault unless we explicitly map it.
20 lines
514 B
Go
20 lines
514 B
Go
package console
|
|
|
|
import (
|
|
"gopheros/device"
|
|
"gopheros/kernel/cpu"
|
|
"gopheros/kernel/hal/multiboot"
|
|
"gopheros/kernel/mem/vmm"
|
|
)
|
|
|
|
var (
|
|
mapRegionFn = vmm.MapRegion
|
|
portWriteByteFn = cpu.PortWriteByte
|
|
getFramebufferInfoFn = multiboot.GetFramebufferInfo
|
|
|
|
// ProbeFuncs is a slice of device probe functions that is used by
|
|
// the hal package to probe for console device hardware. Each driver
|
|
// should use an init() block to append its probe function to this list.
|
|
ProbeFuncs []device.ProbeFn
|
|
)
|