Crate axcpu

Source
Expand description

§axcpu

Crates.io Docs.rs CI

This crate provides privileged instruction and structure abstractions for various CPU architectures. It is designed to implement the hardware abstraction layer of an operating system kernel.

§Supported Architectures

  • x86_64
  • AArch64
  • RISC-V
  • LoongArch64

Modules§

asm
Wrapper functions for assembly instructions.
init
Helper functions to initialize the CPU states on systems bootstrapping.
trap
Trap handling.
uspaceuspace
Structures and functions for user space.

Structs§

ExtendedState
Extended state of a task, such as FP/SIMD states.
FxsaveArea
A 512-byte memory region for the FXSAVE/FXRSTOR instruction to save and restore the x87 FPU, MMX, XMM, and MXCSR registers.
GdtStruct
A wrapper of the Global Descriptor Table (GDT) with maximum 16 entries.
IdtStruct
A wrapper of the Interrupt Descriptor Table (IDT).
TaskContext
Saved hardware states of a task.
TaskStateSegment
In 64-bit mode the TSS holds information that is not directly related to the task-switch mechanism, but is used for stack switching when an interrupt or exception occurs.
TrapFrame
Saved registers when a trap (interrupt or exception) occurs.