diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-13 04:20:22 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-13 04:20:22 +0000 |
commit | 63d7211ebcfa7cb217a9e50143e1ac1a8119626a (patch) | |
tree | 65ff5a4cfb81c61d2e4f54c6c33adce3c63ce0cd /MdePkg/Library/BaseLib/X64/DisablePaging64.S | |
parent | dacae1e8f89107835195eccff4d753be0130f6eb (diff) | |
download | edk2-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.S')
-rw-r--r-- | MdePkg/Library/BaseLib/X64/DisablePaging64.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.S b/MdePkg/Library/BaseLib/X64/DisablePaging64.S index a55059e3be..8c71d2d49e 100644 --- a/MdePkg/Library/BaseLib/X64/DisablePaging64.S +++ b/MdePkg/Library/BaseLib/X64/DisablePaging64.S @@ -51,6 +51,8 @@ L1: mov %cr0,%rax
btr $0x1f,%eax
mov %rax,%cr0 # disable paging
+
+ mov %rdx,%rbx # save EntryPoint to rbx, for rdmsr will overwrite rdx
mov $0xc0000080,%ecx
rdmsr
and $0xfe,%ah # clear LME
@@ -60,6 +62,6 @@ L1: mov %rax,%cr4
push %rdi # push Context2
push %rsi # push Context1
- callq *%rdx # transfer control to EntryPoint
+ callq *%rbx # transfer control to EntryPoint
jmp . # no one should get here
|