blob: f26559feea9fbb9f7999e87e2859c70858f5dbd2 [file] [log] [blame]
Dave Frodin892d1292013-12-11 12:38:40 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
5 * Copyright (C) 2013 Sage Electronic Engineering, LLC
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Dave Frodin892d1292013-12-11 12:38:40 -070015 */
16
17/**
18 * @file
19 *
20 * AMD User options selection for a Brazos platform solution system
21 *
22 * This file is placed in the user's platform directory and contains the
23 * build option selections desired for that platform.
24 *
25 * For Information about this file, see @ref platforminstall.
26 *
Dave Frodin892d1292013-12-11 12:38:40 -070027 */
28
Edward O'Callaghand5339ae2014-07-07 19:58:53 +100029#include <stdlib.h>
30
Dave Frodin892d1292013-12-11 12:38:40 -070031#include "Filecode.h"
32#define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
33
34
35/* Select the cpu family. */
36#define INSTALL_FAMILY_10_SUPPORT FALSE
37#define INSTALL_FAMILY_12_SUPPORT FALSE
38#define INSTALL_FAMILY_14_SUPPORT TRUE
39#define INSTALL_FAMILY_15_SUPPORT FALSE
40
41/* Select the cpu socket type. */
42#define INSTALL_G34_SOCKET_SUPPORT FALSE
43#define INSTALL_C32_SOCKET_SUPPORT FALSE
44#define INSTALL_S1G3_SOCKET_SUPPORT FALSE
45#define INSTALL_S1G4_SOCKET_SUPPORT FALSE
46#define INSTALL_ASB2_SOCKET_SUPPORT FALSE
47#define INSTALL_FS1_SOCKET_SUPPORT FALSE
48#define INSTALL_FM1_SOCKET_SUPPORT FALSE
49#define INSTALL_FP1_SOCKET_SUPPORT FALSE
50#define INSTALL_FT1_SOCKET_SUPPORT TRUE
51#define INSTALL_AM3_SOCKET_SUPPORT FALSE
52
53/*
54 * Agesa optional capabilities selection.
55 * Uncomment and mark FALSE those features you wish to include in the build.
56 * Comment out or mark TRUE those features you want to REMOVE from the build.
57 */
58
59#define BLDOPT_REMOVE_FAMILY_10_SUPPORT TRUE
60#define BLDOPT_REMOVE_FAMILY_12_SUPPORT TRUE
61#define BLDOPT_REMOVE_FAMILY_14_SUPPORT FALSE
62#define BLDOPT_REMOVE_FAMILY_15_SUPPORT TRUE
63
64#define BLDOPT_REMOVE_AM3_SOCKET_SUPPORT TRUE
65#define BLDOPT_REMOVE_ASB2_SOCKET_SUPPORT TRUE
66#define BLDOPT_REMOVE_C32_SOCKET_SUPPORT TRUE
67#define BLDOPT_REMOVE_FM1_SOCKET_SUPPORT TRUE
68#define BLDOPT_REMOVE_FP1_SOCKET_SUPPORT TRUE
69#define BLDOPT_REMOVE_FS1_SOCKET_SUPPORT TRUE
70#define BLDOPT_REMOVE_FT1_SOCKET_SUPPORT FALSE
71#define BLDOPT_REMOVE_G34_SOCKET_SUPPORT TRUE
72#define BLDOPT_REMOVE_S1G3_SOCKET_SUPPORT TRUE
73#define BLDOPT_REMOVE_S1G4_SOCKET_SUPPORT TRUE
74
75#define BLDOPT_REMOVE_UDIMMS_SUPPORT FALSE
76#define BLDOPT_REMOVE_RDIMMS_SUPPORT TRUE
77#define BLDOPT_REMOVE_LRDIMMS_SUPPORT FALSE
78#define BLDOPT_REMOVE_ECC_SUPPORT FALSE
79//#define BLDOPT_REMOVE_DCT_INTERLEAVE TRUE
80#define BLDOPT_REMOVE_BANK_INTERLEAVE FALSE
81#define BLDOPT_REMOVE_NODE_INTERLEAVE TRUE
82#define BLDOPT_REMOVE_PARALLEL_TRAINING FALSE
83#define BLDOPT_REMOVE_DQS_TRAINING FALSE
84#define BLDOPT_REMOVE_ONLINE_SPARE_SUPPORT TRUE
85#define BLDOPT_REMOVE_MULTISOCKET_SUPPORT TRUE
86#define BLDOPT_REMOVE_ACPI_PSTATES FALSE
87 #define BLDCFG_REMOVE_ACPI_PSTATES_PPC FALSE
88 #define BLDCFG_REMOVE_ACPI_PSTATES_PCT FALSE
89 #define BLDCFG_REMOVE_ACPI_PSTATES_PSD FALSE
90 #define BLDCFG_REMOVE_ACPI_PSTATES_PSS FALSE
91 #define BLDCFG_REMOVE_ACPI_PSTATES_XPSS FALSE
92 #define BLDCFG_FORCE_INDEPENDENT_PSD_OBJECT FALSE
93#define BLDOPT_REMOVE_SRAT FALSE
94#define BLDOPT_REMOVE_SLIT FALSE
95#define BLDOPT_REMOVE_WHEA FALSE
96#define BLDOPT_REMOVE_DMI TRUE
97#define BLDOPT_REMOVE_HT_ASSIST TRUE
98#define BLDOPT_REMOVE_ATM_MODE TRUE
99//#define BLDOPT_REMOVE_MSG_BASED_C1E TRUE
100//#define BLDOPT_REMOVE_LOW_POWER_STATE_FOR_PROCHOT TRUE
101#define BLDOPT_REMOVE_MEM_RESTORE_SUPPORT FALSE
102//#define BLDOPT_REMOVE_C6_STATE TRUE
103#define BLDOPT_REMOVE_GFX_RECOVERY TRUE
104#define BLDOPT_REMOVE_EARLY_SAMPLES TRUE
105
Dave Frodin892d1292013-12-11 12:38:40 -0700106
107#define BLDCFG_PCI_MMIO_BASE CONFIG_MMCONF_BASE_ADDRESS
108#define BLDCFG_PCI_MMIO_SIZE CONFIG_MMCONF_BUS_NUMBER
109
110#define BLDCFG_VRM_CURRENT_LIMIT 24000
111//#define BLDCFG_VRM_NB_CURRENT_LIMIT 0
112#define BLDCFG_VRM_LOW_POWER_THRESHOLD 24000
113#define BLDCFG_VRM_NB_LOW_POWER_THRESHOLD 1
114#define BLDCFG_VRM_SLEW_RATE 5000
115//#define BLDCFG_VRM_NB_SLEW_RATE 5000
116//#define BLDCFG_VRM_ADDITIONAL_DELAY 0
117//#define BLDCFG_VRM_NB_ADDITIONAL_DELAY 0
118#define BLDCFG_VRM_HIGH_SPEED_ENABLE TRUE
119//#define BLDCFG_VRM_NB_HIGH_SPEED_ENABLE FALSE
120#define BLDCFG_VRM_INRUSH_CURRENT_LIMIT 6000
121//#define BLDCFG_VRM_NB_INRUSH_CURRENT_LIMIT 0
122
123//#define BLDCFG_PROCESSOR_SCOPE_NAME0 'C'
124//#define BLDCFG_PROCESSOR_SCOPE_NAME1 '0'
125//#define BLDCFG_PROCESSOR_SCOPE_IN_SB FALSE
126#define BLDCFG_PLAT_NUM_IO_APICS 3
127//#define BLDCFG_PLATFORM_C1E_MODE C1eModeDisabled
128//#define BLDCFG_PLATFORM_C1E_OPDATA 0
129//#define BLDCFG_PLATFORM_C1E_MODE_OPDATA1 0
130//#define BLDCFG_PLATFORM_C1E_MODE_OPDATA2 0
131#define BLDCFG_PLATFORM_CSTATE_MODE CStateModeC6
132#define BLDCFG_PLATFORM_CSTATE_OPDATA 0x840
133#define BLDCFG_PLATFORM_CSTATE_IO_BASE_ADDRESS 0x840
134//#define BLDCFG_PLATFORM_CPB_MODE CpbModeAuto
135#define BLDCFG_CORE_LEVELING_MODE CORE_LEVEL_LOWEST
136#define BLDCFG_AP_MTRR_SETTINGS_LIST &OntarioApMtrrSettingsList
137#define BLDCFG_AMD_PLATFORM_TYPE AMD_PLATFORM_MOBILE
138//#define BLDCFG_STARTING_BUSNUM 0
139//#define BLDCFG_MAXIMUM_BUSNUM 0xf8
140//#define BLDCFG_ALLOCATED_BUSNUMS 0x20
141//#define BLDCFG_PLATFORM_DEEMPHASIS_LIST 0
142//#define BLDCFG_BUID_SWAP_LIST 0
143//#define BLDCFG_HTDEVICE_CAPABILITIES_OVERRIDE_LIST 0
144//#define BLDCFG_HTFABRIC_LIMITS_LIST 0
145//#define BLDCFG_HTCHAIN_LIMITS_LIST 0
146//#define BLDCFG_BUS_NUMBERS_LIST 0
147//#define BLDCFG_IGNORE_LINK_LIST 0
148//#define BLDCFG_LINK_SKIP_REGANG_LIST 0
149//#define BLDCFG_ADDITIONAL_TOPOLOGIES_LIST 0
150//#define BLDCFG_USE_HT_ASSIST TRUE
151//#define BLDCFG_USE_ATM_MODE TRUE
152//#define BLDCFG_PLATFORM_CONTROL_FLOW_MODE Nfcm
153#define BLDCFG_S3_LATE_RESTORE TRUE
154//#define BLDCFG_USE_32_BYTE_REFRESH FALSE
155//#define BLDCFG_USE_VARIABLE_MCT_ISOC_PRIORITY FALSE
156//#define BLDCFG_PLATFORM_POWER_POLICY_MODE Performance
157//#define BLDCFG_SET_HTCRC_SYNC_FLOOD FALSE
158//#define BLDCFG_USE_UNIT_ID_CLUMPING FALSE
159//#define BLDCFG_SYSTEM_PHYSICAL_SOCKET_MAP 0
160#define BLDCFG_CFG_GNB_HD_AUDIO FALSE
161//#define BLDCFG_CFG_ABM_SUPPORT FALSE
162//#define BLDCFG_CFG_DYNAMIC_REFRESH_RATE 0
163//#define BLDCFG_CFG_LCD_BACK_LIGHT_CONTROL 0
164//#define BLDCFG_MEM_INIT_PSTATE 0
165//#define BLDCFG_AMD_PSTATE_CAP_VALUE 0
166#define BLDCFG_MEMORY_BUS_FREQUENCY_LIMIT DDR1333_FREQUENCY
167#define BLDCFG_MEMORY_MODE_UNGANGED TRUE
168//#define BLDCFG_MEMORY_QUAD_RANK_CAPABLE TRUE
169//#define BLDCFG_MEMORY_QUADRANK_TYPE QUADRANK_UNBUFFERED
170#define BLDCFG_MEMORY_SODIMM_CAPABLE TRUE
171#define BLDCFG_MEMORY_LRDIMM_CAPABLE FALSE
172#define BLDCFG_MEMORY_ENABLE_BANK_INTERLEAVING TRUE
173#define BLDCFG_MEMORY_ENABLE_NODE_INTERLEAVING FALSE
174#define BLDCFG_MEMORY_CHANNEL_INTERLEAVING FALSE
175#define BLDCFG_MEMORY_POWER_DOWN TRUE
176#define BLDCFG_POWER_DOWN_MODE POWER_DOWN_BY_CHIP_SELECT
177//#define BLDCFG_ONLINE_SPARE FALSE
178//#define BLDCFG_MEMORY_PARITY_ENABLE FALSE
179#define BLDCFG_BANK_SWIZZLE TRUE
180#define BLDCFG_TIMING_MODE_SELECT TIMING_MODE_AUTO
181#define BLDCFG_MEMORY_CLOCK_SELECT DDR1333_FREQUENCY
182#define BLDCFG_DQS_TRAINING_CONTROL TRUE
183#define BLDCFG_IGNORE_SPD_CHECKSUM FALSE
184#define BLDCFG_USE_BURST_MODE FALSE
185#define BLDCFG_MEMORY_ALL_CLOCKS_ON FALSE
186//#define BLDCFG_ENABLE_ECC_FEATURE TRUE
187//#define BLDCFG_ECC_REDIRECTION FALSE
188//#define BLDCFG_SCRUB_DRAM_RATE 0
189//#define BLDCFG_SCRUB_L2_RATE 0
190//#define BLDCFG_SCRUB_L3_RATE 0
191//#define BLDCFG_SCRUB_IC_RATE 0
192//#define BLDCFG_SCRUB_DC_RATE 0
193//#define BLDCFG_ECC_SYNC_FLOOD 0
194//#define BLDCFG_ECC_SYMBOL_SIZE 0
195//#define BLDCFG_1GB_ALIGN FALSE
196#define BLDCFG_UMA_ALLOCATION_MODE UMA_AUTO
197#define BLDCFG_UMA_ALLOCATION_SIZE 0
198#define BLDCFG_UMA_ABOVE4G_SUPPORT FALSE
199#define BLDCFG_UMA_ALIGNMENT NO_UMA_ALIGNED
200#define BLDCFG_HEAP_DRAM_ADDRESS 0xB0000
201#define BLDCFG_CFG_TEMP_PCIE_MMIO_BASE_ADDRESS 0xD0000000
202
203/*
204 * Agesa configuration values selection.
205 * Uncomment and specify the value for the configuration options
206 * needed by the system.
207 */
208#include "AGESA.h"
Dave Frodin892d1292013-12-11 12:38:40 -0700209
210/* The fixed MTRR values to be set after memory initialization. */
211CONST AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] =
212{
213 { AMD_AP_MTRR_FIX64k_00000, 0x1E1E1E1E1E1E1E1Eull },
214 { AMD_AP_MTRR_FIX16k_80000, 0x1E1E1E1E1E1E1E1Eull },
215 { AMD_AP_MTRR_FIX16k_A0000, 0x0000000000000000ull },
216 { AMD_AP_MTRR_FIX4k_C0000, 0x1E1E1E1E1E1E1E1Eull },
217 { AMD_AP_MTRR_FIX4k_C8000, 0x1E1E1E1E1E1E1E1Eull },
218 { AMD_AP_MTRR_FIX4k_D0000, 0x1E1E1E1E1E1E1E1Eull },
219 { AMD_AP_MTRR_FIX4k_D8000, 0x1E1E1E1E1E1E1E1Eull },
220 { AMD_AP_MTRR_FIX4k_E0000, 0x1E1E1E1E1E1E1E1Eull },
221 { AMD_AP_MTRR_FIX4k_E8000, 0x1E1E1E1E1E1E1E1Eull },
222 { AMD_AP_MTRR_FIX4k_F0000, 0x1E1E1E1E1E1E1E1Eull },
223 { AMD_AP_MTRR_FIX4k_F8000, 0x1E1E1E1E1E1E1E1Eull },
224 { CPU_LIST_TERMINAL }
225};
226
227/* Include the files that instantiate the configuration definitions. */
228
229#include "cpuRegisters.h"
230#include "cpuFamRegisters.h"
231#include "cpuFamilyTranslation.h"
232#include "AdvancedApi.h"
233#include "heapManager.h"
234#include "CreateStruct.h"
235#include "cpuFeatures.h"
236#include "Table.h"
237#include "cpuEarlyInit.h"
238#include "cpuLateInit.h"
239#include "GnbInterface.h"
240
241/*****************************************************************************
242 * Define the RELEASE VERSION string
243 *
244 * The Release Version string should identify the next planned release.
245 * When a branch is made in preparation for a release, the release manager
246 * should change/confirm that the branch version of this file contains the
247 * string matching the desired version for the release. The trunk version of
248 * the file should always contain a trailing 'X'. This will make sure that a
249 * development build from trunk will not be confused for a released version.
250 * The release manager will need to remove the trailing 'X' and update the
251 * version string as appropriate for the release. The trunk copy of this file
252 * should also be updated/incremented for the next expected version, + trailing 'X'
253 ****************************************************************************/
254// This is the delivery package title, "BrazosPI"
255// This string MUST be exactly 8 characters long
256#define AGESA_PACKAGE_STRING {'c', 'b', '_', 'A', 'g', 'e', 's', 'a'}
257
258// This is the release version number of the AGESA component
259// This string MUST be exactly 12 characters long
260#define AGESA_VERSION_STRING {'V', '1', '.', '1', '.', '0', '.', '3', ' ', ' ', ' ', ' '}
261
262/* MEMORY_BUS_SPEED */
263#define DDR400_FREQUENCY 200 ///< DDR 400
264#define DDR533_FREQUENCY 266 ///< DDR 533
265#define DDR667_FREQUENCY 333 ///< DDR 667
266#define DDR800_FREQUENCY 400 ///< DDR 800
267#define DDR1066_FREQUENCY 533 ///< DDR 1066
268#define DDR1333_FREQUENCY 667 ///< DDR 1333
269#define DDR1600_FREQUENCY 800 ///< DDR 1600
270#define DDR1866_FREQUENCY 933 ///< DDR 1866
271#define UNSUPPORTED_DDR_FREQUENCY 934 ///< Highest limit of DDR frequency
272
273/* QUANDRANK_TYPE*/
274#define QUADRANK_REGISTERED 0 ///< Quadrank registered DIMM
275#define QUADRANK_UNBUFFERED 1 ///< Quadrank unbuffered DIMM
276
277/* USER_MEMORY_TIMING_MODE */
278#define TIMING_MODE_AUTO 0 ///< Use best rate possible
279#define TIMING_MODE_LIMITED 1 ///< Set user top limit
280#define TIMING_MODE_SPECIFIC 2 ///< Set user specified speed
281
282/* POWER_DOWN_MODE */
283#define POWER_DOWN_BY_CHANNEL 0 ///< Channel power down mode
284#define POWER_DOWN_BY_CHIP_SELECT 1 ///< Chip select power down mode
285
286// The following definitions specify the default values for various parameters in which there are
287// no clearly defined defaults to be used in the common file. The values below are based on product
288// and BKDG content, please consult the AGESA Memory team for consultation.
289#define DFLT_SCRUB_DRAM_RATE (0)
290#define DFLT_SCRUB_L2_RATE (0)
291#define DFLT_SCRUB_L3_RATE (0)
292#define DFLT_SCRUB_IC_RATE (0)
293#define DFLT_SCRUB_DC_RATE (0)
294#define DFLT_MEMORY_QUADRANK_TYPE QUADRANK_UNBUFFERED
295#define DFLT_VRM_SLEW_RATE (5000)
296
297// Instantiate all solution relevant data.
298#include "PlatformInstall.h"
299