mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Unmap first MB after jumping above 3GB
This commit is contained in:
parent
826dc94187
commit
82d0352a67
Notes:
sideshowbarker
2024-07-19 18:30:43 +09:00
Committer: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/82d0352a678
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue