From 31b6af14b233c48c9e643225b43afb242090f495 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 18 Jan 2021 01:57:16 +0900 Subject: [PATCH] exception.c: fix sp calculation in print_regs Signed-off-by: Hector Martin --- src/exception.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exception.c b/src/exception.c index ef9a37aa..dc401f9b 100644 --- a/src/exception.c +++ b/src/exception.c @@ -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);