mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-20 09:55:07 -04:00
thermosphere: rewrite sysreg trapping code, add skeleton code for timer val trap handling; support A32 EL1 once again
This commit is contained in:
parent
d42d9e60b9
commit
b9d07fccd6
9 changed files with 217 additions and 74 deletions
|
@ -102,11 +102,21 @@ static inline void spsrSetT32ItFlags(u64 *spsr, u32 itFlags)
|
|||
*spsr |= ((itFlags >> 2) & 0x3F) << 10;
|
||||
}
|
||||
|
||||
static inline u64 readFrameRegister(ExceptionStackFrame *frame, u32 id)
|
||||
{
|
||||
return frame->x[id];
|
||||
}
|
||||
|
||||
static inline u64 readFrameRegisterZ(ExceptionStackFrame *frame, u32 id)
|
||||
{
|
||||
return id == 31 ? 0 /* xzr */ : frame->x[id];
|
||||
}
|
||||
|
||||
static inline void writeFrameRegister(ExceptionStackFrame *frame, u32 id, u64 val)
|
||||
{
|
||||
frame->x[id] = val;
|
||||
}
|
||||
|
||||
static inline void writeFrameRegisterZ(ExceptionStackFrame *frame, u32 id, u64 val)
|
||||
{
|
||||
if (id != 31) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue