Skip to main content

Module x86_64

Module x86_64 

Source
Expand description

x86_64 architecture-specific code

Inspired by MaestroOS arch/x86/mod.rs

Modules§

apic
Local APIC (Advanced Programmable Interrupt Controller) driver
boot_timestamp
Boot timestamp : TSC-based elapsed time from kernel entry.
cpuid
CPU feature detection via CPUID instruction.
gdt
Global Descriptor Table (GDT) for Strat9-OS
idt
Interrupt Descriptor Table (IDT) for Strat9-OS
io
Port I/O functions for x86_64 (inspired by Maestro OS)
ioapic
I/O APIC driver
keyboard
PS/2 Keyboard driver
keyboard_layout
Keyboard Layout Configuration
keyboard_us
US QWERTY scancode-to-ASCII tables
mouse
PS/2 Mouse driver (IRQ12)
msi
MSI / MSI-X interrupt support for PCI devices (x86_64).
pci
PCI Configuration Space Access
percpu
Per-CPU data (x86_64)
pic
8259 Programmable Interrupt Controller (PIC) driver Inspired by MaestroOS pic.rs
ring3_diag
Pre-IRETQ diagnostics for transitioning from Ring 0 to Ring 3
serial
smp
SMP (Symmetric Multi-Processing) boot for x86_64.
speaker
PC Speaker driver : beep codes + music playback.
syscall
SYSCALL/SYSRET interface for Strat9-OS
timer
Timer Implementation
tlb
TLB (Translation Lookaside Buffer) shootdown for SMP.
tss
Task State Segment (TSS) for Strat9-OS
vga
Framebuffer text console (UEFI bootloader framebuffer + PSF font). https://en.wikipedia.org/wiki/PC_Screen_Font
vgabuf
Bounded, allocation-free SMP queue between logging and framebuffer rendering. Formatting/rendering never retains a reference to a released queue slot.
x2apic
x2APIC (Extended xAPIC) driver

Functions§

clac
Clear AC flag in RFLAGS to re-enable SMAP protection.
cli
Disable interrupts
cpu_has_smap 🔒
Whether CPUID.(7,0):EBX.SMAP is available. Cached on first use; the cpu() call is cheap (single Relaxed load) once cpuid::init() ran.
cpuid
Execute CPUID instruction.
cpuid_osxsave_enabled
Whether CR4.OSXSAVE is currently enabled on this CPU.
hlt
Halt the CPU until the next interrupt
init_cpu_extensions
Initialize FPU, SSE, and optionally XSAVE for the current CPU.
interrupts_enabled
Check if interrupts are enabled
rdmsr
Read from a Model Specific Register
rdtsc
Read the Time Stamp Counter (TSC).
restore_flags
Restore RFLAGS (including interrupt flag) from a previous save.
save_flags_and_cli
Save RFLAGS and disable interrupts. Returns saved flags.
stac
Set AC flag in RFLAGS to temporarily disable SMAP.
sti
Enable interrupts
wrmsr
Write to a Model Specific Register
xgetbv
Read an Extended Control Register (XGETBV).
xsetbv⚠
Write an Extended Control Register (XSETBV).