Lines Matching full:checksum
29 * exception on bad checksum.
37 u8 checksum; in acpi_ut_verify_checksum() local
41 * They are the odd tables, have no standard ACPI header and no checksum in acpi_ut_verify_checksum()
48 /* Compute the checksum on the table */ in acpi_ut_verify_checksum()
51 checksum = in acpi_ut_verify_checksum()
53 table->checksum); in acpi_ut_verify_checksum()
55 /* Computed checksum matches table? */ in acpi_ut_verify_checksum()
57 if (checksum != table->checksum) { in acpi_ut_verify_checksum()
59 "Incorrect checksum in table [%4.4s] - 0x%2.2X, " in acpi_ut_verify_checksum()
61 table->signature, table->checksum, in acpi_ut_verify_checksum()
62 table->checksum - checksum)); in acpi_ut_verify_checksum()
82 * returns an exception on bad checksum.
89 u8 checksum; in acpi_ut_verify_cdat_checksum() local
91 /* Compute the checksum on the table */ in acpi_ut_verify_cdat_checksum()
93 checksum = acpi_ut_generate_checksum(ACPI_CAST_PTR(u8, cdat_table), in acpi_ut_verify_cdat_checksum()
95 cdat_table->checksum); in acpi_ut_verify_cdat_checksum()
97 /* Computed checksum matches table? */ in acpi_ut_verify_cdat_checksum()
99 if (checksum != cdat_table->checksum) { in acpi_ut_verify_cdat_checksum()
101 "Incorrect checksum in table [%4.4s] - 0x%2.2X, " in acpi_ut_verify_cdat_checksum()
103 acpi_gbl_CDAT, cdat_table->checksum, in acpi_ut_verify_cdat_checksum()
104 checksum)); in acpi_ut_verify_cdat_checksum()
111 cdat_table->checksum = checksum; in acpi_ut_verify_cdat_checksum()
121 * original_checksum - Value of the checksum field
123 * RETURN: 8 bit checksum of buffer
125 * DESCRIPTION: Computes an 8 bit checksum of the table.
131 u8 checksum; in acpi_ut_generate_checksum() local
135 checksum = acpi_ut_checksum((u8 *)table, length); in acpi_ut_generate_checksum()
137 /* Subtract off the existing checksum value in the table */ in acpi_ut_generate_checksum()
139 checksum = (u8)(checksum - original_checksum); in acpi_ut_generate_checksum()
141 /* Compute and return the final checksum */ in acpi_ut_generate_checksum()
143 checksum = (u8)(0 - checksum); in acpi_ut_generate_checksum()
144 return (checksum); in acpi_ut_generate_checksum()
154 * RETURN: Checksum (u8)
156 * DESCRIPTION: Calculates circular checksum of memory region.