TianoCore EDK2 master

#include "BaseLibInternals.h"
Go to the source code of this file.
Functions  
UINT8 EFIAPI  CalculateSum8 (IN CONST UINT8 *Buffer, IN UINTN Length) 
UINT8 EFIAPI  CalculateCheckSum8 (IN CONST UINT8 *Buffer, IN UINTN Length) 
UINT16 EFIAPI  CalculateSum16 (IN CONST UINT16 *Buffer, IN UINTN Length) 
UINT16 EFIAPI  CalculateCheckSum16 (IN CONST UINT16 *Buffer, IN UINTN Length) 
UINT32 EFIAPI  CalculateSum32 (IN CONST UINT32 *Buffer, IN UINTN Length) 
UINT32 EFIAPI  CalculateCheckSum32 (IN CONST UINT32 *Buffer, IN UINTN Length) 
UINT64 EFIAPI  CalculateSum64 (IN CONST UINT64 *Buffer, IN UINTN Length) 
UINT64 EFIAPI  CalculateCheckSum64 (IN CONST UINT64 *Buffer, IN UINTN Length) 
UINT32 EFIAPI  CalculateCrc32 (IN VOID *Buffer, IN UINTN Length) 
Variables  
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT32  mCrcTable [256] 
Utility functions to generate checksum based on 2's complement algorithm.
Copyright (c) 2007  2018, Intel Corporation. All rights reserved.
SPDXLicenseIdentifier: BSD2ClausePatent
Definition in file CheckSum.c.
Returns the two's complement checksum of all elements in a buffer of 16bit values.
This function first calculates the sum of the 16bit values in the buffer specified by Buffer and Length. The carry bits in the result of addition are dropped. Then, the two's complement of the sum is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 16bit boundary, then ASSERT(). If Length is not aligned on a 16bit boundary, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the checksum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 150 of file CheckSum.c.
Returns the two's complement checksum of all elements in a buffer of 32bit values.
This function first calculates the sum of the 32bit values in the buffer specified by Buffer and Length. The carry bits in the result of addition are dropped. Then, the two's complement of the sum is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 32bit boundary, then ASSERT(). If Length is not aligned on a 32bit boundary, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the checksum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 230 of file CheckSum.c.
Returns the two's complement checksum of all elements in a buffer of 64bit values.
This function first calculates the sum of the 64bit values in the buffer specified by Buffer and Length. The carry bits in the result of addition are dropped. Then, the two's complement of the sum is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 64bit boundary, then ASSERT(). If Length is not aligned on a 64bit boundary, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the checksum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 310 of file CheckSum.c.
Returns the two's complement checksum of all elements in a buffer of 8bit values.
This function first calculates the sum of the 8bit values in the buffer specified by Buffer and Length. The carry bits in the result of addition are dropped. Then, the two's complement of the sum is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the checksum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 70 of file CheckSum.c.
Computes and returns a 32bit CRC for a data buffer. CRC32 value bases on ITUT V.42.
If Buffer is NULL, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
[in]  Buffer  A pointer to the buffer on which the 32bit CRC is to be computed. 
[in]  Length  The number of bytes in the buffer Data. 
Crc32  The 32bit CRC was computed for the data buffer. 
Definition at line 599 of file CheckSum.c.
Returns the sum of all elements in a buffer of 16bit values. During calculation, the carry bits are dropped.
This function calculates the sum of the 16bit values in the buffer specified by Buffer and Length. The carry bits in result of addition are dropped. The 16bit result is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 16bit boundary, then ASSERT(). If Length is not aligned on a 16bit boundary, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the sum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 106 of file CheckSum.c.
Returns the sum of all elements in a buffer of 32bit values. During calculation, the carry bits are dropped.
This function calculates the sum of the 32bit values in the buffer specified by Buffer and Length. The carry bits in result of addition are dropped. The 32bit result is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 32bit boundary, then ASSERT(). If Length is not aligned on a 32bit boundary, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the sum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 186 of file CheckSum.c.
Returns the sum of all elements in a buffer of 64bit values. During calculation, the carry bits are dropped.
This function calculates the sum of the 64bit values in the buffer specified by Buffer and Length. The carry bits in result of addition are dropped. The 64bit result is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 64bit boundary, then ASSERT(). If Length is not aligned on a 64bit boundary, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the sum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 266 of file CheckSum.c.
Returns the sum of all elements in a buffer in unit of UINT8. During calculation, the carry bits are dropped.
This function calculates the sum of all elements in a buffer in unit of UINT8. The carry bits in result of addition are dropped. The result is returned as UINT8. If Length is Zero, then Zero is returned.
If Buffer is NULL, then ASSERT(). If Length is greater than (MAX_ADDRESS  Buffer + 1), then ASSERT().
Buffer  The pointer to the buffer to carry out the sum operation. 
Length  The size, in bytes, of Buffer. 
Definition at line 32 of file CheckSum.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT32 mCrcTable[256] 
Definition at line 325 of file CheckSum.c.