From 70fd0823dd2a4aaff8322f21253f4c744630955d Mon Sep 17 00:00:00 2001 From: Ry Date: Thu, 23 Jun 2022 00:21:00 -0700 Subject: [PATCH] Ensure we reserve room on the stack before starting the first task Not 100% sure if this is actually needed, but this is just to make sure that the following call to new_task doesn't get its return address overwritten --- kernel/main.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/main.asm b/kernel/main.asm index ac5931a..cbb2053 100644 --- a/kernel/main.asm +++ b/kernel/main.asm @@ -83,6 +83,7 @@ run_startup_task: mov r1, r0 mov r0, 0 mov r2, rsp + sub r2, 4 call new_task ; when the startup file yields for the first time, we'll end up back here