mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Increase stack size to 4096
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ p3_table:
|
||||
p2_table:
|
||||
resb 4096
|
||||
stack_bottom:
|
||||
resb 64
|
||||
resb 4096
|
||||
stack_top:
|
||||
|
||||
section .rodata
|
||||
|
||||
Reference in New Issue
Block a user