package
0.0.0-20240720002214-37b2b8227b91
Repository: https://github.com/progrium/go-netstack.git
Documentation: pkg.go.dev

# Packages

Package pagetables provides a generic implementation of pagetables.

# Functions

AddrOfStart return the address of the CPU entrypoint.
Halt halts execution.
HaltAndWriteFSBase halts execution.
Init sets function pointers based on architectural features.
InitDefault initializes ring0 with the auto-detected host feature set.
IsCanonical indicates whether addr is canonical per the amd64 spec.
IsKernelFlags returns true if rflags coresponds to the kernel mode.
ReadCR2 reads the current CR2 value.
SetCPUIDFaulting sets CPUID faulting per the boolean value.

# Constants

Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Selectors.
Selectors.
KernelFlagsClear should always be clear in the kernel.
KernelFlagsSet should always be set in the kernel.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Exception vectors.
Access bit (always set).
Available.
16 or 32-bit.
Execute permission.
Grows down, not used.
Granularity: page or byte.
Long mode.
Present.
Zero => system, 1 => user code/data.
Write permission.
Exception vectors.
Exception vectors.
Exception vectors.
System call vectors.
Exception vectors.
Selectors.
Selectors.
Selectors.
Selectors.
UserFlagsClear are always cleared in userspace.
UserFlagsSet are always set in userspace.
Exception vectors.
Exception vectors.

# Variables

Standard segments.
Standard segments.
KernelStartAddress is the starting kernel address.
MaximumUserAddress is the largest possible user address.
PhysicalAddressBits is the number of bits available in the physical address space.
Standard segments.
Standard segments.
Standard segments.
UserspaceSize is the total size of userspace.
VirtualAddressBits is the number of bits available in the virtual address space.

# Structs

CPU is the per-CPU struct.
CPUArchState contains CPU-specific arch state.
Gate64 is a 64-bit task, trap, or interrupt gate.
Kernel is a global kernel object.
KernelArchState contains architecture-specific state.
SegmentDescriptor is a segment descriptor.
SwitchArchOpts are embedded in SwitchOpts.
SwitchOpts are passed to the Switch function.
TaskState64 is a 64-bit task state structure.

# Interfaces

Hooks are hooks for kernel functions.

# Type aliases

SegmentDescriptorFlags are typed flags within a descriptor.
Selector is a segment Selector.
Vector is an exception vector.