Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: use tail-call for kernel_main jump #216

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

wipawel
Copy link
Contributor

@wipawel wipawel commented Oct 8, 2021

Signed-off-by: Pawel Wieczorkiewicz [email protected]
Suggested-By: Mathias Krause [email protected]

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Suggested-By: Mathias Krause <[email protected]>
@82marbag 82marbag merged commit 6de0aa7 into KernelTestFramework:mainline Oct 8, 2021
@@ -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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply drop the inline ASM and call kernel_main() as it's supposed to be?:

    kernel_main();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants