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