diff options
Diffstat (limited to 'kernel/src/asm/boot.asm')
-rw-r--r-- | kernel/src/asm/boot.asm | 12 |
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: |