pound-emu_pound/core
Ronald Caesar 65f589e853 aarch64/kernel: Add synchronous exception entry logic
To handle faults such as data aborts, alignment faults, or supervisor
calls, the CPU must transition from the guest's context into a
privileged exception handler. This patch emulates the hardware sequence
for this entry process.

1. The vcpu_state_t struct includes the essential EL1 system registers
   required for exception handling (ELR_EL1, SPSR_EL1, ESR_EL1, FAR_EL1,
   and VBAR_EL1).

2. A new function, take_synchronous_exception(), is introduced. It
   models the requirements for entering an exception targeting EL1:
      - Saves the return address (PC) into ELR_EL1.
      - Saves the current proccess state (PSTATE) into SPSR_EL1.
      - Contructs the Exception Syndrome Register (ESR_EL1) from the
        provided Exception Class and ISS.
      - Saves the faulting address to FAR_EL1 for data aborts.
      - Updates the live PSTATE to a safe state for the handler.

This implementation is intentially partial. The final step of updating the
PC to jump to a handler in the guest's vector table (using VBAR_EL1) is
stubbed out. The vector table will contain assembly instructions so a
functional instruction decoder is required to fully complete the
exception handler.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-08-16 13:11:40 -04:00
..
aarch64 aarch64/kernel: Add synchronous exception entry logic 2025-08-16 13:11:40 -04:00
audio Import Strong Logger & Config System 2025-06-18 18:30:21 +02:00
Base aarch64/mem: Introduce a dedicated guest memory access layer 2025-08-14 20:07:29 -04:00
gpu Import Strong Logger & Config System 2025-06-18 18:30:21 +02:00
Images Adding Pound Icon to Executable 2025-06-18 19:09:53 +02:00
memory memory: Move arena allocator into pound::memory namespace 2025-08-16 12:58:51 -04:00
miscgui rename settings to avoid build faliures 2025-06-21 15:06:37 -04:00
main.cpp aarch64/kernel: Add synchronous exception entry logic 2025-08-16 13:11:40 -04:00
Pound.rc Adding Pound Icon to Executable 2025-06-18 19:09:53 +02:00