Home
last modified time | relevance | path

Searched refs:Sum (Results 1 – 18 of 18) sorted by relevance

/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/
DCheckSum.c45 UINT8 Sum; in CalculateSum8() local
51 for (Sum = 0, Count = 0; Count < Length; Count++) { in CalculateSum8()
52 Sum = (UINT8) (Sum + *(Buffer + Count)); in CalculateSum8()
55 return Sum; in CalculateSum8()
121 UINT16 Sum; in CalculateSum16() local
130 for (Sum = 0, Count = 0; Count < Length; Count++) { in CalculateSum16()
131 Sum = (UINT16) (Sum + *(Buffer + Count)); in CalculateSum16()
134 return Sum; in CalculateSum16()
202 UINT32 Sum; in CalculateSum32() local
211 for (Sum = 0, Count = 0; Count < Length; Count++) { in CalculateSum32()
[all …]
/device/linaro/bootloader/edk2/MdePkg/Library/BaseLib/
DCheckSum.c43 UINT8 Sum; in CalculateSum8() local
49 for (Sum = 0, Count = 0; Count < Length; Count++) { in CalculateSum8()
50 Sum = (UINT8) (Sum + *(Buffer + Count)); in CalculateSum8()
53 return Sum; in CalculateSum8()
118 UINT16 Sum; in CalculateSum16() local
128 for (Sum = 0, Count = 0; Count < Total; Count++) { in CalculateSum16()
129 Sum = (UINT16) (Sum + *(Buffer + Count)); in CalculateSum16()
132 return Sum; in CalculateSum16()
200 UINT32 Sum; in CalculateSum32() local
210 for (Sum = 0, Count = 0; Count < Total; Count++) { in CalculateSum32()
[all …]
/device/linaro/bootloader/edk2/EmulatorPkg/Library/SecPeiServicesLib/
DFwVol.c78 UINT8 Sum; in CalculateHeaderChecksum() local
80 Sum = 0; in CalculateHeaderChecksum()
84 Sum = (UINT8) (Sum + ptr[Index]); in CalculateHeaderChecksum()
85 Sum = (UINT8) (Sum + ptr[Index + 1]); in CalculateHeaderChecksum()
86 Sum = (UINT8) (Sum + ptr[Index + 2]); in CalculateHeaderChecksum()
87 Sum = (UINT8) (Sum + ptr[Index + 3]); in CalculateHeaderChecksum()
91 Sum = (UINT8) (Sum + ptr[Index]); in CalculateHeaderChecksum()
96 Sum = (UINT8) (Sum - FileHeader->State); in CalculateHeaderChecksum()
100 Sum = (UINT8) (Sum - FileHeader->IntegrityCheck.Checksum.File); in CalculateHeaderChecksum()
102 return Sum; in CalculateHeaderChecksum()
/device/linaro/bootloader/edk2/Nt32Pkg/Sec/
DFwVol.c82 UINT8 Sum; in CalculateHeaderChecksum() local
84 Sum = 0; in CalculateHeaderChecksum()
88 Sum = (UINT8) (Sum + ptr[Index]); in CalculateHeaderChecksum()
89 Sum = (UINT8) (Sum + ptr[Index + 1]); in CalculateHeaderChecksum()
90 Sum = (UINT8) (Sum + ptr[Index + 2]); in CalculateHeaderChecksum()
91 Sum = (UINT8) (Sum + ptr[Index + 3]); in CalculateHeaderChecksum()
95 Sum = (UINT8) (Sum + ptr[Index]); in CalculateHeaderChecksum()
100 Sum = (UINT8) (Sum - FileHeader->State); in CalculateHeaderChecksum()
104 Sum = (UINT8) (Sum - FileHeader->IntegrityCheck.Checksum.File); in CalculateHeaderChecksum()
106 return Sum; in CalculateHeaderChecksum()
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Sample/Tools/Source/Common/
DCommonLib.c305 UINT8 Sum; in CalculateSum8() local
307 Sum = 0; in CalculateSum8()
313 Sum = (UINT8) (Sum + Buffer[Index]); in CalculateSum8()
316 return Sum; in CalculateSum8()
367 UINT16 Sum; in CalculateSum16() local
369 Sum = 0; in CalculateSum16()
375 Sum = (UINT16) (Sum + Buffer[Index]); in CalculateSum16()
378 return (UINT16) Sum; in CalculateSum16()
/device/linaro/bootloader/edk2/EmbeddedPkg/Library/PrePiLib/
DFwVol.c79 UINT8 Sum; in CalculateHeaderChecksum() local
81 Sum = 0; in CalculateHeaderChecksum()
85 Sum = (UINT8)(Sum + Ptr[Index]); in CalculateHeaderChecksum()
86 Sum = (UINT8)(Sum + Ptr[Index+1]); in CalculateHeaderChecksum()
87 Sum = (UINT8)(Sum + Ptr[Index+2]); in CalculateHeaderChecksum()
88 Sum = (UINT8)(Sum + Ptr[Index+3]); in CalculateHeaderChecksum()
92 Sum = (UINT8)(Sum + Ptr[Index]); in CalculateHeaderChecksum()
98 Sum = (UINT8)(Sum - FileHeader->State); in CalculateHeaderChecksum()
102 Sum = (UINT8)(Sum - FileHeader->IntegrityCheck.Checksum.File); in CalculateHeaderChecksum()
104 return Sum; in CalculateHeaderChecksum()
/device/linaro/bootloader/edk2/BaseTools/Source/C/Common/
DCommonLib.c369 UINT8 Sum; in CalculateSum8() local
371 Sum = 0; in CalculateSum8()
377 Sum = (UINT8) (Sum + Buffer[Index]); in CalculateSum8()
380 return Sum; in CalculateSum8()
431 UINT16 Sum; in CalculateSum16() local
433 Sum = 0; in CalculateSum16()
439 Sum = (UINT16) (Sum + Buffer[Index]); in CalculateSum16()
442 return (UINT16) Sum; in CalculateSum16()
DFirmwareVolumeBuffer.c1670 UINT16 Sum; in FvBufCalculateSum16() local
1672 Sum = 0; in FvBufCalculateSum16()
1678 Sum = (UINT16) (Sum + Buffer[Index]); in FvBufCalculateSum16()
1681 return (UINT16) Sum; in FvBufCalculateSum16()
1736 UINT8 Sum; in FvBufCalculateSum8() local
1738 Sum = 0; in FvBufCalculateSum8()
1744 Sum = (UINT8) (Sum + Buffer[Index]); in FvBufCalculateSum8()
1747 return Sum; in FvBufCalculateSum8()
/device/linaro/bootloader/edk2/ArmPkg/Library/DebugAgentSymbolsBaseLib/
DDebugAgentSymbolsBaseLib.c89 UINT8 Sum; in CalculateHeaderChecksum() local
92 Sum = CalculateSum8 ((CONST VOID*)FileHeader,sizeof(EFI_FFS_FILE_HEADER)); in CalculateHeaderChecksum()
95 Sum = (UINT8)(Sum - FileHeader->State); in CalculateHeaderChecksum()
98 Sum = (UINT8)(Sum - FileHeader->IntegrityCheck.Checksum.File); in CalculateHeaderChecksum()
100 return Sum; in CalculateHeaderChecksum()
/device/linaro/bootloader/edk2/OvmfPkg/AcpiPlatformDxe/
DXen.c68 UINT8 Sum; in GetXenAcpiRsdp() local
85 Sum = CalculateSum8 ( in GetXenAcpiRsdp()
89 if (Sum != 0) { in GetXenAcpiRsdp()
97 Sum = CalculateSum8 ( in GetXenAcpiRsdp()
101 if (Sum != 0) { in GetXenAcpiRsdp()
/device/linaro/bootloader/edk2/CorebootModulePkg/Library/CbParseLib/
DCbParseLib.c61 UINT32 Sum, TmpValue; in CbCheckSum16() local
65 Sum = 0; in CbCheckSum16()
73 Sum += TmpValue; in CbCheckSum16()
76 if (Sum >= 0x10000) { in CbCheckSum16()
77 Sum = (Sum + (Sum >> 16)) & 0xFFFF; in CbCheckSum16()
81 return (UINT16)((~Sum) & 0xFFFF); in CbCheckSum16()
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/
DNetBuffer.c1660 register UINT32 Sum; in NetblockChecksum() local
1662 Sum = 0; in NetblockChecksum()
1665 Sum += *(UINT16 *) Bulk; in NetblockChecksum()
1674 Sum += *(UINT8 *) Bulk; in NetblockChecksum()
1680 while ((Sum >> 16) != 0) { in NetblockChecksum()
1681 Sum = (Sum & 0xffff) + (Sum >> 16); in NetblockChecksum()
1685 return (UINT16) Sum; in NetblockChecksum()
1705 UINT32 Sum; in NetAddChecksum() local
1707 Sum = Checksum1 + Checksum2; in NetAddChecksum()
1712 if ((Sum >> 16) != 0) { in NetAddChecksum()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Enquire/
DEnquire.c2148 #undef Sum
2204 #define Sum fSum
2292 #define Sum dSum
2382 #define Sum ldSum
2642 Number Sum ARGS2(Number, a, Number, b) {Number r; Store(a+b, &r); return r; }
2799 do { a=Sum(a, a); }
2800 while (Diff(Diff(Sum(a, ONE), a), ONE) == ZERO);
2812 do { b=Sum(b, b); } while ((base=Diff(Sum(a, b), a)) == ZERO);
2837 while (Diff(Diff(Sum(b, ONE), b), ONE) == ZERO);
2849 if (Diff(Sum(a, basem1), a) != ZERO) {
[all …]
/device/linaro/bootloader/edk2/BaseTools/Source/Python/GenFds/
DRegion.py338 Sum = 0
340 Sum += Item[0] * Item[1]
341 if self.Size < Sum:
343 % (FvObj.UiFvName, Sum, self.Size))
/device/linaro/bootloader/edk2/ShellPkg/Library/UefiShellNetwork1CommandsLib/
DPing.c155 UINT32 Sum; in NetChecksum() local
161 Sum = 0; in NetChecksum()
165 Sum += *Packet++; in NetChecksum()
169 Sum += *(UINT8 *) Packet; in NetChecksum()
172 Sum = (Sum & 0xffff) + (Sum >> 16); in NetChecksum()
177 Sum += Sum >> 16; in NetChecksum()
179 return (UINT16) Sum; in NetChecksum()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Parser/
Dasdl.py150 return Sum(sum)
159 return Sum(sum, attributes)
277 class Sum(AST): class
/device/linaro/bootloader/edk2/MdeModulePkg/Universal/Acpi/AcpiTableDxe/
DAcpiTableProtocol.c1465 UINT8 Sum; in AcpiPlatformChecksum() local
1468 Sum = 0; in AcpiPlatformChecksum()
1483 Sum = (UINT8) (Sum + (*Ptr++)); in AcpiPlatformChecksum()
1489 Ptr[ChecksumOffset] = (UINT8) (0xff - Sum + 1); in AcpiPlatformChecksum()
/device/linaro/bootloader/edk2/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/
DAcpiSupportAcpiSupportProtocol.c1639 UINT8 Sum; in AcpiPlatformChecksum() local
1642 Sum = 0; in AcpiPlatformChecksum()
1657 Sum = (UINT8) (Sum + (*Ptr++)); in AcpiPlatformChecksum()
1663 Ptr[ChecksumOffset] = (UINT8) (0xff - Sum + 1); in AcpiPlatformChecksum()