fix: zero .bss before enabling paging to prevent triple fault
Co-authored-by: aider (openrouter/moonshotai/kimi-k2.6) <aider@aider.chat>
This commit is contained in:
@@ -35,6 +35,13 @@ stack_top:
|
|||||||
_start:
|
_start:
|
||||||
movl $stack_top, %esp
|
movl $stack_top, %esp
|
||||||
|
|
||||||
|
cld
|
||||||
|
movl $__bss_start, %edi
|
||||||
|
movl $__bss_end, %ecx
|
||||||
|
subl %edi, %ecx
|
||||||
|
xorl %eax, %eax
|
||||||
|
rep stosb
|
||||||
|
|
||||||
movl $pdpt, %eax
|
movl $pdpt, %eax
|
||||||
orl $0x03, %eax
|
orl $0x03, %eax
|
||||||
movl %eax, pml4
|
movl %eax, pml4
|
||||||
|
|||||||
Reference in New Issue
Block a user