diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-22 12:29:45 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-22 12:30:23 +0100 |
commit | 619657614489d5953583749617e6fd5a0804ce23 (patch) | |
tree | b5eb413e7dbd196f705e752bcd474daa8e772936 /stage2/main.asm | |
parent | 2834bff2cf6131202a788b59a5fd81994e1ed5aa (diff) | |
download | cuddles-619657614489d5953583749617e6fd5a0804ce23.tar.xz |
SysV ABI compliant stack alignment
and fix outright memory corruption by the scheduler stack
Diffstat (limited to 'stage2/main.asm')
-rw-r--r-- | stage2/main.asm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stage2/main.asm b/stage2/main.asm index 7eec56d..3cfb5d2 100644 --- a/stage2/main.asm +++ b/stage2/main.asm @@ -44,4 +44,8 @@ long_mode: mov gs, ax mov ss, ax + ; align stack + and rsp, ~(0x0f) + sub rsp, 8 + ; kernel begins here |