AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Proc / Mem / mt.h
1 /* $NoKeywords:$ */
2 /**
3  * @file
4  *
5  * mt.h
6  *
7  * Common Technology
8  *
9  * @xrefitem bom "File Content Label" "Release Content"
10  * @e project: AGESA
11  * @e sub-project: (Mem)
12  * @e \$Revision: 54372 $ @e \$Date: 2011-06-07 22:22:22 -0600 (Tue, 07 Jun 2011) $
13  *
14  **/
15 /*****************************************************************************
16   *
17  * Copyright (C) 2012 Advanced Micro Devices, Inc.
18  * All rights reserved.
19  *
20  * Redistribution and use in source and binary forms, with or without
21  * modification, are permitted provided that the following conditions are met:
22  *     * Redistributions of source code must retain the above copyright
23  *       notice, this list of conditions and the following disclaimer.
24  *     * Redistributions in binary form must reproduce the above copyright
25  *       notice, this list of conditions and the following disclaimer in the
26  *       documentation and/or other materials provided with the distribution.
27  *     * Neither the name of Advanced Micro Devices, Inc. nor the names of
28  *       its contributors may be used to endorse or promote products derived
29  *       from this software without specific prior written permission.
30  *
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
32  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34  * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
35  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
36  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
37  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
38  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
40  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41   *
42   * ***************************************************************************
43   *
44  */
45
46 #ifndef _MT_H_
47 #define _MT_H_
48
49 /*----------------------------------------------------------------------------
50  *   Mixed (DEFINITIONS AND MACROS / TYPEDEFS, STRUCTURES, ENUMS)
51  *
52  *----------------------------------------------------------------------------
53  */
54
55 /*-----------------------------------------------------------------------------
56  *                         DEFINITIONS AND MACROS
57  *
58  *-----------------------------------------------------------------------------
59  */
60
61 #define FIRST_PASS      1
62 #define SECOND_PASS     2
63 #define BIGPAGE_X8_RJ16 0x80
64 #define BIGPAGE_X8      0x800000
65 #define DQS_FAIL        1
66 #define DQS_PASS        0
67 #define DQS_WRITE_DIR    1
68 #define DQS_READ_DIR     0
69 #define MIN_DQS_WNDW    3
70 #define ST_UNSTEADY     0
71 #define ST_STEADY       1
72 #define ST_GROSS_SWEEP  2
73 #define ST_FINE_SWEEP   3
74 #define ST_FINISH       4
75 #define NIBBLE_0        0
76 #define NIBBLE_1        1
77
78 #define MAX_BYTELANES_PER_CHANNEL   (8 + 1)  ///< Max Bytelanes per channel
79
80 #define MAX_FILTER_DLY_DDR2 0x20
81 #define MAX_FILTER_DLY_DDR3 0x28
82
83 #define NEW_RECEIVER_START_VALUE  0x4
84 #define NEW_RECEIVER_STEP_1       4
85 #define NEW_RECEIVER_STEP_2       7
86
87 #define NEW_RECEIVER_FINAL_OFFSETVALUE 5
88
89 #define MAX_POS_RX_EN_SEED_GROSS_RANGE 0x20     ///< Max Range RxEn Seed Gross
90 #define MAX_POS_RX_EN_SEED_GROSS_DIR 0x2       ///< Max RxEn Seed Gross Direction
91
92 #define DBG_PRINT_STAGE           18                    // "Stage"
93 #define DBG_PRINT_0_TO_64         23                    // "0...64"
94 #define DBG_SPACES_4              21                    // 4 spaces
95 #define DBG_POS_NEW_LINE          11                    // New Line for POS training
96 #define DBG_WR_DLY                24                    // "Write Delay: "
97 #define DBG_B_L_R_W_M             22                    // " Bytelane  Left   Right  Width  Middle"
98 #define DBG_RX_EN_NEW_LINE        25                    // New Line for Rx En
99 #define DBG_RX_EN_STAGE1          6                     // "Receiver Enable Training Stage 1:"
100 #define DBG_RX_EN_STAGE2          7                     // "Receiver Enable Training Stage 2:"
101 #define DBG_RX_EN_STAGE3          8                     // "Receiver Enable Training Stage 3:"
102 #define DBG_DLY_PER_BL            9                     // "Dly per BL   -"
103 #define DBG_A_B_DLY               10                    // "ALL BLs have Dly:"
104 #define DBG_RCVR_PRT_VALUE        0x0010F               // PORT for RX EN training to print a value
105 #define DBG_RX_POS_PRT_VALUE      0x0011F               // PORT for POS training to print a value
106
107 #define DONE_FILTER 0           ///<  optimized receiver enable training glitch search complete
108 #define START_FILTER 1          ///<  optimized receiver enable training start glitch filter search
109 #define FILTER_FIRST_STAGE_COUNT 4 ///<  optimized receiver enable training glitch filter first stage count
110 #define FILTER_SECOND_STAGE_COUNT 7  ///<  optimized receiver enable training glitch second stage count
111 #define FILTER_OFFSET_VALUE 0x1C ///<  optimized receiver enable training glitch filter offset value int preamble
112 #define FILTER_WINDOW_SIZE 0x28  ///< optimized receiver enable training glitch filter search window size
113 #define FILTER_MAX_REC_EN_DLY_VALUE 0x1FF ///< optimized receiver enable glitch filter max receiver value
114 #define FILTER_NEW_RECEIVER_START_VALUE  0x0    ///< optimized receiver enable glitch filter  Start value
115 #define MAX_NUMBER_NIBBLES 18      ///< Maximum number of nibbles
116 #define MAX_NUMBER_LANES 18      ///< Maximum number of lanes (nibbles or bytes)
117 #define MAX____VREF_ENTRIES  0x20        ///< Maximum number of vref entries
118 #define MAX_RD_DQS_ENTRIES  0x40         ///< Maximum number of RDDQS Entries
119 #define VREF_ADDITIONAL_STEP_SIZE  0x0         ///< Vref Additional Step size
120 #define RDDQS_ADDITIONAL_STEP_SIZE  0x0         ///< RdDqs Additional Step size
121 #define MAX____DQS_SEED_COUNT 2                      ///< Max Seed count
122 #define MAX____RDDQS_CS_PER_CHANNEL      8   ///< Max CS per RdDQS delay group
123
124
125 /*----------------------------------------------------------------------------
126  *                         TYPEDEFS, STRUCTURES, ENUMS
127  *
128  *----------------------------------------------------------------------------
129  */
130 /// List for Technology specific functions that are supported
131 typedef enum {
132   WlTrainingPrepareLrdimm,          ///< Technology specific tasks to prepare LRDIMMs for Training
133   LrdimmControlRegInit,             ///< Technology specific tasks to send control words to initialize an LRDIMM
134   LrdimmFreqChgCtrlWrd,             ///< Technology specific tasks to send control words to reprogram LRDIMM's register
135   LrdimmSendAllMRCmds,              ///< Technology specific tasks to send all MR commands
136   LrdimmRankMultiplication,         ///< Determine Rank Multiplication to be used
137   LrdimmBuf2DramTrain,              ///< Perform buffer to DRAM training for LRDIMMs
138   LrdimmSyncTrainedDlys,            ///< Copy trained delay of the first rank of a QR LRDIMM to the third rank
139   LrdimmPresence,                   ///< Perform LRDIMM specific tasks at the time of Dimm Presence Detection
140
141   NumberOfTechHooks                    ///< Size of list
142 } TECHNOLOGY_SPECIFIC_FUNC_INDEX;
143
144 /// Structure for RD DQS training RDDQS delays.
145 typedef struct {
146   UINT32  PosRdDqsDly; ///< Positive RdDQS Delay
147   UINT32  NegRdDqsDly; ///< Negative RdDQS Delay
148 } RD_DQS___;
149 /// Structure for RD DQS training Vref delays
150 typedef struct {
151   RD_DQS___  *Vref;///< pointer to Vref Entries
152   UINT8 Convolution[MAX_RD_DQS_ENTRIES]; ///< Total number of passes in each mask
153   UINT8 PosHeight[MAX_RD_DQS_ENTRIES/2]; ///< Positive Vref height Height per Delay
154   UINT8 NegHeight[MAX_RD_DQS_ENTRIES/2]; ///< Negative Vref height Height per Delay
155   UINT8 HalfDiamondHeight;   ///< Half of the Height per BL (height of pos/neg vref)
156   UINT8 MaxRdDqs; ///< Max RdDqs from convolution function
157 } VREF___;
158 /// Structure for RD DQS training Nibbles
159 typedef struct {
160   VREF___  Lane[MAX_NUMBER_LANES]; ///< Bytelane or Nibble
161   UINT8 Vnom;  // Nominal Vref value
162   UINT8 MaxRdDqsSweep; // Maximum RdDqs Sweep size
163   UINT8 SmallestPosMaxVrefperCS[MAX____RDDQS_CS_PER_CHANNEL];  // Smallest Positive Max Vref per CS
164   UINT8 SmallestNegMaxVrefperCS[MAX____RDDQS_CS_PER_CHANNEL];  // Smallest Negative Max Vref per CS
165   UINT8 DiamondLeft[MAX____VREF_ENTRIES];          // Left edge of Diamond for shape display
166   UINT8 DiamondRight[MAX____VREF_ENTRIES];         // Left edge of Diamond for shape display
167 } MEM____ENTRY;
168
169 /// Structure for Technology block.
170 typedef struct _MEM_TECH_BLOCK {
171   MEM_NB_BLOCK  *NBPtr; ///< point to northbridge block.
172   MEM_PARAMETER_STRUCT *RefPtr; ///< point to parameter list.
173
174   /* Temporary storage */
175   UINT32 HwcrLo; ///< value of HWCR.
176   UINT32 CR4reg; ///< CR4 register value.
177   UINT8  DramEcc; ///< value of Dram ECC bit.
178   UINT8  *TestBufPtr; ///< point to buffer to store read-back data.
179   UINT8  *PatternBufPtr; ///< point to pattern buffer.
180   UINT16 PatternLength; ///< the length of pattern buffer in cache lines.
181   UINT8  Direction; ///< direction during training.
182   UINT8  ChipSel; ///< chip select number.
183   INT8   RestartChipSel;    ///< is used to save the chipsel at which first RdDqsDly retrain is issued
184   UINT16 MaxDlyForMaxRdLat; ///< Largest possible value for Receiver enable delay.
185   UINT16 PrevSpeed; ///< Previous MemClk frequency
186   TRAINING_TYPE  TrainingType;  ///< Type of training currently being done
187   UINT8 TargetDIMM; ///< Target DIMM to being trained
188   INT16 WLCriticalDelay;  ///< Minimum WL Dly of all byte lanes and all DIMMs
189   UINT8 Bytelane; ///< Bytelane being trained
190   UINT8 TrnNibble; ///< Nibble being trained
191
192
193   UINT8  Pass; ///< current pass of training.
194   UINT16 DqsRdWrPosSaved;    ///< for position training byte lane saved flag
195   UINT16 DqsRcvEnSaved;      ///< for TrainRcvrEn UINT8 lane saved flag
196   UINT16 DqsRcvEnSavedS1; ///< for TrainRcvrEn UINT8 lane saved flag
197   UINT16 DqsRcvEnFirstPassVal; ///< for TrainRcvrEn UINT8 lane saved flag
198   BOOLEAN GetFirstPassVal; ///< If the first passing value has been found.
199   BOOLEAN RevertPassVal; ///< Flag to restart training during training process when glitch is found.
200   UINT8 MaxFilterDly; ///< Maximum filter delay value for RcvrTraining.
201   UINT16 RcvrEnDlyOpt[MAX_BYTELANES_PER_CHANNEL];     ///< Receiver Enable delay for optimized filter
202   UINT16 MaxRcvrEnDlyBlOpt[MAX_BYTELANES_PER_CHANNEL]; ///< Max Receiver Enable delay for optimized filter
203   UINT16 RcvrEnDlyLimitOpt[MAX_BYTELANES_PER_CHANNEL]; ///< Receiver Enable delay Limit for optimized filter
204   UINT16 FilterStatusOpt[MAX_BYTELANES_PER_CHANNEL];  ///< Filter status to indicate if a ByteLane is "DONE", "SKIP" or "CONTINUE"
205   UINT16 FilterCountOpt;  ///< Filter count to indicate the total number of ByteLanes completed
206   BOOLEAN DqsRcvEnSavedOpt[MAX_BYTELANES_PER_CHANNEL];      ///< for optimized TrainRcvrEn lane saved flag
207   UINT16 DqsRcvEnFirstPassValOpt[MAX_BYTELANES_PER_CHANNEL]; ///< for TrainRcvrEn UINT8 lane saved flag for optimized
208   BOOLEAN GetFirstPassValOpt[MAX_BYTELANES_PER_CHANNEL]; ///< If the first passing value has been found for optimized.
209   BOOLEAN RevertPassValOpt[MAX_BYTELANES_PER_CHANNEL]; ///< Flag to restart training during training process when glitch is found for optimized.
210   UINT8 MaxFilterDlyBlOpt[MAX_BYTELANES_PER_CHANNEL]; ///< Maximum filter delay value for RcvrTraining for optimized.
211   BOOLEAN IncBy1ForNextCountOpt[MAX_BYTELANES_PER_CHANNEL]; ///< Used to determine when to increment by 1 in second stage of opt. rec. en. training
212   UINT8 FilterSidePassCountOpt[MAX_BYTELANES_PER_CHANNEL];  ///< Indicates that previous side passed
213   UINT16 DiffSeedGrossSeedPreGross[MAX_BYTELANES_PER_CHANNEL];  ///< Gross difference between GrossSeed and SeedPreGross for HwRxEn Training.
214   UINT16 PrevPassRcvEnDly[MAX_BYTELANES_PER_CHANNEL];  ///< Receiver Enable Delay value from the previous pass
215   BOOLEAN SmallDqsPosWindow; ///< Status flag to record small DQS position window event
216   UINT8 WlNibbleDly[MAX_BYTELANES_PER_CHANNEL];  ///< Nibble based trainig results for Nibble 0 of Write Levelization
217   UINT16 WlNibble0Seed[MAX_BYTELANES_PER_CHANNEL];  ///< Nibble based trainig seed value for Nibble 0 Write Levelization
218   UINT16 RxEnNibbleDly[MAX_BYTELANES_PER_CHANNEL];  ///< Nibble based trainig results for Nibble 0 of Rx En training
219   BOOLEAN ByteLaneError[MAX_BYTELANES_PER_CHANNEL]; ///< Indicates that an error has occured on a bytelane
220   UINT16 RxOrig[MAX_BYTELANES_PER_CHANNEL];  ///< Original RxEn Delays for seedless training
221
222   /* PUBLIC functions */
223   VOID (*SendAllMRCmds) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 ChipSel); ///< Send MRS command.
224   VOID (*FreqChgCtrlWrd) (struct _MEM_TECH_BLOCK *TechPtr); ///< Frequency change control word.
225   BOOLEAN (*SetDramMode) (struct _MEM_TECH_BLOCK *TechPtr); ///< Set dram mode (DDR2 or DDR3).
226   BOOLEAN (*DimmPresence) (struct _MEM_TECH_BLOCK *TechPtr); ///< determines if DIMMs present.
227   BOOLEAN (*SpdCalcWidth) (struct _MEM_TECH_BLOCK *TechPtr); ///< check the symmetry of DIMM pairs.
228   BOOLEAN (*SpdGetTargetSpeed) (struct _MEM_TECH_BLOCK *TechPtr); ///< get supported frequency.
229   BOOLEAN (*AutoCycTiming) (struct _MEM_TECH_BLOCK *TechPtr); ///< configure timing based on spd data.
230   BOOLEAN (*SpdSetBanks) (struct _MEM_TECH_BLOCK *TechPtr); ///< set bank address.
231   BOOLEAN (*SetDqsEccTmgs) (struct _MEM_TECH_BLOCK *TechPtr); ///< DQS training.
232   VOID (*GetCSIntLvAddr) (UINT8 BankEnc, UINT8 *LowBit, UINT8 *HiBit); ///< Get Chip select interleave address.
233   VOID (*AdjustTwrwr) (struct _MEM_TECH_BLOCK *TechPtr); ///< Adjust Twrwr for certain dimm technology.
234   VOID (*AdjustTwrrd) (struct _MEM_TECH_BLOCK *TechPtr); ///< Adjust Twrrd for certain dimm technology.
235   INT8 (*GetLD) (struct _MEM_TECH_BLOCK *TechPtr); ///< Get LD value for certain dimm technology.
236   VOID (*DramInit) (struct _MEM_TECH_BLOCK *TechPtr); ///< dram initialization.
237
238   /* PRIVATE functions */
239   VOID (*InitDQSPos4RcvrEn) (struct _MEM_TECH_BLOCK *TechPtr); ///< Initialize training register before training.
240   VOID (*SetRcvrEnDly) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver, UINT16 RcvEnDly); ///< Set receiver enable delay register value.
241   VOID (*LoadRcvrEnDly) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver); ///< Load receiver enable delay register value.
242   BOOLEAN (*SaveRcvrEnDly) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver, UINT16 RcvEnDly, UINT16 cmpResultRank0, UINT16 cmpResultRank1); ///< Save receiver enable delay register value.
243   BOOLEAN (*SaveRcvrEnDlyFilter) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver, UINT16 RcvEnDly, UINT16 cmpResultRank0, UINT16 cmpResultRank1); ///< saves passing DqsRcvEnDly values to the stack.
244   VOID (*ResetDCTWrPtr) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver); ///< resets the DCT input buffer write pointer.
245   UINT16 (*Compare1ClPattern) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Buffer[], UINT8 Pattern[]); ///< Compare training pattern of 1 cache line.
246   VOID (*SkipChipSelPass1) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 *ChipSel); ///< skips odd chip select if training at 800MT or above.
247   VOID (*SkipChipSelPass2) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 *ChipSel); ///< skips odd chip select if training at 800MT or above.
248   UINT16 (*CompareTestPatternFilter) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Buffer[], UINT8 Pattern[], UINT16 ByteCount); ///< compare training pattern with filter.
249   UINT8 (*MaxByteLanes) ( VOID ); ///< return maximum number of bytelanes.
250   VOID (*SetDQSDelayCSR) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 ByteLane, UINT8 Dly); ///< Set CSR.
251   VOID (*DQSWindowSave) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 ByteLane, UINT8 DlyMin, UINT8 DlyMax); ///< programs the trained DQS delay for the specified byte lane and stores its DQS window for reference.
252   BOOLEAN (*FindMaxDlyForMaxRdLat) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 *ChipSel); ///< Find maximum receiver enable delay value.
253   UINT8 (*DlyTableWidth) ( VOID ); ///< return the width of the delay tables (eg. RcvEnDlys, WrDqsDlys,...) in number of bytes.
254   UINT16 (*Compare1ClPatternOpt) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Buffer[], UINT8 Pattern[], UINT8 Side, UINT8 Receiver, BOOLEAN Side1En); ///< Compare training pattern of 1 cache line.
255   VOID (*LoadRcvrEnDlyOpt) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver); ///< Load receiver enable delay register value.
256   VOID (*SetRcvrEnDlyOpt) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver, UINT16 RcvEnDly); ///< Set receiver enable delay register value.
257   BOOLEAN (*CheckRcvrEnDlyLimitOpt) (struct _MEM_TECH_BLOCK *TechPtr); ///< Find limit for all bytelanes
258   UINT16 (*GetMaxValueOpt) (struct _MEM_TECH_BLOCK *TechPtr); ///<  Returns the max value of all bytelanes
259   VOID (*InitializeVariablesOpt) (struct _MEM_TECH_BLOCK *TechPtr); ///< Initialized variables for optimized training
260   BOOLEAN (*SetSweepErrorOpt)(struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver, UINT8 DCT, BOOLEAN ErrorCheck); ///< records any errors generated from optimized sweep
261   VOID (*LoadInitialRcvrEnDlyOpt) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 Receiver); ///< Load the starting value for receiver DQS training.
262   BOOLEAN (*GetDimmSpdBuffer) (struct _MEM_TECH_BLOCK *TechPtr, UINT8 **SpdBuffer, UINT8 Dimm); ///< Gets pointer to spd buffer for a dimm on the current channel, if present
263   UINT8 (*GetMinMaxGrossDly) (struct _MEM_TECH_BLOCK *TechPtr, TRN_DLY_TYPE TrnDlyType, BOOLEAN IfMax); ///< Gets the minimum or maximum gross dly value
264
265   /* Technology Specific Hooks */
266   BOOLEAN (*(TechnologySpecificHook[NumberOfTechHooks])) (struct _MEM_TECH_BLOCK *TechPtr, VOID *OptParam); ///< Technology specific functions
267 } MEM_TECH_BLOCK;
268
269 /*----------------------------------------------------------------------------
270  *                           FUNCTIONS PROTOTYPE
271  *
272  *----------------------------------------------------------------------------
273  */
274
275 VOID
276 MemTDimmByteTrainInit (
277   IN OUT   MEM_TECH_BLOCK *TechPtr
278   );
279
280 BOOLEAN
281 MemTTrainMaxLatency (
282   IN OUT   MEM_TECH_BLOCK *TechPtr
283   );
284
285 BOOLEAN
286 MemTSetDQSEccTmgs (
287   IN OUT   MEM_TECH_BLOCK *TechPtr
288   );
289
290 BOOLEAN
291 MemTSetDQSEccTmgsRDdr3 (
292   IN OUT   MEM_TECH_BLOCK *TechPtr
293   );
294
295 BOOLEAN
296 MemTTrainRcvrEnSwPass1 (
297   IN OUT   MEM_TECH_BLOCK *TechPtr
298   );
299
300 BOOLEAN
301 MemTTrainDQSEdgeDetectSw (
302   IN OUT   MEM_TECH_BLOCK *TechPtr
303   );
304
305 BOOLEAN
306 MemTTrainDQSEdgeDetect (
307   IN OUT   MEM_TECH_BLOCK *TechPtr
308   );
309
310 BOOLEAN
311 MemTDramInitSw3 (
312   IN OUT   MEM_TECH_BLOCK *TechPtr
313   );
314 VOID
315 MemTDramInitHw (
316   IN OUT   MEM_TECH_BLOCK *TechPtr
317   );
318 BOOLEAN
319 MemTFeatDef (
320   IN OUT   MEM_TECH_BLOCK *TechPtr
321   );
322 BOOLEAN
323 MemTSaveRcvrEnDlyByteFilter (
324   IN OUT   MEM_TECH_BLOCK *TechPtr,
325   IN       UINT8 Receiver,
326   IN       UINT16 RcvEnDly,
327   IN       UINT16 CmpResultRank0,
328   IN       UINT16 CmpResultRank1
329   );
330
331 BOOLEAN
332 MemTSaveRcvrEnDlyByteFilterOpt (
333   IN OUT   MEM_TECH_BLOCK *TechPtr,
334   IN       UINT8 Receiver,
335   IN       UINT16 RcvEnDly,
336   IN       UINT16 CmpResultRank0,
337   IN       UINT16 CmpResultRank1
338   );
339
340 BOOLEAN
341 MemTNewRevTrainingSupport (
342   IN OUT   MEM_TECH_BLOCK *TechPtr
343   );
344
345 BOOLEAN
346 MemTTrainOptRcvrEnSwPass1 (
347   IN OUT   MEM_TECH_BLOCK *TechPtr
348   );
349
350 BOOLEAN
351 MemTWriteLevelizationHw3Pass1 (
352   IN OUT   MEM_TECH_BLOCK *TechPtr
353   );
354
355 BOOLEAN
356 MemTWriteLevelizationHw3Pass2 (
357   IN OUT   MEM_TECH_BLOCK *TechPtr
358   );
359
360 BOOLEAN
361 MemTPreparePhyAssistedTraining (
362   IN OUT   MEM_TECH_BLOCK *TechPtr
363   );
364
365 BOOLEAN
366 MemTExitPhyAssistedTraining (
367   IN OUT   MEM_TECH_BLOCK *TechPtr
368   );
369
370 BOOLEAN
371 MemTDqsTrainRcvrEnHwPass1 (
372   IN OUT   MEM_TECH_BLOCK *TechPtr
373   );
374
375 BOOLEAN
376 MemTDqsTrainRcvrEnHwPass2 (
377   IN OUT   MEM_TECH_BLOCK *TechPtr
378   );
379
380 VOID
381 MemRecTSetWrDatRdDqs (
382   IN OUT   MEM_TECH_BLOCK *TechPtr,
383   IN       UINT8 WrDatDly
384   );
385
386 VOID
387 MemRecTTrainDQSPosSw (
388   IN OUT   MEM_TECH_BLOCK *TechPtr
389   );
390
391 VOID
392 MemRecTTrainRcvrEnSw (
393   IN OUT   MEM_TECH_BLOCK *TechPtr
394   );
395
396 VOID
397 MemRecTTrainRcvrEnHw (
398   IN OUT   MEM_TECH_BLOCK *TechPtr
399   );
400
401 VOID
402 MemRecTTrainRcvrEnHwSeedless (
403   IN OUT   MEM_TECH_BLOCK *TechPtr
404   );
405
406 VOID
407 MemRecTBeginTraining (
408   IN OUT   MEM_TECH_BLOCK *TechPtr
409   );
410
411 VOID
412 MemRecTEndTraining (
413   IN OUT   MEM_TECH_BLOCK *TechPtr
414   );
415
416 BOOLEAN
417 MemTSetSweepErrorOptByte (
418   IN OUT   MEM_TECH_BLOCK *TechPtr,
419   IN       UINT8 Receiver,
420   IN       UINT8 Dct,
421   IN       BOOLEAN ErrorCheck
422   );
423
424 VOID
425 MemTInitializeVariablesOptByte (
426   IN OUT   MEM_TECH_BLOCK *TechPtr
427   );
428
429 UINT16
430 MemTGetMaxValueOptByte (
431   IN OUT   MEM_TECH_BLOCK *TechPtr
432   );
433
434 BOOLEAN
435 MemTCheckRcvrEnDlyLimitOptByte (
436   IN OUT   MEM_TECH_BLOCK *TechPtr
437   );
438
439 VOID
440 MemTMarkTrainFail (
441   IN OUT   MEM_TECH_BLOCK *TechPtr
442 );
443
444 VOID
445 MemTBeginTraining (
446   IN OUT   MEM_TECH_BLOCK *TechPtr
447   );
448
449 VOID
450 MemTEndTraining (
451   IN OUT   MEM_TECH_BLOCK *TechPtr
452   );
453
454 VOID
455 MemTSetDQSDelayAllCSR (
456   IN OUT   MEM_TECH_BLOCK *TechPtr,
457   IN       UINT8 Dly
458   );
459
460 BOOLEAN
461 MemTExitPhyAssistedTrainingClient3 (
462   IN OUT   MEM_TECH_BLOCK *TechPtr
463   );
464
465 BOOLEAN
466 MemTFindMaxRcvrEnDlyRdDqsDlyByte (
467   IN OUT   MEM_TECH_BLOCK *TechPtr,
468      OUT   UINT8 *ChipSel
469   );
470
471 BOOLEAN
472 MemTFindMaxRcvrEnDlyRdDqsDlyByteUnb (
473   IN OUT   MEM_TECH_BLOCK *TechPtr,
474      OUT   UINT8 *ChipSel
475   );
476
477 VOID
478 MemTSendCtlWord3 (
479   IN OUT   MEM_TECH_BLOCK *TechPtr,
480   IN       UINT8 CmdNum,
481   IN       UINT8 Value
482   );
483
484 VOID
485 MemTCommonTechInit (
486   IN OUT   MEM_TECH_BLOCK *TechPtr
487   );
488
489 BOOLEAN
490 MemTLrdimmConstructor3 (
491   IN OUT   MEM_TECH_BLOCK *TechPtr
492   );
493
494 BOOLEAN
495 MemTRdPosWithRxEnDlySeeds3 (
496   IN OUT   MEM_TECH_BLOCK *TechPtr
497   );
498
499 BOOLEAN
500 MemTTrackRxEnSeedlessRdWrNoWindBLError (
501   IN OUT   MEM_TECH_BLOCK *TechPtr,
502   IN OUT   VOID *OptParam
503   );
504
505 BOOLEAN
506 MemTTrackRxEnSeedlessRdWrSmallWindBLError (
507   IN OUT   MEM_TECH_BLOCK *TechPtr,
508   IN OUT   VOID *OptParam
509   );
510 #endif  /* _MT_H_ */