/** @file\r
Memory-only library functions with no library constructor/destructor\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation\r
+ Copyright (c) 2006 - 2008, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
If the Buffer is NULL, then ASSERT().\r
\r
- @param Uint16 Pointer to a 16-bit value that may be unaligned.\r
+ @param Buffer Pointer to a 16-bit value that may be unaligned.\r
\r
- @return *Uint16\r
+ @return The 16-bit value read from Buffer.\r
\r
**/\r
UINT16\r
EFIAPI\r
ReadUnaligned16 (\r
- IN CONST UINT16 *Uint16\r
+ IN CONST UINT16 *Buffer\r
);\r
\r
\r
\r
If the Buffer is NULL, then ASSERT().\r
\r
- @param Uint16 Pointer to a 16-bit value that may be unaligned.\r
+ @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 The 16-bit value to write to Buffer.\r
\r
**/\r
UINT16\r
EFIAPI\r
WriteUnaligned16 (\r
- OUT UINT16 *Uint16,\r
- IN UINT16 Value\r
+ OUT UINT16 *Buffer,\r
+ IN UINT16 Value\r
);\r
\r
\r
\r
@param Buffer Pointer to a 24-bit value that may be unaligned.\r
\r
- @return The value read from Buffer.\r
+ @return The 24-bit value read from Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
ReadUnaligned24 (\r
- IN CONST UINT32 *Buffer\r
+ IN CONST UINT32 *Buffer\r
);\r
\r
\r
@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 to Buffer.\r
+ @return The 24-bit value to write to Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
WriteUnaligned24 (\r
- OUT UINT32 *Buffer,\r
- IN UINT32 Value\r
+ OUT UINT32 *Buffer,\r
+ IN UINT32 Value\r
);\r
\r
\r
\r
If the Buffer is NULL, then ASSERT().\r
\r
- @param Uint32 Pointer to a 32-bit value that may be unaligned.\r
+ @param Buffer Pointer to a 32-bit value that may be unaligned.\r
\r
- @return Value read from Uint32\r
+ @return The 32-bit value read from Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
ReadUnaligned32 (\r
- IN CONST UINT32 *Uint32\r
+ IN CONST UINT32 *Buffer\r
);\r
\r
\r
\r
If the Buffer is NULL, then ASSERT().\r
\r
- @param Uint32 Pointer to a 32-bit value that may be unaligned.\r
+ @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 written to Uint32.\r
+ @return The 32-bit value to write to Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
WriteUnaligned32 (\r
- OUT UINT32 *Uint32,\r
- IN UINT32 Value\r
+ OUT UINT32 *Buffer,\r
+ IN UINT32 Value\r
);\r
\r
\r
\r
If the Buffer is NULL, then ASSERT().\r
\r
- @param Uint64 Pointer to a 64-bit value that may be unaligned.\r
+ @param Buffer Pointer to a 64-bit value that may be unaligned.\r
\r
- @return Value read from Uint64.\r
+ @return The 64-bit value read from Buffer.\r
\r
**/\r
UINT64\r
EFIAPI\r
ReadUnaligned64 (\r
- IN CONST UINT64 *Uint64\r
+ IN CONST UINT64 *Buffer\r
);\r
\r
\r
\r
If the Buffer is NULL, then ASSERT().\r
\r
- @param Uint64 Pointer to a 64-bit value that may be unaligned.\r
+ @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 written to Uint64.\r
+ @return The 64-bit value to write to Buffer.\r
\r
**/\r
UINT64\r
EFIAPI\r
WriteUnaligned64 (\r
- OUT UINT64 *Uint64,\r
- IN UINT64 Value\r
+ OUT UINT64 *Buffer,\r
+ IN UINT64 Value\r
);\r
\r
\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 64);\r
return InternalMathARShiftU64 (Operand, Count);\r
}\r
/** @file\r
Bit field functions of BaseLib.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN EndBit\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 8);\r
ASSERT (StartBit <= EndBit);\r
return (UINT8)BitFieldReadUint (Operand, StartBit, EndBit);\r
}\r
IN UINT8 Value\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 8);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldAndThenOr8 (Operand, StartBit, EndBit, 0, Value);\r
}\r
IN UINT8 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 8);\r
ASSERT (StartBit <= EndBit);\r
return (UINT8)BitFieldOrUint (Operand, StartBit, EndBit, OrData);\r
}\r
IN UINT8 AndData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 8);\r
ASSERT (StartBit <= EndBit);\r
return (UINT8)BitFieldAndUint (Operand, StartBit, EndBit, AndData);\r
}\r
IN UINT8 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 8);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldOr8 (\r
BitFieldAnd8 (Operand, StartBit, EndBit, AndData),\r
IN UINTN EndBit\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 16);\r
ASSERT (StartBit <= EndBit);\r
return (UINT16)BitFieldReadUint (Operand, StartBit, EndBit);\r
}\r
IN UINT16 Value\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 16);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldAndThenOr16 (Operand, StartBit, EndBit, 0, Value);\r
}\r
IN UINT16 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 16);\r
ASSERT (StartBit <= EndBit);\r
return (UINT16)BitFieldOrUint (Operand, StartBit, EndBit, OrData);\r
}\r
IN UINT16 AndData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 16);\r
ASSERT (StartBit <= EndBit);\r
return (UINT16)BitFieldAndUint (Operand, StartBit, EndBit, AndData);\r
}\r
IN UINT16 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 16);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldOr16 (\r
BitFieldAnd16 (Operand, StartBit, EndBit, AndData),\r
IN UINTN EndBit\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 32);\r
ASSERT (StartBit <= EndBit);\r
return (UINT32)BitFieldReadUint (Operand, StartBit, EndBit);\r
}\r
IN UINT32 Value\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 32);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldAndThenOr32 (Operand, StartBit, EndBit, 0, Value);\r
}\r
IN UINT32 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 32);\r
ASSERT (StartBit <= EndBit);\r
return (UINT32)BitFieldOrUint (Operand, StartBit, EndBit, OrData);\r
}\r
IN UINT32 AndData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 32);\r
ASSERT (StartBit <= EndBit);\r
return (UINT32)BitFieldAndUint (Operand, StartBit, EndBit, AndData);\r
}\r
IN UINT32 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 32);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldOr32 (\r
BitFieldAnd32 (Operand, StartBit, EndBit, AndData),\r
IN UINTN EndBit\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 64);\r
ASSERT (StartBit <= EndBit);\r
return RShiftU64 (Operand & ~LShiftU64 ((UINT64)-2, EndBit), StartBit);\r
}\r
IN UINT64 Value\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 64);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldAndThenOr64 (Operand, StartBit, EndBit, 0, Value);\r
}\r
UINT64 Value1;\r
UINT64 Value2;\r
\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 64);\r
ASSERT (StartBit <= EndBit);\r
\r
Value1 = LShiftU64 (OrData, StartBit);\r
UINT64 Value1;\r
UINT64 Value2;\r
\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 64);\r
ASSERT (StartBit <= EndBit);\r
\r
Value1 = LShiftU64 (~AndData, StartBit);\r
IN UINT64 OrData\r
)\r
{\r
- ASSERT (EndBit < sizeof (Operand) * 8);\r
+ ASSERT (EndBit < 64);\r
ASSERT (StartBit <= EndBit);\r
return BitFieldOr64 (\r
BitFieldAnd64 (Operand, StartBit, EndBit, AndData),\r
/** @file\r
Unaligned access functions of BaseLib for IPF.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
#include <BaseLibInternals.h>\r
\r
/**\r
\r
@param Buffer Pointer to a 16-bit value that may be unaligned.\r
\r
- @return *Uint16\r
+ @return The 16-bit value read from Buffer.\r
\r
**/\r
UINT16\r
EFIAPI\r
ReadUnaligned16 (\r
- IN CONST UINT16 *Buffer\r
+ IN CONST UINT16 *Buffer\r
)\r
{\r
ASSERT (Buffer != NULL);\r
@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 The 16-bit value to write to Buffer.\r
\r
**/\r
UINT16\r
EFIAPI\r
WriteUnaligned16 (\r
- OUT UINT16 *Buffer,\r
- IN UINT16 Value\r
+ OUT UINT16 *Buffer,\r
+ IN UINT16 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
\r
@param Buffer Pointer to a 24-bit value that may be unaligned.\r
\r
- @return The value read.\r
+ @return The 24-bit value read from Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
ReadUnaligned24 (\r
- IN CONST UINT32 *Buffer\r
+ IN CONST UINT32 *Buffer\r
)\r
{\r
ASSERT (Buffer != NULL);\r
@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 24-bit value to write to Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
WriteUnaligned24 (\r
- OUT UINT32 *Buffer,\r
- IN UINT32 Value\r
+ OUT UINT32 *Buffer,\r
+ IN UINT32 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
\r
@param Buffer Pointer to a 32-bit value that may be unaligned.\r
\r
- @return *Uint32\r
+ @return The 32-bit value read from Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
ReadUnaligned32 (\r
- IN CONST UINT32 *Buffer\r
+ IN CONST UINT32 *Buffer\r
)\r
{\r
UINT16 LowerBytes;\r
@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 The 32-bit value to write to Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
WriteUnaligned32 (\r
- OUT UINT32 *Buffer,\r
- IN UINT32 Value\r
+ OUT UINT32 *Buffer,\r
+ IN UINT32 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
\r
@param Buffer Pointer to a 64-bit value that may be unaligned.\r
\r
- @return *Uint64\r
+ @return The 64-bit value read from Buffer.\r
\r
**/\r
UINT64\r
EFIAPI\r
ReadUnaligned64 (\r
- IN CONST UINT64 *Buffer\r
+ IN CONST UINT64 *Buffer\r
)\r
{\r
UINT32 LowerBytes;\r
@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 The 64-bit value to write to Buffer.\r
\r
**/\r
UINT64\r
EFIAPI\r
WriteUnaligned64 (\r
- OUT UINT64 *Buffer,\r
- IN UINT64 Value\r
+ OUT UINT64 *Buffer,\r
+ IN UINT64 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 32);\r
return (Operand << Count) | (Operand >> (32 - Count));\r
}\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 64);\r
return InternalMathLRotU64 (Operand, Count);\r
}\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 64);\r
return InternalMathLShiftU64 (Operand, Count);\r
}\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 32);\r
return (Operand >> Count) | (Operand << (32 - Count));\r
}\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 64);\r
return InternalMathRRotU64 (Operand, Count);\r
}\r
/** @file\r
Math worker functions.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
+ Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-\r
-\r
-\r
#include "BaseLibInternals.h"\r
\r
/**\r
IN UINTN Count\r
)\r
{\r
- ASSERT (Count < sizeof (Operand) * 8);\r
+ ASSERT (Count < 64);\r
return InternalMathRShiftU64 (Operand, Count);\r
}\r
/** @file\r
Unaligned access functions of BaseLib.\r
\r
- Copyright (c) 2006, Intel Corporation\r
+ Copyright (c) 2006 - 2008, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
@param Buffer Pointer to a 16-bit value that may be unaligned.\r
\r
- @return Data read from Buffer.\r
+ @return The 16-bit value read from Buffer.\r
\r
**/\r
UINT16\r
EFIAPI\r
ReadUnaligned16 (\r
- IN CONST UINT16 *Buffer\r
+ IN CONST UINT16 *Buffer\r
)\r
{\r
ASSERT (Buffer != NULL);\r
@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 written to Buffer\r
+ @return The 16-bit value to write to Buffer.\r
\r
**/\r
UINT16\r
EFIAPI\r
WriteUnaligned16 (\r
- OUT UINT16 *Buffer,\r
- IN UINT16 Value\r
+ OUT UINT16 *Buffer,\r
+ IN UINT16 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
\r
@param Buffer Pointer to a 24-bit value that may be unaligned.\r
\r
- @return The value read from Buffer.\r
+ @return The 24-bit value read from Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
ReadUnaligned24 (\r
- IN CONST UINT32 *Buffer\r
+ IN CONST UINT32 *Buffer\r
)\r
{\r
ASSERT (Buffer != NULL);\r
@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 to Buffer.\r
+ @return The 24-bit value to write to Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
WriteUnaligned24 (\r
- OUT UINT32 *Buffer,\r
- IN UINT32 Value\r
+ OUT UINT32 *Buffer,\r
+ IN UINT32 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
\r
@param Buffer Pointer to a 32-bit value that may be unaligned.\r
\r
- @return Data read from Buffer.\r
+ @return The 32-bit value read from Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
ReadUnaligned32 (\r
- IN CONST UINT32 *Buffer\r
+ IN CONST UINT32 *Buffer\r
)\r
{\r
ASSERT (Buffer != NULL);\r
@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 written to Buffer\r
+ @return The 32-bit value to write to Buffer.\r
\r
**/\r
UINT32\r
EFIAPI\r
WriteUnaligned32 (\r
- OUT UINT32 *Buffer,\r
- IN UINT32 Value\r
+ OUT UINT32 *Buffer,\r
+ IN UINT32 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r
\r
@param Buffer Pointer to a 64-bit value that may be unaligned.\r
\r
- @return Data read from Buffer.\r
+ @return The 64-bit value read from Buffer.\r
\r
**/\r
UINT64\r
EFIAPI\r
ReadUnaligned64 (\r
- IN CONST UINT64 *Buffer\r
+ IN CONST UINT64 *Buffer\r
)\r
{\r
ASSERT (Buffer != NULL);\r
@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 written to Buffer.\r
+ @return The 64-bit value to write to Buffer.\r
\r
**/\r
UINT64\r
EFIAPI\r
WriteUnaligned64 (\r
- OUT UINT64 *Buffer,\r
- IN UINT64 Value\r
+ OUT UINT64 *Buffer,\r
+ IN UINT64 Value\r
)\r
{\r
ASSERT (Buffer != NULL);\r