Kernel: Unmap first MB after jumping above 3GB

This commit is contained in:
etaIneLp 2020-05-25 17:58:49 -04:00 committed by Andreas Kling
parent 826dc94187
commit 82d0352a67
Notes: sideshowbarker 2024-07-19 18:30:43 +09:00

View file

@ -151,7 +151,6 @@ start:
/* identity map the 0 to 2MB range */
movl $512, %ecx
movl $(boot_pd0_pt0 - 0xc0000000), %edi
/*movl $0x100000, %eax*/
xorl %eax, %eax
1:
@ -203,6 +202,16 @@ start:
movl %cr3, %eax
movl %eax, %cr3
/* unmap the 0-1MB range, which isn't used after jmp-ing up here */
movl $256, %ecx
movl $(boot_pd0_pt0 - 0xc0000000), %edi
xorl %eax, %eax
1:
movl %eax, 0(%edi)
addl $8, %edi
loop 1b
/* set up initial stack and jump into C++ land */
mov $stack_top, %esp
and $-16, %esp