From fc389c9e9e2ce7b4bea1168893631af1336cc1be Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 14 Nov 2015 13:20:18 +0100 Subject: [PATCH] Increase stack size to 4096 --- posts/DRAFT-allocating-frames.md | 11 +++++++++++ src/arch/x86_64/boot.asm | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/posts/DRAFT-allocating-frames.md b/posts/DRAFT-allocating-frames.md index 0e4a9484..dbe0d28c 100644 --- a/posts/DRAFT-allocating-frames.md +++ b/posts/DRAFT-allocating-frames.md @@ -5,6 +5,17 @@ title: 'Allocating Frames' TODO +## Preparation +We still have a really tiny stack of 64 bytes, which won't suffice for this post. So we will increase it to 4096 (one page) in `boot.asm`: + +```asm +section .bss +... +stack_bottom: + resb 4096 +stack_top: +``` + ## The Multiboot Information Structure When a Multiboot compliant bootloader loads a kernel, it passes a pointer to a boot information structure in the `ebx` register. We can use it to get information about available memory and loaded kernel sections. diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index c0fa155e..66cba279 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -152,7 +152,7 @@ p3_table: p2_table: resb 4096 stack_bottom: - resb 64 + resb 4096 stack_top: section .rodata