cpu

package
v0.0.0-...-1a7aca4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivePDT

func ActivePDT() uintptr

ActivePDT returns the physical address of the currently active page table.

func DisableInterrupts

func DisableInterrupts()

DisableInterrupts disables interrupt handling.

func EnableInterrupts

func EnableInterrupts()

EnableInterrupts enables interrupt handling.

func FlushTLBEntry

func FlushTLBEntry(virtAddr uintptr)

FlushTLBEntry flushes a TLB entry for a particular virtual address.

func Halt

func Halt()

Halt stops instruction execution.

func ID

func ID(leaf uint32) (uint32, uint32, uint32, uint32)

ID returns information about the CPU and its features. It is implemented as a CPUID instruction with EAX=leaf and returns the values in EAX, EBX, ECX and EDX.

func IsIntel

func IsIntel() bool

IsIntel returns true if the code is running on an Intel processor.

func PortReadByte

func PortReadByte(port uint16) uint8

PortReadByte reads a uint8 value from the requested port.

func PortReadDword

func PortReadDword(port uint16) uint32

PortReadDword reads a uint32 value from the requested port.

func PortReadWord

func PortReadWord(port uint16) uint16

PortReadWord reads a uint16 value from the requested port.

func PortWriteByte

func PortWriteByte(port uint16, val uint8)

PortWriteByte writes a uint8 value to the requested port.

func PortWriteDword

func PortWriteDword(port uint16, val uint32)

PortWriteDword writes a uint32 value to the requested port.

func PortWriteWord

func PortWriteWord(port uint16, val uint16)

PortWriteWord writes a uint16 value to the requested port.

func ReadCR2

func ReadCR2() uint64

ReadCR2 returns the value stored in the CR2 register.

func SwitchPDT

func SwitchPDT(pdtPhysAddr uintptr)

SwitchPDT sets the root page table directory to point to the specified physical address and flushes the TLB.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL