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
This commit is contained in:
xli24
2009-01-13 04:20:22 +00:00
parent dacae1e8f8
commit 63d7211ebc
2 changed files with 7 additions and 3 deletions

View File

@@ -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