mirror of
				https://github.com/taigrr/gopher-os
				synced 2025-01-18 04:43:13 -08:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			635 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			635 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package hal
 | |
| 
 | |
| import (
 | |
| 	"github.com/achilleasa/gopher-os/kernel/driver/tty"
 | |
| 	"github.com/achilleasa/gopher-os/kernel/driver/video/console"
 | |
| 	"github.com/achilleasa/gopher-os/kernel/hal/multiboot"
 | |
| )
 | |
| 
 | |
| var (
 | |
| 	egaConsole = &console.Ega{}
 | |
| 
 | |
| 	// ActiveTerminal points to the currently active terminal.
 | |
| 	ActiveTerminal = &tty.Vt{}
 | |
| )
 | |
| 
 | |
| // InitTerminal provides a basic terminal to allow the kernel to emit some output
 | |
| // till everything is properly setup
 | |
| func InitTerminal() {
 | |
| 	fbInfo := multiboot.GetFramebufferInfo()
 | |
| 
 | |
| 	egaConsole.Init(uint16(fbInfo.Width), uint16(fbInfo.Height), uintptr(fbInfo.PhysAddr))
 | |
| 	ActiveTerminal.AttachTo(egaConsole)
 | |
| }
 |