mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2026-02-09 05:52:27 -05:00
When detecting stack overflow in the kernel exception handler, use `SP_EL0`, rather than `TPIDR_EL1` as the scratch register. This allows us to use the `TPIDR_EL1` register as a CPU-banked register for other purposes. Use of `SP_EL0` is safe here since the stack overflow check occurs during kernel exceptions and SP_EL0 will be restored by the user-space context restore logic, overriding the clobber.