summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorgeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-16 22:34:22 +0000
committergeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-16 22:34:22 +0000
commitbc810c8977e97c63f081f35d3ca1b2767282c1a3 (patch)
tree105256fccd99d03bacdfe25988940b8ed74ee944 /MdePkg/Library
parent47ca9c95885ec58c3c49efb2593692693748a2f1 (diff)
downloadedk2-bc810c8977e97c63f081f35d3ca1b2767282c1a3.tar.gz
edk2-bc810c8977e97c63f081f35d3ca1b2767282c1a3.tar.bz2
edk2-bc810c8977e97c63f081f35d3ca1b2767282c1a3.zip
Fixed GCC 4.4 build issue. Also fixed issue where upper 32-bits may be lost during AND operation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10376 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseLib/X64/DisablePaging64.S5
-rw-r--r--MdePkg/Library/BaseLib/X64/DisablePaging64.asm2
2 files changed, 4 insertions, 3 deletions
diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.S b/MdePkg/Library/BaseLib/X64/DisablePaging64.S
index a467fea260..ce9e9de533 100644
--- a/MdePkg/Library/BaseLib/X64/DisablePaging64.S
+++ b/MdePkg/Library/BaseLib/X64/DisablePaging64.S
@@ -43,7 +43,7 @@ ASM_PFX(InternalX86DisablePaging64):
lea _mTransitionEnd(%rip), %rax # rax <- end of transition code
sub %rsi, %rax # rax <- The size of transition piece code
add $4, %rax # round rax up to the next 4 byte boundary
- and $0x0fffffffc, %rax
+ and $0xfc, %al
sub %rax, %rdi # rdi <- use stack to hold transition code
mov %edi, %r10d # r10 <- The start address of transicition code below 4G
push %rcx # save rcx to stack
@@ -78,4 +78,5 @@ L1:
push %rsi # push Context1
callq *%rbx # transfer control to EntryPoint
jmp . # no one should get here
- _mTransitionEnd :
+
+_mTransitionEnd :
diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
index 5f556a4ca6..4897028054 100644
--- a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
+++ b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm
@@ -41,7 +41,7 @@ InternalX86DisablePaging64 PROC
lea rax, mTransitionEnd ; rax <- end of transition code
sub rax, rsi ; rax <- The size of transition piece code
add rax, 4 ; Round RAX up to the next 4 byte boundary
- and rax, 0fffffffch
+ and al, 0fch
sub rdi, rax ; rdi <- Use stack to hold transition code
mov r10d, edi ; r10 <- The start address of transicition code below 4G
push rcx ; save rcx to stack