AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Proc / CPU / Family / 0x15 / cpuF15PciTables.c
1 /* $NoKeywords:$ */
2 /**
3  * @file
4  *
5  * AMD Family_15  PCI tables with values as defined in BKDG
6  *
7  * @xrefitem bom "File Content Label" "Release Content"
8  * @e project:      AGESA
9  * @e sub-project:  CPU/Family/0x15
10  * @e \$Revision: 59440 $   @e \$Date: 2011-09-22 19:44:44 -0600 (Thu, 22 Sep 2011) $
11  *
12  */
13 /*
14  ******************************************************************************
15  *
16  * Copyright (C) 2012 Advanced Micro Devices, Inc.
17  * All rights reserved.
18  *
19  * Redistribution and use in source and binary forms, with or without
20  * modification, are permitted provided that the following conditions are met:
21  *     * Redistributions of source code must retain the above copyright
22  *       notice, this list of conditions and the following disclaimer.
23  *     * Redistributions in binary form must reproduce the above copyright
24  *       notice, this list of conditions and the following disclaimer in the
25  *       documentation and/or other materials provided with the distribution.
26  *     * Neither the name of Advanced Micro Devices, Inc. nor the names of
27  *       its contributors may be used to endorse or promote products derived
28  *       from this software without specific prior written permission.
29  *
30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
31  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33  * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
34  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
37  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  ******************************************************************************
42  */
43
44 /*----------------------------------------------------------------------------------------
45  *                             M O D U L E S    U S E D
46  *----------------------------------------------------------------------------------------
47  */
48 #include "AGESA.h"
49 #include "Ids.h"
50 #include "cpuRegisters.h"
51 #include "Table.h"
52 #include "Filecode.h"
53 CODE_GROUP (G3_DXE)
54 RDATA_GROUP (G3_DXE)
55
56 #define FILECODE PROC_CPU_FAMILY_0X15_CPUF15PCITABLES_FILECODE
57
58 /*----------------------------------------------------------------------------------------
59  *                   D E F I N I T I O N S    A N D    M A C R O S
60  *----------------------------------------------------------------------------------------
61  */
62
63 /*----------------------------------------------------------------------------------------
64  *                  T Y P E D E F S     A N D     S T R U C T U R E S
65  *----------------------------------------------------------------------------------------
66  */
67
68 /*----------------------------------------------------------------------------------------
69  *           P R O T O T Y P E S     O F     L O C A L     F U N C T I O N S
70  *----------------------------------------------------------------------------------------
71  */
72
73 /*----------------------------------------------------------------------------------------
74  *                          E X P O R T E D    F U N C T I O N S
75  *----------------------------------------------------------------------------------------
76  */
77
78 //  P C I    T a b l e s
79 // ----------------------
80
81 STATIC CONST TABLE_ENTRY_FIELDS ROMDATA F15PciRegisters[] =
82 {
83 // F2x1B0 - Extended Memory Controller Configuration Low
84 // bits[10:8], CohPrefPrbLmt = 1
85   {
86     PciRegister,
87     {
88       AMD_FAMILY_15,                      // CpuFamily
89       AMD_F15_ALL                         // CpuRevision
90     },
91     {AMD_PF_ALL},                           // platformFeatures
92     {{
93       MAKE_SBDFO (0, 0, 24, FUNC_2, 0x1B0),  // Address
94       0x00000100,                           // regData
95       0x00000700,                           // regMask
96     }}
97   },
98
99 // Function 3 - Misc. Control
100
101 // F3x6C - Data Buffer Count
102 // bits[30:28] IsocRspDBC = 1
103 // bits[18:16] UpRspDBC = 1
104 // bits[7:6]   DnRspDBC = 1
105 // bits[5:4]   DnReqDBC = 1
106 // bits[2:0]   UpReqDBC = 2
107   {
108     PciRegister,
109     {
110       AMD_FAMILY_15,                      // CpuFamily
111       AMD_F15_ALL                         // CpuRevision
112     },
113     {AMD_PF_ALL},                           // platformFeatures
114     {{
115       MAKE_SBDFO (0, 0, 24, FUNC_3, 0x6C),  // Address
116       0x10010052,                           // regData
117       0x700700F7,                           // regMask
118     }}
119   },
120 // F3xA0 - Power Control Miscellaneous
121 // bits[13:11] PllLockTime = 1
122   {
123     PciRegister,
124     {
125       AMD_FAMILY_15,                      // CpuFamily
126       AMD_F15_ALL                         // CpuRevision
127     },
128     {AMD_PF_ALL},                           // platformFeatures
129     {{
130       MAKE_SBDFO (0, 0, 24, FUNC_3, 0xA0),  // Address
131       0x00000800,                           // regData
132       0x00003800,                           // regMask
133     }}
134   },
135 // F3xA4 - Reported Temperature Control
136 // bits[12:8] PerStepTimeDn = 0x0F
137 // bits[7] TmpSlewDnEn = 1
138 // bits[6:5] TmpMaxDiffUp = 3
139 // bits[4:0] PerStepTimeUp = 0x0F
140   {
141     PciRegister,
142     {
143       AMD_FAMILY_15,                      // CpuFamily
144       AMD_F15_ALL                         // CpuRevision
145     },
146     {AMD_PF_ALL},                           // platformFeatures
147     {{
148       MAKE_SBDFO (0, 0, 24, FUNC_3, 0xA4),  // Address
149       0x00000FEF,                           // regData
150       0x00001FFF,                           // regMask
151     }}
152   },
153 // F3xDC - Clock Power Timing Control 2
154 // bit [26]    IgnCpuPrbEn = 1
155 // bits[14:12] NbsynPtrAdj = 5
156   {
157     PciRegister,
158     {
159       AMD_FAMILY_15,                      // CpuFamily
160       AMD_F15_ALL                         // CpuRevision
161     },
162     {AMD_PF_ALL},                           // platformFeatures
163     {{
164       MAKE_SBDFO (0, 0, 24, FUNC_3, 0xDC),  // Address
165       0x04005000,                           // regData
166       0x04007000,                           // regMask
167     }}
168   },
169 // F3x1CC - IBS Control
170 // bits[8] LvtOffsetVal = 1
171 // bits[3:0] LvtOffset = 0
172   {
173     PciRegister,
174     {
175       AMD_FAMILY_15,                      // CpuFamily
176       AMD_F15_ALL                         // CpuRevision
177     },
178     {AMD_PF_ALL},                           // platformFeatures
179     {{
180       MAKE_SBDFO (0, 0, 24, FUNC_3, 0x1CC), // Address
181       0x00000100,                           // regData
182       0x0000010F,                           // regMask
183     }}
184   },
185 // F4x15C - Core Performance Boost Control
186 // bits[1:0] BoostSrc = 0
187   {
188     PciRegister,
189     {
190       AMD_FAMILY_15,                      // CpuFamily
191       AMD_F15_ALL                         // CpuRevision
192     },
193     {AMD_PF_ALL},                           // platformFeatures
194     {{
195       MAKE_SBDFO (0, 0, 24, FUNC_4, 0x15C), // Address
196       0x00000000,                           // regData
197       0x00000003,                           // regMask
198     }}
199   },
200 };
201
202 CONST REGISTER_TABLE ROMDATA F15PciRegisterTable = {
203   PrimaryCores,
204   (sizeof (F15PciRegisters) / sizeof (TABLE_ENTRY_FIELDS)),
205   F15PciRegisters,
206 };