Fixed GCC 4.4 build issue. Also fixed issue where upper 32-bits may be lost during...
authorgeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 Apr 2010 22:34:22 +0000 (22:34 +0000)
committergeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 Apr 2010 22:34:22 +0000 (22:34 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10376 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/X64/DisablePaging64.S
MdePkg/Library/BaseLib/X64/DisablePaging64.asm

index a467fea260e251dc53a3b40729ae1637e8ef31e1..ce9e9de533f3f1fcb1fbd9fd24163c2157e28dec 100644 (file)
@@ -43,7 +43,7 @@ ASM_PFX(InternalX86DisablePaging64):
     lea    _mTransitionEnd(%rip), %rax    # rax <- end of transition code\r
     sub    %rsi, %rax                     # rax <- The size of transition piece code\r
     add    $4, %rax                       # round rax up to the next 4 byte boundary\r
-    and    $0x0fffffffc, %rax\r
+    and    $0xfc, %al\r
     sub    %rax, %rdi                     # rdi <- use stack to hold transition code \r
     mov    %edi, %r10d                    # r10 <- The start address of transicition code below 4G\r
     push   %rcx                           # save rcx to stack\r
@@ -78,4 +78,5 @@ L1:
     push   %rsi                           # push Context1\r
     callq  *%rbx                          # transfer control to EntryPoint\r
     jmp    .                              # no one should get here\r
-\r_mTransitionEnd :\r
+\r
+_mTransitionEnd :\r
index 5f556a4ca60d986988af930236b9c689785ba1cf..48970280549fd9726c8a3732a3c5a323fb6d33e4 100644 (file)
@@ -41,7 +41,7 @@ InternalX86DisablePaging64    PROC
     lea     rax, mTransitionEnd         ; rax <- end of transition code\r
     sub     rax, rsi                    ; rax <- The size of transition piece code \r
     add     rax, 4                      ; Round RAX up to the next 4 byte boundary\r
-    and     rax, 0fffffffch\r
+    and     al, 0fch\r
     sub     rdi, rax                    ; rdi <- Use stack to hold transition code\r
     mov     r10d, edi                   ; r10 <- The start address of transicition code below 4G\r
     push    rcx                         ; save rcx to stack\r