From 6de0aa7381c86ece908859c82515878cb0d677fd Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Fri, 8 Oct 2021 13:51:22 +0200 Subject: [PATCH] setup: use tail-call for kernel_main jump Signed-off-by: Pawel Wieczorkiewicz Suggested-By: Mathias Krause --- common/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/setup.c b/common/setup.c index 94b9fd62..7eaa7b63 100644 --- a/common/setup.c +++ b/common/setup.c @@ -300,7 +300,7 @@ void __noreturn __text_init kernel_start(uint32_t multiboot_magic, init_keyboard(get_bsp_cpu_id()); /* Jump from .text.init section to .text */ - asm volatile("push %0; ret" ::"r"(&kernel_main)); + asm volatile("jmp kernel_main"); UNREACHABLE(); }