git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Kernel/x86_64 - Fixed recursive page fault, wasn't enabling the NX bit
[tpg/acess2.git]
/
Kernel
/
arch
/
x86_64
/
start32.asm
diff --git
a/Kernel/arch/x86_64/start32.asm
b/Kernel/arch/x86_64/start32.asm
index
d38c993
..
6b4f940
100644
(file)
--- a/
Kernel/arch/x86_64/start32.asm
+++ b/
Kernel/arch/x86_64/start32.asm
@@
-58,6
+58,13
@@
start:
or eax, 0x80|0x20|0x10
mov cr4, eax
+ ; Initialise System Calls (SYSCALL/SYSRET)
+ ; Set IA32_EFER.(NXE|SCE)
+ mov ecx, 0xC0000080
+ rdmsr
+ or eax, (1 << 11)|(1 << 0) ; NXE, SCE
+ wrmsr
+
; Load PDP4
mov eax, gInitialPML4 - KERNEL_BASE
mov cr3, eax
UCC
git Repository :: git.ucc.asn.au