本文整理汇总了C++中MEM_NB_BLOCK类的典型用法代码示例。如果您正苦于以下问题:C++ MEM_NB_BLOCK类的具体用法?C++ MEM_NB_BLOCK怎么用?C++ MEM_NB_BLOCK使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MEM_NB_BLOCK类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MemTTrainDQSEdgeDetectSw
BOOLEAN
MemTTrainDQSEdgeDetectSw (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
MEM_NB_BLOCK *NBPtr;
BOOLEAN Status;
Status = FALSE;
NBPtr = TechPtr->NBPtr;
TechPtr->TrainingType = TRN_DQS_POSITION;
//
// Initialize the Pattern
//
if (AGESA_SUCCESS == NBPtr->TrainingPatternInit (NBPtr)) {
//
// Setup hardware training engine (if applicable)
//
NBPtr->FamilySpecificHook[SetupHwTrainingEngine] (NBPtr, &TechPtr->TrainingType);
//
// Start Edge Detection
//
Status |= MemTTrainDQSRdWrEdgeDetect (TechPtr);
//
// Finalize the Pattern
//
Status &= (AGESA_SUCCESS == NBPtr->TrainingPatternFinalize (NBPtr));
}
return Status;
}
示例2: AmdMemDoResume
/**
*
*
* This function determines if the PSP is present
*
* @param[in] *StdHeader - Config handle for library and services.
*
* @return AGESA_STATUS
* - AGESA_FATAL
* - AGESA_SUCCESS
*/
AGESA_STATUS
AmdMemDoResume (
IN AMD_CONFIG_PARAMS *StdHeader
)
{
S3_MEM_NB_BLOCK *S3NBPtr;
MEM_NB_BLOCK *NBPtr;
LOCATE_HEAP_PTR LocHeap;
LocHeap.BufferHandle = AMD_MEM_S3_NB_HANDLE;
S3NBPtr = NULL;
if (HeapLocateBuffer (&LocHeap, StdHeader) == AGESA_SUCCESS) {
S3NBPtr = (S3_MEM_NB_BLOCK *)LocHeap.BufferPtr;
NBPtr = ((S3_MEM_NB_BLOCK *)S3NBPtr)->NBPtr;
} else {
ASSERT (FALSE) ; // No match for heap status, but could not locate "AMD_MEM_S3_NB_HANDLE" in heap for S3GetMsr
return AGESA_FATAL;
}
if (S3NBPtr[BSP_DIE].MemS3PspPlatformSecureBootEn (S3NBPtr[BSP_DIE].NBPtr) == NBPtr->MemRunningOnPsp (NBPtr)) {
return AGESA_SUCCESS;
} else {
return AGESA_FATAL;
}
}
示例3: MemTGetLD3
INT8
MemTGetLD3 (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
INT8 LD;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
//
// For DDR3, BIOS calculates the latency difference (Ld) as equal to read CAS latency minus write CAS
// latency, in MEMCLKs (see F2x[1, 0]88[Tcl] and F2x[1, 0]84[Tcwl]) which can be a negative or positive
// value.
//
LD = ((INT8) NBPtr->GetBitField (NBPtr, BFTcl) + 4) - ((INT8) NBPtr->GetBitField (NBPtr, BFTcwl) + 5);
return LD;
}
示例4: MemRecTEMRS13
VOID
MemRecTEMRS13 (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
UINT16 MrsAddress;
UINT8 DramTerm;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
// BA2=0,BA1=0,BA0=1
NBPtr->SetBitField (NBPtr, BFMrsBank, 1);
MrsAddress = 0;
// program MrsAddress[5,1]=output driver impedance control (DIC):
// based on F2x[1,0]84[DrvImpCtrl], which is 2'b01
MrsAddress |= ((UINT16) 1 << 1);
// program MrsAddress[9,6,2]=nominal termination resistance of ODT (RTT):
// based on F2x[1,0]84[DramTerm], which is 3'b001 (60 Ohms)
if (!(NBPtr->IsSupported[CheckDramTerm])) {
DramTerm = (UINT8) NBPtr->GetBitField (NBPtr, BFDramTerm);
} else {
DramTerm = NBPtr->PsPtr->DramTerm;
}
if ((DramTerm & 1) != 0) {
MrsAddress |= ((UINT16) 1 << 2);
}
if ((DramTerm & 2) != 0) {
MrsAddress |= ((UINT16) 1 << 6);
}
if ((DramTerm & 4) != 0) {
MrsAddress |= ((UINT16) 1 << 9);
}
// program MrsAddress[12]=output disable (QOFF):
// based on F2x[1,0]84[Qoff], which is 1'b0
// program MrsAddress[11]=TDQS:
// based on F2x[1,0]94[RDqsEn], which is 1'b0
NBPtr->SetBitField (NBPtr, BFMrsAddress, MrsAddress);
}
示例5: MemRecTEMRS33
VOID
MemRecTEMRS33 (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
// BA2=0,BA1=1,BA0=1
NBPtr->SetBitField (NBPtr, BFMrsBank, 3);
// program MrsAddress[1:0]=multi purpose register address location
// (MPR Location):based on F2x[1,0]84[MprLoc], which is 0
// program MrsAddress[2]=multi purpose register
// (MPR):based on F2x[1,0]84[MprEn], which is also 0
//
NBPtr->SetBitField (NBPtr, BFMrsAddress, 0);
}
示例6: MemTMarkTrainFail
/**
*
* This function sets the TestFail bit for all CS that fail training.
*
* @param[in,out] *TechPtr - Pointer to the MEM_TECH_BLOCK
*/
VOID
MemTMarkTrainFail (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
MEM_NB_BLOCK *NBPtr;
UINT8 Dct;
UINT8 ChipSel;
NBPtr = TechPtr->NBPtr;
for (Dct = 0; Dct < NBPtr->DctCount; Dct ++) {
NBPtr->SwitchDCT (NBPtr, Dct);
NBPtr->DCTPtr->Timings.CsEnabled &= ~NBPtr->DCTPtr->Timings.CsTrainFail;
for (ChipSel = 0; ChipSel < MAX_CS_PER_CHANNEL; ChipSel ++) {
if ((NBPtr->DCTPtr->Timings.CsTrainFail & ((UINT16)1 << ChipSel)) != 0) {
NBPtr->SetBitField (NBPtr, (BFCSBaseAddr0Reg + ChipSel), (UINT32)1 << BFTestFail);
}
}
}
}
示例7: MemTEndTraining
VOID
MemTEndTraining (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
S_UINT64 SMsr;
MEM_DATA_STRUCT *MemPtr;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
MemPtr = NBPtr->MemPtr;
LibAmdWriteCpuReg (CR4_REG, TechPtr->CR4reg);
LibAmdMsrRead (HWCR, (UINT64 *)&SMsr, &MemPtr->StdHeader);
SMsr.lo = TechPtr->HwcrLo;
LibAmdMsrWrite (HWCR, (UINT64 *)&SMsr, &MemPtr->StdHeader);
NBPtr->SetBitField (NBPtr, BFDramEccEn, TechPtr->DramEcc);
}
示例8: MemTDramInitHw
VOID
MemTDramInitHw (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
UINT8 Dct;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
NBPtr->BrdcstSet (NBPtr, BFInitDram, 1);
// Phy fence training
AGESA_TESTPOINT (TpProcMemPhyFenceTraining, &(NBPtr->MemPtr->StdHeader));
for (Dct = 0; Dct < NBPtr->DctCount; Dct++) {
NBPtr->SwitchDCT (NBPtr, Dct);
if (NBPtr->DCTPtr->Timings.DctMemSize != 0) {
IDS_HDT_CONSOLE (MEM_STATUS, "\tDct %d\n", Dct);
NBPtr->PhyFenceTraining (NBPtr);
}
}
}
示例9: MemFGetPCI
/**
*
* This function is the interface to call the PCI register access function
* defined in NB block.
*
* @param[in] *NBPtr - Pointer to the parameter structure MEM_NB_BLOCK
* @param[in] NodeID - Node ID number of the target Northbridge
* @param[in] DctNum - DCT number if applicable, otherwise, put 0
* @param[in] BitFieldName - targeted bitfield
*
* @retval UINT32 - 32 bits PCI register value
*
*/
UINT32
MemFGetPCI (
IN MEM_NB_BLOCK *NBPtr,
IN UINT8 NodeID,
IN UINT8 DctNum,
IN BIT_FIELD_NAME BitFieldName
)
{
MEM_NB_BLOCK *LocalNBPtr;
UINT8 Die;
// Find NBBlock that associates with node NodeID
for (Die = 0; (Die < MAX_NODES_SUPPORTED) && (NBPtr[Die].Node != NodeID); Die ++);
ASSERT (Die < MAX_NODES_SUPPORTED);
// Get the northbridge pointer for the targeted node.
LocalNBPtr = &NBPtr[Die];
LocalNBPtr->FamilySpecificHook[DCTSelectSwitch] (LocalNBPtr, &DctNum);
LocalNBPtr->Dct = DctNum;
// The caller of this function will take care of the ganged/unganged situation.
// So Ganged is set to be false here, and do PCI read on the DCT specified by DctNum.
return LocalNBPtr->GetBitField (LocalNBPtr, BitFieldName);
}
示例10: MemRecTEMRS23
VOID
MemRecTEMRS23 (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
UINT16 MrsAddress;
UINT8 DramTermDyn;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
// BA2=0,BA1=1,BA0=0
NBPtr->SetBitField (NBPtr, BFMrsBank, 2);
// program MrsAddress[5:3]=CAS write latency (CWL):
// based on F2x[1,0]84[Tcwl], which is 3'b000
//
MrsAddress = 0;
// program MrsAddress[6]=auto self refresh method (ASR):
// based on F2x[1,0]84[ASR], which is 1'b1
// program MrsAddress[7]=self refresh temperature range (SRT):
// based on F2x[1,0]84[SRT], which is also 1'b0
//
MrsAddress |= (UINT16) 1 << 6;
// program MrsAddress[10:9]=dynamic termination during writes (RTT_WR):
// based on F2x[1,0]84[DramTermDyn]
//
if (!(NBPtr->IsSupported[CheckDramTermDyn])) {
DramTermDyn = (UINT8) NBPtr->GetBitField (NBPtr, BFDramTermDyn);
} else {
DramTermDyn = NBPtr->PsPtr->DynamicDramTerm;
}
MrsAddress |= (UINT16) DramTermDyn << 9;
NBPtr->SetBitField (NBPtr, BFMrsAddress, MrsAddress);
}
示例11: MemRecTMRS3
VOID
MemRecTMRS3 (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
UINT16 MrsAddress;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
// BA2=0,BA1=0,BA0=0
NBPtr->SetBitField (NBPtr, BFMrsBank, 0);
// program MrsAddress[1:0]=burst length and control method
// (BL):based on F2x[1,0]84[BurstCtrl], which is 1'b0
//
MrsAddress = 0;
// program MrsAddress[3]=1 (BT):interleaved
MrsAddress |= (UINT16) 1 << 3;
// program MrsAddress[6:4,2]=read CAS latency
// (CL):based on F2x[1,0]88[Tcl], which is 4'b0010
MrsAddress |= (UINT16) 2 << 4;
// program MrsAddress[11:9]=write recovery for auto-precharge
// (WR):based on F2x[1,0]84[Twr], which is 3'b010
//
MrsAddress |= (UINT16) 2 << 9;
// program MrsAddress[12]=0 (PPD):slow exit
// program MrsAddress[8]=1 (DLL):DLL reset
MrsAddress |= (UINT16) 1 << 8; // just issue DLL reset at first time
NBPtr->SetBitField (NBPtr, BFMrsAddress, MrsAddress);
}
示例12: MemTBeginTraining
VOID
MemTBeginTraining (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
S_UINT64 SMsr;
MEM_DATA_STRUCT *MemPtr;
MEM_NB_BLOCK *NBPtr;
NBPtr = TechPtr->NBPtr;
MemPtr = NBPtr->MemPtr;
LibAmdReadCpuReg (CR4_REG, &TechPtr->CR4reg);
LibAmdWriteCpuReg (CR4_REG, TechPtr->CR4reg | ((UINT32)1 << 9)); // enable SSE2
LibAmdMsrRead (HWCR, (UINT64 *) (&SMsr), &MemPtr->StdHeader); // HWCR
TechPtr->HwcrLo = SMsr.lo;
SMsr.lo |= 0x00020000; // turn on HWCR.wrap32dis
SMsr.lo &= 0xFFFF7FFF; // turn off HWCR.SSEDIS
LibAmdMsrWrite (HWCR, (UINT64 *) (&SMsr), &MemPtr->StdHeader);
TechPtr->DramEcc = (UINT8) NBPtr->GetBitField (NBPtr, BFDramEccEn);
NBPtr->SetBitField (NBPtr, BFDramEccEn, 0); // Disable ECC
}
示例13: MemTTrainDQSRdWrEdgeDetect
BOOLEAN
STATIC
MemTTrainDQSRdWrEdgeDetect (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
MEM_DATA_STRUCT *MemPtr;
MEM_NB_BLOCK *NBPtr;
UINT8 WrDqDelay;
UINT8 Dct;
UINT8 CSPerChannel;
UINT8 CsPerDelay;
UINT8 ChipSel;
UINT8 i;
BOOLEAN Status;
UINT8 TimesFail;
UINT8 TimesRetrain;
NBPtr = TechPtr->NBPtr;
MemPtr = NBPtr->MemPtr;
TimesRetrain = DEFAULT_TRAINING_TIMES;
IDS_OPTION_HOOK (IDS_MEM_RETRAIN_TIMES, &TimesRetrain, &MemPtr->StdHeader);
//
// Set environment settings before training
//
IDS_HDT_CONSOLE (MEM_STATUS, "\nStart Read/Write Data Eye Edge Detection.\n");
MemTBeginTraining (TechPtr);
//
// Do Rd DQS /Wr Data Position training for all Dcts/Chipselects
//
for (Dct = 0; Dct < NBPtr->DctCount; Dct++) {
IDS_HDT_CONSOLE (MEM_STATUS, "\tDct %d\n", Dct);
NBPtr->SwitchDCT (NBPtr, Dct);
//
// Chip Select Loop
//
CSPerChannel = NBPtr->CSPerChannel (NBPtr);
CsPerDelay = NBPtr->CSPerDelay (NBPtr);
for (ChipSel = 0; ChipSel < CSPerChannel; ChipSel = ChipSel + CsPerDelay ) {
//
// Init Bit Error Masks
//
LibAmdMemFill (&NBPtr->ChannelPtr->FailingBitMask[ (ChipSel * MAX_BYTELANES_PER_CHANNEL) ],
0xFF,
(MAX_BYTELANES_PER_CHANNEL * CsPerDelay),
&MemPtr->StdHeader);
if ((NBPtr->DCTPtr->Timings.CsEnabled & ((UINT16) 1 << ChipSel)) != 0) {
TechPtr->ChipSel = ChipSel;
IDS_HDT_CONSOLE (MEM_STATUS, "\t\tCS %d\n", ChipSel);
IDS_HDT_CONSOLE (MEM_FLOW, "\t\t\tIncrease WrDat, Train RdDqs:\n");
TechPtr->DqsRdWrPosSaved = 0;
//
// Use a list of Approximate Write Data delay values and train Read DQS Position for
// each until a valid Data eye is found.
//
Status = FALSE;
TimesFail = 0;
ERROR_HANDLE_RETRAIN_BEGIN (TimesFail, TimesRetrain) {
i = 0;
while (NBPtr->GetApproximateWriteDatDelay (NBPtr, i, &WrDqDelay)) {
TechPtr->SmallDqsPosWindow = FALSE;
//
// Set Write Delay approximation
//
TechPtr->Direction = DQS_WRITE_DIR;
IDS_HDT_CONSOLE (MEM_FLOW, "\n\t\t\tWrite Delay: %02x", WrDqDelay);
MemTSetDQSDelayAllCSR (TechPtr, WrDqDelay);
//
// Attempt Read Training
//
TechPtr->Direction = DQS_READ_DIR;
if (MemTTrainDQSEdgeDetect (TechPtr)) {
//
// If Read DQS Training was successful, Train Write Data (DQ) Position
//
TechPtr->DqsRdWrPosSaved = 0;
IDS_HDT_CONSOLE (MEM_FLOW, "\n\t\t\tTrain WrDat:\n\n");
TechPtr->Direction = DQS_WRITE_DIR;
Status = MemTTrainDQSEdgeDetect (TechPtr);
break;
}
i++;
}
ERROR_HANDLE_RETRAIN_END ((Status == FALSE), TimesFail)
}
//
// If we went through the table, Fail.
//
if (Status == FALSE) {
// On training failure, check and record whether training fails due to small window or no window
if (TechPtr->SmallDqsPosWindow) {
NBPtr->MCTPtr->ErrStatus[EsbSmallDqs] = TRUE;
} else {
NBPtr->MCTPtr->ErrStatus[EsbNoDqsPos] = TRUE;
}
SetMemError (AGESA_ERROR, NBPtr->MCTPtr);
if (TechPtr->Direction == DQS_READ_DIR) {
PutEventLog (AGESA_ERROR, MEM_ERROR_NO_DQS_POS_RD_WINDOW, NBPtr->Node, NBPtr->Dct, NBPtr->Channel, 0, &NBPtr->MemPtr->StdHeader);
//.........这里部分代码省略.........
示例14: MemFParallelTraining
/**
*
*
* This is the main function to perform parallel training on all nodes.
* This is the routine which will run on the remote AP.
*
* @param[in,out] *EnvPtr - Pointer to the Training Environment Data
* @param[in,out] *StdHeader - Pointer to the Standard Header of the AP
*
* @return TRUE - This feature is enabled.
* @return FALSE - This feature is not enabled.
*/
BOOLEAN
MemFParallelTraining (
IN OUT REMOTE_TRAINING_ENV *EnvPtr,
IN OUT AMD_CONFIG_PARAMS *StdHeader
)
{
MEM_PARAMETER_STRUCT ParameterList;
MEM_NB_BLOCK NB;
MEM_TECH_BLOCK TB;
ALLOCATE_HEAP_PARAMS AllocHeapParams;
MEM_DATA_STRUCT *MemPtr;
DIE_STRUCT *MCTPtr;
UINT8 p;
UINT8 i;
UINT8 Dct;
UINT8 Channel;
UINT8 *BufferPtr;
UINT8 DctCount;
UINT8 ChannelCount;
UINT8 RowCount;
UINT8 ColumnCount;
UINT16 SizeOfNewBuffer;
AP_DATA_TRANSFER ReturnData;
//
// Initialize Parameters
//
ReturnData.DataPtr = NULL;
ReturnData.DataSizeInDwords = 0;
ReturnData.DataTransferFlags = 0;
ASSERT (EnvPtr != NULL);
//
// Replace Standard header of a AP
//
LibAmdMemCopy (StdHeader, &(EnvPtr->StdHeader), sizeof (AMD_CONFIG_PARAMS), &(EnvPtr->StdHeader));
//
// Allocate buffer for training data
//
BufferPtr = (UINT8 *) (&EnvPtr->DieStruct);
DctCount = EnvPtr->DieStruct.DctCount;
BufferPtr += sizeof (DIE_STRUCT);
ChannelCount = ((DCT_STRUCT *) BufferPtr)->ChannelCount;
BufferPtr += DctCount * sizeof (DCT_STRUCT);
RowCount = ((CH_DEF_STRUCT *) BufferPtr)->RowCount;
ColumnCount = ((CH_DEF_STRUCT *) BufferPtr)->ColumnCount;
SizeOfNewBuffer = sizeof (DIE_STRUCT) +
DctCount * (
sizeof (DCT_STRUCT) + (
ChannelCount * (
sizeof (CH_DEF_STRUCT) + sizeof (MEM_PS_BLOCK) + (
RowCount * ColumnCount * NUMBER_OF_DELAY_TABLES +
(MAX_BYTELANES_PER_CHANNEL * MAX_CS_PER_CHANNEL * NUMBER_OF_FAILURE_MASK_TABLES) +
(MAX_DIMMS_PER_CHANNEL * MAX_NUMBER_LANES)
)
)
)
);
AllocHeapParams.RequestedBufferSize = SizeOfNewBuffer;
AllocHeapParams.BufferHandle = GENERATE_MEM_HANDLE (ALLOC_PAR_TRN_HANDLE, 0, 0, 0);
AllocHeapParams.Persist = HEAP_LOCAL_CACHE;
if (HeapAllocateBuffer (&AllocHeapParams, StdHeader) == AGESA_SUCCESS) {
BufferPtr = AllocHeapParams.BufferPtr;
LibAmdMemCopy ( BufferPtr,
&(EnvPtr->DieStruct),
sizeof (DIE_STRUCT) + DctCount * (sizeof (DCT_STRUCT) + ChannelCount * (sizeof (CH_DEF_STRUCT) + sizeof (MEM_PS_BLOCK))),
StdHeader
);
//
// Fix up pointers
//
MCTPtr = (DIE_STRUCT *) BufferPtr;
BufferPtr += sizeof (DIE_STRUCT);
MCTPtr->DctData = (DCT_STRUCT *) BufferPtr;
BufferPtr += MCTPtr->DctCount * sizeof (DCT_STRUCT);
for (Dct = 0; Dct < MCTPtr->DctCount; Dct++) {
MCTPtr->DctData[Dct].ChData = (CH_DEF_STRUCT *) BufferPtr;
BufferPtr += MCTPtr->DctData[Dct].ChannelCount * sizeof (CH_DEF_STRUCT);
for (Channel = 0; Channel < MCTPtr->DctData[Dct].ChannelCount; Channel++) {
MCTPtr->DctData[Dct].ChData[Channel].MCTPtr = MCTPtr;
MCTPtr->DctData[Dct].ChData[Channel].DCTPtr = &MCTPtr->DctData[Dct];
}
}
NB.PSBlock = (MEM_PS_BLOCK *) BufferPtr;
//.........这里部分代码省略.........
示例15: MemTSetDQSEccTmgsRDdr3
BOOLEAN
MemTSetDQSEccTmgsRDdr3 (
IN OUT MEM_TECH_BLOCK *TechPtr
)
{
UINT8 Dct;
UINT8 Dimm;
UINT8 i;
UINT8 *WrDqsDly;
UINT16 *RcvEnDly;
UINT8 *RdDqsDly;
UINT8 *WrDatDly;
UINT8 EccByte;
INT16 TempValue;
MEM_NB_BLOCK *NBPtr;
CH_DEF_STRUCT *ChannelPtr;
EccByte = TechPtr->MaxByteLanes ();
NBPtr = TechPtr->NBPtr;
if (NBPtr->MCTPtr->NodeMemSize) {
for (Dct = 0; Dct < NBPtr->DctCount; Dct++) {
NBPtr->SwitchDCT (NBPtr, Dct);
if (NBPtr->DCTPtr->Timings.DctMemSize != 0) {
ChannelPtr = NBPtr->ChannelPtr;
for (Dimm = 0; Dimm < MAX_DIMMS_PER_CHANNEL; Dimm++) {
if (NBPtr->DCTPtr->Timings.CsEnabled & ((UINT16)3 << (Dimm * 2))) {
i = Dimm * TechPtr->DlyTableWidth ();
WrDqsDly = &ChannelPtr->WrDqsDlys[i];
RcvEnDly = &ChannelPtr->RcvEnDlys[i];
RdDqsDly = &ChannelPtr->RdDqsDlys[i];
WrDatDly = &ChannelPtr->WrDatDlys[i];
// Receiver DQS Enable:
// Receiver DQS enable for ECC bytelane = Receiver DQS enable for bytelane 3 -
// [write DQS for bytelane 3 - write DQS for ECC]
TempValue = (INT16) RcvEnDly[3] - (INT16) (WrDqsDly[3] - WrDqsDly[EccByte]);
if (TempValue < 0) {
TempValue = 0;
}
RcvEnDly[EccByte] = (UINT16) TempValue;
// Read DQS:
// Read DQS for ECC bytelane = read DQS of byte lane 3
//
RdDqsDly[EccByte] = RdDqsDly[3];
// Write Data:
// Write Data for ECC bytelane = Write DQS for ECC +
// [write data for bytelane 3 - Write DQS for bytelane 3]
TempValue = (INT16) (WrDqsDly[EccByte] + (INT8) (WrDatDly[3] - WrDqsDly[3]));
if (TempValue < 0) {
TempValue = 0;
}
WrDatDly[EccByte] = (UINT8) TempValue;
NBPtr->SetTrainDly (NBPtr, AccessRcvEnDly, DIMM_BYTE_ACCESS (Dimm, EccByte), RcvEnDly[EccByte]);
NBPtr->SetTrainDly (NBPtr, AccessRdDqsDly, DIMM_BYTE_ACCESS (Dimm, EccByte), RdDqsDly[EccByte]);
NBPtr->SetTrainDly (NBPtr, AccessWrDatDly, DIMM_BYTE_ACCESS (Dimm, EccByte), WrDatDly[EccByte]);
}
}
}
}
}
return (BOOLEAN) (NBPtr->MCTPtr->ErrCode < AGESA_FATAL);
}