diff --git a/kernel/driver/tty/vt.go b/kernel/driver/tty/vt.go index d831bc1..1c19a5e 100644 --- a/kernel/driver/tty/vt.go +++ b/kernel/driver/tty/vt.go @@ -67,7 +67,7 @@ func (t *Vt) Write(data []byte) (int, error) { return len(data), nil } -// Write implements io.ByteWriter. +// WriteByte implements io.ByteWriter. func (t *Vt) WriteByte(b byte) error { switch b { case '\r': diff --git a/kernel/hal/hal.go b/kernel/hal/hal.go index 61bdc9e..0b211f9 100644 --- a/kernel/hal/hal.go +++ b/kernel/hal/hal.go @@ -7,7 +7,9 @@ import ( ) var ( - egaConsole = &console.Ega{} + egaConsole = &console.Ega{} + + // ActiveTerminal points to the currently active terminal. ActiveTerminal = &tty.Vt{} ) diff --git a/kernel/hal/multiboot/multiboot.go b/kernel/hal/multiboot/multiboot.go index a7336fb..1dd6e9f 100644 --- a/kernel/hal/multiboot/multiboot.go +++ b/kernel/hal/multiboot/multiboot.go @@ -4,6 +4,7 @@ import "unsafe" type tagType uint32 +// nolint const ( tagMbSectionEnd tagType = iota tagBootCmdLine @@ -100,7 +101,7 @@ const ( memUnknown ) -/// MemoryMapEntry describes a memory region entry, namely its physical address, +// MemoryMapEntry describes a memory region entry, namely its physical address, // its length and its type. type MemoryMapEntry struct { // The physical address for this memory region. diff --git a/kernel/kmain.go b/kernel/kmain.go index 534dda9..2c21fda 100644 --- a/kernel/kmain.go +++ b/kernel/kmain.go @@ -26,8 +26,4 @@ func Kmain(multibootInfoPtr uintptr) { hal.InitTerminal() hal.ActiveTerminal.Clear() early.Printf("Starting gopher-os\n") - - // Prevent Kmain from returning - for { - } }