Kernel: Add Exception Syndrome Register to aarch64 Registers.h

This allows us to print more information about what kind of exception
happend.
This commit is contained in:
Timon Kruiper 2022-05-11 09:35:24 +02:00 committed by Linus Groh
parent e43fdcc77e
commit 2c05afaa7b
Notes: sideshowbarker 2024-07-17 10:44:49 +09:00

View File

@ -466,4 +466,25 @@ struct alignas(u64) MAIR_EL1 {
};
static_assert(sizeof(MAIR_EL1) == 8);
// https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-
// Exception Syndrome Register (EL1)
struct ESR_EL1 {
u64 ISS : 25;
u64 IL : 1;
u64 EC : 6;
u64 ISS2 : 5;
u64 : 27;
static inline ESR_EL1 read()
{
ESR_EL1 esr_el1;
asm("mrs %[value], esr_el1"
: [value] "=r"(esr_el1));
return esr_el1;
}
};
static_assert(sizeof(ESR_EL1) == 8);
}