summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/X64
AgeCommit message (Collapse)Author
2011-12-15Fix the issue to clear the high 16-bit of EAX before use it Thunk code.lgao4
This patch updates MdePkg BaseLib, EcpPkg EdkIIGlueLib BaseLib and ThunkLib. Signed-off-by: lgao4 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12876 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-08Fix Xcode link failure. Relocations are not supported in .text sections.andrewfish
Per Rui's review of the patch _16GdtrBase is a label that is patched by C code so it does require initialization. approved-by: andrewfish reviewed-by: jljusten reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12515 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-02MdePkg: Fixed hang/reset in thunk code when building with GCC X64geekboy15a
Reverted changes of data areas from .long back to .space 4. This was done because the size of .long is based off of .int and may vary. Using a fixed size is required because these values are for patching code. Also note that .space will automatically initialize the data to zero. Not initializing all values to zero was causing the hang/reset. Signed-off-by: geekboy15a Reviewed-by: darylm503 Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12079 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-12MdePkg: Fix X64 clang compile issues.andrewfish
Fixed issues with X64 clang, and also make StackSwitch push a zero on the new stack to prevent a stack unwind into memory that is no longer valid. signed-off-by: andrewfish reviewed-by: lgao4 reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12007 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-12Fix the issue that the high 16-bit of EAX may contain invalid data, which ↵li-elvin
cause bad stack pointer, the change will ensure the high 16-bit of EAX is cleared. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11047 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-25Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter
did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10604 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-24Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter
did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10596 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-01Fixed issue with InternalX86ReadIdtr referencing LDT read and not IDT read ↵geekboy15a
operation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10559 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-20Fix some typosqhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10521 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-18Update copyright formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10506 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-181. Restore the inline C implementation of GCC assembly files that was ↵qhuang8
temporarily removed in Svn r10045. 2. Remove 139 GCC assembly files whose functionality have been covered in the inline C implementation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10503 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-23Update the copyright notice formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10405 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-16Fixed GCC 4.4 build issue due to incorrect prefix. Now using ASM_PFX to ↵geekboy15a
correctly set the prefix. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10377 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-16Fixed GCC 4.4 build issue. Also fixed issue where upper 32-bits may be lost ↵geekboy15a
during AND operation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10376 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-01Remove assumption that the transition code for transitioning from 64-bit to ↵mdkinney
32-bit mode is 64 bytes. Instead compute the size based on the implementation in the ASM file. Update logic to align new 32-bit stack on a 4 byte boundary Update logic to prevent one slot overlap between the transition code and the new stack. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10133 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-23Disable interrupt when changing IDTR register.klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10046 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-23Temporarily remove the C implementation of some GCC assembly files in ↵qhuang8
MdePkg. They are kept in repository and will be re-evaluate later. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10045 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-27Clean up MdePkg source to correct some coding style issues, etc.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9832 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-07fix GCC build issue, mWait instruction need not the operands.eric_tian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9526 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-06Fixes for ARM build in the EdkCompatibilityPkg and a couple of Xcode fixes ↵AJFISH
for MdePkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9520 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-24Fix file headersmdkinney
Move stack alignment check from CPU specific files into common SwitchStack() function and add VA_END() to SwitchStack(). Fix incorrect syntax for ASM_FUNCTION_REMOVE_IF_UNREFERENCED git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9193 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-19Update to make end-of-line consistent for all source files in MdePkg. There ↵qhuang8
are no other updates besides that change. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9141 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-18Add ARM supportmdkinney
Add C inline assembly files for IA32 and X64 GCC builds. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9113 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-11Minor update source to make end-of-line consistent. qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9043 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-11Remove all unnecessary .align directives in MdePkgqhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9042 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-10For X64 BASE_LIBRARY_JUMP_BUFFER is 64-bit aligned, not 128-bit aligned, ↵gikidy
replace movdqa with movdqu. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8508 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-10Save/Restore xmm6-xmm15 in function setJump/longJump for GAS.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8507 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-10Save/Restore xmm6-xmm15 in function setJump/longJump.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8506 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05 Need use 32-bit register to hold 32-bit stack address.klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8481 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05 Need use 32-bit register to hold 32-bit stack address.klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8480 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05Fix the bug that if code is run above 4G, AsmDisablePaging64 will be failedklu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8479 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05Fix the bug that if code is run above 4G, AsmDisablePaging64 will be failure.klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8478 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-031. Fix the bug that we should use rip relative addressing for x64 label to ↵qhuang8
prevent GNU assembly generate incorrect code. 2. Sync the bug fix of MS assembly in r8455. 3. Correct the function prototype in comments. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8456 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-03Save label "@F" to 64-bit register (r10) instead of 32-bit register (eax) in ↵qhuang8
case label @F is above 4G. Use "far retq" to load CS and 64-bit rip instead. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8455 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-02Use rip relative addressing for x64 label for Thunk16.S to prevent GCC ↵qhuang8
assembly from generating 32-bit value with HIGHLOW fixup. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8444 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-26Correct one minor instruction to clear the lower 4 bits of r11.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8391 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-26Fix the bug in x64 thunk code that it cannot handle the case when GDT is ↵qhuang8
loaded in above 4G table memory. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8390 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-20Replace .globl with ASM_GLOBALxli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8346 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-201. Remove .extern from GCC assembly.xli24
2. Define macro for .global/.globl in GCC assembly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8344 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-30Fix the bug that EnablePaging64() should assert() for x64 platform.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8223 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-17Save segment registers on stack in case the thunk code assembly calls CF9 ↵qhuang8
soft reset and the x64 registers get cleared. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8123 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-10Fix some build issues encountered with ELFGCC.jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8060 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-30Split out Synchronization Library from Base Librarymdkinney
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7378 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-13Fix the bug that EntryPoint of DisablePaging64() is corrupted.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7250 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-29Update copyright for files modified in this yearqhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7148 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-25Fix minor issues in GCC assembly. The operand is 64bit and "q" prefix should ↵qhuang8
be applied. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6717 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-24Add EnableCache() and DisableCache() implementations for IA32 and X64 to the ↵mdkinney
BaseLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6705 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-19Detabqhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6639 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-03Update to use DOS formatqhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6360 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-31Use #include "XXX.h" for module internal header files.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6330 6f19259b-4bc3-4df7-8a09-765794883524