1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 16:32:05 +00:00

thermosphere: fix exception vector regression

This commit is contained in:
TuxSH 2020-02-21 00:16:54 +00:00
parent 37a889ccb2
commit f6793139c1

View file

@ -79,15 +79,15 @@
.macro PIVOT_STACK_FOR_CRASH .macro PIVOT_STACK_FOR_CRASH
// Note: replace sp_el1 with crashing sp (for convenience) // Note: replace sp_el1 with crashing sp (for convenience)
// The way we do things means that exception stack ptr won't be reset on double fault
// (sp_el2 is not accessible at el2) // (sp_el2 is not accessible at el2)
msr spsel, #0 msr spsel, #0
str x0, [sp, #-0x10] stp x0, x1, [sp, #-0x10]
msr spsel, #1
mov x0, sp mov x0, sp
msr sp_el1, x0 msr spsel, #1
msr spsel, #0 mov x1, sp
ldr x0, [sp, #-0x10] mov sp, x0
msr sp_el1, x1
ldp x0, x1, [sp, #-0x10]
.endm .endm
#define EXCEPTION_TYPE_HOST 0 #define EXCEPTION_TYPE_HOST 0