exception.c: fix sp calculation in print_regs

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-01-18 01:57:16 +09:00
parent 74d3575369
commit 31b6af14b2

View file

@ -14,7 +14,7 @@ void exception_initialize(void)
void print_regs(u64 *regs)
{
u64 sp = ((u64)(regs)) - (8 * 31);
u64 sp = ((u64)(regs)) + 256;
printf("Running in EL%d\n", mrs(CurrentEL) >> 2);
printf("Registers: (@%p)\n", regs);