From dc68fcaff797a6d7e4734ebc399f33cd2436bce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?= Date: Wed, 26 Jul 2023 23:03:46 +0200 Subject: [PATCH] limine: Use a higher-half pointer for the stack on AArch64 --- common/protos/limine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/protos/limine.c b/common/protos/limine.c index 7301be10..ac53714b 100644 --- a/common/protos/limine.c +++ b/common/protos/limine.c @@ -1108,7 +1108,9 @@ FEAT_END #elif defined (__aarch64__) vmm_assert_4k_pages(); - enter_in_el1(entry_point, (uint64_t)stack, LIMINE_SCTLR, LIMINE_MAIR(fb_attr), LIMINE_TCR(tsz, pa), + uint64_t reported_stack = reported_addr(stack); + + enter_in_el1(entry_point, reported_stack, LIMINE_SCTLR, LIMINE_MAIR(fb_attr), LIMINE_TCR(tsz, pa), (uint64_t)pagemap.top_level[0], (uint64_t)pagemap.top_level[1], 0); #elif defined (__riscv64)