23 lines
577 B
C++
23 lines
577 B
C++
/*
|
|
* InterruptFrame.hpp
|
|
* aarch64 exception frame
|
|
* Copyright (c) 2026 Daniel Hammer
|
|
*/
|
|
|
|
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace Arch {
|
|
|
|
// What the exception vectors save before calling into C++.
|
|
struct PanicFrame {
|
|
uint64_t x[31]; // x0-x30
|
|
uint64_t sp; // interrupted SP (SP_EL0 for EL0, else SP_EL1)
|
|
uint64_t elr; // ELR_EL1: faulting/preferred-return PC
|
|
uint64_t spsr; // SPSR_EL1
|
|
uint64_t esr; // ESR_EL1: exception syndrome
|
|
uint64_t far; // FAR_EL1: faulting address
|
|
};
|
|
|
|
}
|