|
Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
|
Exception and interrupt handler utilities used during early boot. More...

Macros | |
| #define | ESR_EC_SHIFT 26U |
| #define | ESR_EC_MASK 0x3FU |
| #define | ESR_EC_IABT_LOW 0x20U |
| #define | ESR_EC_IABT_CUR 0x21U |
| #define | ESR_EC_DABT_LOW 0x24U |
| #define | ESR_EC_DABT_CUR 0x25U |
| #define | ESR_ISS_WNR_BIT (1U << 6) |
Functions | |
| void | exit (uint32_t code) |
| Exit the guest environment with a semihosting code. | |
| void | generic_handler (void) |
| Generic exception handler used during early bring-up. | |
| void | el1_irq_handler (void) |
| EL1 IRQ exception handler. | |
Exception and interrupt handler utilities used during early boot.
This file contains a simple generic exception handler used during early bring-up to report the current exception level and stack pointer selection, then halt to avoid returning to the faulting context.
| #define ESR_EC_DABT_CUR 0x25U |
Data Abort from current EL
| #define ESR_EC_DABT_LOW 0x24U |
Data Abort from lower EL
| #define ESR_EC_IABT_CUR 0x21U |
Instruction Abort from current EL
| #define ESR_EC_IABT_LOW 0x20U |
Instruction Abort from lower EL
| #define ESR_EC_MASK 0x3FU |
Mask for extracting exception class
| #define ESR_EC_SHIFT 26U |
Shift for extracting exception class
| #define ESR_ISS_WNR_BIT (1U << 6) |
ISS[6]: Write-not-Read
| void el1_irq_handler | ( | void | ) |
EL1 IRQ exception handler.
Entry point invoked from the IRQ vector in the exception vector table. Delegates to the ICU dispatch layer to acknowledge, dispatch, and signal EOI for the pending interrupt.
|
extern |
Exit the guest environment with a semihosting code.
Uses the ARM semihosting SYS_EXIT operation to terminate execution under QEMU and report the provided status code to the host.
| code | Host-visible exit status. |
| void generic_handler | ( | void | ) |
Generic exception handler used during early bring-up.
Prints register context and fault information for a trapped exception, then halts the kernel by invoking the exit path.