Пример #1
0
/**
 *
 *
 *   Initiates/synchronizes memory clear on all nodes with Dram on it.
 *
 *     @param[in,out]   *MemMainPtr   - Pointer to the MEM_MAIN_DATA_BLOCK
 *
 *     @return          TRUE -  No fatal error occurs.
 *     @return          FALSE - Fatal error occurs.
 */
BOOLEAN
MemMMctMemClr (
  IN OUT   MEM_MAIN_DATA_BLOCK *MemMainPtr
  )
{
  UINT8   Node;
  UINT8   NodeCnt;
  BOOLEAN RetVal;
  MEM_NB_BLOCK  *NBPtr;

  NBPtr = MemMainPtr->NBPtr;
  NodeCnt = MemMainPtr->DieCount;
  RetVal = TRUE;

  IDS_OPTION_HOOK (IDS_BEFORE_MEMCLR, NULL, &NBPtr->MemPtr->StdHeader);

  for (Node = 0; Node < NodeCnt; Node++) {
    NBPtr->FamilySpecificHook[DisableMemHoleMapping] (&NBPtr[Node], NULL);
  }

  for (Node = 0; Node < NodeCnt; Node++) {
    MemFMctMemClr_Init (&NBPtr[Node]);
  }

  for (Node = 0; Node < NodeCnt; Node++) {
    MemFMctMemClr_Sync (&NBPtr[Node]);
    RetVal &= (BOOLEAN) (NBPtr[Node].MCTPtr->ErrCode < AGESA_FATAL);
  }

  for (Node = 0; Node < NodeCnt; Node++) {
    NBPtr->FamilySpecificHook[RestoreMemHoleMapping] (&NBPtr[Node], NULL);
  }

  return RetVal;
}
Пример #2
0
/**
 *
 *
 *
 *
 *     @param[in,out]   *mmPtr   - Pointer to the MEM_MAIN_DATA_BLOCK
 *
 *     @return          TRUE -  No fatal error occurs.
 *     @return          FALSE - Fatal error occurs.
 */
BOOLEAN
MemMEcc (
  IN OUT   MEM_MAIN_DATA_BLOCK *mmPtr
  )
{
  UINT8 Die;
  DIE_STRUCT *MCTPtr;
  MEM_SHARED_DATA *SharedPtr;
  MEM_PARAMETER_STRUCT *RefPtr;
  BOOLEAN RetVal;

  RetVal = TRUE;
  RefPtr = mmPtr->MemPtr->ParameterListPtr;
  SharedPtr = mmPtr->mmSharedPtr;
  MCTPtr = mmPtr->NBPtr->MCTPtr;
  //
  // Run Northbridge-specific ECC initialization feature for each die.
  //
  SharedPtr->AllECC = FALSE;
  if (MCTPtr->Status[SbEccDimms] && RefPtr->EnableEccFeature) {
    SharedPtr->AllECC = TRUE;
    AGESA_TESTPOINT (TpProcMemEccInitialization, &(mmPtr->MemPtr->StdHeader));

    for (Die = 0 ; Die < mmPtr->DieCount ; Die ++ ) {
      mmPtr->NBPtr[Die].FeatPtr->CheckEcc (&(mmPtr->NBPtr[Die]));
      RetVal &= (BOOLEAN) (mmPtr->NBPtr[Die].MCTPtr->ErrCode < AGESA_FATAL);
    }
    if (SharedPtr->AllECC == TRUE) {
      RefPtr->GStatus[GsbAllECCDimms] = TRUE;
      // Sync mem clear before setting scrub rate.
      for (Die = 0; Die < mmPtr->DieCount; Die++) {
        MemFMctMemClr_Sync (&(mmPtr->NBPtr[Die]));
      }
    }
  }
  // Scrubber control
  for (Die = 0 ; Die < mmPtr->DieCount ; Die ++ ) {
    mmPtr->NBPtr[Die].FeatPtr->InitEcc (&(mmPtr->NBPtr[Die]));
  }
  return RetVal;
}