summaryrefslogtreecommitdiff
path: root/kernel/src/asm/boot.asm
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-11-20 03:47:08 +0100
committerDennis Kobert <dennis@kobert.dev>2019-11-20 03:47:08 +0100
commit0cb231bd3de9bcd4c39064399211fbd2fbc6237e (patch)
treec3713274ae1057afdcd6ce1f9af1f96a03503e93 /kernel/src/asm/boot.asm
parent78ed9468fb817ffa225b8af3cfdd124c8e37d320 (diff)
Fix memory mapping for LAIC and setup it's paging
Diffstat (limited to 'kernel/src/asm/boot.asm')
-rw-r--r--kernel/src/asm/boot.asm12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/src/asm/boot.asm b/kernel/src/asm/boot.asm
index 6449d66..87de35f 100644
--- a/kernel/src/asm/boot.asm
+++ b/kernel/src/asm/boot.asm
@@ -92,6 +92,16 @@ setup_page_tables:
or eax, 0b11 ; present + writable
mov [p3_table], eax
+ ; map third P3 entry to APIC P2 table
+ mov eax, apic_p2_table
+ or eax, 0b11 ; present + writable
+ mov [p3_table + 24], eax
+
+ ; map apic memory space without caching
+ mov eax, 0xFEE00000 + 0b10000111 ; huge + no caching + writable + present
+ mov [apic_p2_table + 4024], eax
+
+ ; map first page without caching
mov eax, 0b10000111 ; huge + no caching + writable + present
mov [p2_table], eax
@@ -169,6 +179,8 @@ p3_table:
resb 4096
p2_table:
resb 4096
+apic_p2_table:
+ resb 4096
alignb 4096 * 512 ; align memory into huge memory page
stack_bottom: