1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00
gopher-os/kernel/cpu/cpu_amd64.go
Achilleas Anagnostopoulos c5aa5fe05f Add method for reading the CR2 register value
This will allow us to figure out the virtual address that caused a page-
or general protection fault.
2017-06-21 21:36:59 +01:00

24 lines
656 B
Go

package cpu
// EnableInterrupts enables interrupt handling.
func EnableInterrupts()
// DisableInterrupts disables interrupt handling.
func DisableInterrupts()
// Halt stops instruction execution.
func Halt()
// FlushTLBEntry flushes a TLB entry for a particular virtual address.
func FlushTLBEntry(virtAddr uintptr)
// SwitchPDT sets the root page table directory to point to the specified
// physical address and flushes the TLB.
func SwitchPDT(pdtPhysAddr uintptr)
// ActivePDT returns the physical address of the currently active page table.
func ActivePDT() uintptr
// ReadCR2 returns the value stored in the CR2 register.
func ReadCR2() uint64