mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:28:11 +00:00
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:
parent
e43fdcc77e
commit
2c05afaa7b
1 changed files with 21 additions and 0 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue