diff options
author | qlong <qlong@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-12-31 07:22:48 +0000 |
---|---|---|
committer | qlong <qlong@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-12-31 07:22:48 +0000 |
commit | 4a567c9690db97ecbf982e9428727f073bada504 (patch) | |
tree | 92682c435813f60c29afd83ad98d04ebc24903ac /CryptoPkg/Library/IntrinsicLib | |
parent | 2a6433fef2413df583db6399008c7e6716a8e243 (diff) |
1. Add new API supports for PEM & X509 key retrieving & verification;
2. Add new MD4 hash supports;
3. Add corresponding test case in Cryptest utility;
4. Fix MACRO definition issue in OpensslLib.inf and parameter checking issues in some wrapper implementations.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11214 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CryptoPkg/Library/IntrinsicLib')
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c index 48e0c52c3..afaa0b74e 100644 --- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c +++ b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c @@ -23,5 +23,17 @@ int _fltused = 1; /* Sets buffers to a specified character */
void * memset (void *dest, char ch, unsigned int count)
{
- return SetMem (dest, (UINTN)count, (UINT8)ch);
+ //
+ // Declare the local variables that actually move the data elements as
+ // volatile to prevent the optimizer from replacing this function with
+ // the intrinsic memset()
+ //
+ volatile UINT8 *Pointer;
+
+ Pointer = (UINT8 *)dest;
+ while (count-- != 0) {
+ *(Pointer++) = ch;
+ }
+
+ return dest;
}
|