Module axhal::arch

source ·
Expand description

Architecture-specific types and operations.

Structs§

  • Extended state of a task, such as FP/SIMD states.
  • A 512-byte memory region for the FXSAVE/FXRSTOR instruction to save and restore the x87 FPU, MMX, XMM, and MXCSR registers.
  • A wrapper of the Global Descriptor Table (GDT) with maximum 16 entries.
  • A wrapper of the Interrupt Descriptor Table (IDT).
  • Saved hardware states of a task.
  • Saved registers when a trap (interrupt or exception) occurs.
  • Context to enter user space.

Functions§

  • Initializes CPU states on the current CPU.
  • Makes the current CPU to ignore interrupts.
  • Allows the current CPU to respond to interrupts.
  • Flushes the TLB.
  • Halt the current CPU.
  • Initializes the per-CPU TSS and GDT structures and loads them into the current CPU.
  • Initializes the global IDT and loads it into the current CPU.
  • Initializes syscall support and setups the syscall handler.
  • Returns whether the current CPU is allowed to respond to interrupts.
  • Reads the register that stores the current page table root.
  • Reads the thread pointer of the current CPU.
  • Returns the stack pointer for privilege level 0 (RSP0) of the current TSS.
  • Sets the stack pointer for privilege level 0 (RSP0) of the current TSS.
  • Relaxes the current CPU and waits for interrupts.
  • Writes the register to update the current page table root.
  • Writes the thread pointer of the current CPU.