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