2
#include "xc_dom_ia64_util.h"
4
#include <acpi/actables.h>
6
/* stolen from xen/drivers/acpi/tables/tbutils.c */
8
/*******************************************************************************
10
* FUNCTION: acpi_tb_checksum
12
* PARAMETERS: Buffer - Pointer to memory region to be checked
13
* Length - Length of this memory region
15
* RETURN: Checksum (u8)
17
* DESCRIPTION: Calculates circular checksum of memory region.
19
******************************************************************************/
21
u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length)
24
u8 *end = buffer + length;
26
while (buffer < end) {
27
sum = (u8) (sum + *(buffer++));