/* This function calculates and updates a UINT8 checksum in an ACPI description table header. */
EFI_STATUS EFIAPI AcpiUpdateChecksum(IN OUT UINT8 *Buffer, IN UINTN Size)
/* This function calculates and updates a UINT8 checksum in an ACPI description table header. */
EFI_STATUS EFIAPI AcpiUpdateChecksum(IN OUT UINT8 *Buffer, IN UINTN Size)
{
  UINTN  ChecksumOffset;
  if ((Buffer == NULL) || (Size == 0)) {
    return EFI_INVALID_PARAMETER;
  }
  ChecksumOffset = OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, Checksum);
  Buffer[ChecksumOffset] = 0;
  Buffer[ChecksumOffset] = CalculateCheckSum8 (Buffer, Size);
  return EFI_SUCCESS;
}