/* This function computes and updates the ACPI table checksum. */
EFI_STATUS EFIAPI AcpiPlatformChecksum(IN EFI_ACPI_DESCRIPTION_HEADER *AcpiTable)
/* This function computes and updates the ACPI table checksum. */
EFI_STATUS EFIAPI AcpiPlatformChecksum(IN EFI_ACPI_DESCRIPTION_HEADER *AcpiTable)
{
  UINT8   *Ptr;
  UINT8   Sum;
  UINT32  Size;
  if (AcpiTable == NULL) {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  Ptr  = (UINT8 *)AcpiTable;
  Size = AcpiTable->Length;
  Sum  = 0;
  AcpiTable->Checksum = 0;
  while ((Size--) != 0) {
    Sum = (UINT8)(Sum + (*Ptr++));
  }
  AcpiTable->Checksum = (UINT8)(0xFF - Sum + 1);
  return EFI_SUCCESS;
}