Expand description
x86_64 architecture-specific code
Inspired by MaestroOS arch/x86/mod.rs
Modules§
- apic
- Local APIC (Advanced Programmable Interrupt Controller) driver
- 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 (inspired by MaestroOS
keyboard.rs) - keyboard_
layout - Keyboard Layout Configuration
- keyboard_
us - US QWERTY PS/2 Keyboard driver
- mouse
- PS/2 Mouse driver (IRQ12)
- pci
- PCI Configuration Space Access
- percpu
- Per-CPU data (x86_64)
- pic
- 8259 Programmable Interrupt Controller (PIC) driver
Inspired by MaestroOS
pic.rs - serial
- smp
- SMP (Symmetric Multi-Processing) boot for x86_64.
- 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 (Limine framebuffer + PSF font). https://en.wikipedia.org/wiki/PC_Screen_Font
- x2apic
- x2APIC (Extended xAPIC) driver
Functions§
- cli
- Disable interrupts
- cpuid
- Execute CPUID instruction.
- 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
- restore_
flags - Restore RFLAGS (including interrupt flag) from a previous save.
- save_
flags_ and_ cli - Save RFLAGS and disable interrupts. Returns saved flags.
- sti
- Enable interrupts
- wrmsr
- Write to a Model Specific Register
- xgetbv
- Read an Extended Control Register (XGETBV).
- xsetbv⚠
- Write an Extended Control Register (XSETBV).