mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
This will allow us to figure out the virtual address that caused a page- or general protection fault.
24 lines
656 B
Go
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
|