Remove magic numbers. Also, no code segment - not needed.

This commit is contained in:
2017-11-14 16:26:11 +01:00
parent dd7636e906
commit 5ddf0173c2
6 changed files with 60 additions and 39 deletions

22
src/kernel/boot/boot_PT.S Normal file
View File

@@ -0,0 +1,22 @@
#include <x86_64/memory.h>
.intel_syntax noprefix
.section .data
.align PAGE_SIZE
.global BootP4
BootP4:
.quad offset BootP3 + (PAGE_PRESENT | PAGE_WRITE)
.rept ENTRIES_PER_PT - 1
.quad 0x0
.endr
BootP3:
.quad offset BootP2 + (PAGE_PRESENT | PAGE_WRITE)
.rept ENTRIES_PER_PT - 1
.quad 0x0
.endr
BootP2:
.set i, 0
.rept ENTRIES_PER_PT
.quad (i << 21 ) + (PAGE_PRESENT | PAGE_WRITE | PAGE_HUGE)
.set i, (i+1)
.endr