Module arch

Source
Expand description

Architecture-specific types and operations.

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.
TrapFrame
Saved registers when a trap (interrupt or exception) occurs.
UspaceContextuspace
Context to enter user space.

Functions§

cpu_init
Initializes CPU states on the current CPU.
disable_irqs
Makes the current CPU to ignore interrupts.
enable_irqs
Allows the current CPU to respond to interrupts.
flush_tlb
Flushes the TLB.
halt
Halt the current CPU.
init_gdt
Initializes the per-CPU TSS and GDT structures and loads them into the current CPU.
init_idt
Initializes the global IDT and loads it into the current CPU.
init_syscalluspace
Initializes syscall support and setups the syscall handler.
irqs_enabled
Returns whether the current CPU is allowed to respond to interrupts.
read_page_table_root
Reads the register that stores the current page table root.
read_thread_pointer
Reads the thread pointer of the current CPU.
tss_get_rsp0
Returns the stack pointer for privilege level 0 (RSP0) of the current TSS.
tss_set_rsp0
Sets the stack pointer for privilege level 0 (RSP0) of the current TSS.
wait_for_irqs
Relaxes the current CPU and waits for interrupts.
write_page_table_root
Writes the register to update the current page table root.
write_thread_pointer
Writes the thread pointer of the current CPU.