/* This function also checks for duplicate ACPI Processor UIDs. */
STATIC EFI_STATUS AddGICCList(IN EFI_ACPI_6_5_GIC_STRUCTURE *Gicc, IN CONST CM_ARM_GICC_INFO *GicCInfo, IN UINT32 GicCCount, IN CONST UINT8 MadtRev)
/* This function also checks for duplicate ACPI Processor UIDs. */
STATIC EFI_STATUS AddGICCList(IN EFI_ACPI_6_5_GIC_STRUCTURE *Gicc, IN CONST CM_ARM_GICC_INFO *GicCInfo, IN UINT32 GicCCount, IN CONST UINT8 MadtRev)
{
  BOOLEAN  IsAcpiProcUidDuplicated;
  ASSERT (Gicc != NULL);
  ASSERT (GicCInfo != NULL);
  IsAcpiProcUidDuplicated = FindDuplicateValue (
                              GicCInfo,
                              GicCCount,
                              sizeof (CM_ARM_GICC_INFO),
                              IsAcpiUidEqual
                              );
  if (IsAcpiProcUidDuplicated) {
    return EFI_INVALID_PARAMETER;
  }
  while (GicCCount-- != 0) {
    AddGICC (Gicc++, GicCInfo++, MadtRev);
  }
  return EFI_SUCCESS;
}