AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Proc / Mem / mp.h
1 /* $NoKeywords:$ */
2 /**
3  * @file
4  *
5  * mp.h
6  *
7  * Platform Specific common header file
8  *
9  * @xrefitem bom "File Content Label" "Release Content"
10  * @e project: AGESA
11  * @e sub-project: (Mem)
12  * @e \$Revision: 55046 $ @e \$Date: 2011-06-15 23:59:07 -0600 (Wed, 15 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 _MP_H_
47 #define _MP_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 /*----------------------------------------------------------------------------
62  *                         TYPEDEFS, STRUCTURES, ENUMS
63  *
64  *----------------------------------------------------------------------------
65  */
66 /// Type of an entry for Dram Term table
67 typedef struct {
68   UINT32 Speed; ///< BitMap for the supported speed
69   UINT8  Dimms; ///< BitMap for supported number of dimm
70   UINT8  QR_Dimms; ///< BitMap for supported number of QR dimm
71   UINT8  DramTerm; ///< DramTerm value
72   UINT8  QR_DramTerm; ///< DramTerm value for QR
73   UINT8  DynamicDramTerm; ///< Dynamic DramTerm
74 } DRAM_TERM_ENTRY;
75
76 /// Type of an entry for POR speed limit table
77 typedef struct {
78   UINT16   DIMMRankType;  ///< Bitmap of Ranks
79   UINT8    Dimms;  ///< Number of dimm
80   UINT16    SpeedLimit_1_5V; ///< POR speed limit for 1.5V
81   UINT16    SpeedLimit_1_35V; ///< POR speed limit for 1.35V
82   UINT16    SpeedLimit_1_25V; ///< POR speed limit for 1.25V
83 } POR_SPEED_LIMIT;
84
85 /// UDIMM&RDIMM Max. Frequency
86 typedef union {
87   struct {                       ///< PSCFG_MAXFREQ_ENTRY
88     UINT16 DimmPerCh:3;          ///< Dimm slot per chanel
89     UINT16 Dimms:3;              ///< Number of Dimms on a channel
90     UINT16 SR:3;                 ///< Number of single-rank Dimm
91     UINT16 DR:3;                 ///< Number of dual-rank Dimm
92     UINT16 QR:4;                 ///< Number of quad-rank Dimm
93     UINT16 Speed1_5V;            ///< Speed limit with voltage 1.5V
94     UINT16 Speed1_35V;           ///< Speed limit with voltage 1.35V
95     UINT16 Speed1_25V;           ///< Speed limit with voltage 1.25V
96   } _MAXFREQ_ENTRY;
97   struct {
98     UINT16 CDN;                  ///< Condition
99     UINT16 Speed[3];             ///< Speed limit
100   } MAXFREQ_ENTRY;
101 } PSCFG_MAXFREQ_ENTRY;
102
103 ///  LRDIMM Max. Frequency
104 typedef union {
105   struct {                       ///< PSCFG_LR_MAXFREQ_ENTRY
106     UINT16 DimmPerCh:3;          ///< Dimm slot per chanel
107     UINT16 Dimms:3;              ///< Number of Dimms on a channel
108     UINT16 LR:10;                ///< Number of LR-DIMM
109     UINT16 Speed1_5V;            ///< Speed limit with voltage 1.5V
110     UINT16 Speed1_35V;           ///< Speed limit with voltage 1.35V
111     UINT16 Speed1_25V;           ///< Speed limit with voltage 1.25V
112   } _LR_MAXFREQ_ENTRY;
113   struct {
114     UINT16 CDN;
115     UINT16 Speed[3];
116   } LR_MAXFREQ_ENTRY;
117 } PSCFG_LR_MAXFREQ_ENTRY;
118
119 /// UDIMM&RDIMM RttNom and RttWr
120 typedef struct {
121   UINT64 DimmPerCh:8;          ///< Dimm slot per chanel
122   UINT64 DDRrate:32;           ///< Bitmap of DDR rate
123   UINT64 VDDIO:4;              ///< Bitmap of VDDIO
124   UINT64 Dimm0:4;              ///< Bitmap of rank type of Dimm0
125   UINT64 Dimm1:4;              ///< Bitmap of rank type of Dimm1
126   UINT64 Dimm2:4;              ///< Bitmap of rank type of Dimm2
127   UINT64 Dimm:4;               ///< Bitmap of rank type of Dimm
128   UINT64 Rank:4;               ///< Bitmap of rank
129   UINT8 RttNom:3;              ///< Dram term
130   UINT8 RttWr:5;               ///< Dynamic dram term
131 } PSCFG_RTT_ENTRY;
132
133 /// LRDIMM RttNom and RttWr
134 typedef struct {
135   UINT64 DimmPerCh:8;          ///< Dimm slot per chanel
136   UINT64 DDRrate:32;           ///< Bitmap of DDR rate
137   UINT64 VDDIO:4;              ///< Bitmap of VDDIO
138   UINT64 Dimm0:4;              ///< Dimm0 population
139   UINT64 Dimm1:4;              ///< Dimm1 population
140   UINT64 Dimm2:12;             ///< Dimm2 population
141   UINT8 RttNom:3;              ///< Dram term
142   UINT8 RttWr:5;               ///< Dynamic dram term
143 } PSCFG_LR_RTT_ENTRY;
144
145 /// UDIMM&RDIMM&LRDIMM ODT pattern OF 1 DPC
146 typedef struct {
147   UINT16 Dimm0;                ///< Bitmap of dimm0 rank type or dimm0 population of LRDIMM
148   UINT32 RdODTCSHigh;          ///< RdODTCSHigh
149   UINT32 RdODTCSLow;           ///< RdODTCSLow
150   UINT32 WrODTCSHigh;          ///< WrODTCSHigh
151   UINT32 WrODTCSLow;           ///< WrODTCSLow
152 } PSCFG_1D_ODTPAT_ENTRY;
153
154 /// UDIMM&RDIMM&LRDIMM ODT pattern OF 2 DPC
155 typedef struct {
156   UINT16 Dimm0:4;              ///< Bitmap of dimm0 rank type or dimm0 population of LRDIMM
157   UINT16 Dimm1:12;             ///< Bitmap of dimm1 rank type or dimm1 population of LRDIMM
158   UINT32 RdODTCSHigh;          ///< RdODTCSHigh
159   UINT32 RdODTCSLow;           ///< RdODTCSLow
160   UINT32 WrODTCSHigh;          ///< WrODTCSHigh
161   UINT32 WrODTCSLow;           ///< WrODTCSLow
162 } PSCFG____ODTPAT_ENTRY;
163
164 /// UDIMM&RDIMM&LRDIMM ODT pattern OF 3 DPC
165 typedef struct {
166   UINT16 Dimm0:4;              ///< Bitmap of dimm0 rank type or dimm0 population of LRDIMM
167   UINT16 Dimm1:4;              ///< Bitmap of dimm1 rank type or dimm1 population of LRDIMM
168   UINT16 Dimm2:8;              ///< Bitmap of dimm2 rank type or dimm2 population of LRDIMM
169   UINT32 RdODTCSHigh;          ///< RdODTCSHigh
170   UINT32 RdODTCSLow;           ///< RdODTCSLow
171   UINT32 WrODTCSHigh;          ///< WrODTCSHigh
172   UINT32 WrODTCSLow;           ///< WrODTCSLow
173 } PSCFG_3D_ODTPAT_ENTRY;
174
175 /// UDIMM&RDIMM&LRDIMM SlowMode, AddrTmgCtl and ODC
176 typedef struct {
177   UINT64 DimmPerCh:8;          ///< Dimm slot per channel
178   UINT64 DDRrate:32;           ///< Bitmap of DDR rate
179   UINT64 VDDIO:4;              ///< Bitmap of VDDIO
180   UINT64 Dimm0:4;              ///< Bitmap of dimm0 rank type or dimm0 population of LRDIMM
181   UINT64 Dimm1:4;              ///< Bitmap of dimm1 rank type or dimm1 population of LRDIMM
182   UINT64 Dimm2:11;             ///< Bitmap of dimm2 rank type or dimm2 population of LRDIMM
183   UINT64 SlowMode:1;           ///< SlowMode
184   UINT32 AddTmgCtl;            ///< AddTmgCtl
185   UINT32 ODC;                  ///< ODC
186 } PSCFG_SAO_ENTRY;
187
188 /// UDIMM&RDIMM&LRDIMM training config entry
189 typedef struct {
190   UINT64 DimmPerCh:8;          ///< Dimm slot per channel
191   UINT64 DDRrate:32;           ///< Bitmap of DDR rate
192   UINT64 VDDIO:4;              ///< Bitmap of VDDIO
193   UINT64 Dimm0:4;              ///< Bitmap of dimm0 rank type or dimm0 population of LRDIMM
194   UINT64 Dimm1:4;              ///< Bitmap of dimm1 rank type or dimm1 population of LRDIMM
195   UINT64 Dimm2:11;             ///< Bitmap of dimm2 rank type or dimm2 population of LRDIMM
196   UINT64 Enable__:1;           ///< SlowMode
197 } PSCFG_S___ENTRY;
198
199 /// UDIMM&RDIMM MR0[WR]
200 typedef struct {
201   UINT8 Timing;                ///< Fn2_22C_dct[1:0][Twr]
202   UINT8 Value;                 ///< MR0[WR] : bit0 - bit2 available
203 } PSCFG_MR0WR_ENTRY;
204
205 /// UDIMM&RDIMM MR0[CL]
206 typedef struct {
207   UINT8 Timing;                ///< Fn2_200_dct[1:0][Tcl]
208   UINT8 Value:3;               ///< MR0[CL] : bit0 - bit2 CL[3:1]
209   UINT8 Value1:5;              ///< MR0[CL] : bit3 CL[0]
210 } PSCFG_MR0CL_ENTRY;
211
212 /// UDIMM&RDIMM MR2[IBT]
213 typedef struct {
214   UINT64 DimmPerCh:4;          ///< Dimm slot per channel
215   UINT64 DDRrate:32;           ///< Bitmap of DDR rate
216   UINT64 VDDIO:4;              ///< Bitmap of VDDIO
217   UINT64 Dimm0:4;              ///< Bitmap of dimm0 rank type
218   UINT64 Dimm1:4;              ///< Bitmap of dimm1 rank type
219   UINT64 Dimm2:4;              ///< Bitmap of dimm2 rank type
220   UINT64 Dimm:4;               ///< Bitmap of rank type of Dimm
221   UINT64 NumOfReg:4;           ///< Number of registers
222   UINT64 IBT:4;                 ///< MR2[IBT] value
223 } PSCFG_MR2IBT_ENTRY;
224
225 /// UDIMM&RDIMM&LRDIMM Operating Speed
226 typedef struct {
227   UINT32 DDRrate;              ///< Bitmap of DDR rate
228   UINT8 OPSPD;                 ///< RC10[OperatingSpeed]
229 } PSCFG_OPSPD_ENTRY;
230
231 /// LRDIMM IBT
232 typedef struct {
233   UINT64 DimmPerCh:4;          ///< Dimm slot per channel
234   UINT64 DDRrate:32;           ///< Bitmap of DDR rate
235   UINT64 VDDIO:4;              ///< Bitmap of VDDIO
236   UINT64 Dimm0:4;              ///< Dimm0 population
237   UINT64 Dimm1:4;              ///< Dimm1 population
238   UINT64 Dimm2:4;              ///< Dimm2 population
239   UINT64 F0RC8:3;              ///< F0RC8
240   UINT64 F1RC0:3;              ///< F1RC0
241   UINT64 F1RC1:3;              ///< F1RC1
242   UINT64 F1RC2:3;              ///< F1RC2
243 } PSCFG_L_IBT_ENTRY;
244
245 /// LRDIMM F0RC13[NumPhysicalRanks]
246 typedef struct {
247   UINT8 NumRanks:3;            ///< NumRanks
248   UINT8 NumPhyRanks:5;         ///< NumPhyRanks
249 } PSCFG_L_NPR_ENTRY;
250
251 /// LRDIMM F0RC13[NumLogicalRanks]
252 typedef struct {
253   UINT16 NumPhyRanks:3;        ///< NumPhyRanks
254   UINT16 DramCap:4;            ///< DramCap
255   UINT16 NumDimmSlot:9;        ///< NumDimmSlot
256   UINT8 NumLogRanks;           ///< NumLogRanks
257 } PSCFG_L_NLR_ENTRY;
258
259 /// UDIMM&RDIMM&LRDIMM pass1 seed entry
260 typedef struct {
261   UINT8 DimmPerCh;             ///< Dimm slot per channel
262   UINT8 Channel;               ///< Channel#
263   UINT16 SeedVal;              ///< Seed value
264 } PSCFG_SEED_ENTRY;
265
266 /// Platform specific configuration types
267 typedef enum {
268   PSCFG_MAXFREQ,               ///< PSCFG_MAXFREQ
269   PSCFG_LR_MAXFREQ,            ///< PSCFG_LR_MAXFREQ
270   PSCFG_RTT,                   ///< PSCFG_RTT
271   PSCFG_LR_RTT,                ///< PSCFG_LR_RTT
272   PSCFG_ODT_PAT_1D,            ///< PSCFG_ODT_PAT_1D
273   PSCFG_ODT_PAT___,            ///< PSCFG_ODT_PAT___
274   PSCFG_ODT_PAT_3D,            ///< PSCFG_ODT_PAT_3D
275   PSCFG_LR_ODT_PAT_1D,         ///< PSCFG_LR_ODT_PAT_1D
276   PSCFG_LR_ODT_PAT___,         ///< PSCFG_LR_ODT_PAT___
277   PSCFG_LR_ODT_PAT_3D,         ///< PSCFG_LR_ODT_PAT_3D
278   PSCFG_SAO,                   ///< PSCFG_SAO
279   PSCFG_LR_SAO,                ///< PSCFG_LR_SAO
280   PSCFG_MR0WR,                 ///< PSCFG_MR0WR
281   PSCFG_MR0CL,                 ///< PSCFG_MR0CL
282   PSCFG_RC2IBT,                ///< PSCFG_RC2IBT
283   PSCFG_RC10OPSPD,             ///< PSCFG_RC10OPSPD
284   PSCFG_LR_IBT,                ///< PSCFG_LR_IBT
285   PSCFG_LR_NPR,                ///< PSCFG_LR_NPR
286   PSCFG_LR_NLR,                ///< PSCFG_LR_NLR
287   PSCFG_S__,                   ///< PSCFG_S__
288   PSCFG_WL_PASS1_SEED,         ///< PSCFG_WL_PASS1_SEED
289   PSCFG_HWRXEN_PASS1_SEED,     ///< PSCFG_HWRXEN_SEED
290
291   // The type of general table entries could be added between
292   // PSCFG_GEN_START and PSCFG_GEN_END so that the PSCGen routine
293   // is able to look for the entries per the PSCType.
294   PSCFG_GEN_START,             ///< PSCFG_GEN_START
295   PSCFG_CLKDIS,                ///< PSCFG_CLKDIS
296   PSCFG_CKETRI,                ///< PSCFG_CKETRI
297   PSCFG_ODTTRI,                ///< PSCFG_ODTTRI
298   PSCFG_CSTRI,                 ///< PSCFG_CSTRI
299   PSCFG_GEN_END                ///< PSCFG_GEN_END
300 } PSCFG_TYPE;
301
302 /// Dimm types
303 typedef enum {
304   UDIMM_TYPE = 0x01,           ///< UDIMM_TYPE
305   RDIMM_TYPE = 0x02,           ///< RDIMM_TYPE
306   SODIMM_TYPE = 0x04,          ///< SODIMM_TYPE
307   LRDIMM_TYPE = 0x08,          ///< LRDIMM_TYPE
308   SODWN_SODIMM_TYPE = 0x10,    ///< SODWN_SODIMM_TYPE
309   DT_DONT_CARE = 0xFF          ///< DT_DONT_CARE
310 } DIMM_TYPE;
311
312 /// Number of Dimm
313 typedef enum {
314   _1DIMM = 0x01,               ///< _1DIMM
315   _2DIMM = 0x02,               ///< _2DIMM
316   _3DIMM = 0x04,               ///< _3DIMM
317   _4DIMM = 0x08,               ///< _4DIMM
318   NOD_DONT_CARE = 0xFF         ///< NOD_DONT_CARE
319 } NOD_SUPPORTED;
320
321 /// Table header related definitions
322 typedef struct {
323   PSCFG_TYPE PSCType;           ///< PSC Type
324   DIMM_TYPE DimmType;           ///< Dimm Type
325   NOD_SUPPORTED NumOfDimm;      ///< Numbef of dimm
326   CPU_LOGICAL_ID LogicalCpuid;  ///< Logical Cpuid
327   UINT8 PackageType;            ///< Package Type
328   TECHNOLOGY_TYPE TechType;     ///< Technology type
329 } PSC_TBL_HEADER;
330
331 /// Table entry
332 typedef struct {
333   PSC_TBL_HEADER Header;        ///< PSC_TBL_HEADER
334   UINT8 TableSize;              ///< Table size
335   VOID *TBLPtr;                 ///< Pointer of the table
336 } PSC_TBL_ENTRY;
337
338 #define NOD_DONT_CARE 0xFF
339 #define PT_DONT_CARE 0xFF
340 #define NP 1
341 #define V1_5  1
342 #define V1_35  2
343 #define V1_25  4
344 #define VOLT_ALL (V1_5 | V1_35 | V1_25)
345 #define DIMM_SR 2
346 #define DIMM_DR 4
347 #define DIMM_QR 8
348 #define DIMM_LR 2
349 #define R0 1
350 #define R1 2
351 #define R2 4
352 #define R3 8
353 #define CH_A 0x01
354 #define CH_B 0x02
355 #define CH_C 0x04
356 #define CH_D 0x08
357 #define CH_ALL 0x0F
358 /*----------------------------------------------------------------------------
359  *                           FUNCTIONS PROTOTYPE
360  *
361  *----------------------------------------------------------------------------
362  */
363
364 AGESA_STATUS
365 MemPConstructPsUDef (
366   IN OUT   MEM_DATA_STRUCT *MemPtr,
367   IN OUT   CH_DEF_STRUCT *ChannelPtr,
368   IN OUT   MEM_PS_BLOCK *PsPtr
369   );
370
371 BOOLEAN
372 MemPGetDramTerm (
373   IN OUT   MEM_NB_BLOCK *NBPtr,
374   IN       UINT8 ArraySize,
375   IN       CONST DRAM_TERM_ENTRY *DramTermPtr
376   );
377
378 AGESA_STATUS
379 MemPConstructPsSHy3 (
380   IN OUT   MEM_DATA_STRUCT *MemPtr,
381   IN OUT   CH_DEF_STRUCT *ChannelPtr,
382   IN OUT   MEM_PS_BLOCK *PsPtr
383   );
384
385 AGESA_STATUS
386 MemPConstructPsUHy3 (
387   IN OUT   MEM_DATA_STRUCT *MemPtr,
388   IN OUT   CH_DEF_STRUCT *ChannelPtr,
389   IN OUT   MEM_PS_BLOCK *PsPtr
390   );
391
392 AGESA_STATUS
393 MemPConstructPsRHy3 (
394   IN OUT   MEM_DATA_STRUCT *MemPtr,
395   IN OUT   CH_DEF_STRUCT *ChannelPtr,
396   IN OUT   MEM_PS_BLOCK *PsPtr
397   );
398
399 AGESA_STATUS
400 MemPConstructPsUC32_3 (
401   IN OUT   MEM_DATA_STRUCT *MemPtr,
402   IN OUT   CH_DEF_STRUCT *ChannelPtr,
403   IN OUT   MEM_PS_BLOCK *PsPtr
404   );
405
406 AGESA_STATUS
407 MemPConstructPsRC32_3 (
408   IN OUT   MEM_DATA_STRUCT *MemPtr,
409   IN OUT   CH_DEF_STRUCT *ChannelPtr,
410   IN OUT   MEM_PS_BLOCK *PsPtr
411   );
412
413
414 AGESA_STATUS
415 MemPConstructPsSDr3 (
416   IN OUT   MEM_DATA_STRUCT *MemPtr,
417   IN OUT   CH_DEF_STRUCT *ChannelPtr,
418   IN OUT   MEM_PS_BLOCK *PsPtr
419   );
420
421 AGESA_STATUS
422 MemPConstructPsUDr3 (
423   IN OUT   MEM_DATA_STRUCT *MemPtr,
424   IN OUT   CH_DEF_STRUCT *ChannelPtr,
425   IN OUT   MEM_PS_BLOCK *PsPtr
426   );
427
428 AGESA_STATUS
429 MemPConstructPsRDr3 (
430   IN OUT   MEM_DATA_STRUCT *MemPtr,
431   IN OUT   CH_DEF_STRUCT *ChannelPtr,
432   IN OUT   MEM_PS_BLOCK *PsPtr
433   );
434
435 AGESA_STATUS
436 MemPConstructPsUDA3 (
437   IN OUT   MEM_DATA_STRUCT *MemPtr,
438   IN OUT   CH_DEF_STRUCT *ChannelPtr,
439   IN OUT   MEM_PS_BLOCK *PsPtr
440   );
441
442 AGESA_STATUS
443 MemPConstructPsSNi3 (
444   IN OUT   MEM_DATA_STRUCT *MemPtr,
445   IN OUT   CH_DEF_STRUCT *ChannelPtr,
446   IN OUT   MEM_PS_BLOCK *PsPtr
447   );
448
449 AGESA_STATUS
450 MemPConstructPsUNi3 (
451   IN OUT   MEM_DATA_STRUCT *MemPtr,
452   IN OUT   CH_DEF_STRUCT *ChannelPtr,
453   IN OUT   MEM_PS_BLOCK *PsPtr
454   );
455
456 AGESA_STATUS
457 MemPConstructPsSRb3 (
458   IN OUT   MEM_DATA_STRUCT *MemPtr,
459   IN OUT   CH_DEF_STRUCT *ChannelPtr,
460   IN OUT   MEM_PS_BLOCK *PsPtr
461   );
462
463 AGESA_STATUS
464 MemPConstructPsURb3 (
465   IN OUT   MEM_DATA_STRUCT *MemPtr,
466   IN OUT   CH_DEF_STRUCT *ChannelPtr,
467   IN OUT   MEM_PS_BLOCK *PsPtr
468   );
469
470 AGESA_STATUS
471 MemPConstructPsSPh3 (
472   IN OUT   MEM_DATA_STRUCT *MemPtr,
473   IN OUT   CH_DEF_STRUCT *ChannelPtr,
474   IN OUT   MEM_PS_BLOCK *PsPtr
475   );
476
477 AGESA_STATUS
478 MemPConstructPsUPh3 (
479   IN OUT   MEM_DATA_STRUCT *MemPtr,
480   IN OUT   CH_DEF_STRUCT *ChannelPtr,
481   IN OUT   MEM_PS_BLOCK *PsPtr
482   );
483
484 AGESA_STATUS
485 MemPConstructPsSDA3 (
486   IN OUT   MEM_DATA_STRUCT *MemPtr,
487   IN OUT   CH_DEF_STRUCT *ChannelPtr,
488   IN OUT   MEM_PS_BLOCK *PsPtr
489   );
490
491 AGESA_STATUS
492 MemPConstructPsSDA2 (
493   IN OUT   MEM_DATA_STRUCT *MemPtr,
494   IN OUT   CH_DEF_STRUCT *ChannelPtr,
495   IN OUT   MEM_PS_BLOCK *PsPtr
496   );
497
498 AGESA_STATUS
499 MemPConstructPsSLN3 (
500   IN OUT   MEM_DATA_STRUCT *MemPtr,
501   IN OUT   CH_DEF_STRUCT *ChannelPtr,
502   IN OUT   MEM_PS_BLOCK *PsPtr
503   );
504
505 AGESA_STATUS
506 MemPConstructPsULN3 (
507   IN OUT   MEM_DATA_STRUCT *MemPtr,
508   IN OUT   CH_DEF_STRUCT *ChannelPtr,
509   IN OUT   MEM_PS_BLOCK *PsPtr
510   );
511
512 AGESA_STATUS
513 MemPConstructPsRLN3 (
514   IN OUT   MEM_DATA_STRUCT *MemPtr,
515   IN OUT   CH_DEF_STRUCT *ChannelPtr,
516   IN OUT   MEM_PS_BLOCK *PsPtr
517   );
518
519 AGESA_STATUS
520 MemPConstructPsSON3 (
521   IN OUT   MEM_DATA_STRUCT *MemPtr,
522   IN OUT   CH_DEF_STRUCT *ChannelPtr,
523   IN OUT   MEM_PS_BLOCK *PsPtr
524   );
525
526 AGESA_STATUS
527 MemPConstructPsUON3 (
528   IN OUT   MEM_DATA_STRUCT *MemPtr,
529   IN OUT   CH_DEF_STRUCT *ChannelPtr,
530   IN OUT   MEM_PS_BLOCK *PsPtr
531   );
532
533 UINT16
534 MemPGetPorFreqLimit (
535   IN OUT   MEM_NB_BLOCK *NBPtr,
536   IN       UINT8 FreqLimitSize,
537   IN       CONST POR_SPEED_LIMIT *FreqLimitPtr
538   );
539
540 VOID
541 MemPGetPORFreqLimitDef (
542   IN OUT   MEM_NB_BLOCK *NBPtr
543   );
544
545 BOOLEAN
546 MemPPSCFlow (
547   IN OUT   MEM_NB_BLOCK *NBPtr
548   );
549
550 VOID
551 MemPConstructRankTypeMap (
552   IN          UINT16 Dimm0,
553   IN          UINT16 Dimm1,
554   IN          UINT16 Dimm2,
555   IN OUT   UINT16 *RankTypeInTable
556  );
557
558 BOOLEAN
559 MemPIsIdSupported (
560   IN OUT   MEM_NB_BLOCK *NBPtr,
561   IN       CPU_LOGICAL_ID LogicalId,
562   IN       UINT8 PackageType
563  );
564
565 UINT16
566 MemPGetPsRankType (
567   IN       CH_DEF_STRUCT *CurrentChannel
568   );
569
570 BOOLEAN
571 MemPRecPSCFlow (
572   IN OUT   MEM_NB_BLOCK *NBPtr
573   );
574
575 VOID
576 MemPRecConstructRankTypeMap (
577   IN          UINT16 Dimm0,
578   IN          UINT16 Dimm1,
579   IN          UINT16 Dimm2,
580   IN OUT   UINT16 *RankTypeInTable
581  );
582
583 BOOLEAN
584 MemPRecIsIdSupported (
585   IN OUT   MEM_NB_BLOCK *NBPtr,
586   IN       CPU_LOGICAL_ID LogicalId,
587   IN       UINT8 PackageType
588  );
589
590 UINT16
591 MemPRecGetPsRankType (
592   IN       CH_DEF_STRUCT *CurrentChannel
593   );
594
595 UINT16
596 MemPProceedTblDrvOverride (
597   IN OUT   MEM_NB_BLOCK *NBPtr,
598   IN       PSO_TABLE *PlatformMemoryConfiguration,
599   IN       UINT8 ProceededPSOType
600   );
601
602 BOOLEAN
603 MemPGetPSCPass1Seed (
604   IN OUT   MEM_NB_BLOCK *NBPtr
605   );
606
607 #endif  /* _MP_H_ */