Revision: 14920
http://sourceforge.net/p/edk2/code/14920
Author: vanjeff
Date: 2013-11-29 04:44:22 +0000 (Fri, 29 Nov 2013)
Log Message:
-----------
UefiCpuPkg: Using the "movabsq" instruction to read global variable
mDoFarReturnFlag and mErrorCodeFlag to avoid page fault with big RAM sizes (>
2GB).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Modified Paths:
--------------
trunk/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S
Modified:
trunk/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S
===================================================================
---
trunk/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S
2013-11-29 03:39:13 UTC (rev 14919)
+++
trunk/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S
2013-11-29 04:44:22 UTC (rev 14920)
@@ -273,7 +273,10 @@
andl $0x0fffffff0, %esp
pushq %rcx
movq 8(%rax), %rcx
- bt %ecx, ASM_PFX(mErrorCodeFlag)
+ pushq %rax
+ movabsl ASM_PFX(mErrorCodeFlag), %eax
+ bt %ecx, %eax
+ popq %rax
jc NoErrorData
pushq (%rsp) # push additional rcx to make stack alignment
NoErrorData:
@@ -301,8 +304,8 @@
cmp $32, %ecx # Intel reserved vector for exceptions?
jae NoErrorCode
pushq %rax
- leaq ASM_PFX(mErrorCodeFlag)(%rip), %rax
- bt %ecx, (%rax)
+ movabsl ASM_PFX(mErrorCodeFlag), %eax
+ bt %ecx, %eax
popq %rax
jc CommonInterruptEntry_al_0000
@@ -549,7 +552,10 @@
jmp *-24(%rsp)
DoReturn:
- cmpq $0, ASM_PFX(mDoFarReturnFlag) # Check if need to do far return
instead of IRET
+ pushq %rax
+ movabsq ASM_PFX(mDoFarReturnFlag), %rax
+ cmpq $0, %rax # Check if need to do far return instead of IRET
+ popq %rax
jz DoIret
pushq %rax
movq %rsp, %rax # save old RSP to rax
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits