AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Proc / Mem / NB / C32 / mnc32.h
1 /* $NoKeywords:$ */
2 /**
3  * @file
4  *
5  * mnc32.h
6  *
7  * Northbridge C32
8  *
9  * @xrefitem bom "File Content Label" "Release Content"
10  * @e project: AGESA
11  * @e sub-project: (Mem)
12  * @e \$Revision: 47408 $ @e \$Date: 2011-02-18 09:56:31 -0700 (Fri, 18 Feb 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 _MNC32_H_
47 #define _MNC32_H_
48
49 /*----------------------------------------------------------------------------
50  *   Mixed (DEFINITIONS AND MACROS / TYPEDEFS, STRUCTURES, ENUMS)
51  *
52  *----------------------------------------------------------------------------
53  */
54 #define MAX_CHANNELS_PER_SOCKET_C32    2
55 #define MAX_DCTS_PER_NODE_C32          2
56 #define MAX_CHANNELS_PER_DCT_C32       1
57 #define MAX_NODES_SUPPORTED_C32        8
58
59 /*-----------------------------------------------------------------------------
60  *                         DEFINITIONS AND MACROS
61  *
62  *-----------------------------------------------------------------------------
63  */
64
65 /*----------------------------------------------------------------------------
66  *                         TYPEDEFS, STRUCTURES, ENUMS
67  *
68  *----------------------------------------------------------------------------
69  */
70
71 /*----------------------------------------------------------------------------
72  *                           FUNCTIONS PROTOTYPE
73  *
74  *----------------------------------------------------------------------------
75  */
76 BOOLEAN
77 MemConstructNBBlockC32 (
78   IN OUT   MEM_NB_BLOCK *NBPtr,
79   IN OUT   MEM_DATA_STRUCT *MemPtr,
80   IN       MEM_FEAT_BLOCK_NB *FeatPtr,
81   IN       MEM_SHARED_DATA *SharedPtr,
82   IN       UINT8 NodeID
83   );
84
85 VOID
86 MemNInitNBDataC32 (
87   IN OUT   MEM_NB_BLOCK *NBPtr
88   );
89
90 VOID
91 MemNInitDefaultsC32 (
92   IN OUT   MEM_DATA_STRUCT *MemPtr
93   );
94
95 BOOLEAN
96 MemNInitializeMctC32 (
97   IN OUT   MEM_NB_BLOCK *NBPtr
98   );
99
100 BOOLEAN
101 MemNFinalizeMctC32 (
102   IN OUT   MEM_NB_BLOCK *NBPtr
103   );
104
105 VOID
106 MemNSendMrsCmdC32 (
107   IN OUT   MEM_NB_BLOCK *NBPtr
108   );
109
110 BOOLEAN
111 MemNAutoConfigC32 (
112   IN OUT   MEM_NB_BLOCK *NBPtr
113   );
114
115 BOOLEAN
116 MemNOtherTimingC32 (
117   IN OUT   MEM_NB_BLOCK *NBPtr
118   );
119
120 VOID
121 MemNInitPhyCompC32 (
122   IN OUT   MEM_NB_BLOCK *NBPtr
123   );
124
125 VOID
126 MemNWritePatternC32 (
127   IN OUT   MEM_NB_BLOCK *NBPtr,
128   IN       UINT32 Address,
129   IN       UINT8 Pattern[],
130   IN       UINT16 ClCount
131   );
132
133 VOID
134 MemNReadPatternC32 (
135   IN OUT   MEM_NB_BLOCK *NBPtr,
136   IN       UINT8 Buffer[],
137   IN       UINT32 Address,
138   IN       UINT16 ClCount
139   );
140
141 VOID
142 InitNBRegTableC32 (
143   IN OUT   MEM_NB_BLOCK *NBPtr,
144   IN OUT   TSEFO NBRegTable[]
145   );
146
147 UINT8
148 MemNGetSocketRelativeChannelC32 (
149   IN OUT   MEM_NB_BLOCK *NBPtr,
150   IN       UINT8 Dct,
151   IN       UINT8 Channel
152   );
153
154 BOOLEAN
155 MemNIsIdSupportedC32 (
156   IN OUT   MEM_NB_BLOCK *NBPtr,
157   IN       CPU_LOGICAL_ID *LogicalIdPtr
158   );
159
160 VOID
161 MemNBeforeDramInitC32 (
162   IN OUT   MEM_NB_BLOCK *NBPtr
163   );
164
165 BOOLEAN
166 MemNPlatformSpecificFormFactorInitC32 (
167   IN OUT   MEM_NB_BLOCK *NBPtr
168   );
169
170 VOID
171 MemNEnDLLShutDownC32 (
172   IN OUT   MEM_NB_BLOCK *NBPtr
173   );
174
175 UINT32
176 MemNCmnGetSetFieldC32 (
177   IN OUT   MEM_NB_BLOCK *NBPtr,
178   IN       UINT8 IsSet,
179   IN       BIT_FIELD_NAME FieldName,
180   IN       UINT32 Field
181   );
182
183 VOID
184 MemNBeforePlatformSpecC32 (
185   IN OUT   MEM_NB_BLOCK *NBPtr
186   );
187
188 BOOLEAN
189 memNEnableTrainSequenceC32 (
190   IN OUT   MEM_NB_BLOCK *NBPtr
191   );
192
193 BOOLEAN
194 MemNInitExtMMIOAddrC32  (
195   IN OUT   MEM_NB_BLOCK *NBPtr,
196   IN OUT   VOID *OptParam
197   );
198
199 VOID
200 MemNBeforeDQSTrainingC32 (
201   IN OUT   MEM_NB_BLOCK *NBPtr
202   );
203
204 BOOLEAN
205 MemNForceLvDimmVoltageC32 (
206   IN OUT   MEM_NB_BLOCK *NBPtr,
207   IN OUT   VOID *MemMainPtr
208   );
209
210 #endif  /* _MNC32_H_ */
211
212