/* ACPI 6.4, s6.4.2.9 "End Tag": "This checksum is generated such that adding it to the sum of all the data
bytes will produce a zero sum." "If the checksum field is zero, the resource data is treated as if the
checksum operation succeeded. Configuration proceeds normally." */
EFI_STATUS EFIAPI AmlRdSetEndTagChecksum(IN CONST AML_RD_HEADER *Header, IN UINT8 CheckSum)
/* ACPI 6.4, s6.4.2.9 "End Tag": "This checksum is generated such that adding it to the sum of all the data
bytes will produce a zero sum." "If the checksum field is zero, the resource data is treated as if the
checksum operation succeeded. Configuration proceeds normally." */
EFI_STATUS EFIAPI AmlRdSetEndTagChecksum(IN CONST AML_RD_HEADER *Header, IN UINT8 CheckSum)
{
  if ((Header == NULL)  ||
      !AmlRdCompareDescId (
         Header,
         AML_RD_BUILD_SMALL_DESC_ID (ACPI_SMALL_END_TAG_DESCRIPTOR_NAME)
         ))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  ((EFI_ACPI_END_TAG_DESCRIPTOR *)Header)->Checksum = CheckSum;
  return EFI_SUCCESS;
}