diff --git a/boot.asm b/boot.asm index 7c4c794..664f5e2 100644 --- a/boot.asm +++ b/boot.asm @@ -1,3 +1,4 @@ +; c.f. https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#OS-image-format ; Declare constants for the multiboot header. MBALIGN equ 1 << 0 ; align loaded modules on page boundaries MEMINFO equ 1 << 1 ; provide memory map @@ -54,6 +55,7 @@ _start: ; stack (as it grows downwards on x86 systems). This is necessarily done ; in assembly as languages such as C cannot function without a stack. mov esp, stack_top + mov ebp, stack_bottom ; This is a good place to initialize crucial processor state before the ; high-level kernel is entered. It's best to minimize the early diff --git a/boot.s b/boot.s index 8aa2a07..2ebf558 100644 --- a/boot.s +++ b/boot.s @@ -64,6 +64,7 @@ _start: in assembly as languages such as C cannot function without a stack. */ mov $stack_top, %esp + mov $stack_bottom, %ebp /* This is a good place to initialize crucial processor state before the