We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd65867 commit fe791acCopy full SHA for fe791ac
boot/startup-x86_64.s
@@ -56,6 +56,15 @@ init_longmode:
56
mov cr4, eax
57
58
setup_paging:
59
+
60
+ ; zero out the initial page tables (2 pages in total)
61
+ mov edi, pml4
62
+clear_pt:
63
+ mov byte [edi], 0
64
+ inc edi
65
+ cmp edi, pt_end
66
+ jne clear_pt
67
68
; Provisional identical page mapping, using 1G huge page, therefore only 2
69
; table levels needed. see docs/x86_paging.txt
70
@@ -186,7 +195,7 @@ pml4:
186
195
pdp:
187
196
resb 4096
188
197
alignb 4096
189
-
198
+pt_end:
190
199
; reserve 8MiB for frame alloc.
191
200
; (see linker file)
192
201
[SECTION .global_free_page_stack]
0 commit comments