summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-11-15 19:17:54 +0100
committerDennis Kobert <dennis@kobert.dev>2019-11-15 19:17:54 +0100
commit6134ec21326f8312d09b69c6cfee749f85846e53 (patch)
treec554fa49a6badf14463952f776f7bb8bbabb3802
parent307571308b115eb737281711c780fa4cd1ed837f (diff)
Disable caching for first mem page
-rw-r--r--kernel/src/asm/boot.asm7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/src/asm/boot.asm b/kernel/src/asm/boot.asm
index 9964636..6449d66 100644
--- a/kernel/src/asm/boot.asm
+++ b/kernel/src/asm/boot.asm
@@ -91,10 +91,13 @@ setup_page_tables:
mov eax, p2_table
or eax, 0b11 ; present + writable
mov [p3_table], eax
+
+ mov eax, 0b10000111 ; huge + no caching + writable + present
+ mov [p2_table], eax
; map each P2 entry to a huge 2MiB page
- mov ecx, 0 ; counter variable
- mov eax, 0b10000011 ; huge + writable + present
+ mov ecx, 8 ; counter variable
+ mov eax, 0x200000 + 0b10000011 ; huge + writable + present
.map_p2_table:
cmp eax, 0b10000011 + stack_bottom