]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code scrub:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 8 Jul 2008 09:38:43 +0000 (09:38 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 8 Jul 2008 09:38:43 +0000 (09:38 +0000)
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

104 files changed:
MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
MdePkg/Library/BaseCacheMaintenanceLib/EbcCache.c
MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c
MdePkg/Library/BaseCacheMaintenanceLib/x86Cache.c
MdePkg/Library/BaseDebugLibNull/DebugLib.c
MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h
MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c
MdePkg/Library/BaseIoLibIntrinsic/IoLib.c
MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
MdePkg/Library/BaseIoLibIntrinsic/IoLibIcc.c
MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c
MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c
MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c
MdePkg/Library/BaseLib/BaseLibInternals.h
MdePkg/Library/BaseLib/BitField.c
MdePkg/Library/BaseLib/CpuDeadLoop.c
MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c
MdePkg/Library/BaseLib/Ebc/Synchronization.c
MdePkg/Library/BaseLib/GetPowerOfTwo32.c
MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c
MdePkg/Library/BaseLib/LinkedList.c
MdePkg/Library/BaseLib/LowBitSet32.c
MdePkg/Library/BaseLib/Math64.c
MdePkg/Library/BaseLib/String.c
MdePkg/Library/BaseLib/Synchronization.c
MdePkg/Library/BaseLib/SynchronizationGcc.c
MdePkg/Library/BaseLib/SynchronizationMsc.c
MdePkg/Library/BaseLib/Unaligned.c
MdePkg/Library/BaseLib/x86FxRestore.c
MdePkg/Library/BaseLib/x86FxSave.c
MdePkg/Library/BaseLib/x86GetInterruptState.c
MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c
MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c
MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c
MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c
MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c
MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c
MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/SetMem16Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/SetMem32Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/SetMem64Wrapper.c
MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/SetMem16Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/SetMem32Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/SetMem64Wrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c
MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/SetMem16Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/SetMem32Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/SetMem64Wrapper.c
MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c
MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/SetMem32Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.c
MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c
MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c

index 6961c0a229a70f8cf70a27d52082d2bd9b7c608e..95e1b6d3144119f35a16c9f7a1b6dba44c9e7cfe 100644 (file)
@@ -471,7 +471,7 @@ StrStr (
 \r
   @param  String                           Pointer to a Null-terminated Unicode string.\r
 \r
-  @retval UINTN\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINTN\r
@@ -511,7 +511,7 @@ StrDecimalToUintn (
 \r
   @param  String                           Pointer to a Null-terminated Unicode string.\r
 \r
-  @retval UINT64\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINT64\r
@@ -553,7 +553,7 @@ StrDecimalToUint64 (
 \r
   @param  String                           Pointer to a Null-terminated Unicode string.\r
 \r
-  @retval UINTN\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINTN\r
@@ -595,7 +595,7 @@ StrHexToUintn (
 \r
   @param  String                           Pointer to a Null-terminated Unicode string.\r
 \r
-  @retval UINT64\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINT64\r
@@ -1127,7 +1127,7 @@ AsciiStrStr (
 \r
   @param  String                           Pointer to a Null-terminated ASCII string.\r
 \r
-  @retval UINTN\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINTN\r
@@ -1164,7 +1164,7 @@ AsciiStrDecimalToUintn (
 \r
   @param  String                           Pointer to a Null-terminated ASCII string.\r
 \r
-  @retval UINT64\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINT64\r
@@ -1205,7 +1205,7 @@ AsciiStrDecimalToUint64 (
 \r
   @param  String                           Pointer to a Null-terminated ASCII string.\r
 \r
-  @retval UINTN\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINTN\r
@@ -1246,7 +1246,7 @@ AsciiStrHexToUintn (
 \r
   @param  String                           Pointer to a Null-terminated ASCII string.\r
 \r
-  @retval UINT64\r
+  @retval Value translated from String.\r
 \r
 **/\r
 UINT64\r
@@ -1595,6 +1595,8 @@ IsNodeAtEnd (
 \r
   @param  FirstEntry  A pointer to a node in a linked list.\r
   @param  SecondEntry A pointer to another node in the same linked list.\r
+  \r
+  @return SecondEntry\r
 \r
 **/\r
 LIST_ENTRY *\r
@@ -2237,7 +2239,7 @@ WriteUnaligned16 (
 \r
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
 \r
-  @return The value read.\r
+  @return The value read from Buffer.\r
 \r
 **/\r
 UINT32\r
@@ -2259,7 +2261,7 @@ ReadUnaligned24 (
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
   @param  Value   24-bit value to write to Buffer.\r
 \r
-  @return The value written.\r
+  @return The value written to Buffer.\r
 \r
 **/\r
 UINT32\r
@@ -2280,7 +2282,7 @@ WriteUnaligned24 (
 \r
   @param  Uint32  Pointer to a 32-bit value that may be unaligned.\r
 \r
-  @return *Uint32\r
+  @return Value read from Uint32\r
 \r
 **/\r
 UINT32\r
@@ -2302,7 +2304,7 @@ ReadUnaligned32 (
   @param  Uint32  Pointer to a 32-bit value that may be unaligned.\r
   @param  Value   32-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return Value written to Uint32.\r
 \r
 **/\r
 UINT32\r
@@ -2323,7 +2325,7 @@ WriteUnaligned32 (
 \r
   @param  Uint64  Pointer to a 64-bit value that may be unaligned.\r
 \r
-  @return *Uint64\r
+  @return Value read from Uint64.\r
 \r
 **/\r
 UINT64\r
@@ -2345,7 +2347,7 @@ ReadUnaligned64 (
   @param  Uint64  Pointer to a 64-bit value that may be unaligned.\r
   @param  Value   64-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return Value written to Uint64.\r
 \r
 **/\r
 UINT64\r
@@ -3048,7 +3050,7 @@ GetSpinLockProperties (
   @param  SpinLock  A pointer to the spin lock to initialize to the released\r
                     state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock in release state.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -3075,7 +3077,7 @@ InitializeSpinLock (
 \r
   @param  SpinLock  A pointer to the spin lock to place in the acquired state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock accquired lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -3120,7 +3122,7 @@ AcquireSpinLockOrFail (
 \r
   @param  SpinLock  A pointer to the spin lock to release.\r
 \r
-  @return SpinLock\r
+  @return SpinLock released lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -3245,6 +3247,7 @@ InterlockedCompareExchange64 (
   @param  CompareValue  Pointer value used in compare operation.\r
   @param  ExchangeValue Pointer value used in exchange operation.\r
 \r
+  @return The original *Value before exchange.\r
 **/\r
 VOID *\r
 EFIAPI\r
@@ -3552,8 +3555,6 @@ LongJump (
 /**\r
   Enables CPU interrupts.\r
 \r
-  Enables CPU interrupts.\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -3565,8 +3566,6 @@ EnableInterrupts (
 /**\r
   Disables CPU interrupts.\r
 \r
-  Disables CPU interrupts.\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -3579,9 +3578,6 @@ DisableInterrupts (
   Disables CPU interrupts and returns the interrupt state prior to the disable\r
   operation.\r
 \r
-  Disables CPU interrupts and returns the interrupt state prior to the disable\r
-  operation.\r
-\r
   @retval TRUE  CPU interrupts were enabled on entry to this call.\r
   @retval FALSE CPU interrupts were disabled on entry to this call.\r
 \r
@@ -3597,9 +3593,6 @@ SaveAndDisableInterrupts (
   Enables CPU interrupts for the smallest window required to capture any\r
   pending interrupts.\r
 \r
-  Enables CPU interrupts for the smallest window required to capture any\r
-  pending interrupts.\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -3611,8 +3604,8 @@ EnableDisableInterrupts (
 /**\r
   Retrieves the current CPU interrupt state.\r
 \r
-  Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r
-  currently enabled. Otherwise returns FALSE.\r
+  Returns TRUE is interrupts are currently enabled. Otherwise\r
+  returns FALSE.\r
 \r
   @retval TRUE  CPU interrupts are enabled.\r
   @retval FALSE CPU interrupts are disabled.\r
index 50e8990010cd8d35695494b7a48835d05cdaf5c5..19ae8032d320529f60634c382afaa977bb0b7a32 100644 (file)
 [Packages]\r
   MdePkg/MdePkg.dec\r
 \r
-[LibraryClasses]\r
-  DebugLib\r
-\r
 [LibraryClasses.Ipf]\r
   PalCallLib\r
 \r
 [LibraryClasses.common]\r
   BaseLib\r
+  DebugLib\r
 \r
index ccb5010fd0e3b53551e544a858ecc91b821bc42c..d9605566fd52c1773215c57c6b97bacd8c8b37ef 100644 (file)
@@ -56,7 +56,7 @@ InvalidateInstructionCache (
 \r
   @param  Length  The number of bytes to invalidate from the instruction cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
@@ -111,7 +111,7 @@ WriteBackInvalidateDataCache (
   @param  Length  The number of bytes to write back and invalidate from the\r
                   data cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
@@ -165,7 +165,7 @@ WriteBackDataCache (
                   mode, then Address is a virtual address.\r
   @param  Length  The number of bytes to write back from the data cache.\r
 \r
-  @return Address\r
+  @return Address of cache wrote in main memory.\r
 \r
 **/\r
 VOID *\r
@@ -222,7 +222,7 @@ InvalidateDataCache (
                   then Address is a virtual address.\r
   @param  Length  The number of bytes to invalidate from the data cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
index 17ef43d9689c45c8e32c447aafbcb1f6b8f9418c..a46df594973f69b294f42d6641be37cdf1a6c09e 100644 (file)
@@ -61,7 +61,7 @@ InvalidateInstructionCache (
 \r
   @param  Length  The number of bytes to invalidate from the instruction cache.\r
 \r
-  @return Address\r
+  @return Address of cahce invalidation.\r
 \r
 **/\r
 VOID *\r
@@ -116,7 +116,7 @@ WriteBackInvalidateDataCache (
   @param  Length  The number of bytes to write back and invalidate from the\r
                   data cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
@@ -172,7 +172,7 @@ WriteBackDataCache (
                   mode, then Address is a virtual address.\r
   @param  Length  The number of bytes to write back from the data cache.\r
 \r
-  @return Address\r
+  @return Address of cache wrote in main memory.\r
 \r
 **/\r
 VOID *\r
@@ -231,7 +231,7 @@ InvalidateDataCache (
                   then Address is a virtual address.\r
   @param  Length  The number of bytes to invalidate from the data cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
index 7e744698e38c18c90e0206180ea6f38f43a789a4..1fc2b95daa999c25f32b6c038d487f4460fe5d6b 100644 (file)
@@ -64,7 +64,7 @@ InvalidateInstructionCache (
 \r
   @param  Length  The number of bytes to invalidate from the instruction cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
@@ -120,7 +120,7 @@ WriteBackInvalidateDataCache (
   @param  Length  The number of bytes to write back and invalidate from the\r
                   data cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
@@ -139,6 +139,9 @@ WriteBackInvalidateDataCacheRange (
   }\r
 \r
   Start = (UINTN)Address;\r
+  //\r
+  // Calculate the cache line alignment\r
+  // \r
   End = (Start + Length + (CACHE_LINE_SIZE - 1)) & ~(CACHE_LINE_SIZE - 1);\r
   Start &= ~(CACHE_LINE_SIZE - 1);\r
 \r
@@ -189,7 +192,7 @@ WriteBackDataCache (
                   mode, then Address is a virtual address.\r
   @param  Length  The number of bytes to write back from the data cache.\r
 \r
-  @return Address\r
+  @return Address of cache wrote in main memory.\r
 \r
 **/\r
 VOID *\r
@@ -246,7 +249,7 @@ InvalidateDataCache (
                   then Address is a virtual address.\r
   @param  Length  The number of bytes to invalidate from the data cache.\r
 \r
-  @return Address\r
+  @return Address of cache invalidation.\r
 \r
 **/\r
 VOID *\r
index 5034317d49f23db419c79d42eca4ff8aba4d805d..73319d729bf579c26faec67bb9aa3b92ade89dfe 100644 (file)
@@ -93,7 +93,7 @@ DebugAssert (
   @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
 \r
-  @return  Buffer\r
+  @return  Buffer filled with PcdDebugClearMemoryValue.\r
 \r
 **/\r
 VOID *\r
@@ -116,6 +116,8 @@ DebugClearMemory (
 \r
   @retval  TRUE    The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.\r
   @retval  FALSE   The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.\r
+  \r
+  @return  Always return FALSE.\r
 \r
 **/\r
 BOOLEAN\r
@@ -137,6 +139,8 @@ DebugAssertEnabled (
 \r
   @retval  TRUE    The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.\r
   @retval  FALSE   The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.\r
+  \r
+  @return Always return FALSE.\r
 \r
 **/\r
 BOOLEAN\r
@@ -158,6 +162,8 @@ DebugPrintEnabled (
 \r
   @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.\r
   @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.\r
+  \r
+  @return  Always return FALSE.\r
 \r
 **/\r
 BOOLEAN\r
@@ -179,6 +185,8 @@ DebugCodeEnabled (
 \r
   @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
   @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  \r
+  @return  Always return FALSE.\r
 \r
 **/\r
 BOOLEAN\r
index 1a8cc27c5640e989d92e4fb86dd6c00bb06ad3ed..4a29835ea3583ca4b30a12cfa6a89e54c8ccf0aa 100644 (file)
@@ -1,7 +1,7 @@
 /**@file\r
   Common header file shared by all source files.\r
 \r
-  This file includes package header files, library classes and protocol, PPI & GUID definitions.\r
+  This file includes package header files, dependent library classes.\r
 \r
   Copyright (c) 2007, Intel Corporation.\r
   All rights reserved. This program and the accompanying materials\r
@@ -12,8 +12,8 @@
    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 **/\r
 \r
-#ifndef __COMMON_HEADER_H_\r
-#define __COMMON_HEADER_H_\r
+#ifndef __BASEIOLIB_INTRINSIC_INTERNAL_H_\r
+#define __BASEIOLIB_INTRINSIC_INTERNAL_H_\r
 \r
 \r
 \r
index bc5d4aab8985b3a1269975f30733929e44656279..4e5a738155a7e85cc8d8d60e8108f31b5d755b81 100644 (file)
@@ -130,7 +130,8 @@ IoAndThenOr8 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..7.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT8\r
@@ -410,7 +411,8 @@ IoAndThenOr16 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..15.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT16\r
@@ -690,7 +692,8 @@ IoAndThenOr32 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..31.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT32\r
@@ -970,7 +973,8 @@ IoAndThenOr64 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..63.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT64\r
@@ -1251,7 +1255,8 @@ MmioAndThenOr8 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..7.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT8\r
@@ -1533,7 +1538,8 @@ MmioAndThenOr16 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..15.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT16\r
@@ -1815,7 +1821,8 @@ MmioAndThenOr32 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..31.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT32\r
@@ -2097,7 +2104,8 @@ MmioAndThenOr64 (
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
                     Range 0..63.\r
 \r
-  @return The value read.\r
+  @return The value read from I/O port specified by StartBit and\r
+          EndBit.\r
 \r
 **/\r
 UINT64\r
index 25efcd2e6081bc0fcf8d97adec36500147bf2420..86efa6db6a16038be309ff69f51fd90fcf174a36 100644 (file)
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
 #include "BaseIoLibIntrinsicInternal.h"\r
 \r
 /**\r
@@ -28,7 +25,7 @@
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return Always return zero.\r
 \r
 **/\r
 UINT64\r
@@ -53,7 +50,7 @@ IoRead64 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return Always return zero.\r
 \r
 **/\r
 UINT64\r
index c28ad56624422d562209e982f07b0045007db3e3..db94f0f47e657489a18cc52c8bebe01b18abe355 100644 (file)
@@ -37,7 +37,7 @@
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT8\r
@@ -61,6 +61,9 @@ MmioRead8 (
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 **/\r
 UINT8\r
 EFIAPI\r
@@ -83,7 +86,7 @@ MmioWrite8 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT16\r
@@ -108,6 +111,9 @@ MmioRead16 (
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 **/\r
 UINT16\r
 EFIAPI\r
@@ -131,7 +137,7 @@ MmioWrite16 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT32\r
@@ -156,6 +162,9 @@ MmioRead32 (
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 **/\r
 UINT32\r
 EFIAPI\r
@@ -179,7 +188,7 @@ MmioWrite32 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT64\r
@@ -204,6 +213,9 @@ MmioRead64 (
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 **/\r
 UINT64\r
 EFIAPI\r
@@ -229,7 +241,7 @@ MmioWrite64 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 __inline__\r
@@ -257,7 +269,9 @@ IoRead8 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 __inline__\r
@@ -283,7 +297,7 @@ IoWrite8 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 __inline__\r
@@ -312,7 +326,9 @@ IoRead16 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 __inline__\r
@@ -339,7 +355,7 @@ IoWrite16 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 __inline__\r
@@ -368,7 +384,9 @@ IoRead32 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 __inline__\r
index d12ce3de90b8530a27fd99e3eb375f3721b130bd..c83fe8838de5f181a6b80681282b1cb09359fd5f 100644 (file)
@@ -13,9 +13,6 @@
 \r
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
 #include "BaseIoLibIntrinsicInternal.h"\r
 \r
 /**\r
@@ -29,7 +26,7 @@
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT8\r
@@ -52,6 +49,10 @@ MmioRead8 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 \r
 **/\r
 UINT8\r
@@ -75,7 +76,7 @@ MmioWrite8 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT16\r
@@ -99,6 +100,10 @@ MmioRead16 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 \r
 **/\r
 UINT16\r
@@ -123,7 +128,7 @@ MmioWrite16 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT32\r
@@ -147,6 +152,10 @@ MmioRead32 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 \r
 **/\r
 UINT32\r
@@ -171,7 +180,7 @@ MmioWrite32 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT64\r
@@ -196,6 +205,9 @@ MmioRead64 (
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 **/\r
 UINT64\r
 EFIAPI\r
@@ -221,7 +233,7 @@ MmioWrite64 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT8\r
@@ -253,7 +265,9 @@ IoRead8 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          I/O port.\r
 \r
 **/\r
 UINT8\r
@@ -282,7 +296,7 @@ IoWrite8 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT16\r
@@ -316,7 +330,9 @@ IoRead16 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          I/O port.\r
 \r
 **/\r
 UINT16\r
@@ -351,7 +367,7 @@ IoWrite16 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT32\r
@@ -385,7 +401,9 @@ IoRead32 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          I/O port.\r
 \r
 **/\r
 UINT32\r
index 23ca5c68ed3d83c44a5ab74f6e61c355f318ae9d..8eec29551f07ea12a6e69c308ae44c85e214e600 100644 (file)
@@ -61,7 +61,7 @@ InternalGetMemoryMapAddress (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT8\r
@@ -82,7 +82,7 @@ IoRead8 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT16\r
@@ -103,7 +103,7 @@ IoRead16 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT32\r
@@ -126,7 +126,7 @@ IoRead32 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT64\r
@@ -149,7 +149,9 @@ IoRead64 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 UINT8\r
@@ -172,7 +174,9 @@ IoWrite8 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 UINT16\r
@@ -195,7 +199,9 @@ IoWrite16 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 UINT32\r
@@ -220,7 +226,9 @@ IoWrite32 (
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
-  @return The value written the I/O port.\r
+  @return The value written to the I/O port. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the I/O port.\r
 \r
 **/\r
 UINT64\r
@@ -243,7 +251,7 @@ IoWrite64 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT8\r
@@ -272,7 +280,7 @@ MmioRead8 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT16\r
@@ -306,7 +314,7 @@ MmioRead16 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT32\r
@@ -340,7 +348,7 @@ MmioRead32 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT64\r
@@ -376,7 +384,9 @@ MmioRead64 (
   @param  Address The MMIO register to write.\r
   @param  Data    The value to write to the MMIO register.\r
 \r
-  @return The value written the memory address.\r
+  @return The value written to the Mmio. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the Mmio.\r
 \r
 **/\r
 UINT8\r
@@ -405,7 +415,9 @@ MmioWrite8 (
   @param  Address The MMIO register to write.\r
   @param  Data    The value to write to the MMIO register.\r
 \r
-  @return The value written the memory address.\r
+  @return The value written to the Mmio. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the Mmio.\r
 \r
 **/\r
 UINT16\r
@@ -439,7 +451,9 @@ MmioWrite16 (
   @param  Address The MMIO register to write.\r
   @param  Data    The value to write to the MMIO register.\r
 \r
-  @return The value written the memory address.\r
+  @return The value written to the Mmio. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the Mmio.\r
 \r
 **/\r
 UINT32\r
@@ -473,7 +487,9 @@ MmioWrite32 (
   @param  Address The MMIO register to write.\r
   @param  Data    The value to write to the MMIO register.\r
 \r
-  @return The value written the memory address.\r
+  @return The value written to the Mmio. It equals to the\r
+          input Value instead of the actual value read back from\r
+          the Mmio.\r
 \r
 **/\r
 UINT64\r
index 4569a166e72fb98b01062ebabc0f8e4d4ef343f4..20c4693f3a5d31473308f0fc20b984229ff562a7 100644 (file)
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
 #include "BaseIoLibIntrinsicInternal.h"\r
 \r
 /**\r
@@ -32,7 +29,7 @@
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Buffer contains the data read from Mmio.\r
 \r
 **/\r
 UINT8 *\r
@@ -76,7 +73,7 @@ MmioReadBuffer8 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Buffer contains the data read from Mmio.\r
 \r
 **/\r
 UINT16 *\r
@@ -127,7 +124,7 @@ MmioReadBuffer16 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Buffer contains the data read from Mmio.\r
 \r
 **/\r
 UINT32 *\r
@@ -178,7 +175,7 @@ MmioReadBuffer32 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Buffer contains the data read from Mmio.\r
 \r
 **/\r
 UINT64 *\r
index 9fec1bcae90779cf399eef1ad3f32b770c63c700..1e903a7e254aa20aa53b95c04022b062a946ad8f 100644 (file)
@@ -63,7 +63,7 @@ void          _ReadWriteBarrier (void);
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT8\r
@@ -119,7 +119,7 @@ IoWrite8 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT16\r
@@ -177,7 +177,7 @@ IoWrite16 (
 \r
   @param  Port  The I/O port to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Port.\r
 \r
 **/\r
 UINT32\r
@@ -236,7 +236,7 @@ IoWrite32 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT8\r
@@ -262,7 +262,11 @@ MmioRead8 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
-\r
+  \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
+  \r
 **/\r
 UINT8\r
 EFIAPI\r
@@ -285,7 +289,7 @@ MmioWrite8 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT16\r
@@ -312,6 +316,9 @@ MmioRead16 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return The value read from the Mmio after wrote specified\r
+          Value.\r
 \r
 **/\r
 UINT16\r
@@ -336,7 +343,7 @@ MmioWrite16 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT32\r
@@ -363,6 +370,10 @@ MmioRead32 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
 \r
 **/\r
 UINT32\r
@@ -387,7 +398,7 @@ MmioWrite32 (
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read.\r
+  @return The value read from Address.\r
 \r
 **/\r
 UINT64\r
@@ -415,6 +426,10 @@ MmioRead64 (
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
+  @return The value written to the Mmio. It equals to the input\r
+          Value instead of the actual value read back from the\r
+          Mmio.\r
+  \r
 **/\r
 UINT64\r
 EFIAPI\r
index 51f3c96cb8349ac8e2c95db03f323db8d7d0a096..04f622b79ae11b6b031677aed6b0aaa8874a994a 100644 (file)
@@ -311,6 +311,7 @@ InternalMathDivRemU64x64 (
 \r
 **/\r
 INT64\r
+EFIAPI\r
 InternalMathDivRemS64x64 (\r
   IN      INT64                     Dividend,\r
   IN      INT64                     Divisor,\r
@@ -374,6 +375,7 @@ InternalSwitchStack (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 IsNodeInList (\r
   IN      CONST LIST_ENTRY      *List,\r
   IN      CONST LIST_ENTRY      *Node\r
@@ -484,6 +486,7 @@ InternalSyncCompareExchange64 (
 \r
 **/\r
 unsigned int\r
+EFIAPI\r
 BitFieldReadUint (\r
   IN      unsigned int              Operand,\r
   IN      UINTN                     StartBit,\r
@@ -508,6 +511,7 @@ BitFieldReadUint (
 \r
 **/\r
 unsigned int\r
+EFIAPI\r
 BitFieldOrUint (\r
   IN      unsigned int              Operand,\r
   IN      UINTN                     StartBit,\r
@@ -533,6 +537,7 @@ BitFieldOrUint (
 \r
 **/\r
 unsigned int\r
+EFIAPI\r
 BitFieldAndUint (\r
   IN      unsigned int              Operand,\r
   IN      UINTN                     StartBit,\r
@@ -553,6 +558,7 @@ BitFieldAndUint (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 InternalAssertJumpBuffer (\r
   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer\r
   );\r
index 372ba12355b82cc5de3ffc6d28b0ab707cfcab05..5e894843b2c810c247b90bafe69fe90bb01de43a 100644 (file)
@@ -32,6 +32,7 @@
 \r
 **/\r
 unsigned int\r
+EFIAPI\r
 BitFieldReadUint (\r
   IN      unsigned int              Operand,\r
   IN      UINTN                     StartBit,\r
@@ -62,6 +63,7 @@ BitFieldReadUint (
 \r
 **/\r
 unsigned int\r
+EFIAPI\r
 BitFieldOrUint (\r
   IN      unsigned int              Operand,\r
   IN      UINTN                     StartBit,\r
@@ -93,6 +95,7 @@ BitFieldOrUint (
 \r
 **/\r
 unsigned int\r
+EFIAPI\r
 BitFieldAndUint (\r
   IN      unsigned int              Operand,\r
   IN      UINTN                     StartBit,\r
index b2014c77af1739c233edc036fc7a5d7966f827b0..325be96d934ac23b98807a5d3fc1d9351ef236e1 100644 (file)
@@ -36,5 +36,5 @@ CpuDeadLoop (
 {\r
   volatile UINTN  Index;\r
 \r
-  for (Index = 0; Index == 0;);\r
+  for (Index = 0; 0 == Index;);\r
 }\r
index 44d393f6b40f2a8ac41c2b77049ea32f2bdedbac..13de998127cf92e744a40ea7b9dac6296507e886 100644 (file)
@@ -28,6 +28,7 @@
 \r
 **/\r
 VOID\r
+EFIAPI\r
 InternalAssertJumpBuffer (\r
   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer\r
   );\r
index ef3fa62d898757185de0432eed39c92fa4569bf4..cb5d1f3450bba86b751d596a5dc01e431ff97ebc 100644 (file)
 \r
 **/\r
 \r
+/**\r
+  Performs an atomic compare exchange operation on a 32-bit\r
+  unsigned integer.\r
+\r
+  Performs an atomic compare exchange operation on the 32-bit\r
+  unsigned integer specified by Value.  If Value is equal to\r
+  CompareValue, then Value is set to ExchangeValue and\r
+  CompareValue is returned.  If Value is not equal to\r
+  CompareValue, then Value is returned. The compare exchange\r
+  operation must be performed using MP safe mechanisms.\r
+\r
+  @param  Value         A pointer to the 32-bit value for the\r
+                        compare exchange operation.\r
+  @param  CompareValue  32-bit value used in compare operation.\r
+  @param  ExchangeValue 32-bit value used in exchange operation.\r
+\r
+  @return The original *Value before exchange.\r
+\r
+**/\r
 UINT32\r
 EFIAPI\r
 InternalSyncCompareExchange32 (\r
index 19b00dd760a055683aa6152c2bfce379f317e449..f9849c34c4d0f905c4f79d6264b822736f4718de 100644 (file)
@@ -38,7 +38,7 @@ GetPowerOfTwo32 (
   IN      UINT32                    Operand\r
   )\r
 {\r
-  if (Operand == 0) {\r
+  if (0 == Operand) {\r
     return 0;\r
   }\r
 \r
index 3a1867b0941d06c800fa29863b32b84809488098..36b256f07ceed46a64502d9fb5fe27d5e9e16bed 100644 (file)
@@ -37,6 +37,7 @@
 \r
 **/\r
 INT64\r
+EFIAPI\r
 InternalMathDivRemS64x64 (\r
   IN      INT64                     Dividend,\r
   IN      INT64                     Divisor,\r
index 5d804109ab48f56ba1f14ba691db5194ddf2fb47..73cfe4d7a8faf6cfb43076ff1c989d7dcfb9c6f7 100644 (file)
@@ -41,6 +41,7 @@
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 IsNodeInList (\r
   IN      CONST LIST_ENTRY      *List,\r
   IN      CONST LIST_ENTRY      *Node\r
@@ -384,6 +385,8 @@ IsNodeAtEnd (
 \r
   @param  FirstEntry  A pointer to a node in a linked list.\r
   @param  SecondEntry A pointer to another node in the same linked list.\r
+  \r
+  @return SecondEntry\r
 \r
 **/\r
 LIST_ENTRY *\r
index a598a1f71f41570ebe4824b5c58f9cce4b0a24a1..58d0063e22457fa95e7be9cf9308b03856ff009d 100644 (file)
@@ -44,6 +44,6 @@ LowBitSet32 (
     return -1;\r
   }\r
 \r
-  for (BitIndex = 0; (Operand & 1) == 0; BitIndex++, Operand >>= 1);\r
+  for (BitIndex = 0; 0 == (Operand & 1); BitIndex++, Operand >>= 1);\r
   return BitIndex;\r
 }\r
index 43dd575f09d01d94e01a74c64eeff6b6cfdfce33..02a29fb73f9904e60a5a479db53f4725f8b992b1 100644 (file)
@@ -361,6 +361,7 @@ InternalMathDivRemU64x64 (
 \r
 **/\r
 INT64\r
+EFIAPI\r
 InternalMathDivRemS64x64 (\r
   IN      INT64                     Dividend,\r
   IN      INT64                     Divisor,\r
index 909262e5872f78e81c4b947acfd7498157450894..bdfa7a3c6d15c7756190ea42cbe104ed8af6ce05 100644 (file)
@@ -193,7 +193,7 @@ StrLen (
 \r
   @param  String  Pointer to a Null-terminated Unicode string.\r
 \r
-  @return The size of String.\r
+  @return The size in bytes of String.\r
 \r
 **/\r
 UINTN\r
@@ -291,7 +291,7 @@ StrnCmp (
   IN      UINTN                     Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
 \r
@@ -469,7 +469,7 @@ StrStr (
       SearchStringTmp++;\r
     } \r
     \r
-    if (*SearchStringTmp == '\0') {\r
+    if ('\0' == *SearchStringTmp) {\r
       return (CHAR16 *) FirstMatch;\r
     }\r
 \r
@@ -641,14 +641,14 @@ StrDecimalToUintn (
   //\r
   // Ignore the pad spaces (space or tab)\r
   //\r
-  while ((*String == L' ') || (*String == L'\t')) {\r
+  while ((L' ' ==*String) || (L'\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == L'0') {\r
+  while (L'0' == *String) {\r
     String++;\r
   }\r
 \r
@@ -660,7 +660,7 @@ StrDecimalToUintn (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINTN_DIVIDED_BY_10) ||\r
-      ((Result == QUIENT_MAX_UINTN_DIVIDED_BY_10) &&\r
+      ((QUIENT_MAX_UINTN_DIVIDED_BY_10 == Result) &&\r
       (*String - L'0') <= REMINDER_MAX_UINTN_DIVIDED_BY_10)\r
       );\r
 \r
@@ -723,14 +723,14 @@ StrDecimalToUint64 (
   //\r
   // Ignore the pad spaces (space or tab)\r
   //\r
-  while ((*String == L' ') || (*String == L'\t')) {\r
+  while ((L' ' == *String) || (L'\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == L'0') {\r
+  while (L'0' == *String) {\r
     String++;\r
   }\r
 \r
@@ -742,7 +742,7 @@ StrDecimalToUint64 (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINT64_DIVIDED_BY_10) || \r
-      ((Result == QUIENT_MAX_UINT64_DIVIDED_BY_10) && \r
+      ((QUIENT_MAX_UINT64_DIVIDED_BY_10 == Result) && \r
       (*String - L'0') <= REMINDER_MAX_UINT64_DIVIDED_BY_10)\r
       );\r
 \r
@@ -805,19 +805,19 @@ StrHexToUintn (
   //\r
   // Ignore the pad spaces (space or tab) \r
   //\r
-  while ((*String == L' ') || (*String == L'\t')) {\r
+  while ((L' ' == *String) || (L'\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == L'0') {\r
+  while (L'0' == *String) {\r
     String++;\r
   }\r
 \r
   if (InternalCharToUpper (*String) == L'X') {\r
-    ASSERT (*(String - 1)  == L'0');\r
+    ASSERT (L'0' == *(String - 1));\r
     if (*(String - 1)  != L'0') {\r
       return 0;\r
     }\r
@@ -835,7 +835,7 @@ StrHexToUintn (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINTN_DIVIDED_BY_16) ||\r
-      ((Result == QUIENT_MAX_UINTN_DIVIDED_BY_16) && \r
+      ((QUIENT_MAX_UINTN_DIVIDED_BY_16 == Result) && \r
       (InternalHexCharToUintn (*String) <= REMINDER_MAX_UINTN_DIVIDED_BY_16))\r
       );\r
 \r
@@ -899,19 +899,19 @@ StrHexToUint64 (
   //\r
   // Ignore the pad spaces (space or tab) \r
   //\r
-  while ((*String == L' ') || (*String == L'\t')) {\r
+  while ((L' ' == *String) || (L'\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == L'0') {\r
+  while (L'0' == *String) {\r
     String++;\r
   }\r
 \r
   if (InternalCharToUpper (*String) == L'X') {\r
-    ASSERT (*(String - 1)  == L'0');\r
+    ASSERT (L'0' == *(String - 1));\r
     if (*(String - 1)  != L'0') {\r
       return 0;\r
     }\r
@@ -929,7 +929,7 @@ StrHexToUint64 (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINT64_DIVIDED_BY_16)|| \r
-      ((Result == QUIENT_MAX_UINT64_DIVIDED_BY_16) && \r
+      ((QUIENT_MAX_UINT64_DIVIDED_BY_16 == Result) && \r
       (InternalHexCharToUintn (*String) <= REMINDER_MAX_UINT64_DIVIDED_BY_16))\r
       );\r
 \r
@@ -1153,7 +1153,7 @@ AsciiStrnCpy (
 {\r
   CHAR8                             *ReturnValue;\r
 \r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Destination;\r
   }\r
 \r
@@ -1432,7 +1432,7 @@ AsciiStrnCmp (
   IN      UINTN                     Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
 \r
@@ -1662,14 +1662,14 @@ AsciiStrDecimalToUintn (
   //\r
   // Ignore the pad spaces (space or tab)\r
   //\r
-  while ((*String == ' ') || (*String == '\t')) {\r
+  while ((' ' == *String) || ('\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == '0') {\r
+  while ('0' == *String) {\r
     String++;\r
   }\r
 \r
@@ -1681,7 +1681,7 @@ AsciiStrDecimalToUintn (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINTN_DIVIDED_BY_10) ||\r
-      ((Result == QUIENT_MAX_UINTN_DIVIDED_BY_10) && \r
+      ((QUIENT_MAX_UINTN_DIVIDED_BY_10 == Result) && \r
       (*String - '0') <= REMINDER_MAX_UINTN_DIVIDED_BY_10)\r
       );\r
 \r
@@ -1739,14 +1739,14 @@ AsciiStrDecimalToUint64 (
   //\r
   // Ignore the pad spaces (space or tab)\r
   //\r
-  while ((*String == ' ') || (*String == '\t')) {\r
+  while ((' ' == *String) || ('\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == '0') {\r
+  while ('0' == *String) {\r
     String++;\r
   }\r
 \r
@@ -1758,7 +1758,7 @@ AsciiStrDecimalToUint64 (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINT64_DIVIDED_BY_10) || \r
-      ((Result == QUIENT_MAX_UINT64_DIVIDED_BY_10) && \r
+      ((QUIENT_MAX_UINT64_DIVIDED_BY_10 == Result) && \r
       (*String - '0') <= REMINDER_MAX_UINT64_DIVIDED_BY_10)\r
       );\r
 \r
@@ -1819,19 +1819,19 @@ AsciiStrHexToUintn (
   //\r
   // Ignore the pad spaces (space or tab) \r
   //\r
-  while ((*String == ' ') || (*String == '\t')) {\r
+  while ((' ' == *String) || ('\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == '0') {\r
+  while ('0' == *String) {\r
     String++;\r
   }\r
 \r
   if (AsciiToUpper (*String) == 'X') {\r
-    ASSERT (*(String - 1)  == '0');\r
+    ASSERT ('0' == *(String - 1));\r
     if (*(String - 1)  != '0') {\r
       return 0;\r
     }\r
@@ -1849,7 +1849,7 @@ AsciiStrHexToUintn (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
      ASSERT ((Result < QUIENT_MAX_UINTN_DIVIDED_BY_16) ||\r
-       ((Result == QUIENT_MAX_UINTN_DIVIDED_BY_16) && \r
+       ((QUIENT_MAX_UINTN_DIVIDED_BY_16 == Result) && \r
        (InternalAsciiHexCharToUintn (*String) <= REMINDER_MAX_UINTN_DIVIDED_BY_16))\r
        );\r
 \r
@@ -1914,19 +1914,19 @@ AsciiStrHexToUint64 (
   //\r
   // Ignore the pad spaces (space or tab) \r
   //\r
-  while ((*String == ' ') || (*String == '\t')) {\r
+  while ((' ' == *String) || ('\t' == *String)) {\r
     String++;\r
   }\r
 \r
   //\r
   // Ignore leading Zeros after the spaces\r
   //\r
-  while (*String == '0') {\r
+  while ('0' == *String) {\r
     String++;\r
   }\r
 \r
   if (AsciiToUpper (*String) == 'X') {\r
-    ASSERT (*(String - 1)  == '0');\r
+    ASSERT ('0' == *(String - 1));\r
     if (*(String - 1)  != '0') {\r
       return 0;\r
     }\r
@@ -1944,7 +1944,7 @@ AsciiStrHexToUint64 (
     // to the range defined by UINTN, then ASSERT().\r
     //\r
     ASSERT ((Result < QUIENT_MAX_UINT64_DIVIDED_BY_16) ||\r
-      ((Result == QUIENT_MAX_UINT64_DIVIDED_BY_16) && \r
+      ((QUIENT_MAX_UINT64_DIVIDED_BY_16 == Result) && \r
       (InternalAsciiHexCharToUintn (*String) <= REMINDER_MAX_UINT64_DIVIDED_BY_16))\r
       );\r
 \r
index f1565db3fdab7eb665328cce2f6bc4b3132f635d..8e8a2bf7e178cca85186fb5baf30d45d8788028b 100644 (file)
@@ -44,7 +44,6 @@ GetSpinLockProperties (
   VOID\r
   )\r
 {\r
-  // @bug May use a PCD entry to determine this alignment.\r
   return 32;\r
 }\r
 \r
@@ -61,7 +60,7 @@ GetSpinLockProperties (
   @param  SpinLock  A pointer to the spin lock to initialize to the released\r
                     state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock initialized in release state.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -92,7 +91,7 @@ InitializeSpinLock (
 \r
   @param  SpinLock  A pointer to the spin lock to place in the acquired state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock aquired lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -190,7 +189,7 @@ AcquireSpinLockOrFail (
   ASSERT (SpinLock != NULL);\r
 \r
   LockValue = *SpinLock;\r
-  ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);\r
+  ASSERT (SPIN_LOCK_ACQUIRED == LockValue || SPIN_LOCK_RELEASED == LockValue);\r
 \r
   return (BOOLEAN)(\r
            InterlockedCompareExchangePointer (\r
@@ -226,7 +225,7 @@ ReleaseSpinLock (
   ASSERT (SpinLock != NULL);\r
 \r
   LockValue = *SpinLock;\r
-  ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);\r
+  ASSERT (SPIN_LOCK_ACQUIRED == LockValue || SPIN_LOCK_RELEASED == LockValue);\r
 \r
   *SpinLock = SPIN_LOCK_RELEASED;\r
   return SpinLock;\r
@@ -358,6 +357,8 @@ InterlockedCompareExchange64 (
                         operation.\r
   @param  CompareValue  Pointer value used in compare operation.\r
   @param  ExchangeValue Pointer value used in exchange operation.\r
+  \r
+  @return The original *Value before exchange.\r
 \r
 **/\r
 VOID *\r
index 4c30dbc4b15b6dcd6899c16152394100913d2341..67a8f17be39076a6eff7b63ab1731456ac580494 100644 (file)
@@ -49,7 +49,6 @@ GetSpinLockProperties (
   VOID\r
   )\r
 {\r
-  // @bug May use a PCD entry to determine this alignment.\r
   return 32;\r
 }\r
 \r
@@ -66,7 +65,7 @@ GetSpinLockProperties (
   @param  SpinLock  A pointer to the spin lock to initialize to the released\r
                     state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock in release state.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -101,7 +100,7 @@ InitializeSpinLock (
 \r
   @param  SpinLock  A pointer to the spin lock to place in the acquired state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock accquired lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -224,7 +223,7 @@ AcquireSpinLockOrFail (
 \r
   @param  SpinLock  A pointer to the spin lock to release.\r
 \r
-  @return SpinLock\r
+  @return SpinLock released lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -374,6 +373,7 @@ InterlockedCompareExchange64 (
   @param  CompareValue  Pointer value used in compare operation.\r
   @param  ExchangeValue Pointer value used in exchange operation.\r
 \r
+  @return The original *Value before exchange.\r
 **/\r
 VOID *\r
 EFIAPI\r
index 0bc60259b170bc6cd0517df8751d1a30386f9d74..a4fc399387b98a5906a4e4ab893423325d2c1b37 100644 (file)
@@ -51,7 +51,6 @@ GetSpinLockProperties (
   VOID\r
   )\r
 {\r
-  // @bug May use a PCD entry to determine this alignment.\r
   return 32;\r
 }\r
 \r
@@ -68,7 +67,7 @@ GetSpinLockProperties (
   @param  SpinLock  A pointer to the spin lock to initialize to the released\r
                     state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock in released state.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -103,7 +102,7 @@ InitializeSpinLock (
 \r
   @param  SpinLock  A pointer to the spin lock to place in the acquired state.\r
 \r
-  @return SpinLock\r
+  @return SpinLock aquiring lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -226,7 +225,7 @@ AcquireSpinLockOrFail (
 \r
   @param  SpinLock  A pointer to the spin lock to release.\r
 \r
-  @return SpinLock\r
+  @return SpinLock releasing lock.\r
 \r
 **/\r
 SPIN_LOCK *\r
@@ -375,6 +374,8 @@ InterlockedCompareExchange64 (
                         operation.\r
   @param  CompareValue  Pointer value used in compare operation.\r
   @param  ExchangeValue Pointer value used in exchange operation.\r
+  \r
+  @return The original *Value before exchange.\r
 \r
 **/\r
 VOID *\r
index e7b19e4deea257052b92e380cefbfec7d1cf6b43..49518c028759e7304c1b264a48561dd281e71816 100644 (file)
@@ -28,7 +28,7 @@
 \r
   @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
 \r
-  @return *Uint16\r
+  @return Data read from Buffer.\r
 \r
 **/\r
 UINT16\r
@@ -54,7 +54,7 @@ ReadUnaligned16 (
   @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
   @param  Value   16-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return Value written to Buffer\r
 \r
 **/\r
 UINT16\r
@@ -79,7 +79,7 @@ WriteUnaligned16 (
 \r
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
 \r
-  @return The value read.\r
+  @return The value read from Buffer.\r
 \r
 **/\r
 UINT32\r
@@ -105,7 +105,7 @@ ReadUnaligned24 (
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
   @param  Value   24-bit value to write to Buffer.\r
 \r
-  @return The value written.\r
+  @return The value written to Buffer.\r
 \r
 **/\r
 UINT32\r
@@ -131,7 +131,7 @@ WriteUnaligned24 (
 \r
   @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
 \r
-  @return *Uint32\r
+  @return Data read from Buffer.\r
 \r
 **/\r
 UINT32\r
@@ -157,7 +157,7 @@ ReadUnaligned32 (
   @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
   @param  Value   32-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return Value written to Buffer\r
 \r
 **/\r
 UINT32\r
@@ -182,7 +182,7 @@ WriteUnaligned32 (
 \r
   @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
 \r
-  @return *Uint64\r
+  @return Data read from Buffer.\r
 \r
 **/\r
 UINT64\r
@@ -208,7 +208,7 @@ ReadUnaligned64 (
   @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
   @param  Value   64-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return Value written to Buffer.\r
 \r
 **/\r
 UINT64\r
index 3da5ae202cfa7351d9077f711a36b0baba42f754..40410ecbbd9180269f5ddbef80e2a93118ad3924 100644 (file)
@@ -40,12 +40,12 @@ AsmFxRestore (
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
-  ASSERT (((UINTN)Buffer & 0xf) == 0);\r
+  ASSERT (0 == ((UINTN)Buffer & 0xf));\r
 \r
   //\r
   // Check the flag recorded by AsmFxSave()\r
   //\r
-  ASSERT (*(UINT32 *) (&Buffer[sizeof (IA32_FX_BUFFER) - 4]) == 0xAA5555AA);\r
+  ASSERT (0xAA5555AA == *(UINT32 *) (&Buffer[sizeof (IA32_FX_BUFFER) - 4]));\r
 \r
   InternalX86FxRestore (Buffer);\r
 }\r
index 2f44c55543ece66d5db661f3cd8d7a4c147bb215..6b8173d724fd07ff93f79491577e8c8a08437d30 100644 (file)
@@ -39,7 +39,7 @@ AsmFxSave (
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
-  ASSERT (((UINTN)Buffer & 0xf) == 0);\r
+  ASSERT (0 == ((UINTN)Buffer & 0xf));\r
 \r
   InternalX86FxSave (Buffer);\r
 \r
index 613d012f85992216f5f95be8d84a334ab86b1b2c..6898b8db51f5afc93e470829a41786c44c0454e3 100644 (file)
@@ -37,7 +37,7 @@ GetInterruptState (
   IA32_EFLAGS32                     EFlags;\r
 \r
   EFlags.UintN = AsmReadEflags ();\r
-  return (BOOLEAN)(EFlags.Bits.IF == 1);\r
+  return (BOOLEAN)(1 == EFlags.Bits.IF);\r
 }\r
 \r
 \r
index ccd38e1aef581e04aabd9fd74b32146242ce5ee7..031b7fcec6456ad767d735d05b4ab9f71a632611 100644 (file)
@@ -58,7 +58,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r
index f957c8c85092ea184633ef341057bad46f9b4dd5..09c18255aa46de21ae9d8cafdbb8f5bb25a22513 100644 (file)
@@ -52,7 +52,7 @@ CopyMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return DestinationBuffer;\r
   }\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
index 1908788e7eaa6f8bd69023309a1b261b04462180..e45202d9501d141b3173dee33061ba7e3bf00170 100644 (file)
@@ -56,14 +56,14 @@ ScanMem16 (
   IN UINT16      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
   ASSERT (Buffer != NULL);\r
-  ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == ((UINTN)Buffer & (sizeof (Value) - 1)));\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-  ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == (Length & (sizeof (Value) - 1)));\r
 \r
   return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value);\r
 }\r
index 896d60c208aee20776ec58db226807dabe002a6e..a4a16372e67234206a2f0a32961bbca7255e478e 100644 (file)
@@ -56,14 +56,14 @@ ScanMem32 (
   IN UINT32      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
   ASSERT (Buffer != NULL);\r
-  ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == ((UINTN)Buffer & (sizeof (Value) - 1)));\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-  ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == (Length & (sizeof (Value) - 1)));\r
 \r
   return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value);\r
 }\r
index c9cc20316cccbeccae3429c17f049e87ecf381ae..b182243648989ba1f073dec82c69003c32a166c0 100644 (file)
@@ -56,14 +56,14 @@ ScanMem64 (
   IN UINT64      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
   ASSERT (Buffer != NULL);\r
-  ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == ((UINTN)Buffer & (sizeof (Value) - 1)));\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-  ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == (Length & (sizeof (Value) - 1)));\r
 \r
   return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value);\r
 }\r
index 615a0b6171675d35cda2df43bd7059a61cee3d4a..8164e2a181c59ad3069610fbfad437ec235157bd 100644 (file)
@@ -54,7 +54,7 @@ ScanMem8 (
   IN UINT8       Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
   ASSERT (Buffer != NULL);\r
index 36ec277ada8c931a65b69edb31c6c0173054e7d7..9877d2f0c5535da7e9fb8895a7f4318de8fa5070 100644 (file)
@@ -55,14 +55,14 @@ SetMem16 (
   IN UINT16  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
   ASSERT (Buffer != NULL);\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-  ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
-  ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == (((UINTN)Buffer) & (sizeof (Value) - 1)));\r
+  ASSERT (0 == (Length & (sizeof (Value) - 1)));\r
 \r
   return InternalMemSetMem16 (Buffer, Length / sizeof (Value), Value);\r
 }\r
index e42a3a92a6ee1e4ce72b32f5fb6aec6835f0ef7d..ed63a014978859aa8b5f9d998d32df020512c7ee 100644 (file)
@@ -55,14 +55,14 @@ SetMem32 (
   IN UINT32  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
   ASSERT (Buffer != NULL);\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-  ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
-  ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == (((UINTN)Buffer) & (sizeof (Value) - 1)));\r
+  ASSERT (0 == (Length & (sizeof (Value) - 1)));\r
 \r
   return InternalMemSetMem32 (Buffer, Length / sizeof (Value), Value);\r
 }\r
index 4ddbc689f17f1690a4888a5b17ecac007a4d1eab..4e3fc758526a87f65a61a35fc93c6d78fde426c0 100644 (file)
@@ -55,14 +55,14 @@ SetMem64 (
   IN UINT64  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
   ASSERT (Buffer != NULL);\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-  ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
-  ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
+  ASSERT (0 == (((UINTN)Buffer) & (sizeof (Value) - 1)));\r
+  ASSERT (0 == (Length & (sizeof (Value) - 1)));\r
 \r
   return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value);\r
 }\r
index 609eab6db456a6e90cbcce4b7e2a1d55324b377e..0e3428cd7a88d740cf514a20bf8c06dca89592a5 100644 (file)
@@ -49,7 +49,7 @@ SetMem (
   IN UINT8  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 4c0d3eaadbab5863b3e4480e0ecad15e25767a89..1886da59df9b120a0837c80da76bdae1b31469d3 100644 (file)
@@ -55,7 +55,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r
index 9e620e2200a5ffe9a4580c7b4a923c260fa9d2c9..1cee34801a4877461ad361023563979e60fae731 100644 (file)
@@ -49,7 +49,7 @@ CopyMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return DestinationBuffer;\r
   }\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
index da7c7370d094cfdef2948abad24741f679eab545..e8d72dd04c794e45ceb21da59d90f71d889439cb 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef __MEM_LIB_INTERNALS__\r
 #define __MEM_LIB_INTERNALS__\r
 \r
+#include <Base.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -52,7 +53,7 @@ InternalMemCopyMem (
   Set Buffer to Value for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
   @param  Value Value of the set operation.\r
 \r
   @return Buffer\r
@@ -124,7 +125,7 @@ InternalMemSetMem64 (
   Set Buffer to 0 for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
 \r
   @return Buffer\r
 \r
index 95f134bbda63539802092ea8b28e755cc5a3014f..d746c8fc606bebf2c2d0e46540b8fac2c87099ea 100644 (file)
@@ -53,7 +53,7 @@ ScanMem16 (
   IN UINT16      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 6a3dcd7ad233762130bab066ae5d18df222c0f83..d6681deecf52b712f37e2263d60e638479d78ab3 100644 (file)
@@ -53,7 +53,7 @@ ScanMem32 (
   IN UINT32      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index b355fe647cd9e1d4cee9cbad80aa5193f34340a7..6d8d8c9d95ff9d516671a726303d6464324d7a60 100644 (file)
@@ -53,7 +53,7 @@ ScanMem64 (
   IN UINT64      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 2b21b22166ddd7d8afaa353bb8c576c51e5153ad..ce4eed606a1ddda9b70b79a59a426b5762f0acbd 100644 (file)
@@ -51,7 +51,7 @@ ScanMem8 (
   IN UINT8       Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
   ASSERT (Buffer != NULL);\r
index 889339c9533d9822a5d3f47af818b3d47ee33ea4..1596328a58739a1a3c53a41424be968e22ccb283 100644 (file)
@@ -52,7 +52,7 @@ SetMem16 (
   IN UINT16  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 15f8205ebc2c88ed16ca0bcc18f8c0208155cfdf..25249174796ad3dbb9364d249b4090d0e7b5db2c 100644 (file)
@@ -52,7 +52,7 @@ SetMem32 (
   IN UINT32  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 981a7d4731d50e950b4b2822ebed733da8cbea4c..0cfcb9fa4b385cc549d0cf212b5e799277e261d6 100644 (file)
@@ -52,7 +52,7 @@ SetMem64 (
   IN UINT64  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index e74ce8d65b8f086259f70c7605bec2d4b2d89778..1c1a289b53d163a89264d96b96eafdba247964a5 100644 (file)
@@ -46,7 +46,7 @@ SetMem (
   IN UINT8  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 90e607c0ce790b1890746c9d5eedf8f94e18efbe..00205b1908e318922f49841e4cc57590905a54fb 100644 (file)
@@ -45,7 +45,7 @@ ZeroMem (
   IN UINTN  Length\r
   )\r
 {\r
-  ASSERT (!(Buffer == NULL && Length > 0));\r
+  ASSERT (!(NULL == Buffer && Length > 0));\r
   ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
   return InternalMemZeroMem (Buffer, Length);\r
 }\r
index ccd38e1aef581e04aabd9fd74b32146242ce5ee7..031b7fcec6456ad767d735d05b4ab9f71a632611 100644 (file)
@@ -58,7 +58,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r
index f957c8c85092ea184633ef341057bad46f9b4dd5..09c18255aa46de21ae9d8cafdbb8f5bb25a22513 100644 (file)
@@ -52,7 +52,7 @@ CopyMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return DestinationBuffer;\r
   }\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
index 1908788e7eaa6f8bd69023309a1b261b04462180..54abe1c356def40b11f5d80a76df067573f2bab4 100644 (file)
@@ -56,7 +56,7 @@ ScanMem16 (
   IN UINT16      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 896d60c208aee20776ec58db226807dabe002a6e..b91a38b973dae7ed3edb864c3f403e46fb3e4885 100644 (file)
@@ -56,7 +56,7 @@ ScanMem32 (
   IN UINT32      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index c9cc20316cccbeccae3429c17f049e87ecf381ae..f47d700c9b1bf2b16b91f8c8a7f292653273742e 100644 (file)
@@ -56,7 +56,7 @@ ScanMem64 (
   IN UINT64      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 615a0b6171675d35cda2df43bd7059a61cee3d4a..8164e2a181c59ad3069610fbfad437ec235157bd 100644 (file)
@@ -54,7 +54,7 @@ ScanMem8 (
   IN UINT8       Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
   ASSERT (Buffer != NULL);\r
index 36ec277ada8c931a65b69edb31c6c0173054e7d7..0a9936bb9afee9374383fa9807a86da81f4630de 100644 (file)
@@ -55,7 +55,7 @@ SetMem16 (
   IN UINT16  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index e42a3a92a6ee1e4ce72b32f5fb6aec6835f0ef7d..d0015a3992ff290d08852d00987cfa49c517b345 100644 (file)
@@ -55,7 +55,7 @@ SetMem32 (
   IN UINT32  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 4ddbc689f17f1690a4888a5b17ecac007a4d1eab..408c074624252d7f7c81866d5ec8bb88c59c46ce 100644 (file)
@@ -55,7 +55,7 @@ SetMem64 (
   IN UINT64  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 609eab6db456a6e90cbcce4b7e2a1d55324b377e..0e3428cd7a88d740cf514a20bf8c06dca89592a5 100644 (file)
@@ -49,7 +49,7 @@ SetMem (
   IN UINT8  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 87565f1c9a037efc0b9e003ca0f988020fbe51f4..e27851b077f8c59913c39c5e2cc2ef873050ffbe 100644 (file)
@@ -48,7 +48,7 @@ ZeroMem (
   IN UINTN  Length\r
   )\r
 {\r
-  ASSERT (!(Buffer == NULL && Length > 0));\r
+  ASSERT (!(NULL == Buffer && Length > 0));\r
   ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
   return InternalMemZeroMem (Buffer, Length);\r
 }\r
index ccd38e1aef581e04aabd9fd74b32146242ce5ee7..031b7fcec6456ad767d735d05b4ab9f71a632611 100644 (file)
@@ -58,7 +58,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r
index f957c8c85092ea184633ef341057bad46f9b4dd5..09c18255aa46de21ae9d8cafdbb8f5bb25a22513 100644 (file)
@@ -52,7 +52,7 @@ CopyMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return DestinationBuffer;\r
   }\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
index 9825b9f7922f6dc5098391426ad41359beb0c6d9..cbbad2cb5dfb65fe5f30ceb4dc369bd71b646647 100644 (file)
@@ -24,7 +24,7 @@
 //\r
 // Include common header file for this module.\r
 //\r
-#include <MemLibInternals.h>\r
+#include "MemLibInternals.h"\r
 \r
 \r
 /**\r
index ceddbbe7a05b30419497fa9c491fcbe03993c8b4..ce55f447c05afdd66ab392086545278f7143ba1d 100644 (file)
@@ -51,7 +51,7 @@ InternalMemCopyMem (
   Set Buffer to Value for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
   @param  Value Value of the set operation.\r
 \r
   @return Buffer\r
@@ -123,7 +123,7 @@ InternalMemSetMem64 (
   Set Buffer to 0 for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
 \r
   @return Buffer\r
 \r
index 1908788e7eaa6f8bd69023309a1b261b04462180..54abe1c356def40b11f5d80a76df067573f2bab4 100644 (file)
@@ -56,7 +56,7 @@ ScanMem16 (
   IN UINT16      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 896d60c208aee20776ec58db226807dabe002a6e..b91a38b973dae7ed3edb864c3f403e46fb3e4885 100644 (file)
@@ -56,7 +56,7 @@ ScanMem32 (
   IN UINT32      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index c9cc20316cccbeccae3429c17f049e87ecf381ae..f47d700c9b1bf2b16b91f8c8a7f292653273742e 100644 (file)
@@ -56,7 +56,7 @@ ScanMem64 (
   IN UINT64      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 615a0b6171675d35cda2df43bd7059a61cee3d4a..8164e2a181c59ad3069610fbfad437ec235157bd 100644 (file)
@@ -54,7 +54,7 @@ ScanMem8 (
   IN UINT8       Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
   ASSERT (Buffer != NULL);\r
index 36ec277ada8c931a65b69edb31c6c0173054e7d7..0a9936bb9afee9374383fa9807a86da81f4630de 100644 (file)
@@ -55,7 +55,7 @@ SetMem16 (
   IN UINT16  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index e42a3a92a6ee1e4ce72b32f5fb6aec6835f0ef7d..d0015a3992ff290d08852d00987cfa49c517b345 100644 (file)
@@ -55,7 +55,7 @@ SetMem32 (
   IN UINT32  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 4ddbc689f17f1690a4888a5b17ecac007a4d1eab..408c074624252d7f7c81866d5ec8bb88c59c46ce 100644 (file)
@@ -55,7 +55,7 @@ SetMem64 (
   IN UINT64  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 609eab6db456a6e90cbcce4b7e2a1d55324b377e..0e3428cd7a88d740cf514a20bf8c06dca89592a5 100644 (file)
@@ -49,7 +49,7 @@ SetMem (
   IN UINT8  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 87565f1c9a037efc0b9e003ca0f988020fbe51f4..e27851b077f8c59913c39c5e2cc2ef873050ffbe 100644 (file)
@@ -48,7 +48,7 @@ ZeroMem (
   IN UINTN  Length\r
   )\r
 {\r
-  ASSERT (!(Buffer == NULL && Length > 0));\r
+  ASSERT (!(NULL == Buffer && Length > 0));\r
   ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
   return InternalMemZeroMem (Buffer, Length);\r
 }\r
index ccd38e1aef581e04aabd9fd74b32146242ce5ee7..031b7fcec6456ad767d735d05b4ab9f71a632611 100644 (file)
@@ -58,7 +58,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r
index f957c8c85092ea184633ef341057bad46f9b4dd5..09c18255aa46de21ae9d8cafdbb8f5bb25a22513 100644 (file)
@@ -52,7 +52,7 @@ CopyMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return DestinationBuffer;\r
   }\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
index ceddbbe7a05b30419497fa9c491fcbe03993c8b4..ce55f447c05afdd66ab392086545278f7143ba1d 100644 (file)
@@ -51,7 +51,7 @@ InternalMemCopyMem (
   Set Buffer to Value for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
   @param  Value Value of the set operation.\r
 \r
   @return Buffer\r
@@ -123,7 +123,7 @@ InternalMemSetMem64 (
   Set Buffer to 0 for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
 \r
   @return Buffer\r
 \r
index 1908788e7eaa6f8bd69023309a1b261b04462180..54abe1c356def40b11f5d80a76df067573f2bab4 100644 (file)
@@ -56,7 +56,7 @@ ScanMem16 (
   IN UINT16      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 896d60c208aee20776ec58db226807dabe002a6e..b91a38b973dae7ed3edb864c3f403e46fb3e4885 100644 (file)
@@ -56,7 +56,7 @@ ScanMem32 (
   IN UINT32      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index c9cc20316cccbeccae3429c17f049e87ecf381ae..f47d700c9b1bf2b16b91f8c8a7f292653273742e 100644 (file)
@@ -56,7 +56,7 @@ ScanMem64 (
   IN UINT64      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 615a0b6171675d35cda2df43bd7059a61cee3d4a..8164e2a181c59ad3069610fbfad437ec235157bd 100644 (file)
@@ -54,7 +54,7 @@ ScanMem8 (
   IN UINT8       Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
   ASSERT (Buffer != NULL);\r
index 36ec277ada8c931a65b69edb31c6c0173054e7d7..0a9936bb9afee9374383fa9807a86da81f4630de 100644 (file)
@@ -55,7 +55,7 @@ SetMem16 (
   IN UINT16  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index e42a3a92a6ee1e4ce72b32f5fb6aec6835f0ef7d..d0015a3992ff290d08852d00987cfa49c517b345 100644 (file)
@@ -55,7 +55,7 @@ SetMem32 (
   IN UINT32  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 4ddbc689f17f1690a4888a5b17ecac007a4d1eab..408c074624252d7f7c81866d5ec8bb88c59c46ce 100644 (file)
@@ -55,7 +55,7 @@ SetMem64 (
   IN UINT64  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 609eab6db456a6e90cbcce4b7e2a1d55324b377e..0e3428cd7a88d740cf514a20bf8c06dca89592a5 100644 (file)
@@ -49,7 +49,7 @@ SetMem (
   IN UINT8  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 87565f1c9a037efc0b9e003ca0f988020fbe51f4..e27851b077f8c59913c39c5e2cc2ef873050ffbe 100644 (file)
@@ -48,7 +48,7 @@ ZeroMem (
   IN UINTN  Length\r
   )\r
 {\r
-  ASSERT (!(Buffer == NULL && Length > 0));\r
+  ASSERT (!(NULL == Buffer && Length > 0));\r
   ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
   return InternalMemZeroMem (Buffer, Length);\r
 }\r
index ccd38e1aef581e04aabd9fd74b32146242ce5ee7..031b7fcec6456ad767d735d05b4ab9f71a632611 100644 (file)
@@ -58,7 +58,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r
index f957c8c85092ea184633ef341057bad46f9b4dd5..09c18255aa46de21ae9d8cafdbb8f5bb25a22513 100644 (file)
@@ -52,7 +52,7 @@ CopyMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return DestinationBuffer;\r
   }\r
   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
index c13cd462e4ef92c42a6e52d0bade16bae2cb1d07..cf364c1d1fd155a1bb0c20403267db1e055b7131 100644 (file)
@@ -80,22 +80,17 @@ CompareGuid (
   IN CONST GUID  *Guid2\r
   )\r
 {\r
-  UINT64 Guid1ValueLo;\r
-  UINT64 Guid1ValueHi;\r
-  UINT64 Guid2ValueLo;\r
-  UINT64 Guid2ValueHi;\r
+  UINT64  LowPartOfGuid1;\r
+  UINT64  LowPartOfGuid2;\r
+  UINT64  HighPartOfGuid1;\r
+  UINT64  HighPartOfGuid2;\r
 \r
-  Guid1ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid1);\r
-  Guid2ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid2);\r
+  LowPartOfGuid1  = ReadUnaligned64 ((CONST UINT64*) Guid1);\r
+  LowPartOfGuid2  = ReadUnaligned64 ((CONST UINT64*) Guid2);\r
+  HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);\r
+  HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);\r
 \r
-  Guid1ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid1 + 1);\r
-  Guid2ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid2 + 1);\r
-\r
-\r
-  return (BOOLEAN)\r
-           ((Guid1ValueLo == Guid2ValueLo) &&\r
-            (Guid1ValueHi == Guid2ValueHi)\r
-           );\r
+  return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);\r
 }\r
 \r
 /**\r
index ceddbbe7a05b30419497fa9c491fcbe03993c8b4..ce55f447c05afdd66ab392086545278f7143ba1d 100644 (file)
@@ -51,7 +51,7 @@ InternalMemCopyMem (
   Set Buffer to Value for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
   @param  Value Value of the set operation.\r
 \r
   @return Buffer\r
@@ -123,7 +123,7 @@ InternalMemSetMem64 (
   Set Buffer to 0 for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
 \r
   @return Buffer\r
 \r
index 1908788e7eaa6f8bd69023309a1b261b04462180..54abe1c356def40b11f5d80a76df067573f2bab4 100644 (file)
@@ -56,7 +56,7 @@ ScanMem16 (
   IN UINT16      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 896d60c208aee20776ec58db226807dabe002a6e..b91a38b973dae7ed3edb864c3f403e46fb3e4885 100644 (file)
@@ -56,7 +56,7 @@ ScanMem32 (
   IN UINT32      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index c9cc20316cccbeccae3429c17f049e87ecf381ae..f47d700c9b1bf2b16b91f8c8a7f292653273742e 100644 (file)
@@ -56,7 +56,7 @@ ScanMem64 (
   IN UINT64      Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
 \r
index 615a0b6171675d35cda2df43bd7059a61cee3d4a..8164e2a181c59ad3069610fbfad437ec235157bd 100644 (file)
@@ -54,7 +54,7 @@ ScanMem8 (
   IN UINT8       Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return NULL;\r
   }\r
   ASSERT (Buffer != NULL);\r
index 36ec277ada8c931a65b69edb31c6c0173054e7d7..0a9936bb9afee9374383fa9807a86da81f4630de 100644 (file)
@@ -55,7 +55,7 @@ SetMem16 (
   IN UINT16  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index e42a3a92a6ee1e4ce72b32f5fb6aec6835f0ef7d..d0015a3992ff290d08852d00987cfa49c517b345 100644 (file)
@@ -55,7 +55,7 @@ SetMem32 (
   IN UINT32  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 4ddbc689f17f1690a4888a5b17ecac007a4d1eab..408c074624252d7f7c81866d5ec8bb88c59c46ce 100644 (file)
@@ -55,7 +55,7 @@ SetMem64 (
   IN UINT64  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 609eab6db456a6e90cbcce4b7e2a1d55324b377e..0e3428cd7a88d740cf514a20bf8c06dca89592a5 100644 (file)
@@ -49,7 +49,7 @@ SetMem (
   IN UINT8  Value\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (0 == Length) {\r
     return Buffer;\r
   }\r
 \r
index 87565f1c9a037efc0b9e003ca0f988020fbe51f4..e27851b077f8c59913c39c5e2cc2ef873050ffbe 100644 (file)
@@ -48,7 +48,7 @@ ZeroMem (
   IN UINTN  Length\r
   )\r
 {\r
-  ASSERT (!(Buffer == NULL && Length > 0));\r
+  ASSERT (!(NULL == Buffer && Length > 0));\r
   ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
   return InternalMemZeroMem (Buffer, Length);\r
 }\r
index 7ed8f078fc8ac5adc92385093074c7e58bb002d3..36370ba4f71f458c075a797631467eeb3fd9e46d 100644 (file)
@@ -52,7 +52,7 @@ PeCoffLoaderGetEntryPoint (
   ASSERT (EntryPoint != NULL);\r
 \r
   DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
+  if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {\r
     //\r
     // DOS image header is present, so read the PE header after the DOS image header.\r
     //\r
@@ -104,7 +104,7 @@ PeCoffLoaderGetMachineType (
   ASSERT (Pe32Data != NULL);\r
 \r
   DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
+  if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {\r
     //\r
     // DOS image header is present, so read the PE header after the DOS image header.\r
     //\r
@@ -116,9 +116,9 @@ PeCoffLoaderGetMachineType (
     Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
   }\r
 \r
-  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
+  if (EFI_TE_IMAGE_HEADER_SIGNATURE == Hdr.Te->Signature) {\r
     return Hdr.Te->Machine;\r
-  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE)  {\r
+  } else if (EFI_IMAGE_NT_SIGNATURE == Hdr.Pe32->Signature)  {\r
     return Hdr.Pe32->FileHeader.Machine;\r
   }\r
 \r
@@ -168,7 +168,7 @@ PeCoffLoaderGetPdbPointer (
   NumberOfRvaAndSizes = 0;\r
 \r
   DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
+  if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {\r
     //\r
     // DOS image header is present, so read the PE header after the DOS image header.\r
     //\r
@@ -180,7 +180,7 @@ PeCoffLoaderGetPdbPointer (
     Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
   }\r
 \r
-  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
+  if (EFI_TE_IMAGE_HEADER_SIGNATURE == Hdr.Te->Signature) {\r
     if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) {\r
       DirectoryEntry  = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG];\r
       TEImageAdjust   = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize;\r
@@ -188,7 +188,7 @@ PeCoffLoaderGetPdbPointer (
                     Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress +\r
                     TEImageAdjust);\r
     }\r
-  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) {\r
+  } else if (EFI_IMAGE_NT_SIGNATURE == Hdr.Pe32->Signature) {\r
     //\r
     // NOTE: We use Machine field to identify PE32/PE32+, instead of Magic.\r
     //       It is due to backward-compatibility, for some system might\r
@@ -215,7 +215,7 @@ PeCoffLoaderGetPdbPointer (
       Magic = Hdr.Pe32->OptionalHeader.Magic;\r
     }\r
 \r
-    if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {\r
+    if (EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC == Magic) {\r
       //\r
       // Use PE32 offset get Debug Directory Entry\r
       //\r
@@ -239,12 +239,15 @@ PeCoffLoaderGetPdbPointer (
     return NULL;\r
   }\r
 \r
-  if (DebugEntry == NULL || DirectoryEntry == NULL) {\r
+  if (NULL == DebugEntry || NULL == DirectoryEntry) {\r
     return NULL;\r
   }\r
 \r
+  //\r
+  // Scan the directory to find the debug entry.\r
+  // \r
   for (DirCount = 0; DirCount < DirectoryEntry->Size; DirCount += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY), DebugEntry++) {\r
-    if (DebugEntry->Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {\r
+    if (EFI_IMAGE_DEBUG_TYPE_CODEVIEW == DebugEntry->Type) {\r
       if (DebugEntry->SizeOfData > 0) {\r
         CodeViewEntryPointer = (VOID *) ((UINTN) DebugEntry->RVA + ((UINTN)Pe32Data) + (UINTN)TEImageAdjust);\r
         switch (* (UINT32 *) CodeViewEntryPointer) {\r