Commit Graph

505 Commits

Author SHA1 Message Date
lgao4 94952554cc Add ASSERT() for BitField operations to make sure the input value is valid.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <Michael.D.Kinney@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14019 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-25 02:25:50 +00:00
lgao4 2054fd132a Fix memory out of band access in AsmFxSave() and AsmFxRestore().
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13894 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-30 08:35:08 +00:00
niruiyu de74f0c286 Correct a bug in AsmCpuidEx() to return correct ECX and EDX.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13359 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-25 03:02:26 +00:00
li-elvin fcbccedb28 Current IPF version SwitchStack implementation uses loadrs instruction to restore dirty partition of register stack from the backing store, but there is no guarantee to make the backing store valid before. So add flushrs before loadrs to make sure backing store valid.
Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Li Kevin <kevin.y.li@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13183 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-11 01:56:48 +00:00
lgao4 1445300f51 Update the modifier of ThunkContext parameter for AsmPrepareThunk16() in BaseLib from OUT to IN OUT.
Signed-off-by: lgao4
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13038 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-27 07:46:04 +00:00
lgao4 c8641de387 Roll back the previous change in MdePkg BaseLib Ia32 Thunk16.S and EcpPkg GlueLib BaseLib Ia32 Thunk16.S, and still use the hard code offset in them to avoid GCC compiler create the unexpected instruction.
Signed-off-by: lgao4
Reviewed-by: rsun3



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12898 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-28 09:48:15 +00:00
lgao4 fe28761275 Clean up the hard code offset in MdePkg BaseLib Ia32 Thunk16.S and EcpPkg GlueLib BaseLib Ia32 Thunk16.S.
Signed-off-by: lgao4
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12889 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-20 09:50:19 +00:00
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
hhtian c32dcd284c add missing <BR>
Signed-off-by: hhtian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12781 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-25 05:23:58 +00:00
oliviermartin 0806815921 MdePkg/BaseLib: Replaced inline assembly for ARMGCC by GCC assembly source file
The registers used to passed arguments to the DxeCore entrypoint in the inline
assembly function InternalSwitchStackAsm() where switched at compilation time.
This change replaces the inline assembly by a pure assembly source file to
avoid this kind of optimization.

Note: Inline assembly is generally not recommanded in system programming.

Reviewed-by: lgao4



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12674 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-08 18:49:22 +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
hhtian 4223e4f4c9 Minor copyright format update
Signed-off-by: hhtian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12334 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-13 07:48:35 +00:00
li-elvin 6088db3802 Move generic IA32_SEGMENT_DESCRIPTOR definition to BaseLib.h.
Signed-off-by: li-elvin
Reviewed-by: mdkinney


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12265 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-02 11:37:50 +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
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
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
xli24 287f4f47b4 Add ASSERT check for AsmFlushCacheRange().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8465 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-04 14:29:12 +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
rsun3 faeb3214d4 Fix the implementation of AsciiStrStr() and StrStr() in MdePkg. If the length of SearchString is zero, then String is returned.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8297 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-12 03:33:34 +00:00
rsun3 62e71e2fbe Fix bugs in StrStr() and AsciiStrStr().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8261 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-08 05:22:17 +00:00
klu2 8243b089ab Update function comments for AsmPrepareThunk16, AsmThunk16, AsmPrepareAndThunk16 interface. These interfaces could be used in either physical mode or virtual modes with paging enabled where virtual to physical mappings for ThunkContext.RealModeBuffer is mapped to 1:1
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8231 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-04 03:33:53 +00:00
klu2 d1be17ab87 Add checking for ThunkAttribute to avoid THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL and THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 are set at same time.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8230 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-04 03:00:08 +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
klu2 52fa075c38 Add limitation clarification for usage of AsmPrepareThunk16(), AsmThunk16(), AsmPrepareAndThunk16() interfaces that they are could only be used in physical mode but can not be used in virtual mode with paging.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8202 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-29 06:23:35 +00:00
eric_tian 53e9661036 update string function comment to clear the semantic meaning.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8153 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-23 03:11:45 +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
eric_tian dfbe9de95f add assertion condition to satisfy the requirement in MdePkg library spec 0.61p
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8033 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-07 09:14:33 +00:00
qhuang8 ff565d71e1 Remove incorrect assertion. According to spec, it should not assert and should return 0.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7853 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-10 13:58:52 +00:00
xli24 053b13f296 Fix the error that part of instructions of AsmWriteIva() is not included into the function body.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7751 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-02 03:54:47 +00:00
qhuang8 440ceebd78 Clean up to remove unreferenced data structure
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7599 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-23 07:04:13 +00:00
lgao4 9e5acfd583 Change style 0 == Index to Index == 0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7493 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-10 13:17:51 +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
mdkinney 720d3c5fb3 Split out Synchronization Library from Base Library
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7377 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-30 00:45:13 +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
gikidy 34b0820ec6 INF file verified, and Coding Style reviewed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7232 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-09 07:23:31 +00:00
vanjeff 0a6c0fd563 Update function header.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7210 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-08 08:20:28 +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 6446db6e74 Update to use Dos format for all .s files
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7087 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-22 12:47:53 +00:00
qhuang8 4e16d2cd28 Add AccessMsrDb.s for MSFT tool chain. It uses raw data to represent instructions "mov msr[]=" and "mov =msr[]", which is only supported by INTEL & GCC tool chain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7069 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-17 09:58:39 +00:00
qhuang8 59e0bb0cbd 1. Simplify the implementation of AsmReadApplicationRegister() & AsmReadControlRegister() for IPF architecture.
2. Add AsmReadMsr() & AsmWriteMsr() for IPF architecture
3. update AsmCpuMisc.s to only support GCC tool chain to avoid symbol collision.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7034 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-15 15:51:43 +00:00
gikidy 77f863ee03 Fix some typo.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7007 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-12 05:54:07 +00:00
gikidy efb2311707 Synchronize MdePkg h files to Library/Base* c files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6984 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-11 04:45:23 +00:00
gikidy 2fc60b7038 Synchronize BaseLib h files to c files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6983 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-11 02:59:41 +00:00
gikidy 2fe241a290 Synchronize comment of BaseLib.h and it's implementation to match the Spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6929 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-09 07:02:26 +00:00
gikidy 62991af27f Make comments match the Spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6876 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-05 09:50:02 +00:00
qhuang8 030cd1a2e9 Update the text to use "x64" instead of "X64" in MdePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6854 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-05 03:23:13 +00:00
gikidy cc39b88baa Change function IpfFlushCacheRange() to AsmFlushCacheRange() follow the Mde_Lib_Spec 0.61k
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6834 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-04 06:52:09 +00:00
qhuang8 be5f161485 Add AsmEnableCache() and AsmDisableCache() as the IA32 & x64 specific BaseLib API.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6807 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-03 02:19:49 +00:00
qhuang8 cd2ed84a47 De-Unicode in MdePkg source files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6794 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-01 14:06:25 +00:00
klu2 891193ee4f Fix the issue that wrong doxygen header comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6788 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-01 07:34:29 +00:00
lgao4 ac7e320cb8 Remove NibbleToHexChar() function from BaseLib
Move IsHexDigit, BufToHexString, HexStringToBuf from BaseLib to MdeModulePkg IfrSupportLib. The reason is:
1) IsHexDigit function provides the logic to check Hex Digit and convert it to Decimal value, which is required by IScsi LUN and HII user input. But this logic is not provided by any functions in MdeLib. So, it can't be deleted. It is moved to IfrSupportLib.
2) BufToHexString function converts a array of buffers to hex string. If the buffer length is less than sizeof (UINT64), it can be directly replaced by UnicodeValueToString(). But HII modules may use BufToHexString to convert the buffers whose length > sizeof (UINT64). For example:
.\MdeModulePkg\Universal\HiiDatabaseDxe\ConfigRouting.c line 201, 1148
.\Universal\SetupBrowserDxe\Setup.c line line 1457, 1503
Like this case, it is not easy to use UnicodeValueToString to replace BufToHexString. So, BufToHexString is still kept. Because such usages are in HII modules, this function is moved to IfrSupportLib. 
3) HexStringToBuf is moved to IfrSupportLib. The reason is similar to BufToHexString.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6782 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-01 02:32:12 +00:00
qhuang8 aad6137d5c 1. Removal PalCallStatic API
2. Two two new ReadApplicationRegister.c(), ReadControlRegister.c() API together with its related definitions in BaseLib.h
3. Remove prototype of AsmSwitchStackAndBackingStore() in public BaseLib.h, it is supposed to be a worker function for AsmSwitchStack()

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6757 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-27 06:48:03 +00:00
qhuang8 003c1db883 Remove checking for overflow in several Multiple functions in BaseLib, for it is not feasible to check in C code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6726 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-26 01:41:49 +00:00
gikidy 9aa049d971 Synchronize function comment in MdePkg\Library\BaseLib.h with the instance of this functions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6718 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-25 03:19:49 +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
lgao4 dc8577f275 Clean up the unused EDK_RELEASE_VERSION, PI_SPECIFICATION_VERSION and EFI_SPECIFICATION_VERSION from all the MdePkg INF files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6716 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-25 02:36:57 +00:00
qhuang8 e73bf9f394 Use ".486" for the instruction of "wbinvd"
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6713 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-25 00:05:41 +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
qwang12 285010e7dc Update doxygen comment for VarArg list parameter. "..."'s description is added.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6623 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-19 03:29:46 +00:00
qwang12 1b37333d61 Add two EFI Modifier.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6388 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-05 04:58:29 +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 b687d19184 Use #include <XXX.h> for public include files.
Remove commented code.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6331 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-31 04:33:14 +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
qhuang8 e82e1acc55 Update to use DOS format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6320 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-31 03:44:07 +00:00
qhuang8 32ed92de95 Update to use DOS format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6319 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-31 03:42:31 +00:00
eric_tian e34ecc8a1e Remove unnessary UEFI_SPECIFICATION_VERSION and PI_SPECIFICATION_VERSION in INF file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6281 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-29 03:17:21 +00:00
xli24 2faf4da5f7 Refine comments of X64 assembly files of MDE BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6277 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 14:23:36 +00:00
vanjeff 57246fe073 sync comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6274 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 09:51:44 +00:00
xli24 85ea851e6a Refine file header for INF files of MDE library instances.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6273 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 09:45:52 +00:00
vanjeff bb40027d7c move Ia32DivS64x64Remainder.c to Ia32/DivS64x64Remainder.c.
remove #ifdef _MS_EXTENTION_, since those files has been assigned to MS compiler in INF file.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6259 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 03:19:37 +00:00
vanjeff aa5f2556fb Copied remotely
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6258 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 03:16:59 +00:00
xli24 7e43ed89b2 Refine code for ECC check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6217 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 08:18:36 +00:00
xli24 14f268ba2a Revert CpuId and CpuIdEx to r6213.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6216 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 07:39:52 +00:00
xli24 610204a84c Sync function prototype of CpuId and CpuIdEx with MDE library specification.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6215 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 07:05:21 +00:00
vanjeff 44b013bd6e ECC Cleanup.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6213 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 06:06:42 +00:00
vanjeff 572b6b1acb rename filename to match the actual ones.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6212 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 05:51:07 +00:00
vanjeff 83c20be1a4 Renamed
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6211 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 05:41:25 +00:00
vanjeff efe146fcb8 Renamed
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6210 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 05:41:01 +00:00
vanjeff 719d0c91d8 Renamed
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6209 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 05:40:31 +00:00
vanjeff 248a4d9787 Renamed
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6208 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 05:39:59 +00:00
xli24 76d9959482 Update EBC sub-dir of BaseLib according to code review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6198 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-23 07:17:18 +00:00
xli24 c2049caa25 Update GCC assembly files for MdePkg/Library/BaseLib/X64
1. Fix bugs in assembly instructions
2. Change module names in comments from .asm to .S


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6196 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-23 07:02:59 +00:00
xli24 1f86b07d91 Update GCC assembly files for MdePkg/Library/BaseLib/Ia32
1. Fix bugs in assembly instructions
2. Change module names in comments from .asm to .S


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6193 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-23 06:20:02 +00:00
vanjeff 710a5b3584 1.removed DivS64x64Remainder.c since it has been moved to upper directory.
2.removed blank lines from DivU64x32Remainder.c

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6183 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-22 08:14:35 +00:00
qwang12 8161369252 Update some comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6170 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-21 08:23:13 +00:00
xli24 955c32f2f0 Change style of (CONSTANT == Var) to (Var == CONSTANT) for BaseLib/String.c.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6153 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-20 14:24:36 +00:00
vanjeff 6767917b10 removed blank lines to refine source codes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6135 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-20 08:48:16 +00:00
xli24 aa0583c783 Modify MDE source code according to MDE library update.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6103 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-11 12:32:19 +00:00
vanjeff e389c39b7b Clean up code according to code review.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5986 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 04:56:53 +00:00
vanjeff b26978d3dd 1. Changing filename to match actual ones.
2. add MSFT and ICC family flag for Thunk16.asm and EnablePaging64.asm.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5980 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:41:00 +00:00
vanjeff a8097e0c4f Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5979 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:30:14 +00:00
vanjeff 9ff60f4043 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5978 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:29:53 +00:00
vanjeff d914e15e11 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5977 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:29:34 +00:00
vanjeff 76c844dd9a Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5976 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:29:15 +00:00
vanjeff 0d0afe60c1 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5975 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:28:53 +00:00
vanjeff 3b849a8628 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5974 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:28:31 +00:00
vanjeff 13e4e2aee7 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5973 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:28:09 +00:00
vanjeff 8062bfcd7f Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5972 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:27:50 +00:00
vanjeff 5e7828f0f6 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5971 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:27:28 +00:00
vanjeff 9d4c3e8c7c Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5970 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:25:24 +00:00
vanjeff b0cb767e89 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5969 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:25:04 +00:00
vanjeff 90b31bc8e6 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5968 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:24:43 +00:00
vanjeff 583828c1a0 Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5967 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:24:20 +00:00
vanjeff 3c6a5186ae Change name.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5966 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25 02:23:58 +00:00
vanjeff 28ca72bc97 Changing unsigned int into UINTN according to code review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5960 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-24 08:31:38 +00:00
vanjeff 5385a57969 clean up baselib according to review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5958 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-24 05:30:40 +00:00
xli24 24dcb5e50a Update BaseLib according to code review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5956 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-24 04:17:16 +00:00
lgao4 2bfb60098f 1. Change 0 == Length style to Length == 0
2. Clean BasePeCoff library instance, only keep one copy PeCoffLoaderEx.c file for IA32, X64 and IPF arch
3. Clean the confused comments

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5927 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-18 14:27:39 +00:00
vanjeff 1efcc4ae46 remove unnecessary comments introduced by tools from MdePkg. The regular express is "//^p//[ ]Include[ ]common[ ]header[ ]file[ ]for[ ]this[ ]module[.]^p//"
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5911 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 07:46:17 +00:00
vanjeff 835849540d remove '../' from Base Library.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5878 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-11 09:12:14 +00:00
vanjeff 3ec9bc1557 move and rename it
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5877 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-11 09:08:12 +00:00
eric_tian 1106ffe1c0 Function description in baselib.h is not clear. change it to comply with Doxgen format.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5862 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-09 06:22:30 +00:00
lgao4 14bcde689e remove the unused msa files in MdePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5725 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-25 05:00:23 +00:00
jljusten 44f5e74f28 edk2/MdePkg/Library/BaseLib/BaseLib.inf:
edk2/MdePkg/Library/BaseLib/Ipf/AsmCpuMisc.s:
* Add GCC IPF implementation of CpuBreakpoint, MemoryFence,
  DisableInterrupts, EnableInterrupts, and EnableDisableInterrupts.
  (Thanks Vara!)


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5701 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-20 22:19:25 +00:00
lgao4 a8ff971524 Cleanup Cpu library class and CpuLib instance and BaseLib instance; and add comments for the confused logic in IfrSupportLib instance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5694 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-20 09:15:34 +00:00
jljusten 0e0c422d4c MdePkg/Library/BaseLib/X64/ReadCr2.S:
MdePkg/Library/BaseLib/X64/ReadMm0.S:
* Fix syntax error for X64 gcc assembly files.  (Missing parenthesis.)


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5597 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-31 16:23:36 +00:00
eric_tian 6a28ac4441 Gcc cleanup
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5589 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-31 06:56:12 +00:00
eric_tian 85c25283ed Gcc cleanup for baselib & basememorylib in mdepkg/library/
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5587 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-31 06:23:32 +00:00
yshang1 42eedea958 Code Scrub for MdePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5567 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-25 12:21:57 +00:00
yshang1 38bbd3d91c Code scrub:
MdePkg/Library/BaseCacheMaintenanceLib
MdePkg/Library/BaseDebugLibNull
MdePkg/Library/BaseIoLibIntrinsic
MdePkg/Library/BaseLib
MdePkg/Library/BaseMemoryLib
MdePkg/Library/BaseMemoryLibMmx
MdePkg/Library/BaseMemoryLibOptDxe
MdePkg/Library/BaseMemoryLibOptPei
MdePkg/Library/BaseMemoryLibRepStr
MdePkg/Library/BaseMemoryLibSse2
MdePkg/Library/BasePeCoffGetEntryPointLib


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5426 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-08 09:38:43 +00:00
qhuang8 d2e6d78887 1. Add comments about reserve space on space according to x64 calling convention
2. Fix comments in SwitchStack as for the x64 calling convention.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5315 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-30 02:03:15 +00:00
qhuang8 ac64461468 De-unicode in comment for all source files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5302 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-27 03:24:01 +00:00
qwang12 d9e5c1fffb 1) Add BufToHexString, HexStringToBuf and IsHexDigit to BaseLib.
2) Remove the duplicated functions implementation  from the modules that reference these APIs 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5282 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-23 05:25:44 +00:00
klu2 2a254b9046 Fix typo in comment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5108 6f19259b-4bc3-4df7-8a09-765794883524
2008-04-22 05:16:14 +00:00
qhuang8 9e77c2c3b7 Replace "addr16" with other instructions.
Thunk16.S was merely "translated" from Thunk16.asm to ensure of the binary equivalence.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4812 6f19259b-4bc3-4df7-8a09-765794883524
2008-03-10 05:57:03 +00:00
qhuang8 41c7f55141 Remove the DivU64x64Remainder.c (embedded asm version)for IA32 architecture. It cannot handle the case when divisor is less than 4G.
Make MSFT tool chain uses the ASM version, which can handle the case in an size efficient way. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4654 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-01 15:05:08 +00:00
qhuang8 4df26661c7 1. Add conformance checking to ensure the input & output string are well-defined.
2. Adjust the return value of UnicodeStrToAsciiStr() & AsciiStrToUnicodeStr () to be the original destination string to follow MdeLib spec.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4653 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-01 15:02:05 +00:00
qhuang8 1e3ee53678 Fix the asserting error for SetJump().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4650 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-01 14:54:52 +00:00
qhuang8 f9cea76b15 Fix the issues about the loop count for checksum 16,32,64. The input parameters are the buffer size according to Mde Lib spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4649 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-01 14:53:33 +00:00
xli24 57069be8fb Update Thunk16.S of X64 for BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4620 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 02:59:28 +00:00
xli24 de0419128f Check in implementation in GNU assembly for Thunk16.S in BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4614 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-22 08:54:44 +00:00
xli24 ab9a4f1638 Fix bugs in GNU assembly files for writing CR and DR registers.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4590 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-21 03:34:55 +00:00
mdkinney a82da388bf Fix timeout logic in AcquireSpinLock(). It could fail if the end time computed was larger than the roll over value of the performance counter. The timeout logic now accumulates the total time elapsed to determine if the timeout has been exceeded.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4345 6f19259b-4bc3-4df7-8a09-765794883524
2007-11-30 02:33:37 +00:00
jljusten a21f46e4b6 MdePkg/Library/BaseLib/ChkStkGcc.c:
MdePkg/Library/BaseLib/BaseLib.inf:
  Added stub (nil) implementation of __chkstk for which calls are generated
  by newer versions of gcc.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4237 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-30 00:10:23 +00:00
qwang12 bff2467aff add in include for header file to get value for MACRO THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4128 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-16 07:10:15 +00:00
vprabhal d331a1e391 these files have moved to cpulib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4098 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-11 16:26:17 +00:00
vprabhal 3e0ada4914 moved CpuSleep and CpuFlushTlb to the CpuLib to use PalCall in those functions, it is creating circular dependency if those functions are in BaseLib and the PalCallStatic is replaced with PalCall
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4023 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-05 18:51:24 +00:00
yshang1 d074a8e1a2 Update Mde/MdeModulePkg to support ICC build for IA32/X64.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3892 6f19259b-4bc3-4df7-8a09-765794883524
2007-09-19 06:15:43 +00:00