mov %cr0,%rax\r
btr $0x1f,%eax\r
mov %rax,%cr0 # disable paging\r
+\r
+ mov %rdx,%rbx # save EntryPoint to rbx, for rdmsr will overwrite rdx\r
mov $0xc0000080,%ecx\r
rdmsr \r
and $0xfe,%ah # clear LME\r
mov %rax,%cr4\r
push %rdi # push Context2\r
push %rsi # push Context1\r
- callq *%rdx # transfer control to EntryPoint\r
+ callq *%rbx # transfer control to EntryPoint\r
jmp . # no one should get here\r
\r
;------------------------------------------------------------------------------\r
;\r
-; Copyright (c) 2006, Intel Corporation\r
+; Copyright (c) 2006 - 2008, Intel Corporation\r
; All rights reserved. This program and the accompanying materials\r
; are licensed and made available under the terms and conditions of the BSD License\r
; which accompanies this distribution. The full text of the license may be found at\r
mov rax, cr0\r
btr eax, 31\r
mov cr0, rax ; disable paging\r
+\r
+ mov rbx, rdx ; save EntryPoint to rbx, for rdmsr will overwrite rdx\r
mov ecx, 0c0000080h\r
rdmsr\r
and ah, NOT 1 ; clear LME\r
mov cr4, rax\r
push rdi ; push Context2\r
push rsi ; push Context1\r
- call rdx ; transfer control to EntryPoint\r
+ call rbx ; transfer control to EntryPoint\r
hlt ; no one should get here\r
InternalX86DisablePaging64 ENDP\r
\r