Home
last modified time | relevance | path

Searched refs:Sum (Results 1 – 21 of 21) 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.c1674 UINT16 Sum; in FvBufCalculateSum16() local
1676 Sum = 0; in FvBufCalculateSum16()
1682 Sum = (UINT16) (Sum + Buffer[Index]); in FvBufCalculateSum16()
1685 return (UINT16) Sum; in FvBufCalculateSum16()
1740 UINT8 Sum; in FvBufCalculateSum8() local
1742 Sum = 0; in FvBufCalculateSum8()
1748 Sum = (UINT8) (Sum + Buffer[Index]); in FvBufCalculateSum8()
1751 return Sum; in FvBufCalculateSum8()
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/
Dxa_profiler.h50 unsigned long Sum; member
59 double Sum;
87 p_prof->Sum += Curr; in xa_compute_mcps()
88 Ave = p_prof->Sum / (p_prof->frame_count-1); in xa_compute_mcps()
131 …rintf(stdout,"%5s Average MCPS = %f\n", x.id, (x.frame_count < 2) ? 0 : (x.Sum/(x.frame_count-1)))…
/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/FatPkg/EnhancedFatDxe/
DFileName.c388 UINT8 Sum; in FatCheckSum() local
389 Sum = 0; in FatCheckSum()
391 Sum = (UINT8)((((Sum & 1) != 0) ? 0x80 : 0) + (Sum >> 1) + *ShortNameString++); in FatCheckSum()
394 return Sum; in FatCheckSum()
/device/linaro/bootloader/edk2/ArmVirtPkg/XenAcpiPlatformDxe/
DXenAcpiPlatformDxe.c51 UINT8 Sum; in GetXenArmAcpiRsdp() local
79 Sum = CalculateSum8 ((CONST UINT8 *)RsdpStructurePtr, in GetXenArmAcpiRsdp()
81 if (Sum != 0) { in GetXenArmAcpiRsdp()
/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()
1668 Sum += *(Bulk + Len - 1); in NetblockChecksum()
1672 Sum += *(UINT16 *) 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.py329 Sum = 0
331 Sum += Item[0] * Item[1]
332 if self.Size < Sum:
334 % (FvObj.UiFvName, Sum, self.Size))
/device/linaro/bootloader/edk2/ShellPkg/Library/UefiShellNetwork1CommandsLib/
DPing.c161 UINT32 Sum; in NetChecksum() local
167 Sum = 0; in NetChecksum()
171 Sum += *Packet++; in NetChecksum()
175 Sum += *(UINT8 *) Packet; in NetChecksum()
178 Sum = (Sum & 0xffff) + (Sum >> 16); in NetChecksum()
183 Sum += Sum >> 16; in NetChecksum()
185 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.c1509 UINT8 Sum; in AcpiPlatformChecksum() local
1512 Sum = 0; in AcpiPlatformChecksum()
1527 Sum = (UINT8) (Sum + (*Ptr++)); in AcpiPlatformChecksum()
1533 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()