arch.x86.fault.ace¶
Alignment Check Exception handler (CPU vector 17).
Overview¶
Handles the x86 Alignment Check exception (#AC, vector 17), which is raised when a memory reference to an unaligned address is made while alignment checking is enabled (CR0.AM set and EFLAGS.AC set at CPL 3). The handler disables interrupts and triggers a kernel panic.
Dependencies¶
arch.x86.utilarch.x86.panicarch.x86.isr.typesarch.x86.isr.mgrarch.x86.idt
Functions and Procedures¶
register¶
Registers the alignment check handler with arch.x86.isr.mgr at ISR vector 17. Must be called during fault subsystem initialisation.
Notes¶
- The handler calls
correctInterruptRegisters(true)because vector 17 pushes an error code (always zero for alignment check faults). - After adjusting register pointers,
x86_panicis called with fault identifier'arch.x86.fault.ace'and description'Alignment Check Exception.'.