/* Checks and adjusts current CPU features per dependency relationship. */
BOOLEAN InsertToAfterEntry(IN LIST_ENTRY *FeatureList, IN LIST_ENTRY *CurrentEntry, IN UINT8 *FeatureMask)
/* Checks and adjusts current CPU features per dependency relationship. */
BOOLEAN InsertToAfterEntry(IN LIST_ENTRY *FeatureList, IN LIST_ENTRY *CurrentEntry, IN UINT8 *FeatureMask)
{
  LIST_ENTRY          *CheckEntry;
  CPU_FEATURES_ENTRY  *CheckFeature;
  BOOLEAN             Swapped;
  Swapped = FALSE;
  CheckEntry = GetNextNode (FeatureList, CurrentEntry);
  while (!IsNull (FeatureList, CheckEntry)) {
    CheckFeature = CPU_FEATURE_ENTRY_FROM_LINK (CheckEntry);
    if (IsBitMaskMatchCheck (CheckFeature->FeatureMask, FeatureMask)) {
      AdjustEntry (FeatureList, CheckEntry, CurrentEntry, FALSE);
      Swapped = TRUE;
      break;
    }
    CheckEntry = CheckEntry->ForwardLink;
  }
  return Swapped;
}