Commit Graph

341 Commits

Author SHA1 Message Date
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
jcarsey d3e0289ccf Clarify the requirements for the Destination parameter of UnicodeStrToAsciiStr.
signed-off-by:jcarsey
Reviewed-by:lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11917 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-28 15:01:53 +00:00
lgao4 1955808d94 For BaseLib IsNull() function , update retval value comment to match its function description.
Signed-off-by: lgao4
Reviewed-by: rni2


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11825 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15 02:45:58 +00:00
andrewfish 4c8a6e069c Replace INTERWORK_FUNC, with GCC_ASM_EXPORT() and GCC_ASM_IMPORT() and update the rest of the MdePkg ARM assembler to use the macro. Leave the old INTERWORK_FUNC macro in place until we can make sure all the other packages have been updated and then it can be removed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11289 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-01 05:01:35 +00:00
andrewfish e7cb469e3a Fix issue with CodeSourcery gcc requiring assembly functions to have a .type define inorder to support interworking (calling from thumb(C code) to ARM code (hadn written assembly). We had to add a macro as the .type directive is not supported, or needed, by Xcode. All ARM .S files need to be updated.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11167 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-15 00:58:34 +00:00
jljusten dccf78f0a2 MdePkg: Fix GCC Thunk support for IA32
In r11047 Ia32/Thunk.S was modified.  However, the current
implemention of Ia32/Thunk.S has contant values in the code
which must be updated if the code is changed.

This change updates those constants for the r11047 change.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11121 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-06 06:06:35 +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
sfu5 6efe946118 Refine code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10799 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-16 01:11:49 +00:00
sfu5 f0b0ba3177 Refine code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10793 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-13 02:47:22 +00:00
hhuan13 a58b9d96b4 Fixed K9 scan issues.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10781 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-09 06:28:01 +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
myronporter c5b16b1b0b 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@10594 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-22 23:56:19 +00:00
MyronPorter e4a34497b4 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@10593 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-22 22:59:38 +00:00
myronporter 35a1715411 Minor grammatical work--mostly adding periods. Sending separately a list of files missing Doxygen @param and @return information.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10572 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-11 00:02:51 +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
jljusten 2653bb431a MdePkg BaseLib: Fix GCC build break
Only use X86MemoryFence.c for INTEL and MSFT.  MemoryFence is defined
in GccInline.c for GCC.

This change is the same as r10522, but for X64.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10525 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-20 21:12:18 +00:00
qhuang8 c756ce80a4 Fix GCC build break as MemoryFence() API has already been included in GccInline.c in BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10522 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-20 05:30:55 +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
xdu2 5277dc8829 Fix bug in AsmCpuVirtual() to return 1 instead of 0 when CPU is in virtual mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10475 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-10 02:48:44 +00:00
mdkinney cab979f161 Fix ICC 11.1 build break
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10466 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-07 22:47:32 +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
andrewfish 703f1d091f Add Math64.S to reduce the number of compiler intrinsics that need to be supported. It turns out they seem to change from GCC generation to generation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10259 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-17 02:21:18 +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
lgao4 6bfbb5f0e0 1. Correct File header to ## @file
2. Remove unnecessary .common] postfix on section.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-24 00:21:16 +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
qhuang8 8f635c36ad Fix a bug in MdePkg BaseLib: StrnCat() and AsciiStrnCat() should NULL terminated the final destination string when Length is equal to the length of Source string
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9588 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-23 01:50:10 +00:00
eric_tian 6741aad96b according to IA32 intel architecture spec, mwait instuction needs not the operands.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9527 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-07 04:15:00 +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 cbca8de588 1) Add new BaseLib API GetPreviousNode()
2) Clarify comment for the value returned from GetNextNode() if the end of list is reached.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9464 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-21 21:57:11 +00:00
klu2 6a8e44d9c6 Add ASM_PFX() for exposed symoble from assemble to C
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9435 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-17 06:52:34 +00:00
qhuang8 8facd18f30 Split AsmReadKr7() and AsmWriteKr7() from AccessKr.s file since these two APIs are frequently used to store/fetch PeiServicesTable pointer for IPF platform. Some compiler/linker with /Od is not smart enough to remove used KR registers access APIs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9219 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-01 14:57:18 +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 ea3c1b3ad6 1. Use .p2align directive instead of ambiguous .align directive.
It seems for ARM, .align means power of two, so we'd like to use .p2align for more portability.
2. Fix some typos in ARM ProcessorBind.h 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9152 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-20 07:24:59 +00:00
qhuang8 01a54966be Remove tabs in source code in MdePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9142 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-19 14:09:31 +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 4b5f371b7d Make EOL consistent
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9115 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-18 22:14:01 +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
klu2 1081f624a4 Add PcdVerifyNoteInList for judge whether do verification of node in list in debug mode. The default value is FALSE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9016 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-28 02:38:30 +00:00
lgao4 80151e5331 Rename BaseLib internal functions by adding InternalBaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8980 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-23 01:43:04 +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