Repository navigation
v0.2 - Exceptions and Interrupts
Exception handling and interrupt controller support for the AArch64 bare-metal kernel.
Added
src/exceptions/vectors.s: AArch64 exception vector table, 16 entries, 2 KB aligned, synchronous and IRQ handler entries (VBAR_EL1 + 0x200/+ 0x280), 14 unused stubssrc/exceptions/handlers.s: synchronous handler (dumpsELR_EL1/SPSR_EL1/ESR_EL1), IRQ handler (dumpsGICC_IAR), both returning viaeretsrc/gic/gic.s,src/gic/gic.inc: GICv2 driver (gic_init), Distributor and CPU interface setupsrc/uart/uart.s:uart_put_hex, prints a 64-bit register value in hexadecimalVBAR_EL1configured and GIC initialized in_start, before any code that could trigger an exceptionnotes/v02.md: full theory and implementation walkthrough (AArch64 exception model, GICv2 architecture, register reference)
Verification
The kernel successfully boots on QEMU virt, triggers a deliberate svc #0 (EC=0x15 in ESR_EL1) and a self-targeted SGI 0 via GICD_SGIR, both correctly routed, handled, and returned from:
Hello, AArch64!
Synchronous exception caught!
ELR_EL1: 0x0000000040000024
SPSR_EL1: 0x0000000040000345
ESR_EL1: 0x0000000056000000
IRQ exception caught!
GICC_IAR: 0x0000000000000000