lgao4
c577049aaf
Fix the issue to clear the high 16-bit of EAX before use it Thunk code.
...
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-12-15 08:27:17 +00:00
andrewfish
f2a4d59359
Fix Xcode link failure. Relocations are not supported in .text sections.
...
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-10-08 20:51:17 +00:00
geekboy15a
3c47fe65ed
MdePkg: Fixed hang/reset in thunk code when building with GCC X64
...
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-08-02 22:29:50 +00:00
andrewfish
bab427db7d
MdePkg: Fix X64 clang compile issues.
...
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
2011-07-12 03:01:34 +00:00
li-elvin
4d4c535a32
Fix the issue that the high 16-bit of EAX may contain invalid data, which 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-11-12 07:47:27 +00:00
myronporter
2fc59a003e
Minor grammatical work--mostly adding periods. Items with ONLY period added 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-25 21:56:02 +00:00
myronporter
127010dd96
Minor grammatical work--mostly adding periods. Items with ONLY period added 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-24 00:20:35 +00:00
geekboy15a
2bd78c92c6
Fixed issue with InternalX86ReadIdtr referencing LDT read and not IDT read operation.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10559 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-01 22:46:53 +00:00
qhuang8
d01a90fb3e
Fix some typos
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10521 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-20 05:23:50 +00:00
hhtian
c9b34b8cb3
Update copyright format
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10506 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-18 11:40:39 +00:00
qhuang8
cf683fedc7
1. Restore the inline C implementation of GCC assembly files that was 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-05-18 05:37:58 +00:00
hhtian
bb817c56c5
Update the copyright notice format
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10405 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-23 16:00:47 +00:00
geekboy15a
4e57f24098
Fixed GCC 4.4 build issue due to incorrect prefix. Now using ASM_PFX to correctly set the prefix.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10377 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-16 22:37:03 +00:00
geekboy15a
bc810c8977
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
2010-04-16 22:34:22 +00:00
mdkinney
be04587c86
Remove assumption that the transition code for transitioning from 64-bit to 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-03-01 05:35:20 +00:00
klu2
28b5f7c062
Disable interrupt when changing IDTR register.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10046 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-23 07:32:20 +00:00
qhuang8
f18f2882e9
Temporarily remove the C implementation of some GCC assembly files in 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-02-23 04:56:55 +00:00
qhuang8
ea6898b902
Clean up MdePkg source to correct some coding style issues, etc.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9832 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-27 03:25:28 +00:00
eric_tian
0e121f5551
fix GCC build issue, mWait instruction need not the operands.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9526 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-07 03:31:44 +00:00
AJFISH
1afe0401f4
Fixes for ARM build in the EdkCompatibilityPkg and a couple of Xcode fixes for MdePkg.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9520 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-06 02:01:54 +00:00
mdkinney
7f22d35110
Fix file headers
...
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-24 23:53:23 +00:00
qhuang8
ebd04fc2e5
Update to make end-of-line consistent for all source files in MdePkg. There 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-19 14:02:07 +00:00
mdkinney
64698eb841
Add ARM support
...
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-18 21:04:14 +00:00
qhuang8
09b0fdbbb5
Minor update source to make end-of-line consistent.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9043 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-11 15:37:14 +00:00
qhuang8
0da835f99b
Remove all unnecessary .align directives in MdePkg
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9042 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-11 15:35:27 +00:00
gikidy
ebdad7f865
For X64 BASE_LIBRARY_JUMP_BUFFER is 64-bit aligned, not 128-bit aligned, replace movdqa with movdqu.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8508 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-10 09:00:21 +00:00
gikidy
63b65a9e4f
Save/Restore xmm6-xmm15 in function setJump/longJump for GAS.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8507 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-10 08:07:37 +00:00
gikidy
9b9641c6d9
Save/Restore xmm6-xmm15 in function setJump/longJump.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8506 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-10 07:14:17 +00:00
klu2
0d654ba433
Need use 32-bit register to hold 32-bit stack address.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8481 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05 13:36:09 +00:00
klu2
5a76206190
Need use 32-bit register to hold 32-bit stack address.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8480 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05 13:31:58 +00:00
klu2
2e56bb155b
Fix the bug that if code is run above 4G, AsmDisablePaging64 will be failed
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8479 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05 11:50:39 +00:00
klu2
ce4c0e31b0
Fix the bug that if code is run above 4G, AsmDisablePaging64 will be failure.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8478 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-05 11:21:48 +00:00
qhuang8
2561f56540
1. Fix the bug that we should use rip relative addressing for x64 label to 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-03 08:15:18 +00:00
qhuang8
1a76fbef84
Save label "@F" to 64-bit register (r10) instead of 32-bit register (eax) in 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-03 08:11:34 +00:00
qhuang8
d48e8b0afa
Use rip relative addressing for x64 label for Thunk16.S to prevent GCC 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-06-02 23:40:06 +00:00
qhuang8
a81c3daf0a
Correct one minor instruction to clear the lower 4 bits of r11.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8391 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-26 12:04:46 +00:00
qhuang8
a148780114
Fix the bug in x64 thunk code that it cannot handle the case when GDT is 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-26 11:41:12 +00:00
xli24
132f41f0a9
Replace .globl with ASM_GLOBAL
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8346 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-20 10:22:09 +00:00
xli24
d5172f911d
1. Remove .extern from GCC assembly.
...
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-05-20 09:42:59 +00:00
qhuang8
744e71a3bf
Fix the bug that EnablePaging64() should assert() for x64 platform.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8223 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-30 07:17:52 +00:00
qhuang8
0fe43214e3
Save segment registers on stack in case the thunk code assembly calls CF9 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-17 07:38:57 +00:00
jljusten
c9268416b9
Fix some build issues encountered with ELFGCC.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8060 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-10 20:58:07 +00:00
mdkinney
bbc3c2d526
Split out Synchronization Library from Base Library
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7378 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-30 00:47:57 +00:00
xli24
63d7211ebc
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
2009-01-13 04:20:22 +00:00
qhuang8
373ade0eb6
Update copyright for files modified in this year
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7148 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-29 14:07:07 +00:00
qhuang8
04fdba5412
Fix minor issues in GCC assembly. The operand is 64bit and "q" prefix should be applied.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6717 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-25 02:49:23 +00:00
mdkinney
9f4f2f0e15
Add EnableCache() and DisableCache() implementations for IA32 and X64 to the BaseLib
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6705 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-24 08:30:58 +00:00
qhuang8
6f890d5b40
Detab
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6639 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-19 15:22:53 +00:00
qhuang8
b1ff428c96
Update to use DOS format
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6360 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-03 09:25:10 +00:00
qhuang8
47fc17d8a9
Use #include "XXX.h" for module internal header files.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6330 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-31 04:32:02 +00:00