Example #1
0
/**
 * FchInitEnv - Config Fch before PCI emulation
 *
 *
 *
 * @param[in] EnvParams
 *
 */
AGESA_STATUS
FchInitEnv (
  IN       AMD_ENV_PARAMS            *EnvParams
  )
{
  UINT8               i;
  UINT8               Data;
  FCH_DATA_BLOCK      *FchParams;
  AGESA_STATUS        Status;

  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitEnv Enter... \n");
  FchParams = FchInitEnvCreatePrivateData (EnvParams);

  // Override internal data with IDS (Optional, internal build only)
  IDS_OPTION_CALLOUT (IDS_CALLOUT_FCH_INIT_ENV, FchParams, FchParams->StdHeader);

  //
  //to_do-Initialize PCI IRQ routing registers for INTA#-INTH#
  //
  for (i = 0; i < 8; i++) {
    Data = i | BIT7;                                  // Select IRQ routing to APIC
    LibAmdIoWrite (AccessWidth8, FCH_IOMAP_REGC00, &Data, &EnvParams->StdHeader);
    Data = i | BIT4;
    LibAmdIoWrite (AccessWidth8, FCH_IOMAP_REGC01, &Data, &EnvParams->StdHeader);
  }

  AgesaFchOemCallout (FchParams);
  Status = FchTaskLauncher (&FchInitEnvTaskTable[0], FchParams);
  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitEnv Exit... Status = [0x%x]\n", Status);
  return Status;
}
Example #2
0
VOID
FchInitS3EarlyRestore (
  IN      FCH_DATA_BLOCK     *FchDataPtr
  )
{
  AGESA_STATUS    AgesaStatus;

  FchDataPtr->Misc.S3Resume = 1;
  AgesaStatus = FchTaskLauncher (&FchInitS3EarlyTaskTable[0], FchDataPtr, TpFchInitS3EarlyDispatching);
  FchDataPtr->Misc.S3Resume = 0;
}
Example #3
0
VOID
FchInitS3LateRestore (
  IN      FCH_DATA_BLOCK     *FchDataPtr
  )
{
  AGESA_STATUS    AgesaStatus;

  FchDataPtr->Misc.S3Resume = 1;
  AgesaStatus = FchTaskLauncher (&FchInitS3LateTaskTable[0], FchDataPtr);
  FchDataPtr->Misc.S3Resume = 0;
}
Example #4
0
/**
 *  FchInitLate - Prepare Fch to boot to OS.
 *
 *
 *
 * @param[in] LateParams
 *
 */
AGESA_STATUS
FchInitLate (
  IN      FCH_DATA_BLOCK     *LateParams
  )
{
  AGESA_STATUS        Status;

  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitLate Enter... \n");
  Status = FchTaskLauncher (&FchInitLateTaskTable[0], LateParams, TpFchInitLateDispatching);
  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitLate Exit... Status = [0x%x]\n", Status);
  return Status;
}
Example #5
0
/**
 *  FchInitMid - Config Fch after PCI emulation
 *
 *
 *
 * @param[in] MidParams Fch configuration structure pointer.
 *
 */
AGESA_STATUS
FchInitMid (
  IN  AMD_MID_PARAMS     *MidParams
  )
{
  FCH_DATA_BLOCK      *FchParams;
  AGESA_STATUS        Status;

  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitMid Enter... \n");
  FchParams = FchInitLoadDataBlock (&MidParams->FchInterface, &MidParams->StdHeader);
  Status = FchTaskLauncher (&FchInitMidTaskTable[0], FchParams, TpFchInitMidDispatching);
  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitMid Exit... Status = [0x%x]\n", Status);
  return Status;
}
Example #6
0
/**
 * FchInitEnv - Config Fch before PCI emulation
 *
 *
 *
 * @param[in] EnvParams
 *
 */
AGESA_STATUS
FchInitEnv (
  IN       AMD_ENV_PARAMS            *EnvParams
  )
{
  FCH_DATA_BLOCK      *FchParams;
  AGESA_STATUS        Status;

  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitEnv Enter... \n");
  FchParams = FchInitEnvCreatePrivateData (EnvParams);

  // Override internal data with IDS (Optional, internal build only)
  IDS_OPTION_CALLOUT (IDS_CALLOUT_FCH_INIT_ENV, FchParams, FchParams->StdHeader);

  AgesaFchOemCallout (FchParams);
  Status = FchTaskLauncher (&FchInitEnvTaskTable[0], FchParams, TpFchInitEnvDispatching);
  IDS_HDT_CONSOLE (FCH_TRACE, "  FchInitEnv Exit... Status = [0x%x]\n", Status);
  return Status;
}
Example #7
0
/**
 * FchInitReset - Config Fch during power on stage.
 *
 *
 *
 * @param[in] ResetParams
 *
 */
AGESA_STATUS
FchInitReset (
  IN  AMD_RESET_PARAMS     *ResetParams
  )
{
  FCH_RESET_DATA_BLOCK          FchParams;

  // Load private data block with default
  FchInitResetLoadPrivateDefault (&FchParams, &ResetParams->StdHeader);

  // Override external data with input parameters
  FchParams.StdHeader = &ResetParams->StdHeader;
  FchParams.FchReset = &ResetParams->FchInterface;

  // Override internal data with IDS (Optional, internal build only)
  IDS_OPTION_CALLOUT (IDS_CALLOUT_FCH_INIT_RESET, &FchParams, &ResetParams->StdHeader);

  AgesaFchOemCallout (&FchParams);
  return FchTaskLauncher (&FchInitResetTaskTable[0], &FchParams);
}