summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-13 04:20:22 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-13 04:20:22 +0000
commit63d7211ebcfa7cb217a9e50143e1ac1a8119626a (patch)
tree65ff5a4cfb81c61d2e4f54c6c33adce3c63ce0cd /MdePkg/Library/BaseLib/X64/DisablePaging64.asm
parentdacae1e8f89107835195eccff4d753be0130f6eb (diff)
downloadedk2-platforms-63d7211ebcfa7cb217a9e50143e1ac1a8119626a.tar.xz
Fix the bug that EntryPoint of DisablePaging64() is corrupted.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7250 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/X64/DisablePaging64.asm')
-rw-r--r--MdePkg/Library/BaseLib/X64/DisablePaging64.asm6
1 files changed, 4 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
index 518137ddc9..29bf558e6c 100644
--- a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
+++ b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
@@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2006, Intel Corporation
+; Copyright (c) 2006 - 2008, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -49,6 +49,8 @@ InternalX86DisablePaging64 PROC
mov rax, cr0
btr eax, 31
mov cr0, rax ; disable paging
+
+ mov rbx, rdx ; save EntryPoint to rbx, for rdmsr will overwrite rdx
mov ecx, 0c0000080h
rdmsr
and ah, NOT 1 ; clear LME
@@ -58,7 +60,7 @@ InternalX86DisablePaging64 PROC
mov cr4, rax
push rdi ; push Context2
push rsi ; push Context1
- call rdx ; transfer control to EntryPoint
+ call rbx ; transfer control to EntryPoint
hlt ; no one should get here
InternalX86DisablePaging64 ENDP