From: John Hodge Date: Sat, 29 Oct 2011 15:02:44 +0000 (+0800) Subject: Kernel/x86_64 - Combined EFER modifcations into one X-Git-Tag: rel0.14~170 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=b9e0e8b8f157f35828567331a6927894b9ae1ef2;p=tpg%2Facess2.git Kernel/x86_64 - Combined EFER modifcations into one --- diff --git a/Kernel/arch/x86_64/start32.asm b/Kernel/arch/x86_64/start32.asm index 6b4f9403..52b133c6 100644 --- a/Kernel/arch/x86_64/start32.asm +++ b/Kernel/arch/x86_64/start32.asm @@ -58,21 +58,15 @@ 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 - ; Enable long/compatability mode + ; Enable IA-32e mode + ; (Also enables SYSCALL and NX) mov ecx, 0xC0000080 rdmsr - or ax, 0x100 + or eax, (1 << 11)|(1 << 8)|(1 << 0) ; NXE, LME, SCE wrmsr ; Enable paging @@ -97,6 +91,8 @@ start: jmp .loop .hlt: + cli + hlt jmp .hlt [section .data]