Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 1 | /* |
| 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. |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 14 | */ |
Stefan Reinauer | 5ff7c13 | 2011-10-31 12:56:45 -0700 | [diff] [blame] | 15 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 16 | /** |
| 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 | * |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 26 | */ |
| 27 | |
Edward O'Callaghan | d5339ae | 2014-07-07 19:58:53 +1000 | [diff] [blame] | 28 | #include <stdlib.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 29 | #include "Filecode.h" |
| 30 | #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE |
| 31 | |
| 32 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 33 | /* Select the cpu family. */ |
| 34 | #define INSTALL_FAMILY_10_SUPPORT FALSE |
| 35 | #define INSTALL_FAMILY_12_SUPPORT FALSE |
| 36 | #define INSTALL_FAMILY_14_SUPPORT TRUE |
| 37 | #define INSTALL_FAMILY_15_SUPPORT FALSE |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 38 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 39 | /* Select the cpu socket type. */ |
| 40 | #define INSTALL_G34_SOCKET_SUPPORT FALSE |
| 41 | #define INSTALL_C32_SOCKET_SUPPORT FALSE |
| 42 | #define INSTALL_S1G3_SOCKET_SUPPORT FALSE |
| 43 | #define INSTALL_S1G4_SOCKET_SUPPORT FALSE |
| 44 | #define INSTALL_ASB2_SOCKET_SUPPORT FALSE |
| 45 | #define INSTALL_FS1_SOCKET_SUPPORT FALSE |
| 46 | #define INSTALL_FM1_SOCKET_SUPPORT FALSE |
| 47 | #define INSTALL_FP1_SOCKET_SUPPORT FALSE |
| 48 | #define INSTALL_FT1_SOCKET_SUPPORT TRUE |
| 49 | #define INSTALL_AM3_SOCKET_SUPPORT FALSE |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 50 | |
Stefan Reinauer | 5ff7c13 | 2011-10-31 12:56:45 -0700 | [diff] [blame] | 51 | /* |
| 52 | * Agesa optional capabilities selection. |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 53 | * Uncomment and mark FALSE those features you wish to include in the build. |
| 54 | * Comment out or mark TRUE those features you want to REMOVE from the build. |
| 55 | */ |
| 56 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 57 | #define BLDOPT_REMOVE_FAMILY_10_SUPPORT TRUE |
| 58 | #define BLDOPT_REMOVE_FAMILY_12_SUPPORT TRUE |
| 59 | #define BLDOPT_REMOVE_FAMILY_14_SUPPORT FALSE |
| 60 | #define BLDOPT_REMOVE_FAMILY_15_SUPPORT TRUE |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 61 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 62 | #define BLDOPT_REMOVE_AM3_SOCKET_SUPPORT TRUE |
| 63 | #define BLDOPT_REMOVE_ASB2_SOCKET_SUPPORT TRUE |
| 64 | #define BLDOPT_REMOVE_C32_SOCKET_SUPPORT TRUE |
| 65 | #define BLDOPT_REMOVE_FM1_SOCKET_SUPPORT TRUE |
| 66 | #define BLDOPT_REMOVE_FP1_SOCKET_SUPPORT TRUE |
| 67 | #define BLDOPT_REMOVE_FS1_SOCKET_SUPPORT TRUE |
| 68 | #define BLDOPT_REMOVE_FT1_SOCKET_SUPPORT FALSE |
| 69 | #define BLDOPT_REMOVE_G34_SOCKET_SUPPORT TRUE |
| 70 | #define BLDOPT_REMOVE_S1G3_SOCKET_SUPPORT TRUE |
| 71 | #define BLDOPT_REMOVE_S1G4_SOCKET_SUPPORT TRUE |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 72 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 73 | #define BLDOPT_REMOVE_UDIMMS_SUPPORT FALSE |
| 74 | #define BLDOPT_REMOVE_RDIMMS_SUPPORT TRUE |
| 75 | #define BLDOPT_REMOVE_LRDIMMS_SUPPORT FALSE |
| 76 | #define BLDOPT_REMOVE_ECC_SUPPORT FALSE |
| 77 | //#define BLDOPT_REMOVE_DCT_INTERLEAVE TRUE |
| 78 | #define BLDOPT_REMOVE_BANK_INTERLEAVE FALSE |
| 79 | #define BLDOPT_REMOVE_NODE_INTERLEAVE TRUE |
| 80 | #define BLDOPT_REMOVE_PARALLEL_TRAINING FALSE |
| 81 | #define BLDOPT_REMOVE_DQS_TRAINING FALSE |
| 82 | #define BLDOPT_REMOVE_ONLINE_SPARE_SUPPORT TRUE |
| 83 | #define BLDOPT_REMOVE_MULTISOCKET_SUPPORT TRUE |
| 84 | #define BLDOPT_REMOVE_ACPI_PSTATES FALSE |
| 85 | #define BLDCFG_REMOVE_ACPI_PSTATES_PPC FALSE |
| 86 | #define BLDCFG_REMOVE_ACPI_PSTATES_PCT FALSE |
| 87 | #define BLDCFG_REMOVE_ACPI_PSTATES_PSD FALSE |
| 88 | #define BLDCFG_REMOVE_ACPI_PSTATES_PSS FALSE |
| 89 | #define BLDCFG_REMOVE_ACPI_PSTATES_XPSS FALSE |
| 90 | #define BLDCFG_FORCE_INDEPENDENT_PSD_OBJECT FALSE |
| 91 | #define BLDOPT_REMOVE_SRAT FALSE |
| 92 | #define BLDOPT_REMOVE_SLIT FALSE |
| 93 | #define BLDOPT_REMOVE_WHEA FALSE |
| 94 | #define BLDOPT_REMOVE_DMI TRUE |
| 95 | #define BLDOPT_REMOVE_HT_ASSIST TRUE |
| 96 | #define BLDOPT_REMOVE_ATM_MODE TRUE |
| 97 | //#define BLDOPT_REMOVE_MSG_BASED_C1E TRUE |
| 98 | //#define BLDOPT_REMOVE_LOW_POWER_STATE_FOR_PROCHOT TRUE |
| 99 | #define BLDOPT_REMOVE_MEM_RESTORE_SUPPORT FALSE |
| 100 | //#define BLDOPT_REMOVE_C6_STATE TRUE |
| 101 | #define BLDOPT_REMOVE_GFX_RECOVERY TRUE |
| 102 | #define BLDOPT_REMOVE_EARLY_SAMPLES TRUE |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 103 | |
| 104 | /* |
| 105 | * Agesa entry points used in this implementation. |
| 106 | */ |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 107 | #define AGESA_ENTRY_INIT_RESET TRUE |
| 108 | #define AGESA_ENTRY_INIT_RECOVERY FALSE |
| 109 | #define AGESA_ENTRY_INIT_EARLY TRUE |
| 110 | #define AGESA_ENTRY_INIT_POST TRUE |
| 111 | #define AGESA_ENTRY_INIT_ENV TRUE |
| 112 | #define AGESA_ENTRY_INIT_MID TRUE |
| 113 | #define AGESA_ENTRY_INIT_LATE TRUE |
| 114 | #define AGESA_ENTRY_INIT_S3SAVE TRUE |
| 115 | #define AGESA_ENTRY_INIT_RESUME TRUE |
| 116 | #define AGESA_ENTRY_INIT_LATE_RESTORE FALSE |
| 117 | #define AGESA_ENTRY_INIT_GENERAL_SERVICES FALSE |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 118 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 119 | #define BLDCFG_PCI_MMIO_BASE CONFIG_MMCONF_BASE_ADDRESS |
| 120 | #define BLDCFG_PCI_MMIO_SIZE CONFIG_MMCONF_BUS_NUMBER |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 121 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 122 | #define BLDCFG_VRM_CURRENT_LIMIT 24000 |
| 123 | //#define BLDCFG_VRM_NB_CURRENT_LIMIT 0 |
| 124 | #define BLDCFG_VRM_LOW_POWER_THRESHOLD 24000 |
| 125 | #define BLDCFG_VRM_NB_LOW_POWER_THRESHOLD 1 |
| 126 | #define BLDCFG_VRM_SLEW_RATE 5000 |
| 127 | //#define BLDCFG_VRM_NB_SLEW_RATE 5000 |
| 128 | //#define BLDCFG_VRM_ADDITIONAL_DELAY 0 |
| 129 | //#define BLDCFG_VRM_NB_ADDITIONAL_DELAY 0 |
| 130 | #define BLDCFG_VRM_HIGH_SPEED_ENABLE TRUE |
| 131 | //#define BLDCFG_VRM_NB_HIGH_SPEED_ENABLE FALSE |
| 132 | #define BLDCFG_VRM_INRUSH_CURRENT_LIMIT 6000 |
| 133 | //#define BLDCFG_VRM_NB_INRUSH_CURRENT_LIMIT 0 |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 134 | |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 135 | //#define BLDCFG_PROCESSOR_SCOPE_NAME0 'C' |
| 136 | //#define BLDCFG_PROCESSOR_SCOPE_NAME1 '0' |
| 137 | //#define BLDCFG_PROCESSOR_SCOPE_IN_SB FALSE |
| 138 | #define BLDCFG_PLAT_NUM_IO_APICS 3 |
| 139 | //#define BLDCFG_PLATFORM_C1E_MODE C1eModeDisabled |
| 140 | //#define BLDCFG_PLATFORM_C1E_OPDATA 0 |
| 141 | //#define BLDCFG_PLATFORM_C1E_MODE_OPDATA1 0 |
| 142 | //#define BLDCFG_PLATFORM_C1E_MODE_OPDATA2 0 |
| 143 | #define BLDCFG_PLATFORM_CSTATE_MODE CStateModeC6 |
| 144 | #define BLDCFG_PLATFORM_CSTATE_OPDATA 0x840 |
| 145 | #define BLDCFG_PLATFORM_CSTATE_IO_BASE_ADDRESS 0x840 |
| 146 | //#define BLDCFG_PLATFORM_CPB_MODE CpbModeAuto |
| 147 | #define BLDCFG_CORE_LEVELING_MODE CORE_LEVEL_LOWEST |
| 148 | #define BLDCFG_AP_MTRR_SETTINGS_LIST &OntarioApMtrrSettingsList |
| 149 | #define BLDCFG_AMD_PLATFORM_TYPE AMD_PLATFORM_MOBILE |
| 150 | //#define BLDCFG_STARTING_BUSNUM 0 |
| 151 | //#define BLDCFG_MAXIMUM_BUSNUM 0xf8 |
| 152 | //#define BLDCFG_ALLOCATED_BUSNUMS 0x20 |
| 153 | //#define BLDCFG_PLATFORM_DEEMPHASIS_LIST 0 |
| 154 | //#define BLDCFG_BUID_SWAP_LIST 0 |
| 155 | //#define BLDCFG_HTDEVICE_CAPABILITIES_OVERRIDE_LIST 0 |
| 156 | //#define BLDCFG_HTFABRIC_LIMITS_LIST 0 |
| 157 | //#define BLDCFG_HTCHAIN_LIMITS_LIST 0 |
| 158 | //#define BLDCFG_BUS_NUMBERS_LIST 0 |
| 159 | //#define BLDCFG_IGNORE_LINK_LIST 0 |
| 160 | //#define BLDCFG_LINK_SKIP_REGANG_LIST 0 |
| 161 | //#define BLDCFG_ADDITIONAL_TOPOLOGIES_LIST 0 |
| 162 | //#define BLDCFG_USE_HT_ASSIST TRUE |
| 163 | //#define BLDCFG_USE_ATM_MODE TRUE |
| 164 | //#define BLDCFG_PLATFORM_CONTROL_FLOW_MODE Nfcm |
| 165 | #define BLDCFG_S3_LATE_RESTORE FALSE |
| 166 | //#define BLDCFG_USE_32_BYTE_REFRESH FALSE |
| 167 | //#define BLDCFG_USE_VARIABLE_MCT_ISOC_PRIORITY FALSE |
| 168 | //#define BLDCFG_PLATFORM_POWER_POLICY_MODE Performance |
| 169 | //#define BLDCFG_SET_HTCRC_SYNC_FLOOD FALSE |
| 170 | //#define BLDCFG_USE_UNIT_ID_CLUMPING FALSE |
| 171 | //#define BLDCFG_SYSTEM_PHYSICAL_SOCKET_MAP 0 |
| 172 | #define BLDCFG_CFG_GNB_HD_AUDIO TRUE |
| 173 | //#define BLDCFG_CFG_ABM_SUPPORT FALSE |
| 174 | //#define BLDCFG_CFG_DYNAMIC_REFRESH_RATE 0 |
| 175 | //#define BLDCFG_CFG_LCD_BACK_LIGHT_CONTROL 0 |
| 176 | //#define BLDCFG_MEM_INIT_PSTATE 0 |
| 177 | //#define BLDCFG_AMD_PSTATE_CAP_VALUE 0 |
| 178 | #define BLDCFG_MEMORY_BUS_FREQUENCY_LIMIT DDR1333_FREQUENCY |
| 179 | #define BLDCFG_MEMORY_MODE_UNGANGED TRUE |
| 180 | //#define BLDCFG_MEMORY_QUAD_RANK_CAPABLE TRUE |
| 181 | //#define BLDCFG_MEMORY_QUADRANK_TYPE QUADRANK_UNBUFFERED |
| 182 | #define BLDCFG_MEMORY_SODIMM_CAPABLE TRUE |
| 183 | #define BLDCFG_MEMORY_LRDIMM_CAPABLE FALSE |
| 184 | #define BLDCFG_MEMORY_ENABLE_BANK_INTERLEAVING TRUE |
| 185 | #define BLDCFG_MEMORY_ENABLE_NODE_INTERLEAVING FALSE |
| 186 | #define BLDCFG_MEMORY_CHANNEL_INTERLEAVING FALSE |
| 187 | #define BLDCFG_MEMORY_POWER_DOWN TRUE |
| 188 | #define BLDCFG_POWER_DOWN_MODE POWER_DOWN_BY_CHIP_SELECT |
| 189 | //#define BLDCFG_ONLINE_SPARE FALSE |
| 190 | //#define BLDCFG_MEMORY_PARITY_ENABLE FALSE |
| 191 | #define BLDCFG_BANK_SWIZZLE TRUE |
| 192 | #define BLDCFG_TIMING_MODE_SELECT TIMING_MODE_AUTO |
| 193 | #define BLDCFG_MEMORY_CLOCK_SELECT DDR1333_FREQUENCY |
| 194 | #define BLDCFG_DQS_TRAINING_CONTROL TRUE |
| 195 | #define BLDCFG_IGNORE_SPD_CHECKSUM FALSE |
| 196 | #define BLDCFG_USE_BURST_MODE FALSE |
| 197 | #define BLDCFG_MEMORY_ALL_CLOCKS_ON FALSE |
| 198 | //#define BLDCFG_ENABLE_ECC_FEATURE TRUE |
| 199 | //#define BLDCFG_ECC_REDIRECTION FALSE |
| 200 | //#define BLDCFG_SCRUB_DRAM_RATE 0 |
| 201 | //#define BLDCFG_SCRUB_L2_RATE 0 |
| 202 | //#define BLDCFG_SCRUB_L3_RATE 0 |
| 203 | //#define BLDCFG_SCRUB_IC_RATE 0 |
| 204 | //#define BLDCFG_SCRUB_DC_RATE 0 |
| 205 | //#define BLDCFG_ECC_SYNC_FLOOD 0 |
| 206 | //#define BLDCFG_ECC_SYMBOL_SIZE 0 |
| 207 | //#define BLDCFG_1GB_ALIGN FALSE |
| 208 | #define BLDCFG_UMA_ALLOCATION_MODE UMA_AUTO |
| 209 | #define BLDCFG_UMA_ALLOCATION_SIZE 0 |
| 210 | #define BLDCFG_UMA_ABOVE4G_SUPPORT FALSE |
| 211 | #define BLDCFG_UMA_ALIGNMENT NO_UMA_ALIGNED |
| 212 | #define BLDCFG_HEAP_DRAM_ADDRESS 0xB0000 |
| 213 | #define BLDCFG_CFG_TEMP_PCIE_MMIO_BASE_ADDRESS 0xD0000000 |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 214 | |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 215 | /* |
| 216 | * Agesa configuration values selection. |
| 217 | * Uncomment and specify the value for the configuration options |
| 218 | * needed by the system. |
| 219 | */ |
| 220 | #include "AGESA.h" |
| 221 | #include "CommonReturns.h" |
| 222 | |
| 223 | /* The fixed MTRR values to be set after memory initialization. */ |
| 224 | CONST AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] = |
| 225 | { |
| 226 | { AMD_AP_MTRR_FIX64k_00000, 0x1E1E1E1E1E1E1E1Eull }, |
| 227 | { AMD_AP_MTRR_FIX16k_80000, 0x1E1E1E1E1E1E1E1Eull }, |
| 228 | { AMD_AP_MTRR_FIX16k_A0000, 0x0000000000000000ull }, |
| 229 | { AMD_AP_MTRR_FIX4k_C0000, 0x1E1E1E1E1E1E1E1Eull }, |
| 230 | { AMD_AP_MTRR_FIX4k_C8000, 0x1E1E1E1E1E1E1E1Eull }, |
| 231 | { AMD_AP_MTRR_FIX4k_D0000, 0x1E1E1E1E1E1E1E1Eull }, |
| 232 | { AMD_AP_MTRR_FIX4k_D8000, 0x1E1E1E1E1E1E1E1Eull }, |
| 233 | { AMD_AP_MTRR_FIX4k_E0000, 0x1E1E1E1E1E1E1E1Eull }, |
| 234 | { AMD_AP_MTRR_FIX4k_E8000, 0x1E1E1E1E1E1E1E1Eull }, |
| 235 | { AMD_AP_MTRR_FIX4k_F0000, 0x1E1E1E1E1E1E1E1Eull }, |
| 236 | { AMD_AP_MTRR_FIX4k_F8000, 0x1E1E1E1E1E1E1E1Eull }, |
| 237 | { CPU_LIST_TERMINAL } |
| 238 | }; |
| 239 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 240 | /* Include the files that instantiate the configuration definitions. */ |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 241 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 242 | #include "cpuRegisters.h" |
| 243 | #include "cpuFamRegisters.h" |
| 244 | #include "cpuFamilyTranslation.h" |
| 245 | #include "AdvancedApi.h" |
| 246 | #include "heapManager.h" |
| 247 | #include "CreateStruct.h" |
| 248 | #include "cpuFeatures.h" |
| 249 | #include "Table.h" |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 250 | #include "cpuEarlyInit.h" |
| 251 | #include "cpuLateInit.h" |
| 252 | #include "GnbInterface.h" |
| 253 | |
| 254 | /***************************************************************************** |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 255 | * Define the RELEASE VERSION string |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 256 | * |
| 257 | * The Release Version string should identify the next planned release. |
| 258 | * When a branch is made in preparation for a release, the release manager |
| 259 | * should change/confirm that the branch version of this file contains the |
| 260 | * string matching the desired version for the release. The trunk version of |
| 261 | * the file should always contain a trailing 'X'. This will make sure that a |
| 262 | * development build from trunk will not be confused for a released version. |
| 263 | * The release manager will need to remove the trailing 'X' and update the |
| 264 | * version string as appropriate for the release. The trunk copy of this file |
| 265 | * should also be updated/incremented for the next expected version, + trailing 'X' |
| 266 | ****************************************************************************/ |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 267 | // This is the delivery package title, "BrazosPI" |
| 268 | // This string MUST be exactly 8 characters long |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 269 | #define AGESA_PACKAGE_STRING {'c', 'b', '_', 'A', 'g', 'e', 's', 'a'} |
| 270 | |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 271 | // This is the release version number of the AGESA component |
| 272 | // This string MUST be exactly 12 characters long |
| 273 | #define AGESA_VERSION_STRING {'V', '1', '.', '1', '.', '0', '.', '3', ' ', ' ', ' ', ' '} |
| 274 | |
| 275 | /* MEMORY_BUS_SPEED */ |
| 276 | #define DDR400_FREQUENCY 200 ///< DDR 400 |
| 277 | #define DDR533_FREQUENCY 266 ///< DDR 533 |
| 278 | #define DDR667_FREQUENCY 333 ///< DDR 667 |
| 279 | #define DDR800_FREQUENCY 400 ///< DDR 800 |
| 280 | #define DDR1066_FREQUENCY 533 ///< DDR 1066 |
| 281 | #define DDR1333_FREQUENCY 667 ///< DDR 1333 |
| 282 | #define DDR1600_FREQUENCY 800 ///< DDR 1600 |
| 283 | #define DDR1866_FREQUENCY 933 ///< DDR 1866 |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 284 | #define UNSUPPORTED_DDR_FREQUENCY 934 ///< Highest limit of DDR frequency |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 285 | |
| 286 | /* QUANDRANK_TYPE*/ |
| 287 | #define QUADRANK_REGISTERED 0 ///< Quadrank registered DIMM |
| 288 | #define QUADRANK_UNBUFFERED 1 ///< Quadrank unbuffered DIMM |
| 289 | |
| 290 | /* USER_MEMORY_TIMING_MODE */ |
| 291 | #define TIMING_MODE_AUTO 0 ///< Use best rate possible |
| 292 | #define TIMING_MODE_LIMITED 1 ///< Set user top limit |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 293 | #define TIMING_MODE_SPECIFIC 2 ///< Set user specified speed |
Kerry Sheh | 01f7ab9 | 2012-01-19 13:18:36 +0800 | [diff] [blame] | 294 | |
| 295 | /* POWER_DOWN_MODE */ |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 296 | #define POWER_DOWN_BY_CHANNEL 0 ///< Channel power down mode |
| 297 | #define POWER_DOWN_BY_CHIP_SELECT 1 ///< Chip select power down mode |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 298 | |
| 299 | // The following definitions specify the default values for various parameters in which there are |
| 300 | // no clearly defined defaults to be used in the common file. The values below are based on product |
| 301 | // and BKDG content, please consult the AGESA Memory team for consultation. |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 302 | #define DFLT_SCRUB_DRAM_RATE (0) |
| 303 | #define DFLT_SCRUB_L2_RATE (0) |
| 304 | #define DFLT_SCRUB_L3_RATE (0) |
| 305 | #define DFLT_SCRUB_IC_RATE (0) |
| 306 | #define DFLT_SCRUB_DC_RATE (0) |
| 307 | #define DFLT_MEMORY_QUADRANK_TYPE QUADRANK_UNBUFFERED |
| 308 | #define DFLT_VRM_SLEW_RATE (5000) |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 309 | |
| 310 | // Instantiate all solution relevant data. |
| 311 | #include "PlatformInstall.h" |
| 312 | |
| 313 | /*---------------------------------------------------------------------------------------- |
| 314 | * CUSTOMER OVERIDES MEMORY TABLE |
| 315 | *---------------------------------------------------------------------------------------- |
| 316 | */ |
| 317 | |
| 318 | /* |
Paul Menzel | cf4ecfb | 2013-02-25 14:58:23 +0100 | [diff] [blame] | 319 | * Platform Specific Overriding Table allows IBV/OEM to pass in platform information to AGESA |
| 320 | * (e.g. MemClk routing, the number of DIMM slots per channel,...). If PlatformSpecificTable |
| 321 | * is populated, AGESA will base its settings on the data from the table. Otherwise, it will |
| 322 | * use its default conservative settings. |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 323 | */ |
| 324 | CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = { |
Kerry Sheh | f03360f | 2012-01-19 13:25:55 +0800 | [diff] [blame] | 325 | // |
| 326 | // The following macros are supported (use comma to separate macros): |
| 327 | // |
| 328 | // MEMCLK_DIS_MAP(SocketID, ChannelID, MemClkDisBit0CSMap,..., MemClkDisBit7CSMap) |
| 329 | // The MemClk pins are identified based on BKDG definition of Fn2x88[MemClkDis] bitmap. |
| 330 | // AGESA will base on this value to disable unused MemClk to save power. |
| 331 | // Example: |
| 332 | // BKDG definition of Fn2x88[MemClkDis] bitmap for AM3 package is like below: |
| 333 | // Bit AM3/S1g3 pin name |
| 334 | // 0 M[B,A]_CLK_H/L[0] |
| 335 | // 1 M[B,A]_CLK_H/L[1] |
| 336 | // 2 M[B,A]_CLK_H/L[2] |
| 337 | // 3 M[B,A]_CLK_H/L[3] |
| 338 | // 4 M[B,A]_CLK_H/L[4] |
| 339 | // 5 M[B,A]_CLK_H/L[5] |
| 340 | // 6 M[B,A]_CLK_H/L[6] |
| 341 | // 7 M[B,A]_CLK_H/L[7] |
| 342 | // And platform has the following routing: |
| 343 | // CS0 M[B,A]_CLK_H/L[4] |
| 344 | // CS1 M[B,A]_CLK_H/L[2] |
| 345 | // CS2 M[B,A]_CLK_H/L[3] |
| 346 | // CS3 M[B,A]_CLK_H/L[5] |
| 347 | // Then platform can specify the following macro: |
| 348 | // MEMCLK_DIS_MAP(ANY_SOCKET, ANY_CHANNEL, 0x00, 0x00, 0x02, 0x04, 0x01, 0x08, 0x00, 0x00) |
| 349 | // |
| 350 | // CKE_TRI_MAP(SocketID, ChannelID, CKETriBit0CSMap, CKETriBit1CSMap) |
| 351 | // The CKE pins are identified based on BKDG definition of Fn2x9C_0C[CKETri] bitmap. |
| 352 | // AGESA will base on this value to tristate unused CKE to save power. |
| 353 | // |
| 354 | // ODT_TRI_MAP(SocketID, ChannelID, ODTTriBit0CSMap,..., ODTTriBit3CSMap) |
| 355 | // The ODT pins are identified based on BKDG definition of Fn2x9C_0C[ODTTri] bitmap. |
| 356 | // AGESA will base on this value to tristate unused ODT pins to save power. |
| 357 | // |
| 358 | // CS_TRI_MAP(SocketID, ChannelID, CSTriBit0CSMap,..., CSTriBit7CSMap) |
| 359 | // The Chip select pins are identified based on BKDG definition of Fn2x9C_0C[ChipSelTri] bitmap. |
| 360 | // AGESA will base on this value to tristate unused Chip select to save power. |
| 361 | // |
| 362 | // NUMBER_OF_DIMMS_SUPPORTED(SocketID, ChannelID, NumberOfDimmSlotsPerChannel) |
| 363 | // Specifies the number of DIMM slots per channel. |
| 364 | // |
| 365 | // NUMBER_OF_CHIP_SELECTS_SUPPORTED(SocketID, ChannelID, NumberOfChipSelectsPerChannel) |
| 366 | // Specifies the number of Chip selects per channel. |
| 367 | // |
| 368 | // NUMBER_OF_CHANNELS_SUPPORTED(SocketID, NumberOfChannelsPerSocket) |
| 369 | // Specifies the number of channels per socket. |
| 370 | // |
| 371 | // OVERRIDE_DDR_BUS_SPEED(SocketID, ChannelID, USER_MEMORY_TIMING_MODE, MEMORY_BUS_SPEED) |
| 372 | // Specifies DDR bus speed of channel ChannelID on socket SocketID. |
| 373 | // |
| 374 | // DRAM_TECHNOLOGY(SocketID, TECHNOLOGY_TYPE) |
| 375 | // Specifies the DRAM technology type of socket SocketID (DDR2, DDR3,...) |
| 376 | // |
| 377 | // WRITE_LEVELING_SEED(SocketID, ChannelID, Byte0Seed, Byte1Seed, Byte2Seed, Byte3Seed, Byte4Seed, Byte5Seed, |
| 378 | // Byte6Seed, Byte7Seed, ByteEccSeed) |
| 379 | // Specifies the write leveling seed for a channel of a socket. |
| 380 | // |
| 381 | NUMBER_OF_DIMMS_SUPPORTED (ANY_SOCKET, ANY_CHANNEL, 2), |
| 382 | NUMBER_OF_CHANNELS_SUPPORTED (ANY_SOCKET, 1), |
| 383 | PSO_END |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 384 | }; |
| 385 | |
| 386 | /* |
| 387 | * These tables are optional and may be used to adjust memory timing settings |
| 388 | */ |
| 389 | #include "mm.h" |
| 390 | #include "mn.h" |