| 1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
| 2 | |
| 3 | /* $NoKeywords:$ */ |
| 4 | /** |
| 5 | * @file |
| 6 | * |
| 7 | * Agesa structures and definitions |
| 8 | * |
| 9 | * Contains AMD AGESA core interface |
| 10 | * |
| 11 | * @xrefitem bom "File Content Label" "Release Content" |
| 12 | * @e project: AGESA |
| 13 | * @e sub-project: Include |
| 14 | * @e \$Revision: 281178 $ @e \$Date: 2013-12-18 02:14:15 -0600 (Wed, 18 Dec 2013) $ |
| 15 | */ |
| 16 | /***************************************************************************** |
| 17 | * |
| 18 | * Copyright (c) 2008 - 2014, Advanced Micro Devices, Inc. |
| 19 | * All rights reserved. |
| 20 | * |
| 21 | * Redistribution and use in source and binary forms, with or without |
| 22 | * modification, are permitted provided that the following conditions are met: |
| 23 | * * Redistributions of source code must retain the above copyright |
| 24 | * notice, this list of conditions and the following disclaimer. |
| 25 | * * Redistributions in binary form must reproduce the above copyright |
| 26 | * notice, this list of conditions and the following disclaimer in the |
| 27 | * documentation and/or other materials provided with the distribution. |
| 28 | * * Neither the name of Advanced Micro Devices, Inc. nor the names of |
| 29 | * its contributors may be used to endorse or promote products derived |
| 30 | * from this software without specific prior written permission. |
| 31 | * |
| 32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 33 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 35 | * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY |
| 36 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 37 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 38 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 39 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 40 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 41 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 42 | * |
| 43 | ***************************************************************************/ |
| 44 | |
| 45 | |
| 46 | #ifndef _AGESA_H_ |
| 47 | #define _AGESA_H_ |
| 48 | |
| 49 | #include "Porting.h" |
| 50 | #include "AMD.h" |
| 51 | |
| 52 | // |
| 53 | // |
| 54 | // AGESA Types and Definitions |
| 55 | // |
| 56 | // |
| 57 | |
| 58 | // AGESA BASIC CALLOUTS |
| 59 | #define AGESA_MEM_RELEASE 0x00028000ul |
| 60 | |
| 61 | // AGESA ADVANCED CALLOUTS, Processor |
| 62 | #define AGESA_CHECK_UMA 0x00028100ul |
| 63 | #define AGESA_DO_RESET 0x00028101ul |
| 64 | #define AGESA_ALLOCATE_BUFFER 0x00028102ul |
| 65 | #define AGESA_DEALLOCATE_BUFFER 0x00028103ul |
| 66 | #define AGESA_LOCATE_BUFFER 0x00028104ul |
| 67 | #define AGESA_RUNFUNC_ONAP 0x00028105ul |
| 68 | #define AGESA_PUBLISH_CS_RESTORATION_DATA 0x00028106ul |
| 69 | |
| 70 | // AGESA ADVANCED CALLOUTS, Memory |
| 71 | #define AGESA_READ_SPD 0x00028140ul |
| 72 | #define AGESA_HOOKBEFORE_DRAM_INIT 0x00028141ul |
| 73 | #define AGESA_HOOKBEFORE_DQS_TRAINING 0x00028142ul |
| 74 | #define AGESA_READ_SPD_RECOVERY 0x00028143ul |
| 75 | #define AGESA_HOOKBEFORE_EXIT_SELF_REF 0x00028144ul |
| 76 | #define AGESA_HOOKBEFORE_DRAM_INIT_RECOVERY 0x00028145ul |
| 77 | #define AGESA_EXTERNAL_2D_TRAIN_VREF_CHANGE 0x00028146ul |
| 78 | #define AGESA_EXTERNAL_VOLTAGE_ADJUST 0x00028147ul |
| 79 | |
| 80 | // AGESA IDS CALLOUTS |
| 81 | #define AGESA_GET_IDS_INIT_DATA 0x00028200ul |
| 82 | |
| 83 | // AGESA GNB CALLOUTS |
| 84 | #define AGESA_GNB_PCIE_SLOT_RESET 0x00028301ul |
| 85 | #define AGESA_GNB_GFX_GET_VBIOS_IMAGE 0x00028302ul |
| 86 | #define AGESA_GNB_PCIE_CLK_REQ 0x00028303ul |
| 87 | |
| 88 | // AGESA FCH CALLOUTS |
| 89 | #define AGESA_FCH_OEM_CALLOUT 0x00028401ul |
| 90 | |
| 91 | //----------------------------------------------------------------------------- |
| 92 | // FCH DEFINITIONS AND MACROS |
| 93 | // |
| 94 | //----------------------------------------------------------------------------- |
| 95 | |
| 96 | /// Configuration values for SdConfig |
| 97 | typedef enum { |
| 98 | SdDisable = 0, ///< Disabled |
| 99 | SdAmda, ///< AMDA, set 24,18,16, default |
| 100 | SdDma, ///< DMA clear 24, 16, set 18 |
| 101 | SdPio, ///< PIO clear 24,18,16 |
| 102 | SdDump ///< SD DUMP, don't touch SD |
| 103 | } SD_MODE; |
| 104 | |
| 105 | /// Configuration values for SdClockControl |
| 106 | typedef enum { |
| 107 | Sd50MhzTraceCableLengthWithinSixInches = 4, ///< 50Mhz, default |
| 108 | Sd40MhzTraceCableLengthSix2ElevenInches = 6, ///< 40Mhz |
| 109 | Sd25MhzTraceCableLengthEleven2TwentyfourInches = 7, ///< 25Mhz |
| 110 | } SD_CLOCK_CONTROL; |
| 111 | |
| 112 | /// Configuration values for AzaliaController |
| 113 | typedef enum { |
| 114 | AzAuto = 0, ///< Auto - Detect Azalia controller automatically |
| 115 | AzDisable, ///< Diable - Disable Azalia controller |
| 116 | AzEnable ///< Enable - Enable Azalia controller |
| 117 | } HDA_CONFIG; |
| 118 | |
| 119 | /// Configuration values for IrConfig |
| 120 | typedef enum { |
| 121 | IrDisable = 0, ///< Disable |
| 122 | IrRxTx0 = 1, ///< Rx and Tx0 |
| 123 | IrRxTx1 = 2, ///< Rx and Tx1 |
| 124 | IrRxTx0Tx1 = 3 ///< Rx and both Tx0,Tx1 |
| 125 | } IR_CONFIG; |
| 126 | |
| 127 | /// Configuration values for SataClass |
| 128 | typedef enum { |
| 129 | SataNativeIde = 0, ///< Native IDE mode |
| 130 | SataRaid, ///< RAID mode |
| 131 | SataAhci, ///< AHCI mode |
| 132 | SataLegacyIde, ///< Legacy IDE mode |
| 133 | SataIde2Ahci, ///< IDE->AHCI mode |
| 134 | SataAhci7804, ///< AHCI mode as 7804 ID (AMD driver) |
| 135 | SataIde2Ahci7804 ///< IDE->AHCI mode as 7804 ID (AMD driver) |
| 136 | } SATA_CLASS; |
| 137 | |
| 138 | /// Configuration values for BLDCFG_FCH_GPP_LINK_CONFIG |
| 139 | typedef enum { |
| 140 | PortA4 = 0, ///< 4:0:0:0 |
| 141 | PortA2B2 = 2, ///< 2:2:0:0 |
| 142 | PortA2B1C1 = 3, ///< 2:1:1:0 |
| 143 | PortA1B1C1D1 = 4 ///< 1:1:1:1 |
| 144 | } GPP_LINKMODE; |
| 145 | |
| 146 | /// Configuration values for FchPowerFail |
| 147 | typedef enum { |
| 148 | AlwaysOff = 0, ///< Always power off after power resumes |
| 149 | AlwaysOn = 1, ///< Always power on after power resumes |
| 150 | UsePrevious = 3, ///< Resume to same setting when power fails |
| 151 | } POWER_FAIL; |
| 152 | |
| 153 | |
| 154 | /// Configuration values for SATA Link Speed |
| 155 | typedef enum { |
| 156 | Gen1 = 1, ///< SATA port GEN1 speed |
| 157 | Gen2 = 2, ///< SATA port GEN2 speed |
| 158 | Gen3 = 3, ///< SATA port GEN3 speed |
| 159 | } SATA_SPEED; |
| 160 | |
| 161 | |
| 162 | /// Configuration values for GPIO function |
| 163 | typedef enum { |
| 164 | Function0 = 0, ///< GPIO Function 1 |
| 165 | Function1 = 1, ///< GPIO Function 1 |
| 166 | Function2 = 2, ///< GPIO Function 2 |
| 167 | Function3 = 3, ///< GPIO Function 3 |
| 168 | } GPIO_FUN; |
| 169 | |
| 170 | /// Configuration values for memory phy voltage (VDDR) |
| 171 | typedef enum { |
| 172 | VOLT0_95, ///< VDDR 0.95V |
| 173 | VOLT1_05, ///< VDDR 1.05V |
| 174 | MAX_VDDR ///< Maxmum value for this enum definition |
| 175 | } MEMORY_PHY_VOLTAGE; |
| 176 | |
| 177 | /// Configuration values for GPIO_CFG |
| 178 | typedef enum { |
| 179 | OwnedByEc = 1 << 0, ///< This bit can only be written by EC |
| 180 | OwnedByHost = 1 << 1, ///< This bit can only be written by host (BIOS) |
| 181 | Sticky = 1 << 2, ///< If set, [6:3] are sticky |
| 182 | PullUpB = 1 << 3, ///< 0: Pullup enable; 1: Pullup disabled |
| 183 | PullDown = 1 << 4, ///< 0: Pulldown disabled; 1: Pulldown enable |
| 184 | GpioOutEnB = 1 << 5, ///< 0: Output enable; 1: Output disable |
| 185 | GpioOut = 1 << 6, ///< Output state when GpioOutEnB is 0 |
| 186 | GpioIn = 1 << 7, ///< This bit is read only - current pin state |
| 187 | } CFG_BYTE; |
| 188 | |
| 189 | /// Configuration values for GPIO_CFG2 |
| 190 | typedef enum { |
| 191 | DrvStrengthSel_4mA = 0 << 1, ///< 18:17 DrvStrengthSel. |
| 192 | DrvStrengthSel_8mA = 1 << 1, ///< 18:17 DrvStrengthSel. |
| 193 | DrvStrengthSel_12mA = 2 << 1, ///< 18:17 DrvStrengthSel. |
| 194 | DrvStrengthSel_16mA = 3 << 1, ///< 18:17 DrvStrengthSel. |
| 195 | PullUpSel_8K = 1 << 3, ///< 19 PullUpSel. Read-write. 0=4 K pull-up is selected. 1=8 K pull-up is selected. |
| 196 | PullUpEnable = 1 << 4, ///< 20 PullUpEnable. Read-write. 0=Pull-up is disabled on the pin. 1=Pull-up is enabled on the pin. |
| 197 | PullDownEnable = 1 << 5, ///< 21 PullDownEnable. Read-write. 0=Pull-down is disabled on the pin. 1=Pull-down is enabled on thepin. |
| 198 | OutputValue = 1 << 6, ///< 22 OutputValue. Read-write. 0=low. 1=high. |
| 199 | OutputEnable = 1 << 7, ///< 23 OutputEnable. Read-write. 0=Output is disabled on the pin. 1=Output is enabled on the pin. |
| 200 | } CFG2_BYTE; |
| 201 | |
| 202 | /// FCH GPIO CONTROL |
| 203 | typedef struct { |
| 204 | IN UINT8 GpioPin; ///< Gpio Pin, valid range: 0-67, 128-150, 160-228 |
| 205 | IN GPIO_FUN PinFunction; ///< Multi-function selection |
| 206 | IN CFG_BYTE CfgByte; ///< GPIO Register value |
| 207 | } GPIO_CONTROL; |
| 208 | |
| 209 | /// |
| 210 | /// FCH SCI MAP CONTROL |
| 211 | /// |
| 212 | typedef struct { |
| 213 | IN UINT8 InputPin; ///< Input Pin, valid range 0-63 |
| 214 | IN UINT8 GpeMap; ///< Gpe Map, valid range 0-31 |
| 215 | } SCI_MAP_CONTROL; |
| 216 | |
| 217 | /// |
| 218 | /// FCH SATA PHY CONTROL |
| 219 | /// |
| 220 | typedef struct { |
| 221 | IN BOOLEAN CommonPhy; ///< Common PHY or not |
| 222 | ///< @li <b>FALSE</b> - Only applied to specified port |
| 223 | ///< @li <b>TRUE</b> - Apply to all SATA ports |
| 224 | IN SATA_SPEED Gen; ///< SATA speed |
| 225 | IN UINT8 Port; ///< Port number, valid range: 0-7 |
| 226 | IN UINT32 PhyData; ///< SATA PHY data, valid range: 0-0xFFFFFFFF |
| 227 | } SATA_PHY_CONTROL; |
| 228 | |
| 229 | /// |
| 230 | /// FCH Component Data Structure in InitReset stage |
| 231 | /// |
| 232 | typedef struct { |
| 233 | IN BOOLEAN UmiGen2; ///< Enable Gen2 data rate of UMI |
| 234 | ///< @li <b>FALSE</b> - Disable Gen2 |
| 235 | ///< @li <b>TRUE</b> - Enable Gen2 |
| 236 | |
| 237 | IN BOOLEAN SataEnable; ///< SATA controller function |
| 238 | ///< @li <b>FALSE</b> - SATA controller is disabled |
| 239 | ///< @li <b>TRUE</b> - SATA controller is enabled |
| 240 | |
| 241 | IN BOOLEAN IdeEnable; ///< SATA IDE controller mode enabled/disabled |
| 242 | ///< @li <b>FALSE</b> - IDE controller is disabled |
| 243 | ///< @li <b>TRUE</b> - IDE controller is enabled |
| 244 | |
| 245 | IN BOOLEAN GppEnable; ///< Master switch of GPP function |
| 246 | ///< @li <b>FALSE</b> - GPP disabled |
| 247 | ///< @li <b>TRUE</b> - GPP enabled |
| 248 | |
| 249 | IN BOOLEAN Xhci0Enable; ///< XHCI0 controller function |
| 250 | ///< @li <b>FALSE</b> - XHCI0 controller disabled |
| 251 | ///< @li <b>TRUE</b> - XHCI0 controller enabled |
| 252 | |
| 253 | IN BOOLEAN Xhci1Enable; ///< XHCI1 controller function |
| 254 | ///< @li <b>FALSE</b> - XHCI1 controller disabled |
| 255 | ///< @li <b>TRUE</b> - XHCI1 controller enabled |
| 256 | } FCH_RESET_INTERFACE; |
| 257 | |
| 258 | |
| 259 | /// |
| 260 | /// FCH Component Data Structure from InitEnv stage |
| 261 | /// |
| 262 | typedef struct { |
| 263 | IN SD_MODE SdConfig; ///< Secure Digital (SD) controller mode |
| 264 | IN HDA_CONFIG AzaliaController; ///< Azalia HD Audio Controller |
| 265 | |
| 266 | IN IR_CONFIG IrConfig; ///< Infrared (IR) Configuration |
| 267 | IN BOOLEAN UmiGen2; ///< Enable Gen2 data rate of UMI |
| 268 | ///< @li <b>FALSE</b> - Disable Gen2 |
| 269 | ///< @li <b>TRUE</b> - Enable Gen2 |
| 270 | |
| 271 | IN SATA_CLASS SataClass; ///< SATA controller mode |
| 272 | IN BOOLEAN SataEnable; ///< SATA controller function |
| 273 | ///< @li <b>FALSE</b> - SATA controller is disabled |
| 274 | ///< @li <b>TRUE</b> - SATA controller is enabled |
| 275 | |
| 276 | IN BOOLEAN IdeEnable; ///< SATA IDE controller mode enabled/disabled |
| 277 | ///< @li <b>FALSE</b> - IDE controller is disabled |
| 278 | ///< @li <b>TRUE</b> - IDE controller is enabled |
| 279 | |
| 280 | IN BOOLEAN SataIdeMode; ///< Native mode of SATA IDE controller |
| 281 | ///< @li <b>FALSE</b> - Legacy IDE mode |
| 282 | ///< @li <b>TRUE</b> - Native IDE mode |
| 283 | |
| 284 | IN BOOLEAN Ohci1Enable; ///< OHCI controller #1 Function |
| 285 | ///< @li <b>FALSE</b> - OHCI1 is disabled |
| 286 | ///< @li <b>TRUE</b> - OHCI1 is enabled |
| 287 | |
| 288 | IN BOOLEAN Ohci2Enable; ///< OHCI controller #2 Function |
| 289 | ///< @li <b>FALSE</b> - OHCI2 is disabled |
| 290 | ///< @li <b>TRUE</b> - OHCI2 is enabled |
| 291 | |
| 292 | IN BOOLEAN Ohci3Enable; ///< OHCI controller #3 Function |
| 293 | ///< @li <b>FALSE</b> - OHCI3 is disabled |
| 294 | ///< @li <b>TRUE</b> - OHCI3 is enabled |
| 295 | |
| 296 | IN BOOLEAN Ohci4Enable; ///< OHCI controller #4 Function |
| 297 | ///< @li <b>FALSE</b> - OHCI4 is disabled |
| 298 | ///< @li <b>TRUE</b> - OHCI4 is enabled |
| 299 | |
| 300 | IN BOOLEAN GppEnable; ///< Master switch of GPP function |
| 301 | ///< @li <b>FALSE</b> - GPP disabled |
| 302 | ///< @li <b>TRUE</b> - GPP enabled |
| 303 | |
| 304 | IN POWER_FAIL FchPowerFail; ///< FCH power failure option |
| 305 | } FCH_INTERFACE; |
| 306 | |
| 307 | |
| 308 | /*---------------------------------------------------------------------------- |
| 309 | * CPU Feature related info |
| 310 | *---------------------------------------------------------------------------- |
| 311 | */ |
| 312 | /// Build Configuration values for BLDCFG_PLATFORM_CONNECTED_STANDBY_MODE |
| 313 | typedef enum { |
| 314 | ConnectedStandbyAuto = 0, ///< Auto |
| 315 | ConnectedStandbyDisabled = 1, ///< Disabled |
| 316 | MaxConnectedStandbyMode = 2 ///< Not a valid value, used for verifying input |
| 317 | } PLATFORM_CONNECTED_STANDBY_MODES; |
| 318 | |
| 319 | /// Build Configuration values for BLDCFG_PLATFORM_CSTATE_MODE |
| 320 | typedef enum { |
| 321 | CStateModeDisabled = 0, ///< Disabled |
| 322 | CStateModeC6 = 1, ///< C6 State |
| 323 | MaxCStateMode = 2 ///< Not a valid value, used for verifying input |
| 324 | } PLATFORM_CSTATE_MODES; |
| 325 | |
| 326 | /// Build Configuration values for BLDCFG_PLATFORM_CPB_MODE |
| 327 | typedef enum { |
| 328 | CpbModeAuto = 0, ///< Auto |
| 329 | CpbModeDisabled = 1, ///< Disabled |
| 330 | MaxCpbMode = 2 ///< Not a valid value, used for verifying input |
| 331 | } PLATFORM_CPB_MODES; |
| 332 | |
| 333 | /// Build Configuration values for BLDCFG_LOW_POWER_PSTATE_FOR_PROCHOT_MODE |
| 334 | typedef enum { |
| 335 | LOW_POWER_PSTATE_FOR_PROCHOT_AUTO = 0, ///< Auto |
| 336 | LOW_POWER_PSTATE_FOR_PROCHOT_DISABLE = 1, ///< Disabled |
| 337 | MAX_LOW_POWER_PSTATE_FOR_PROCHOT_MODE = 2 ///< Not a valid value, used for verifying input |
| 338 | } PLATFORM_LOW_POWER_PSTATE_MODES; |
| 339 | |
| 340 | /// Build Configuration values for BLDCFG_ACPI_PSTATES_PSD_POLICY |
| 341 | #define PsdPolicyProcessorDefault 0 ///< PSD is dependent or independent per processor default |
| 342 | #define PsdPolicyDependent 1 ///< PSD is forced dependent |
| 343 | #define PsdPolicyIndependent 2 ///< PSD is forced independent |
| 344 | #define PsdPolicyMax 3 ///< Not a valid value, used for verifying input |
| 345 | |
| 346 | /*---------------------------------------------------------------------------- |
| 347 | * GNB PCIe configuration info |
| 348 | *---------------------------------------------------------------------------- |
| 349 | */ |
| 350 | |
| 351 | // Event definitions |
| 352 | |
| 353 | #define GNB_EVENT_INVALID_CONFIGURATION 0x20010000ul // User configuration invalid |
| 354 | #define GNB_EVENT_INVALID_PCIE_TOPOLOGY_CONFIGURATION 0x20010001ul // Requested lane allocation for PCIe port can not be supported |
| 355 | #define GNB_EVENT_INVALID_PCIE_PORT_CONFIGURATION 0x20010002ul // Requested incorrect PCIe port device address |
| 356 | #define GNB_EVENT_INVALID_DDI_LINK_CONFIGURATION 0x20010003ul // Incorrect parameter in DDI link configuration |
| 357 | #define GNB_EVENT_INVALID_LINK_WIDTH_CONFIGURATION 0x20010004ul // Invalid with for PCIe port or DDI link |
| 358 | #define GNB_EVENT_INVALID_LANES_CONFIGURATION 0x20010005ul // Lane double subscribe lanes |
| 359 | #define GNB_EVENT_INVALID_DDI_TOPOLOGY_CONFIGURATION 0x20010006ul // Requested lane allocation for DDI link(s) can not be supported |
| 360 | #define GNB_EVENT_LINK_TRAINING_FAIL 0x20020000ul // PCIe Link training fail |
| 361 | #define GNB_EVENT_BROKEN_LANE_RECOVERY 0x20030000ul // Broken lane workaround applied to recover link training |
| 362 | #define GNB_EVENT_GEN2_SUPPORT_RECOVERY 0x20040000ul // Scale back to GEN1 to recover link training |
| 363 | |
| 364 | |
| 365 | #define DESCRIPTOR_TERMINATE_LIST 0x80000000ull |
| 366 | #define DESCRIPTOR_IGNORE 0x40000000ull |
| 367 | |
| 368 | /// PCIe link initialization |
| 369 | typedef enum { |
| 370 | EndpointDetect = 0, ///< Detect endpoint presence |
| 371 | EndpointNotPresent ///< Endpoint not present (or connected). Used in case there is alternative way to determine |
| 372 | ///< if device present on board or in slot. For example GPIO can be used to determine device presence. |
| 373 | } PCIE_ENDPOINT_STATUS; |
| 374 | |
| 375 | |
| 376 | /// PCIe port misc extended controls |
| 377 | typedef struct { |
| 378 | IN UINT8 LinkComplianceMode :1; ///< Force port into compliance mode (device will not be trained, port output compliance pattern) |
| 379 | IN UINT8 LinkSafeMode :2; /**< Safe mode PCIe capability. (Parameter may limit PCIe speed requested through PCIe_PORT_DATA::LinkSpeedCapability) |
| 380 | * @li @b 0 - port can advertize muximum supported capability |
| 381 | * @li @b 1 - port limit advertized capability and speed to PCIe Gen1 |
| 382 | */ |
| 383 | IN UINT8 SbLink :1; /**< PCIe link type |
| 384 | * @li @b 0 - General purpose port |
| 385 | * @li @b 1 - Port connected to SB |
| 386 | */ |
| 387 | IN UINT8 ClkPmSupport :1; /**< Clock Power Management Support |
| 388 | * @li @b 0 - Clock Power Management not configured |
| 389 | * @li @b 1 - Clock Power Management configured according to PCIe device capability |
| 390 | */ |
| 391 | } PCIe_PORT_MISC_CONTROL; |
| 392 | |
| 393 | /// The IO APIC Interrupt Mapping Info |
| 394 | typedef struct { |
| 395 | IN UINT8 GroupMap; /**< Group mapping for slot or endpoint device (connected to PCIE port) interrupts . |
| 396 | * @li <b>0</b> - IGNORE THIS STRUCTURE AND USE RECOMMENDED SETTINGS |
| 397 | * @li <b>1</b> - mapped to Grp 0 (Interrupts 0..3 of IO APIC redirection table) |
| 398 | * @li <b>2</b> - mapped to Grp 1 (Interrupts 4..7 of IO APIC redirection table) |
| 399 | * @li ... |
| 400 | * @li <b>8</b> - mapped to Grp 7 (Interrupts 28..31 of IO APIC redirection table) |
| 401 | */ |
| 402 | IN UINT8 Swizzle; /**< Swizzle interrupt in the Group. |
| 403 | * @li <b>0</b> - ABCD |
| 404 | * @li <b>1</b> - BCDA |
| 405 | * @li <b>2</b> - CDAB |
| 406 | * @li <b>3</b> - DABC |
| 407 | */ |
| 408 | IN UINT8 BridgeInt; /**< IOAPIC redirection table entry for PCIE bridge interrupt |
| 409 | * @li <b>0</b> - Entry 0 of IO APIC redirection table |
| 410 | * @li <b>1</b> - Entry 1 of IO APIC redirection table |
| 411 | * @li ... |
| 412 | * @li <b>31</b> - Entry 31 of IO APIC redirection table |
| 413 | */ |
| 414 | } APIC_DEVICE_INFO; |
| 415 | |
| 416 | /// Initial Offset Calibration Control |
| 417 | typedef enum { |
| 418 | ADAPT_IOC_DISABLED = 0, ///< Initial Offset Calibration Disabled |
| 419 | ADAPT_IOC_ENABLED ///< Initial Offset Calibration Enabled |
| 420 | } ADAPT_IOC_CONTROL; |
| 421 | |
| 422 | /// DFE Control values |
| 423 | typedef enum { |
| 424 | ADAPT_DFE_CONTROL_DISABLED = 0, ///< DFE Disabled |
| 425 | ADAPD_DFE_CONTROL_1TAP_DFE = 4, ///< 1-tap DFE |
| 426 | ADAPD_DFE_CONTROL_1TAP_DFE_FBF, ///< 1-tap DFE with Future Bit Filtering |
| 427 | ADAPD_DFE_CONTROL_2TAP_DFE, ///< 2-tap DFE |
| 428 | ADAPD_DFE_CONTROL_2TAP_DFE_FBF ///< 2-tap DFE with Future Bit Filtering |
| 429 | } ADAPT_DFE_CONTROL; |
| 430 | |
| 431 | /// LEQ Control values |
| 432 | typedef enum { |
| 433 | ADAPT_LEQ_CONTROL_DISABLED = 0, ///< LEQ Disabled |
| 434 | ADAPT_LEQ_CONTROL_DC_GAIN = 2, ///< DC Gain Adaptation |
| 435 | ADAPT_LEQ_CONTROL_DC_GAIN_POLE ///< DC Gain and Pole Adaptation |
| 436 | } ADAPT_LEQ_CONTROL; |
| 437 | |
| 438 | /// Dynamic Offset Calibration Control |
| 439 | typedef enum { |
| 440 | ADAPT_DOC_DISABLED = 0, ///< Dynamic Offset Calibration Disabled |
| 441 | ADAPT_DOC_ENABLED ///< Dynamic Offset Calibration Enabled |
| 442 | } ADAPT_DOC_CONTROL; |
| 443 | |
| 444 | /// FOM Calculation Control |
| 445 | typedef enum { |
| 446 | ADAPT_FOMC_DISABLED = 0, ///< FOM Calculation Disabled |
| 447 | ADAPT_FOMC_ENABLED ///< FOM Calculation Enabled |
| 448 | } ADAPT_FOMC_CONTROL; |
| 449 | |
| 450 | /// PI Offset Calibration Control |
| 451 | typedef enum { |
| 452 | ADAPT_PIOC_DISABLED = 0, ///< PI Offset Calibration Disabled |
| 453 | ADAPT_PIOC_ENABLED ///< PI Offset Calibration Enabled |
| 454 | } ADAPT_PIOC_CONTROL; |
| 455 | |
| 456 | /// GEN3 RxAdaptMode Configuration Structure |
| 457 | typedef struct { |
| 458 | IN BOOLEAN InitOffsetCancellation; ///< Initial Offset Cancellation Enable |
| 459 | IN UINT8 DFEControl; ///< DFE Control |
| 460 | IN UINT8 LEQControl; ///< LEQ Control |
| 461 | IN BOOLEAN DynamicOffsetCalibration; ///< Dynamic Offset Calibration Enable |
| 462 | IN BOOLEAN FOMCalculation; ///< FOM Calculation Enable |
| 463 | IN BOOLEAN PIOffsetCalibration; ///< PI Offset Calibratino Enable |
| 464 | } RX_ADAPT_MODE; |
| 465 | |
| 466 | /// PCIe port configuration data |
| 467 | typedef struct { |
| 468 | IN UINT8 PortPresent; ///< Enable PCIe port for initialization. |
| 469 | IN UINT8 ChannelType; /**< Channel type. |
| 470 | * @li @b 0 - "lowLoss", |
| 471 | * @li @b 1 - "highLoss", |
| 472 | * @li @b 2 - "mob0db", |
| 473 | * @li @b 3 - "mob3db", |
| 474 | * @li @b 4 - "extnd6db" |
| 475 | * @li @b 5 - "extnd8db" |
| 476 | */ |
| 477 | IN UINT8 DeviceNumber; /**< PCI Device number for port. |
| 478 | * @li @b 0 - Native port device number |
| 479 | * @li @b N - Port device number (See available configurations in BKDG |
| 480 | */ |
| 481 | IN UINT8 FunctionNumber; ///< Reserved for future use |
| 482 | IN UINT8 LinkSpeedCapability; /**< PCIe link speed/ |
| 483 | * @li @b 0 - Maximum supported by silicon |
| 484 | * @li @b 1 - Gen1 |
| 485 | * @li @b 2 - Gen2 |
| 486 | * @li @b 3 - Gen3 |
| 487 | */ |
| 488 | IN UINT8 LinkAspm; /**< ASPM control. (see AgesaPcieLinkAspm for additional option to control ASPM) |
| 489 | * @li @b 0 - Disabled |
| 490 | * @li @b 1 - L0s only |
| 491 | * @li @b 2 - L1 only |
| 492 | * @li @b 3 - L0s and L1 |
| 493 | */ |
| 494 | IN UINT8 LinkHotplug; /**< Hotplug control. |
| 495 | * @li @b 0 - Disabled |
| 496 | * @li @b 1 - Basic |
| 497 | * @li @b 2 - Server |
| 498 | * @li @b 3 - Enhanced |
| 499 | */ |
| 500 | IN UINT8 ResetId; /**< Arbitrary number greater than 0 assigned by platform firmware for GPIO |
| 501 | * identification which control reset for given port. |
| 502 | * Each port with unique GPIO should have unique ResetId assigned. |
| 503 | * All ports use same GPIO to control reset should have same ResetId assigned. |
| 504 | * see AgesaPcieSlotResetContol. |
| 505 | */ |
| 506 | IN PCIe_PORT_MISC_CONTROL MiscControls; ///< Misc extended controls |
| 507 | IN APIC_DEVICE_INFO ApicDeviceInfo; ///< IOAPIC device programming info |
| 508 | IN PCIE_ENDPOINT_STATUS EndpointStatus; ///< PCIe endpoint (device connected to PCIe port) status |
| 509 | IN RX_ADAPT_MODE RxAdaptMode; ///< Gen3 RxAdaptMode configuration |
| 510 | } PCIe_PORT_DATA; |
| 511 | |
| 512 | /// DDI channel lane mapping |
| 513 | typedef struct { ///< Structure that discribe lane mapping |
| 514 | IN UINT8 Lane0 :2; /**< Lane 0 mapping |
| 515 | * @li @b 0 - Map to lane 0 |
| 516 | * @li @b 1 - Map to lane 1 |
| 517 | * @li @b 2 - Map to lane 2 |
| 518 | * @li @b 3 - Map to lane 3 |
| 519 | */ |
| 520 | IN UINT8 Lane1 :2; ///< Lane 1 mapping (see "Lane 0 mapping") |
| 521 | IN UINT8 Lane2 :2; ///< Lane 2 mapping (see "Lane 0 mapping") |
| 522 | IN UINT8 Lane3 :2; ///< Lane 3 mapping (see "Lane 0 mapping") |
| 523 | } CHANNEL_MAPPING; ///< Lane mapping |
| 524 | |
| 525 | /// Common Channel Mapping |
| 526 | typedef union { |
| 527 | IN UINT8 ChannelMappingValue; ///< Raw lane mapping |
| 528 | IN CHANNEL_MAPPING ChannelMapping; ///< Channel mapping |
| 529 | } CONN_CHANNEL_MAPPING; |
| 530 | |
| 531 | /// DDI Configuration data |
| 532 | typedef struct { |
| 533 | IN UINT8 ConnectorType; /**< Display Connector Type |
| 534 | * @li @b 0 - DP |
| 535 | * @li @b 1 - eDP |
| 536 | * @li @b 2 - Single Link DVI-D |
| 537 | * @li @b 3 - Dual Link DVI-D (see @ref DualLinkDviDescription "Example Dual Link DVI connector description") |
| 538 | * @li @b 4 - HDMI |
| 539 | * @li @b 5 - DP-to-VGA |
| 540 | * @li @b 6 - DP-to-LVDS |
| 541 | * @li @b 7 - Hudson-2 NutMeg DP-to-VGA |
| 542 | * @li @b 8 - Single Link DVI-I |
| 543 | * @li @b 9 - Native CRT (Family 0x14) |
| 544 | * @li @b 10 - Native LVDS (Family 0x14) |
| 545 | * @li @b 11 - Auto detect LCD panel connector type. VBIOS is able to auto detect the LVDS connector type: native LVDS, eDP or DP-to-LVDS |
| 546 | * The auto detection method only support panel with EDID. |
| 547 | */ |
| 548 | IN UINT8 AuxIndex; /**< Indicates which AUX or DDC Line is used |
| 549 | * @li @b 0 - AUX1 |
| 550 | * @li @b 1 - AUX2 |
| 551 | * @li @b 2 - AUX3 |
| 552 | * @li @b 3 - AUX4 |
| 553 | * @li @b 4 - AUX5 |
| 554 | * @li @b 5 - AUX6 |
| 555 | */ |
| 556 | IN UINT8 HdpIndex; /**< Indicates which HDP pin is used |
| 557 | * @li @b 0 - HDP1 |
| 558 | * @li @b 1 - HDP2 |
| 559 | * @li @b 2 - HDP3 |
| 560 | * @li @b 3 - HDP4 |
| 561 | * @li @b 4 - HDP5 |
| 562 | * @li @b 5 - HDP6 |
| 563 | */ |
| 564 | IN CONN_CHANNEL_MAPPING Mapping[2]; /**< Set specific mapping of lanes to connector pins |
| 565 | * @li Mapping[0] define mapping for group of 4 lanes starting at PCIe_ENGINE_DATA.StartLane |
| 566 | * @li Mapping[1] define mapping for group of 4 lanes ending at PCIe_ENGINE_DATA.EndLane (only applicable for Dual DDI link) |
| 567 | * if Mapping[x] set to 0 than default mapping assumed |
| 568 | */ |
| 569 | IN UINT8 LanePnInversionMask; /**< Specifies whether to invert the state of P and N for each lane. Each bit represents a PCIe lane on the DDI port. |
| 570 | * @li 0 - Do not invert (default) |
| 571 | * @li 1 - Invert P and N on this lane |
| 572 | */ |
| 573 | IN UINT8 Flags; /**< Capabilities flags |
| 574 | * @li Flags bit[0] DDI_DATA_FLAGS_DP1_1_ONLY Selects downgrade PHY link to DP1.1 |
| 575 | * @li Flags bit[7:1] Reserved |
| 576 | */ |
| 577 | } PCIe_DDI_DATA; |
| 578 | |
| 579 | /// Engine Configuration |
| 580 | typedef struct { |
| 581 | IN UINT8 EngineType; /**< Engine type |
| 582 | * @li @b 0 - Ignore engine configuration |
| 583 | * @li @b 1 - PCIe port |
| 584 | * @li @b 2 - DDI |
| 585 | */ |
| 586 | IN UINT16 StartLane; /**< Start Lane ID (in reversed configuration StartLane > EndLane) |
| 587 | * Refer to lane descriptions and supported configurations in BKDG |
| 588 | */ |
| 589 | IN UINT16 EndLane; /**< End lane ID (in reversed configuration StartLane > EndLane) |
| 590 | * Refer to lane descriptions and supported configurations in BKDG |
| 591 | */ |
| 592 | |
| 593 | } PCIe_ENGINE_DATA; |
| 594 | |
| 595 | /// PCIe port descriptor |
| 596 | typedef struct { |
| 597 | IN UINT32 Flags; /**< Descriptor flags |
| 598 | * @li @b Bit31 - last descriptor in complex |
| 599 | */ |
| 600 | IN PCIe_ENGINE_DATA EngineData; ///< Engine data |
| 601 | IN PCIe_PORT_DATA Port; ///< PCIe port specific configuration info |
| 602 | } PCIe_PORT_DESCRIPTOR; |
| 603 | |
| 604 | /// DDI descriptor |
| 605 | typedef struct { |
| 606 | IN UINT32 Flags; /**< Descriptor flags |
| 607 | * @li @b Bit31 - last descriptor in complex |
| 608 | */ |
| 609 | IN PCIe_ENGINE_DATA EngineData; ///< Engine data |
| 610 | IN PCIe_DDI_DATA Ddi; ///< DDI port specific configuration info |
| 611 | } PCIe_DDI_DESCRIPTOR; |
| 612 | |
| 613 | /// PCIe Complex descriptor |
| 614 | typedef struct { |
| 615 | IN UINT32 Flags; /**< Descriptor flags |
| 616 | * @li @b Bit31 - last descriptor in topology |
| 617 | */ |
| 618 | IN UINT32 SocketId; ///< Socket Id |
| 619 | IN const PCIe_PORT_DESCRIPTOR *PciePortList; ///< Pointer to array of PCIe port descriptors or NULL (Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST). |
| 620 | IN const PCIe_DDI_DESCRIPTOR *DdiLinkList; ///< Pointer to array DDI link descriptors (Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST). |
| 621 | IN VOID *Reserved; ///< Reserved for future use |
| 622 | } PCIe_COMPLEX_DESCRIPTOR; |
| 623 | |
| 624 | /// Action to control PCIe slot reset |
| 625 | typedef enum { |
| 626 | AssertSlotReset, ///< Assert slot reset |
| 627 | DeassertSlotReset ///< Deassert slot reset |
| 628 | } PCIE_RESET_CONTROL; |
| 629 | |
| 630 | ///Slot Reset Info |
| 631 | typedef struct { |
| 632 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 633 | IN UINT8 ResetId; ///< Slot reset ID as specified in PCIe_PORT_DESCRIPTOR |
| 634 | IN UINT8 ResetControl; ///< Reset control as in PCIE_RESET_CONTROL |
| 635 | } PCIe_SLOT_RESET_INFO; |
| 636 | |
| 637 | #define GFX_VBIOS_IMAGE_FLAG_SPECIAL_POST 0x1 |
| 638 | |
| 639 | ///VBIOS image info |
| 640 | typedef struct { |
| 641 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 642 | OUT VOID *ImagePtr; ///< Pointer to VBIOS image |
| 643 | IN PCI_ADDR GfxPciAddress; ///< PCI address of integrated graphics controller |
| 644 | IN UINT32 Flags; ///< BIT[0] - special repost requred |
| 645 | } GFX_VBIOS_IMAGE_INFO; |
| 646 | |
| 647 | /// Engine descriptor type |
| 648 | typedef enum { |
| 649 | PcieUnusedEngine = 0, ///< Unused descriptor |
| 650 | PciePortEngine = 1, ///< PCIe port |
| 651 | PcieDdiEngine = 2, ///< DDI |
| 652 | MaxPcieEngine ///< Max engine type for boundary check. |
| 653 | } PCIE_ENGINE_TYPE; |
| 654 | |
| 655 | /// PCIe link capability/speed |
| 656 | typedef enum { |
| 657 | PcieGenMaxSupported, ///< Maximum supported |
| 658 | PcieGen1 = 1, ///< Gen1 |
| 659 | PcieGen2, ///< Gen2 |
| 660 | PcieGen3, ///< Gen3 |
| 661 | MaxPcieGen ///< Max Gen for boundary check |
| 662 | } PCIE_LINK_SPEED_CAP; |
| 663 | |
| 664 | /// PCIe PSPP Power policy |
| 665 | typedef enum { |
| 666 | PsppDisabled, ///< PSPP disabled |
| 667 | PsppPerformance = 1, ///< Performance |
| 668 | PsppBalanceHigh, ///< Balance-High |
| 669 | PsppBalanceLow, ///< Balance-Low |
| 670 | PsppPowerSaving, ///< Power Saving |
| 671 | MaxPspp ///< Max Pspp for boundary check |
| 672 | } PCIE_PSPP_POLICY; |
| 673 | |
| 674 | /// DDI display connector type |
| 675 | typedef enum { |
| 676 | ConnectorTypeDP, ///< DP |
| 677 | ConnectorTypeEDP, ///< eDP |
| 678 | ConnectorTypeSingleLinkDVI, ///< Single Link DVI-D |
| 679 | ConnectorTypeDualLinkDVI, ///< Dual Link DVI-D |
| 680 | ConnectorTypeHDMI, ///< HDMI |
| 681 | ConnectorTypeDpToVga, ///< DP-to-VGA |
| 682 | ConnectorTypeDpToLvds, ///< DP-to-LVDS |
| 683 | ConnectorTypeNutmegDpToVga, ///< Hudson-2 NutMeg DP-to-VGA |
| 684 | ConnectorTypeSingleLinkDviI, ///< Single Link DVI-I |
| 685 | ConnectorTypeCrt, ///< CRT (VGA) |
| 686 | ConnectorTypeLvds, ///< LVDS |
| 687 | ConnectorTypeEDPToLvds, ///< 3rd party common eDP-to-LVDS translator chip without AMD SW init |
| 688 | ConnectorTypeEDPToLvdsSwInit, ///< 3rd party eDP-to-LVDS translator which requires AMD SW init |
| 689 | ConnectorTypeAutoDetect, ///< VBIOS auto detect connector type (native LVDS, eDP or DP-to-LVDS) |
| 690 | MaxConnectorType ///< Not valid value, used to verify input |
| 691 | } PCIE_CONNECTOR_TYPE; |
| 692 | |
| 693 | /// PCIe link channel type |
| 694 | typedef enum { |
| 695 | ChannelTypeLowLoss, ///< Low Loss |
| 696 | ChannelTypeHighLoss, ///< High Loss |
| 697 | ChannelTypeMob0db, ///< Mobile 0dB |
| 698 | ChannelTypeMob3db, ///< Mobile 3dB |
| 699 | ChannelTypeExt6db, ///< Extended 6dB |
| 700 | ChannelTypeExt8db, ///< Extended 8dB |
| 701 | MaxChannelType ///< Not valid value, used to verify input |
| 702 | } PCIE_CHANNEL_TYPE; |
| 703 | |
| 704 | /// PCIe link ASPM |
| 705 | typedef enum { |
| 706 | AspmDisabled, ///< Disabled |
| 707 | AspmL0s, ///< PCIe L0s link state |
| 708 | AspmL1, ///< PCIe L1 link state |
| 709 | AspmL0sL1, ///< PCIe L0s & L1 link state |
| 710 | MaxAspm ///< Not valid value, used to verify input |
| 711 | } PCIE_ASPM_TYPE; |
| 712 | |
| 713 | /// PCIe link hotplug support |
| 714 | typedef enum { |
| 715 | HotplugDisabled, ///< Hotplug disable |
| 716 | HotplugBasic, ///< Basic Hotplug |
| 717 | HotplugServer, ///< Server Hotplug |
| 718 | HotplugEnhanced, ///< Enhanced |
| 719 | HotplugInboard, ///< Inboard |
| 720 | MaxHotplug ///< Not valid value, used to verify input |
| 721 | } PCIE_HOTPLUG_TYPE; |
| 722 | |
| 723 | /// PCIe link initialization |
| 724 | typedef enum { |
| 725 | PortDisabled, ///< Disable |
| 726 | PortEnabled ///< Enable |
| 727 | } PCIE_PORT_ENABLE; |
| 728 | |
| 729 | /// PCIe ACS capability - Access Control Services |
| 730 | typedef enum { |
| 731 | PcieAcsDisabled, ///< Disabled |
| 732 | PcieAcsEnabled, ///< Enabled |
| 733 | } PCIE_ACS_CAP; |
| 734 | |
| 735 | /// PCIe ClkPmSupport initialization |
| 736 | typedef enum { |
| 737 | ClkPmSupportDisabled, ///< Disable |
| 738 | ClkPmSupportEnabled ///< Enable |
| 739 | } CLKPM_SUPPORT_ENABLE; |
| 740 | |
| 741 | /// DDI Aux channel |
| 742 | typedef enum { |
| 743 | Aux1, ///< Aux1 |
| 744 | Aux2, ///< Aux2 |
| 745 | Aux3, ///< Aux3 |
| 746 | Aux4, ///< Aux4 |
| 747 | Aux5, ///< Aux5 |
| 748 | Aux6, ///< Aux6 |
| 749 | MaxAux ///< Not valid value, used to verify input |
| 750 | } PCIE_AUX_TYPE; |
| 751 | |
| 752 | /// DDI Hdp Index |
| 753 | typedef enum { |
| 754 | Hdp1, ///< Hdp1 |
| 755 | Hdp2, ///< Hdp2 |
| 756 | Hdp3, ///< Hdp3 |
| 757 | Hdp4, ///< Hdp4 |
| 758 | Hdp5, ///< Hdp5 |
| 759 | Hdp6, ///< Hdp6 |
| 760 | MaxHdp ///< Not valid value, used to verify input |
| 761 | } PCIE_HDP_TYPE; |
| 762 | |
| 763 | /// PCIe_DDI_DATA.Flags definitions |
| 764 | #define DDI_DATA_FLAGS_DP1_1_ONLY 0x01 ///< BIT[0] Selects downgrade PHY link to DP1.1 |
| 765 | #define EXT_DISPLAY_PATH_CAPS_DP_FIXED_VS_EN 0x02 ///< BIT[1] VBIOS will always output fixed voltage swing during DP link training |
| 766 | /// DP receiver definitions with fixed voltage swing |
| 767 | typedef enum { |
| 768 | DP_VS_0_4V_0DB, ///< 0x00 |
| 769 | DP_VS_0_6V_0DB, ///< 0x01 |
| 770 | DP_VS_0_8V_0DB, ///< 0x02 |
| 771 | DP_VS_1_2V_0DB, ///< 0x03 |
| 772 | DP_VS_0_4V_3_5DB = 0x8, ///< 0x08 |
| 773 | DP_VS_0_6V_3_5DB, ///< 0x09 |
| 774 | DP_VS_0_8V_3_5DB, ///< 0x0a |
| 775 | DP_VS_0_4V_6DB = 0x10, ///< 0x10 |
| 776 | DP_VS_0_6V_6DB, ///< 0x11 |
| 777 | DP_VS_0_4V_9_5DB = 0x18 ///< 0x18 |
| 778 | } DP_FIXED_VOLT_SWING_TYPE; |
| 779 | |
| 780 | #if CONFIG(AGESA_USE_1_0_0_4_HEADER) |
| 781 | /// Alternative DRAM MAC |
| 782 | typedef enum { |
| 783 | MAC_UNTESTEDMAC, ///< Assign 0 to Untested MAC |
| 784 | MAC_700k, ///< Assign 1 to 700k |
| 785 | MAC_600k, ///< Assign 2 to 600k |
| 786 | MAC_500k, ///< Assign 3 to 500k |
| 787 | MAC_400k, ///< Assign 4 to 400k |
| 788 | MAC_300k, ///< Assign 5 to 300k |
| 789 | MAC_200k, ///< Assign 6 to 200k |
| 790 | } DRAM_MAXIMUM_ACTIVATE_COUNT; |
| 791 | #endif |
| 792 | |
| 793 | // Macro for statically initializing various structures |
| 794 | #define PCIE_ENGINE_DATA_INITIALIZER(mType, mStartLane, mEndLane) {mType, mStartLane, mEndLane} |
| 795 | #define PCIE_PORT_DATA_INITIALIZER(mPortPresent, mChannelType, mDevAddress, mHotplug, mMaxLinkSpeed, mMaxLinkCap, mAspm, mResetId) \ |
| 796 | {mPortPresent, mChannelType, mDevAddress, 0, mMaxLinkSpeed, mAspm, mHotplug, mResetId, {0, mMaxLinkCap, 0, 0}, {0, 0, 0}, EndpointDetect, \ |
| 797 | {ADAPT_IOC_ENABLED, ADAPT_DFE_CONTROL_DISABLED, ADAPT_LEQ_CONTROL_DC_GAIN_POLE, ADAPT_DOC_DISABLED, ADAPT_FOMC_ENABLED, ADAPT_PIOC_DISABLED}} |
| 798 | #define PCIE_PORT_DATA_INITIALIZER_V2(mPortPresent, mChannelType, mDevAddress, mDevFunction, mHotplug, mMaxLinkSpeed, mMaxLinkCap, mAspm, mResetId, mClkPmSupport) \ |
| 799 | {mPortPresent, mChannelType, mDevAddress, mDevFunction, mMaxLinkSpeed, mAspm, mHotplug, mResetId, {0, mMaxLinkCap, 0, mClkPmSupport}, {0, 0, 0}, EndpointDetect, \ |
| 800 | {ADAPT_IOC_ENABLED, ADAPT_DFE_CONTROL_DISABLED, ADAPT_LEQ_CONTROL_DC_GAIN_POLE, ADAPT_DOC_DISABLED, ADAPT_FOMC_ENABLED, ADAPT_PIOC_DISABLED}} |
| 801 | #define PCIE_PORT_DATA_INITIALIZER_GEN3(mPortPresent, mChannelType, mDevAddress, mDevFunction, mHotplug, mMaxLinkSpeed, mMaxLinkCap, mAspm, mResetId, mClkPmSupport, \ |
| 802 | mInitOffsetCancellation, mDFEControl, mLEQControl, mDynamicOffsetCalibration, mFOMCalculation, mPIOffsetCalibration) \ |
| 803 | {mPortPresent, mChannelType, mDevAddress, mDevFunction, mMaxLinkSpeed, mAspm, mHotplug, mResetId, {0, mMaxLinkCap, 0, mClkPmSupport}, {0, 0, 0}, EndpointDetect, \ |
| 804 | {mInitOffsetCancellation, mDFEControl, mLEQControl, mDynamicOffsetCalibration, mFOMCalculation, mPIOffsetCalibration}} |
| 805 | #define PCIE_DDI_DATA_INITIALIZER(mConnectorType, mAuxIndex, mHpdIndex ) \ |
| 806 | {mConnectorType, mAuxIndex, mHpdIndex, {{0}, {0}}, 0, 0} |
| 807 | #define PCIE_DDI_DATA_INITIALIZER_V1(mConnectorType, mAuxIndex, mHpdIndex, mMapping0, mMapping1, mPNInversion) \ |
| 808 | {mConnectorType, mAuxIndex, mHpdIndex, {mMapping0, mMapping1}, mPNInversion, 0} |
| 809 | #define PCIE_DDI_DATA_INITIALIZER_V2(mConnectorType, mAuxIndex, mHpdIndex, mMapping0, mMapping1, mPNInversion, mFlags) \ |
| 810 | {mConnectorType, mAuxIndex, mHpdIndex, {mMapping0, mMapping1}, mPNInversion, mFlags} |
| 811 | |
| 812 | ///IOMMU requestor ID |
| 813 | typedef struct { |
| 814 | IN UINT16 Bus :8; ///< Bus |
| 815 | IN UINT16 Device :5; ///< Device |
| 816 | IN UINT16 Function :3; ///< Function |
| 817 | } IOMMU_REQUESTOR_ID; |
| 818 | |
| 819 | /// IVMD exclusion range descriptor |
| 820 | typedef struct { |
| 821 | IN UINT32 Flags; /**< Descriptor flags |
| 822 | * @li @b Flags[31] - Terminate descriptor array. |
| 823 | * @li @b Flags[30] - Ignore descriptor. |
| 824 | */ |
| 825 | IN IOMMU_REQUESTOR_ID RequestorIdStart; ///< Requestor ID start |
| 826 | IN IOMMU_REQUESTOR_ID RequestorIdEnd; ///< Requestor ID end (use same as start for single ID) |
| 827 | IN UINT64 RangeBaseAddress; ///< Phisical base address of exclusion range |
| 828 | IN UINT64 RangeLength; ///< Length of exclusion range in bytes |
| 829 | } IOMMU_EXCLUSION_RANGE_DESCRIPTOR; |
| 830 | |
| 831 | /*---------------------------------------------------------------------------- |
| 832 | * GNB configuration info |
| 833 | *---------------------------------------------------------------------------- |
| 834 | */ |
| 835 | |
| 836 | /// LVDS Misc Control Field |
| 837 | typedef struct { |
| 838 | IN UINT8 FpdiMode:1; ///< This item configures LVDS 888bit panel mode |
| 839 | ///< @li FALSE = LVDS 888 panel in LDI mode |
| 840 | ///< @li TRUE = LVDS 888 panel in FPDI mode |
| 841 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_888_FPDI_MODE} |
| 842 | IN UINT8 DlChSwap:1; ///< This item configures LVDS panel lower and upper link mapping |
| 843 | ///< @li FALSE = Lower link and upper link not swap |
| 844 | ///< @li TRUE = Lower link and upper link are swapped |
| 845 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_DL_CH_SWAP} |
| 846 | IN UINT8 VsyncActiveLow:1; ///< This item configures polarity of frame pulse encoded in lvds data stream |
| 847 | ///< @li FALSE = Active high Frame Pulse/Vsync |
| 848 | ///< @li TRUE = Active low Frame Pulse/Vsync |
| 849 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_VSYNC_ACTIVE_LOW} |
| 850 | IN UINT8 HsyncActiveLow:1; ///< This item configures polarity of line pulse encoded in lvds data |
| 851 | ///< @li FALSE = Active high Line Pulse |
| 852 | ///< @li TRUE = Active low Line Pulse / Hsync |
| 853 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_HSYNC_ACTIVE_LOW} |
| 854 | IN UINT8 BLONActiveLow:1; ///< This item configures polarity of signal sent to digital BLON output pin |
| 855 | ///< @li FALSE = Not inverted(active high) |
| 856 | ///< @li TRUE = Inverted (active low) |
| 857 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_BLON_ACTIVE_LOW} |
| 858 | IN UINT8 LvdsVoltOverwriteEn:1; ///< This item configures polarity of DP-to-LVDS output voltage overwrite |
| 859 | ///< @li FALSE = DP-to-LVDS output voltage overwrite disable, use VBIOS default setting. |
| 860 | ///< @li TRUE = Use ucLVDSVolAdjust value to program register LVDS_CTRL_4 |
| 861 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_VOLT_OVERWRITE_ENABLE} |
| 862 | IN UINT8 Reserved:2; ///< Reserved |
| 863 | } LVDS_MISC_CONTROL_FIELD; |
| 864 | |
| 865 | /// LVDS Misc Control |
| 866 | typedef union _LVDS_MISC_CONTROL { |
| 867 | IN LVDS_MISC_CONTROL_FIELD Field; ///< LVDS_MISC_CONTROL_FIELD |
| 868 | IN UINT8 Value; ///< LVDS Misc Control Value |
| 869 | } LVDS_MISC_CONTROL; |
| 870 | |
| 871 | /// Display Misc Control Field |
| 872 | typedef struct { |
| 873 | IN UINT8 Reserved1:3; ///< Reserved |
| 874 | IN UINT8 VbiosFastBootEn:1; ///< This item configures VBIOS skip display device detection in every set mode if LCD panel is connect and LID is open. |
| 875 | ///< @li FALSE = VBIOS fast boot is disable. |
| 876 | ///< @li TRUE = VBIOS fast boot is enable. |
| 877 | ///< @BldCfgItem{BLDCFG_DISPLAY_MISC_VBIOS_FAST_BOOT_ENABLE} |
| 878 | IN UINT8 Reserved2:4; ///< Reserved |
| 879 | } DISPLAY_MISC_CONTROL_FIELD; |
| 880 | |
| 881 | /// LVDS Misc Control |
| 882 | typedef union _DISPLAY_MISC_CONTROL { |
| 883 | IN DISPLAY_MISC_CONTROL_FIELD Field; ///< DISPLAY_MISC_CONTROL_FIELD |
| 884 | IN UINT8 Value; ///< Display Misc Control Value |
| 885 | } DISPLAY_MISC_CONTROL; |
| 886 | |
| 887 | /// POST Configuration settings for GNB. |
| 888 | typedef struct { |
| 889 | IN UINT8 IgpuEnableDisablePolicy; ///< This item defines the iGPU Enable/Disable policy |
| 890 | ///< @li 0 = Auto - use existing default - |
| 891 | ///< @li 1 = Disable iGPU if any PCIe/PCI graphics card present |
| 892 | ///< @BldCfgItem{BLDCFG_IGPU_ENABLE_DISABLE_POLICY} |
| 893 | } GNB_POST_CONFIGURATION; |
| 894 | |
| 895 | /// iGPU Enable/Disable Policy values |
| 896 | #define IGPU_DISABLE_AUTO 0 ///< Auto setting - disable iGPU if ANY PCI graphics or non-AMD PCIe graphics |
| 897 | #define IGPU_DISABLE_ANY_PCIE 1 ///< Disable iGPU if any PCI or PCIE graphics card is present |
| 898 | |
| 899 | /// ENV Configuration settings for GNB. |
| 900 | typedef struct { |
| 901 | IN UINT8 Gnb3dStereoPinIndex; ///< 3D Stereo Pin ID. |
| 902 | ///< @li 0 = Stereo 3D is disabled (default). |
| 903 | ///< @li 1 = Use processor pin HPD1. |
| 904 | ///< @li 2 = Use processor pin HPD2 |
| 905 | ///< @li 3 = Use processor pin HPD3 |
| 906 | ///< @li 4 = Use processor pin HPD4 |
| 907 | ///< @li 5 = Use processor pin HPD5 |
| 908 | ///< @li 6 = Use processor pin HPD6 |
| 909 | ///< @BldCfgItem{BLDCFG_STEREO_3D_PINOUT} |
| 910 | IN BOOLEAN IommuSupport; ///< IOMMU support. |
| 911 | ///< @li FALSE = Disabled. Disable and hide IOMMU device. |
| 912 | ///< @li TRUE = Initialize IOMMU subsystem. Generate ACPI IVRS table. |
| 913 | ///< BldCfgItem{BLDCFG_IOMMU_SUPPORT} |
| 914 | IN UINT16 LvdsSpreadSpectrum; ///< Spread spectrum value in 0.01 % |
| 915 | ///< BldCfgItem{BLDCFG_GFX_LVDS_SPREAD_SPECTRUM} |
| 916 | IN UINT16 LvdsSpreadSpectrumRate; ///< Spread spectrum frequency used by SS hardware logic in unit of 10Hz, 0 - default frequency 40kHz |
| 917 | ///< BldCfgItem{BLDCFG_GFX_LVDS_SPREAD_SPECTRUM_RATE} |
| 918 | IN UINT8 LvdsPowerOnSeqDigonToDe; ///< This item configures panel initialization timing. |
| 919 | ///< @BldCfgItem{BLDCFG_LVDS_POWER_ON_SEQ_DIGON_TO_DE} |
| 920 | IN UINT8 LvdsPowerOnSeqDeToVaryBl; ///< This item configures panel initialization timing. |
| 921 | ///< @BldCfgItem{BLDCFG_LVDS_POWER_ON_SEQ_DE_TO_VARY_BL} |
| 922 | IN UINT8 LvdsPowerOnSeqDeToDigon; ///< This item configures panel initialization timing. |
| 923 | ///< @BldCfgItem{BLDCFG_LVDS_POWER_ON_SEQ_DE_TO_DIGON} |
| 924 | IN UINT8 LvdsPowerOnSeqVaryBlToDe; ///< This item configures panel initialization timing. |
| 925 | ///< @BldCfgItem{BLDCFG_LVDS_POWERS_ON_SEQ_VARY_BL_TO_DE} |
| 926 | IN UINT8 LvdsPowerOnSeqOnToOffDelay; ///< This item configures panel initialization timing. |
| 927 | ///< @BldCfgItem{BLDCFG_LVDS_POWER_ON_SEQ_ON_TO_OFF_DELAY} |
| 928 | IN UINT8 LvdsPowerOnSeqVaryBlToBlon; ///< This item configures panel initialization timing. |
| 929 | ///< @BldCfgItem{BLDCFG_LVDS_POWER_ON_SEQ_VARY_BL_TO_BLON} |
| 930 | IN UINT8 LvdsPowerOnSeqBlonToVaryBl; ///< This item configures panel initialization timing. |
| 931 | ///< @BldCfgItem{BLDCFG_LVDS_POWER_ON_SEQ_BLON_TO_VARY_BL} |
| 932 | IN UINT16 LvdsMaxPixelClockFreq; ///< This item configures the maximum pixel clock frequency supported. |
| 933 | ///< @BldCfgItem{BLDCFG_LVDS_MAX_PIXEL_CLOCK_FREQ} |
| 934 | IN UINT32 LcdBitDepthControlValue; ///< This item configures the LCD bit depth control settings. |
| 935 | ///< @BldCfgItem{BLDCFG_LCD_BIT_DEPTH_CONTROL_VALUE} |
| 936 | IN UINT8 Lvds24bbpPanelMode; ///< This item configures the LVDS 24 BBP mode. |
| 937 | ///< @BldCfgItem{BLDCFG_LVDS_24BBP_PANEL_MODE} |
| 938 | IN LVDS_MISC_CONTROL LvdsMiscControl;///< This item configures LVDS swap/Hsync/Vsync/BLON |
| 939 | IN UINT16 PcieRefClkSpreadSpectrum; ///< Spread spectrum value in 0.01 % |
| 940 | ///< @BldCfgItem{BLDCFG_PCIE_REFCLK_SPREAD_SPECTRUM} |
| 941 | IN BOOLEAN GnbRemoteDisplaySupport; ///< This item enables Wireless Display Support |
| 942 | ///< @li TRUE = Enable Wireless Display Support |
| 943 | ///< @li FALSE = Disable Wireless Display Support |
| 944 | ///< @BldCfgItem{BLDCFG_REMOTE_DISPLAY_SUPPORT} |
| 945 | IN UINT8 LvdsMiscVoltAdjustment; ///< Register LVDS_CTRL_4 to adjust LVDS output voltage |
| 946 | ///< @BldCfgItem{BLDCFG_LVDS_MISC_VOL_ADJUSTMENT} |
| 947 | IN DISPLAY_MISC_CONTROL DisplayMiscControl;///< This item configures display misc control |
| 948 | IN DP_FIXED_VOLT_SWING_TYPE DpFixedVoltSwingType;///< To indicate fixed voltage swing value |
| 949 | ///< @BldCfgItem{BLDCFG_DP_FIXED_VOLT_SWING} |
| 950 | IN UINT32 GpuFrequencyLimit; ///< GNB GPU Max Frequency(NULL if platform configured) |
| 951 | ///< @BldCfgItem{BLDCFG_GPU_FREQUENCY_LIMIT} |
| 952 | } GNB_ENV_CONFIGURATION; |
| 953 | |
| 954 | /// Configuration settings for GNB. |
| 955 | typedef struct { |
| 956 | IN UINT8 iGpuVgaMode; ///< VGA resources decoding configuration for iGPU |
| 957 | ///< @li 0 = iGPU decode all VGA resources (must be primary VGA adapter) |
| 958 | ///< @li 1 = iGPU will not decode any VGA resources (must be secondary graphics adapter) |
| 959 | IN UINT8 PcieAcsCapability; ///< Pcie ACS Capability support |
| 960 | ///< @li 0 = Disabled |
| 961 | ///< @li 1 = Enabled |
| 962 | IN UINT64 GnbIoapicAddress; ///< GNB IOAPIC Base Address(NULL if platform configured) |
| 963 | ///< @BldCfgItem{BLDCFG_GNB_IOAPIC_ADDRESS} |
| 964 | IN UINT8 MaxNumAudioEndpoints; ///< Max number of audio endpoints |
| 965 | ///< @BldCfgItem{BLDCFG_MAX_NUM_AUDIO_ENDPOINTS} |
| 966 | } GNB_MID_CONFIGURATION; |
| 967 | |
| 968 | /// GNB configuration info |
| 969 | typedef struct { |
| 970 | IN const PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL. |
| 971 | * Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST |
| 972 | * Example of topology definition for single socket system: |
| 973 | * @code |
| 974 | * PCIe_PORT_DESCRIPTOR PortList [] = { |
| 975 | * // Initialize Port descriptor (PCIe port, Lanes 8:15, PCI Device Number 2, ...) |
| 976 | * { |
| 977 | * 0, //Descriptor flags |
| 978 | * PCIE_ENGINE_DATA_INITIALIZER (PciePortEngine, 8, 15), |
| 979 | * PCIE_PORT_DATA_INITIALIZER (PortEnabled, ChannelTypeExt6db, 2, HotplugDisabled, PcieGenMaxSupported, PcieGenMaxSupported, AspmDisabled, 0) |
| 980 | * }, |
| 981 | * // Initialize Port descriptor (PCIe port, Lanes 16:19, PCI Device Number 3, ...) |
| 982 | * { |
| 983 | * 0, //Descriptor flags |
| 984 | * PCIE_ENGINE_DATA_INITIALIZER (PciePortEngine, 16, 19), |
| 985 | * PCIE_PORT_DATA_INITIALIZER (PortEnabled, ChannelTypeExt6db, 3, HotplugDisabled, PcieGenMaxSupported, PcieGenMaxSupported, AspmDisabled, 0) |
| 986 | * }, |
| 987 | * // Initialize Port descriptor (PCIe port, Lanes 4, PCI Device Number 4, ...) |
| 988 | * { |
| 989 | * DESCRIPTOR_TERMINATE_LIST, //Descriptor flags !!!IMPORTANT!!! Terminate last element of array |
| 990 | * PCIE_ENGINE_DATA_INITIALIZER (PciePortEngine, 4, 4), |
| 991 | * PCIE_PORT_DATA_INITIALIZER (PortEnabled, ChannelTypeExt6db, 4, HotplugDisabled, PcieGenMaxSupported, PcieGenMaxSupported, AspmDisabled, 0) |
| 992 | * } |
| 993 | * }; |
| 994 | * PCIe_PORT_DESCRIPTOR DdiList [] = { |
| 995 | * // Initialize Ddi descriptor (DDI interface Lanes 24:27, Display Port Connector, ...) |
| 996 | * { |
| 997 | * 0, //Descriptor flags |
| 998 | * PCIE_ENGINE_DATA_INITIALIZER (PcieDdiEngine, 24, 27), |
| 999 | * PCIE_DDI_DATA_INITIALIZER (ConnectorTypeDP, Aux1, Hdp1, 0) |
| 1000 | * }, |
| 1001 | * // Initialize Ddi descriptor (DDI interface Lanes 28:31, HDMI, ...) |
| 1002 | * { |
| 1003 | * DESCRIPTOR_TERMINATE_LIST, //Descriptor flags !!!IMPORTANT!!! Terminate last element of array |
| 1004 | * PCIE_ENGINE_DATA_INITIALIZER (PcieDdiEngine, 28, 31), |
| 1005 | * PCIE_DDI_DATA_INITIALIZER (ConnectorTypeHDMI, Aux2, Hdp2, 0) |
| 1006 | * } |
| 1007 | * }; |
| 1008 | * PCIe_COMPLEX_DESCRIPTOR PlatformTopology = { |
| 1009 | * DESCRIPTOR_TERMINATE_LIST, //Descriptor flags !!!IMPORTANT!!! Terminate complexes list |
| 1010 | * 0, //Socket ID |
| 1011 | * &PortList[0], |
| 1012 | * &DdiList[0], |
| 1013 | * } |
| 1014 | * @endcode |
| 1015 | */ |
| 1016 | IN UINT8 PsppPolicy; /**< PSPP (PCIe Speed Power Policy) |
| 1017 | * @li @b 0 - Disabled |
| 1018 | * @li @b 1 - Performance |
| 1019 | * @li @b 2 - Balance-High |
| 1020 | * @li @b 3 - Balance-Low |
| 1021 | * @li @b 4 - Power Saving |
| 1022 | */ |
| 1023 | |
| 1024 | } GNB_CONFIGURATION; |
| 1025 | |
| 1026 | /// Late Configuration settings for GNB. |
| 1027 | typedef struct { |
| 1028 | IN BOOLEAN DockedTdpHeadroom; ///< Docked TDP headroom |
| 1029 | ///< @li TRUE = Enable docked TDP headroom |
| 1030 | ///< @li FALSE = Disable docked TDP headroom |
| 1031 | ///< @BldCfgItem{BLDCFG_DOCKED_TDP_HEADROOM} |
| 1032 | IN UINT8 GnbIoapicId; ///< GNB IOAPIC ID, platform BIOS needs to pass correct id number, default is 0xFF. |
| 1033 | ///< If BLDCFG_GNB_IOAPIC_ADDRESS == NULL or BLDCFG_IOMMU_SUPPORT == NULL or GnbIoapicId == default(0xFF), AGESA will skip it anyway. |
| 1034 | ///< @li 0~n = IOAPIC ID number for IVRS which should be matched with MADT |
| 1035 | IN UINT8 FchIoapicId; ///< Fch IOAPIC ID, platform BIOS needs to pass correct id number, default is 0xFF. |
| 1036 | ///< If BLDCFG_IOMMU_SUPPORT == NULL or or FchIoapicId == default(0xFF), AGESA will skip it anyway. |
| 1037 | ///< @li 0~n = IOAPIC ID number for IVRS which should be matched with MADT |
| 1038 | |
| 1039 | } GNB_LATE_CONFIGURATION; |
| 1040 | |
| 1041 | // |
| 1042 | // MEMORY-SPECIFIC DATA STRUCTURES |
| 1043 | // |
| 1044 | // |
| 1045 | // |
| 1046 | // |
| 1047 | // AGESA MAXIMIUM VALUES |
| 1048 | // |
| 1049 | // These Max values are used to define array sizes and associated loop |
| 1050 | // counts in the code. They reflect the maximum values that AGESA |
| 1051 | // currently supports and does not necessarily reflect the hardware |
| 1052 | // capabilities of configuration. |
| 1053 | // |
| 1054 | |
| 1055 | #define MAX_SOCKETS_SUPPORTED 1 ///< Max number of sockets in system |
| 1056 | #define MAX_CHANNELS_PER_SOCKET 4 ///< Max Channels per sockets |
| 1057 | #define MAX_DIMMS_PER_CHANNEL 4 ///< Max DIMMs on a memory channel (independent of platform) |
| 1058 | #define NUMBER_OF_DELAY_TABLES 9 ///< Number of tables defined in CH_DEF_STRUCT. |
| 1059 | ///< Eg: UINT16 *RcvEnDlys; |
| 1060 | ///< UINT8 *WrDqsDlys; |
| 1061 | ///< UINT8 *RdDqsDlys; |
| 1062 | ///< UINT8 *WrDatDlys; |
| 1063 | ///< UINT8 *RdDqsMinDlys; |
| 1064 | ///< UINT8 *RdDqsMaxDlys; |
| 1065 | ///< UINT8 *WrDatMinDlys; |
| 1066 | ///< UINT8 *WrDatMaxDlys; |
| 1067 | #define NUMBER_OF_FAILURE_MASK_TABLES 1 ///< Number of failure mask tables |
| 1068 | |
| 1069 | #define MAX_PLATFORM_TYPES 16 ///< Platform types per system |
| 1070 | |
| 1071 | #define MCT_TRNG_KEEPOUT_START 0x00004000ul ///< base [39:8] |
| 1072 | #define MCT_TRNG_KEEPOUT_END 0x00007FFFul ///< base [39:8] |
| 1073 | #define DATAEYE_VREF_RANGE 31 ///< Number of VREF steps in Data Eye Bitmap |
| 1074 | |
| 1075 | #define UMA_ATTRIBUTE_INTERLEAVE 0x80000000ul ///< Uma Region is interleaved |
| 1076 | #define UMA_ATTRIBUTE_ON_DCT0 0x40000000ul ///< UMA resides on memory that belongs to DCT0 |
| 1077 | #define UMA_ATTRIBUTE_ON_DCT1 0x20000000ul ///< UMA resides on memory that belongs to DCT1 |
| 1078 | #define UMA_ATTRIBUTE_ON_DCT2 0x10000000ul ///< UMA resides on memory that belongs to DCT2 |
| 1079 | #define UMA_ATTRIBUTE_ON_DCT3 0x08000000ul ///< UMA resides on memory that belongs to DCT3 |
| 1080 | |
| 1081 | typedef UINT8 PSO_TABLE; ///< Platform Configuration Table |
| 1082 | |
| 1083 | // AGESA DEFINITIONS |
| 1084 | // |
| 1085 | // Many of these are derived from the platform and hardware specific definitions |
| 1086 | |
| 1087 | /// EccSymbolSize override value |
| 1088 | #define ECCSYMBOLSIZE_USE_BKDG 0 ///< Use BKDG Recommended Value |
| 1089 | #define ECCSYMBOLSIZE_FORCE_X4 4 ///< Force to x4 |
| 1090 | #define ECCSYMBOLSIZE_FORCE_X8 8 ///< Force to x8 |
| 1091 | /// CPU Package Type |
| 1092 | #define PT_L1 0 ///< L1 Package type |
| 1093 | #define PT_M2 1 ///< AM Package type |
| 1094 | #define PT_S1 2 ///< S1 Package type |
| 1095 | |
| 1096 | /// Build Configuration values for BLDCFG_MEMORY_BUS_FREQUENCY_LIMIT & BLDCFG_MEMORY_CLOCK_SELECT |
| 1097 | #define DDR400_FREQUENCY 200 ///< DDR 400 |
| 1098 | #define DDR533_FREQUENCY 266 ///< DDR 533 |
| 1099 | #define DDR667_FREQUENCY 333 ///< DDR 667 |
| 1100 | #define DDR800_FREQUENCY 400 ///< DDR 800 |
| 1101 | #define DDR1066_FREQUENCY 533 ///< DDR 1066 |
| 1102 | #define DDR1333_FREQUENCY 667 ///< DDR 1333 |
| 1103 | #define DDR1600_FREQUENCY 800 ///< DDR 1600 |
| 1104 | #define DDR1866_FREQUENCY 933 ///< DDR 1866 |
| 1105 | #define DDR2100_FREQUENCY 1050 ///< DDR 2100 |
| 1106 | #define DDR2133_FREQUENCY 1066 ///< DDR 2133 |
| 1107 | #define DDR2400_FREQUENCY 1200 ///< DDR 2400 |
| 1108 | #define UNSUPPORTED_DDR_FREQUENCY 1201 ///< Highest limit of DDR frequency |
| 1109 | |
| 1110 | /// Build Configuration values for BLDCFG_TIMING_MODE_SELECT |
| 1111 | #define TIMING_MODE_AUTO 0 ///< Use best rate possible |
| 1112 | #define TIMING_MODE_LIMITED 1 ///< Set user top limit |
| 1113 | #define TIMING_MODE_SPECIFIC 2 ///< Set user specified speed |
| 1114 | |
| 1115 | /// Build Configuration values for BLDCFG_MEMORY_QUADRANK_TYPE |
| 1116 | #define QUADRANK_REGISTERED 0 ///< Quadrank registered DIMM |
| 1117 | #define QUADRANK_UNBUFFERED 1 ///< Quadrank unbuffered DIMM |
| 1118 | |
| 1119 | /// Build Configuration values for BLDCFG_POWER_DOWN_MODE |
| 1120 | #define POWER_DOWN_BY_CHANNEL 0 ///< Channel power down mode |
| 1121 | #define POWER_DOWN_BY_CHIP_SELECT 1 ///< Chip select power down mode |
| 1122 | #define POWER_DOWN_MODE_AUTO 2 ///< AGESA to select power down mode |
| 1123 | |
| 1124 | /// Build Configuration limit for BLDCFG_GNB_GPU_MAX_FREQUENCY |
| 1125 | #define UNSUPPORTED_GPU_FREQUENCY 901 ///< Highest limit of GPU frequency |
| 1126 | |
| 1127 | /// Structures use to pass system Logical CPU-ID |
| 1128 | typedef struct { |
| 1129 | IN OUT UINT64 Family; ///< Indicates logical ID Family |
| 1130 | IN OUT UINT64 Revision; ///< Indicates logical ID Family |
| 1131 | } CPU_LOGICAL_ID; |
| 1132 | |
| 1133 | /// Structures use to report AMP status |
| 1134 | typedef struct { |
| 1135 | OUT BOOLEAN AmpVoltageValid; ///< Indicates if Amp voltage is valid |
| 1136 | OUT BOOLEAN AmpSupportDetectedButNotEnabled; ///< Indicates if Amp support is detected but not enabled |
| 1137 | OUT BOOLEAN AmpSelectedButNotEnabled; ///< Indicates if Amp is selected but not enabled |
| 1138 | } AMP_STATUS; |
| 1139 | |
| 1140 | /// Normalized Critical Composite Data Eye |
| 1141 | /// Bit 15 represents trained eye Center |
| 1142 | /// Bit 0 represents eye center -15 delay steps |
| 1143 | /// Bit 31 represents eye center +16 delay steps |
| 1144 | /// Offset 0 represents +15 Vref Steps |
| 1145 | /// Offset 31 represents -15 Vref Steps |
| 1146 | typedef UINT32 COMPOSITE_DATAEYE[DATAEYE_VREF_RANGE]; |
| 1147 | |
| 1148 | /// Build Configuration values for BLDCFG_AMD_PLATFORM_TYPE |
| 1149 | typedef enum { |
| 1150 | AMD_PLATFORM_SERVER = 0x8000, ///< Server |
| 1151 | AMD_PLATFORM_DESKTOP = 0x10000, ///< Desktop |
| 1152 | AMD_PLATFORM_MOBILE = 0x20000, ///< Mobile |
| 1153 | } AMD_PLATFORM_TYPE; |
| 1154 | |
| 1155 | /// Dram technology type |
| 1156 | typedef enum { |
| 1157 | DDR2_TECHNOLOGY, ///< DDR2 technology |
| 1158 | DDR3_TECHNOLOGY, ///< DDR3 technology |
| 1159 | GDDR5_TECHNOLOGY, ///< GDDR5 technology |
| 1160 | UNSUPPORTED_TECHNOLOGY, ///< Unsupported technology |
| 1161 | } TECHNOLOGY_TYPE; |
| 1162 | |
| 1163 | /// Low voltage support |
| 1164 | typedef enum { |
| 1165 | VOLT_INITIAL, ///< Initial value for VDDIO |
| 1166 | VOLT1_5, ///< 1.5 Volt |
| 1167 | VOLT1_35, ///< 1.35 Volt |
| 1168 | VOLT1_25, ///< 1.25 Volt |
| 1169 | VOLT_UNSUPPORTED = 0xFF ///< No common voltage found |
| 1170 | } DIMM_VOLTAGE; |
| 1171 | |
| 1172 | /// AMP voltage support |
| 1173 | typedef enum { |
| 1174 | AMP_VOLT_RSVD, ///< Reserved |
| 1175 | AMP_VOLT1_5, ///< 1.5 Volt |
| 1176 | AMP_VOLT1_55, ///< 1.55 Volt |
| 1177 | AMP_VOLT1_6, ///< 1.6 Volt |
| 1178 | AMP_VOLT1_65, ///< 1.65 Volt |
| 1179 | AMP_VOLT1_7, ///< 1.7 Volt |
| 1180 | AMP_VOLT1_75, ///< 1.75 Volt |
| 1181 | AMP_VOLT1_8, ///< 1.8 Volt |
| 1182 | AMP_VOLT1_85, ///< 1.85 Volt |
| 1183 | AMP_VOLT1_9, ///< 1.9 Volt |
| 1184 | AMP_VOLT1_45 = 0x10, ///< 1.45 Volt |
| 1185 | AMP_VOLT1_4 = 0x20, ///< 1.4 Volt |
| 1186 | AMP_VOLT1_35 = 0x30, ///< 1.35 Volt |
| 1187 | AMP_VOLT1_3 = 0x40, ///< 1.3 Volt |
| 1188 | AMP_VOLT1_25 = 0x50, ///< 1.25 Volt |
| 1189 | AMP_VOLT1_2 = 0x60 ///< 1.2 Volt |
| 1190 | } AMP_DIMM_VOLTAGE; |
| 1191 | |
| 1192 | /// Build Configuration values for BLDCFG_ACP_SIZE |
| 1193 | typedef enum { |
| 1194 | NO_ACP_SIZE = 0x00, ///< NO ACP |
| 1195 | ACP_SIZE_2MB = 0x20, ///< UMA 4MB aligned |
| 1196 | ACP_SIZE_4MB = 0x40, ///< UMA 128MB aligned |
| 1197 | } ACP_SIZE; |
| 1198 | |
| 1199 | /// UMA Mode |
| 1200 | typedef enum { |
| 1201 | UMA_NONE = 0, ///< UMA None |
| 1202 | UMA_SPECIFIED = 1, ///< UMA Specified |
| 1203 | UMA_AUTO = 2 ///< UMA Auto |
| 1204 | } UMA_MODE; |
| 1205 | |
| 1206 | /// Force Training Mode |
| 1207 | typedef enum { |
| 1208 | FORCE_TRAIN_1D = 0, ///< 1D Training only |
| 1209 | FORCE_TRAIN_2D = 1, ///< 2D Training only |
| 1210 | FORCE_TRAIN_AUTO = 2 ///< Auto - 1D or 2D depending on configuration |
| 1211 | } FORCE_TRAIN_MODE; |
| 1212 | |
| 1213 | /// PMU Training Mode |
| 1214 | typedef enum { |
| 1215 | PMU_TRAIN_1D = 0, ///< PMU 1D Training only |
| 1216 | PMU_TRAIN_1D_2D_READ = 1, ///< PMU 1D and 2D Training read only |
| 1217 | PMU_TRAIN_1D_2D = 2, ///< PMU 1D and 2D Training |
| 1218 | PMU_TRAIN_AUTO = 3 ///< Auto - PMU Training depend on configuration |
| 1219 | } PMU_TRAIN_MODE; |
| 1220 | |
| 1221 | /// The possible DRAM prefetch mode settings. |
| 1222 | typedef enum { |
| 1223 | DRAM_PREFETCHER_AUTO, ///< Use the recommended setting for the processor. In most cases, the recommended setting is enabled. |
| 1224 | DISABLE_DRAM_PREFETCH_FOR_IO, ///< Disable DRAM prefetching for I/O requests only. |
| 1225 | DISABLE_DRAM_PREFETCH_FOR_CPU, ///< Disable DRAM prefetching for requests from processor cores only. |
| 1226 | DISABLE_DRAM_PREFETCHER, ///< Disable DRAM prefetching. |
| 1227 | MAX_DRAM_FREFETCH_MODE ///< Not a DRAM prefetch mode, use for limit checking. |
| 1228 | } DRAM_PREFETCH_MODE; |
| 1229 | |
| 1230 | /// Build Configuration values for BLDCFG_UMA_ALIGNMENT |
| 1231 | typedef enum { |
| 1232 | NO_UMA_ALIGNED = 0x00FFFFFF, ///< NO UMA aligned |
| 1233 | UMA_4MB_ALIGNED = 0x00FFFFC0, ///< UMA 4MB aligned |
| 1234 | UMA_128MB_ALIGNED = 0x00FFF800, ///< UMA 128MB aligned |
| 1235 | UMA_256MB_ALIGNED = 0x00FFF000, ///< UMA 256MB aligned |
| 1236 | UMA_512MB_ALIGNED = 0x00FFE000, ///< UMA 512MB aligned |
| 1237 | } UMA_ALIGNMENT; |
| 1238 | |
| 1239 | /// |
| 1240 | /// Global MCT Configuration Status Word (GStatus) |
| 1241 | /// |
| 1242 | typedef enum { |
| 1243 | GsbMTRRshort, ///< Ran out of MTRRs while mapping memory |
| 1244 | GsbAllECCDimms, ///< All banks of all Nodes are ECC capable |
| 1245 | GsbDramECCDis, ///< Dram ECC requested but not enabled. |
| 1246 | GsbSoftHole, ///< A Node Base gap was created |
| 1247 | GsbHWHole, ///< A HW dram remap was created |
| 1248 | GsbNodeIntlv, ///< Node Memory interleaving was enabled |
| 1249 | GsbSpIntRemapHole, ///< Special condition for Node Interleave and HW remapping |
| 1250 | GsbEnDIMMSpareNW, ///< Indicates that DIMM Spare can be used without a warm reset |
| 1251 | |
| 1252 | GsbEOL ///< End of list |
| 1253 | } GLOBAL_STATUS_FIELD; |
| 1254 | |
| 1255 | /// |
| 1256 | /// Local Error Status (DIE_STRUCT.ErrStatus[31:0]) |
| 1257 | /// |
| 1258 | typedef enum { |
| 1259 | EsbNoDimms, ///< No DIMMs |
| 1260 | EsbSpdChkSum, ///< SPD Checksum fail |
| 1261 | EsbDimmMismatchM, ///< dimm module type(buffer) mismatch |
| 1262 | EsbDimmMismatchT, ///< dimm CL/T mismatch |
| 1263 | EsbDimmMismatchO, ///< dimm organization mismatch (128-bit) |
| 1264 | EsbNoTrcTrfc, ///< SPD missing Trc or Trfc info |
| 1265 | EsbNoCycTime, ///< SPD missing byte 23 or 25 |
| 1266 | EsbBkIntDis, ///< Bank interleave requested but not enabled |
| 1267 | EsbDramECCDis, ///< Dram ECC requested but not enabled |
| 1268 | EsbSpareDis, ///< Online spare requested but not enabled |
| 1269 | EsbMinimumMode, ///< Running in Minimum Mode |
| 1270 | EsbNoRcvrEn, ///< No DQS Receiver Enable pass window found |
| 1271 | EsbSmallRcvr, ///< DQS Rcvr En pass window too small (far right of dynamic range) |
| 1272 | EsbNoDqsPos, ///< No DQS-DQ passing positions |
| 1273 | EsbSmallDqs, ///< DQS-DQ passing window too small |
| 1274 | EsbDCBKScrubDis, ///< DCache scrub requested but not enabled |
| 1275 | |
| 1276 | EsbEMPNotSupported, ///< Processor is not capable for EMP. |
| 1277 | EsbEMPConflict, ///< EMP requested but cannot be enabled since |
| 1278 | ///< channel interleaving, bank interleaving, or bank swizzle is enabled. |
| 1279 | EsbEMPDis, ///< EMP requested but cannot be enabled since |
| 1280 | ///< memory size of each DCT is not a power of two. |
| 1281 | |
| 1282 | EsbEOL ///< End of list |
| 1283 | } ERROR_STATUS_FIELD; |
| 1284 | |
| 1285 | /// |
| 1286 | /// Local Configuration Status (DIE_STRUCT.Status[31:0]) |
| 1287 | /// |
| 1288 | typedef enum { |
| 1289 | SbRegistered, ///< All DIMMs are Registered |
| 1290 | SbEccDimms, ///< All banks ECC capable |
| 1291 | SbParDimms, ///< All banks Addr/CMD Parity capable |
| 1292 | SbDiagClks, ///< Jedec ALL slots clock enable diag mode |
| 1293 | Sb128bitmode, ///< DCT in 128-bit mode operation |
| 1294 | Sb64MuxedMode, ///< DCT in 64-bit mux'ed mode. |
| 1295 | Sb2TMode, ///< 2T CMD timing mode is enabled. |
| 1296 | SbSWNodeHole, ///< Remapping of Node Base on this Node to create a gap. |
| 1297 | SbHWHole, ///< Memory Hole created on this Node using HW remapping. |
| 1298 | SbOver400Mhz, ///< DCT freq greater than or equal to 400MHz flag |
| 1299 | SbDQSPosPass2, ///< Used for TrainDQSPos DIMM0/1, when freq greater than or equal to 400MHz |
| 1300 | SbDQSRcvLimit, ///< Used for DQSRcvEnTrain to know we have reached the upper bound. |
| 1301 | SbExtConfig, ///< Indicate the default setting for extended PCI configuration support |
| 1302 | SbLrdimms, ///< All DIMMs are LRDIMMs |
| 1303 | |
| 1304 | SbEOL ///< End of list |
| 1305 | } LOCAL_STATUS_FIELD; |
| 1306 | |
| 1307 | |
| 1308 | ///< CPU MSR Register definitions ------------------------------------------ |
| 1309 | #define SYS_CFG 0xC0010010ul |
| 1310 | #define TOP_MEM 0xC001001Aul |
| 1311 | #define TOP_MEM2 0xC001001Dul |
| 1312 | #define HWCR 0xC0010015ul |
| 1313 | #define NB_CFG 0xC001001Ful |
| 1314 | |
| 1315 | #define FS_BASE 0xC0000100ul |
| 1316 | #define IORR0_BASE 0xC0010016ul |
| 1317 | #define IORR0_MASK 0xC0010017ul |
| 1318 | #define BU_CFG 0xC0011023ul |
| 1319 | #define BU_CFG2 0xC001102Aul |
| 1320 | #define COFVID_STAT 0xC0010071ul |
| 1321 | #define TSC 0x10 |
| 1322 | |
| 1323 | //----------------------------------------------------------------------------- |
| 1324 | /// |
| 1325 | /// SPD Data for each DIMM. |
| 1326 | /// |
| 1327 | typedef struct _SPD_DEF_STRUCT { |
| 1328 | IN BOOLEAN DimmPresent; ///< Indicates that the DIMM is present and Data is valid |
| 1329 | IN UINT8 Data[256]; ///< Buffer for 256 Bytes of SPD data from DIMM |
| 1330 | } SPD_DEF_STRUCT; |
| 1331 | |
| 1332 | |
| 1333 | //----------------------------------------------------------------------------- |
| 1334 | /// |
| 1335 | /// VDDP_VDDR Voltage Info for Low Power DIMM |
| 1336 | /// |
| 1337 | typedef struct _VDDP_VDDR_VOLTAGE { |
| 1338 | IN BOOLEAN IsValid; ///< Indicates if daata is valid |
| 1339 | IN MEMORY_PHY_VOLTAGE Voltage; ///< VDDP VDDR Voltage Value |
| 1340 | } VDDP_VDDR_VOLTAGE; |
| 1341 | |
| 1342 | /// |
| 1343 | /// Channel Definition Structure. |
| 1344 | /// This data structure defines entries that are specific to the channel initialization |
| 1345 | /// |
| 1346 | typedef struct _CH_DEF_STRUCT { |
| 1347 | OUT UINT8 ChannelID; ///< Physical channel ID of a socket(0 = CH A, 1 = CH B, 2 = CH C, 3 = CH D) |
| 1348 | OUT TECHNOLOGY_TYPE TechType; ///< Technology type of this channel |
| 1349 | OUT UINT8 ChDimmPresent; ///< For each bit n 0..7, 1 = DIMM n is present. |
| 1350 | ///< DIMM# Select Signal |
| 1351 | ///< 0 MA0_CS_L[0, 1] |
| 1352 | ///< 1 MB0_CS_L[0, 1] |
| 1353 | ///< 2 MA1_CS_L[0, 1] |
| 1354 | ///< 3 MB1_CS_L[0, 1] |
| 1355 | ///< 4 MA2_CS_L[0, 1] |
| 1356 | ///< 5 MB2_CS_L[0, 1] |
| 1357 | ///< 6 MA3_CS_L[0, 1] |
| 1358 | ///< 7 MB3_CS_L[0, 1] |
| 1359 | |
| 1360 | OUT struct _DCT_STRUCT *DCTPtr; ///< Pointer to the DCT data of this channel. |
| 1361 | OUT struct _DIE_STRUCT *MCTPtr; ///< Pointer to the node data of this channel. |
| 1362 | OUT SPD_DEF_STRUCT *SpdPtr; ///< Pointer to the SPD data for this channel. (Setup by NB Constructor) |
| 1363 | OUT SPD_DEF_STRUCT *DimmSpdPtr[MAX_DIMMS_PER_CHANNEL]; ///< Array of pointers to |
| 1364 | ///< SPD Data for each Dimm. (Setup by Tech Block Constructor) |
| 1365 | OUT UINT8 ChDimmValid; ///< For each bit n 0..3, 1 = DIMM n is valid and is/will be configured where 4..7 are reserved. |
| 1366 | ///< |
| 1367 | OUT UINT8 RegDimmPresent; ///< For each bit n 0..3, 1 = DIMM n is a registered DIMM where 4..7 are reserved. |
| 1368 | OUT UINT8 LrDimmPresent; ///< For each bit n 0..3, 1 = DIMM n is Load Reduced DIMM where 4..7 are reserved. |
| 1369 | OUT UINT8 SODimmPresent; ///< For each bit n 0..3, 1 = DIMM n is a SO-DIMM, where 4..7 are reserved. |
| 1370 | OUT UINT8 Loads; ///< Number of devices loading bus |
| 1371 | OUT UINT8 Dimms; ///< Number of DIMMs loading Channel |
| 1372 | OUT UINT8 Ranks; ///< Number of ranks loading Channel DATA |
| 1373 | OUT BOOLEAN SlowMode; ///< 1T or 2T CMD mode (slow access mode) |
| 1374 | ///< FALSE = 1T |
| 1375 | ///< TRUE = 2T |
| 1376 | ///< The following pointers will be pointed to dynamically allocated buffers. |
| 1377 | ///< Each buffer is two dimensional (RowCount x ColumnCount) and is lay-outed as in below. |
| 1378 | ///< Example: If DIMM and Byte based training, then |
| 1379 | ///< XX is a value in Hex |
| 1380 | ///< BYTE 0, BYTE 1, BYTE 2, BYTE 3, BYTE 4, BYTE 5, BYTE 6, BYTE 7, ECC BYTE |
| 1381 | ///< Row1 - Logical DIMM0 XX XX XX XX XX XX XX XX XX |
| 1382 | ///< Row2 - Logical DIMM1 XX XX XX XX XX XX XX XX XX |
| 1383 | OUT UINT16 *RcvEnDlys; ///< DQS Receiver Enable Delays |
| 1384 | OUT UINT8 *WrDqsDlys; ///< Write DQS delays (only valid for DDR3) |
| 1385 | OUT UINT8 *RdDqsDlys; ///< Read Dqs delays |
| 1386 | OUT UINT8 *WrDatDlys; ///< Write Data delays |
| 1387 | OUT UINT8 *RdDqs2dDlys; ///< 2d Read DQS data |
| 1388 | OUT UINT8 *RdDqsMinDlys; ///< Minimum Window for Read DQS |
| 1389 | OUT UINT8 *RdDqsMaxDlys; ///< Maximum Window for Read DQS |
| 1390 | OUT UINT8 *WrDatMinDlys; ///< Minimum Window for Write data |
| 1391 | OUT UINT8 *WrDatMaxDlys; ///< Maximum Window for Write data |
| 1392 | OUT UINT16 *RcvEnDlysMemPs1; ///< DQS Receiver Enable Delays for Mem Pstate 1 |
| 1393 | OUT UINT8 *WrDqsDlysMemPs1; ///< Write DQS delays (only valid for DDR3) for Mem Pstate 1 |
| 1394 | OUT UINT8 *RdDqsDlysMemPs1; ///< Read Dqs delays for Memory Pstate 1 |
| 1395 | OUT UINT8 *WrDatDlysMemPs1; ///< Write Data delays for Memory Pstate 1 |
| 1396 | OUT UINT8 *RdDqs2dDlysMemPs1; ///< 2d Read DQS data for Memory Pstate 1 |
| 1397 | OUT UINT8 *RdDqsMinDlysMemPs1; ///< Minimum Window for Read DQS for Memory Pstate 1 |
| 1398 | OUT UINT8 *RdDqsMaxDlysMemPs1; ///< Maximum Window for Read DQS for Memory Pstate 1 |
| 1399 | OUT UINT8 *WrDatMinDlysMemPs1; ///< Minimum Window for Write data for Memory Pstate 1 |
| 1400 | OUT UINT8 *WrDatMaxDlysMemPs1; ///< Maximum Window for Write data for Memory Pstate 1 |
| 1401 | OUT UINT8 RowCount; ///< Number of rows of the allocated buffer. |
| 1402 | OUT UINT8 ColumnCount; ///< Number of columns of the allocated buffer. |
| 1403 | OUT UINT8 *FailingBitMask; ///< Table of masks to Track Failing bits |
| 1404 | OUT UINT8 *FailingBitMaskMemPs1; ///< Table of masks to Track Failing bits for Memory Pstate 1 |
| 1405 | OUT VOID *RdDataEyes; ///< Pointer to Read Data Eye Bitmaps |
| 1406 | OUT VOID *WrDataEyes; ///< Pointer to Write Data Eye Bitmaps |
| 1407 | OUT UINT32 DctOdcCtl; ///< Output Driver Strength (see BKDG FN2:Offset 9Ch, index 00h) |
| 1408 | OUT UINT32 DctAddrTmg; ///< Address Bus Timing (see BKDG FN2:Offset 9Ch, index 04h) |
| 1409 | OUT UINT32 PhyRODTCSLow; ///< Phy Read ODT Pattern Chip Select low (see BKDG FN2:Offset 9Ch, index 180h) |
| 1410 | OUT UINT32 PhyRODTCSHigh; ///< Phy Read ODT Pattern Chip Select high (see BKDG FN2:Offset 9Ch, index 181h) |
| 1411 | OUT UINT32 PhyWODTCSLow; ///< Phy Write ODT Pattern Chip Select low (see BKDG FN2:Offset 9Ch, index 182h) |
| 1412 | OUT UINT32 PhyWODTCSHigh; ///< Phy Write ODT Pattern Chip Select high (see BKDG FN2:Offset 9Ch, index 183) |
| 1413 | OUT UINT8 PhyWLODT[4]; ///< Write Levelization ODT Pattern for Dimm 0-3 or CS 0-7(see BKDG FN2:Offset 9Ch, index 0x8[11:8]) |
| 1414 | OUT UINT16 DctEccDqsLike; ///< DCT DQS ECC UINT8 like... |
| 1415 | OUT UINT8 DctEccDqsScale; ///< DCT DQS ECC UINT8 scale |
| 1416 | OUT UINT16 PtrPatternBufA; ///< Ptr on stack to aligned DQS testing pattern |
| 1417 | OUT UINT16 PtrPatternBufB; ///< Ptr on stack to aligned DQS testing pattern |
| 1418 | OUT UINT8 ByteLane; ///< Current UINT8 Lane (0..7) |
| 1419 | OUT UINT8 Direction; ///< Current DQS-DQ training write direction (0=read, 1=write) |
| 1420 | OUT UINT8 Pattern; ///< Current pattern |
| 1421 | OUT UINT8 DqsDelay; ///< Current DQS delay value |
| 1422 | OUT UINT16 HostBiosSrvc1; ///< UINT16 sized general purpose field for use by host BIOS. Scratch space. |
| 1423 | OUT UINT32 HostBiosSrvc2; ///< UINT32 sized general purpose field for use by host BIOS. Scratch space. |
| 1424 | OUT UINT16 DctMaxRdLat[4]; ///< Max Read Latency (ns) for the DCT |
| 1425 | ///< DctMaxRdLat [i] is for NBPstate i |
| 1426 | OUT UINT8 DIMMValidCh; ///< DIMM# in CH |
| 1427 | OUT UINT8 MaxCh; ///< Max number of CH in system |
| 1428 | OUT UINT8 Dct; ///< Dct pointer |
| 1429 | OUT UINT8 WrDatGrossH; ///< Write Data Gross delay high value |
| 1430 | OUT UINT8 DqsRcvEnGrossL; ///< DQS Receive Enable Gross Delay low |
| 1431 | |
| 1432 | OUT UINT8 TrwtWB; ///< Non-SPD timing value for TrwtWB |
| 1433 | OUT UINT8 CurrRcvrDctADelay; ///< for keep current RcvrEnDly |
| 1434 | OUT UINT16 T1000; ///< get the T1000 figure (cycle time (ns) * 1K) |
| 1435 | OUT UINT8 DqsRcvEnPass; ///< for TrainRcvrEn UINT8 lane pass flag |
| 1436 | OUT UINT8 DqsRcvEnSaved; ///< for TrainRcvrEn UINT8 lane saved flag |
| 1437 | OUT UINT8 SeedPass1Remainder; ///< for Phy assisted DQS receiver enable training |
| 1438 | |
| 1439 | OUT UINT8 ClToNbFlag; ///< is used to restore ClLinesToNbDis bit after memory |
| 1440 | OUT UINT32 NodeSysBase; ///< for channel interleave usage |
| 1441 | OUT UINT8 RefRawCard[MAX_DIMMS_PER_CHANNEL]; ///< Array of rawcards detected |
| 1442 | OUT UINT8 CtrlWrd02[MAX_DIMMS_PER_CHANNEL]; ///< Control Word 2 values per DIMM |
| 1443 | OUT UINT8 CtrlWrd03[MAX_DIMMS_PER_CHANNEL]; ///< Control Word 3 values per DIMM |
| 1444 | OUT UINT8 CtrlWrd04[MAX_DIMMS_PER_CHANNEL]; ///< Control Word 4 values per DIMM |
| 1445 | OUT UINT8 CtrlWrd05[MAX_DIMMS_PER_CHANNEL]; ///< Control Word 5 values per DIMM |
| 1446 | OUT UINT8 CtrlWrd08[MAX_DIMMS_PER_CHANNEL]; ///< Control Word 8 values per DIMM |
| 1447 | |
| 1448 | OUT UINT16 CsPresentDCT; ///< For each bit n 0..7, 1 = Chip-select n is present |
| 1449 | OUT UINT8 DimmMirrorPresent; ///< For each bit n 0..3, 1 = DIMM n is OnDimmMirror capable where 4..7 are reserved. |
| 1450 | OUT UINT8 DimmSpdCse; ///< For each bit n 0..3, 1 = DIMM n SPD checksum error where 4..7 are reserved. |
| 1451 | OUT UINT8 DimmExclude; ///< For each bit n 0..3, 1 = DIMM n gets excluded where 4..7 are reserved. |
| 1452 | OUT UINT8 DimmYr06; ///< Bitmap indicating which Dimms have a manufacturer's year code <= 2006 |
| 1453 | OUT UINT8 DimmWk2406; ///< Bitmap indicating which Dimms have a manufacturer's week code <= 24 of 2006 (June) |
| 1454 | OUT UINT8 DimmPlPresent; ///< Bitmap indicating that Planar (1) or Stacked (0) Dimms are present. |
| 1455 | OUT UINT8 DimmQrPresent; ///< QuadRank DIMM present? |
| 1456 | OUT UINT8 DimmDrPresent; ///< Bitmap indicating that Dual Rank Dimms are present |
| 1457 | OUT UINT8 DimmSRPresent; ///< Bitmap indicating that Single Rank Dimms are present |
| 1458 | OUT UINT8 Dimmx4Present; ///< For each bit n 0..3, 1 = DIMM n contains x4 data devices. where 4..7 are reserved. |
| 1459 | OUT UINT8 Dimmx8Present; ///< For each bit n 0..3, 1 = DIMM n contains x8 data devices. where 4..7 are reserved. |
| 1460 | OUT UINT8 Dimmx16Present; ///< For each bit n 0..3, 1 = DIMM n contains x16 data devices. where 4..7 are reserved. |
| 1461 | OUT UINT8 LrdimmPhysicalRanks[MAX_DIMMS_PER_CHANNEL];///< Number of Physical Ranks for LRDIMMs |
| 1462 | OUT UINT8 LrDimmLogicalRanks[MAX_DIMMS_PER_CHANNEL];///< Number of LRDIMM Logical ranks in this configuration |
| 1463 | OUT UINT8 LrDimmRankMult[MAX_DIMMS_PER_CHANNEL];///< Rank Multipication factor per dimm. |
| 1464 | OUT UINT8 DimmNibbleAccess; ///< For each bit n 0..3, 1 = DIMM n will use nibble signaling. Where 4..7 are reserved. |
| 1465 | OUT UINT8 *MemClkDisMap; ///< This pointer will be set to point to an array that describes |
| 1466 | ///< the routing of M[B,A]_CLK pins to the DIMMs' ranks. AGESA will |
| 1467 | ///< base on this array to disable unused MemClk to save power. |
| 1468 | ///< |
| 1469 | ///< The array must have 8 entries. Each entry, which associates with |
| 1470 | ///< one MemClkDis bit, is a bitmap of 8 CS that that MemClk is routed to. |
| 1471 | ///< Example: |
| 1472 | ///< BKDG definition of Fn2x88[MemClkDis] bitmap for AM3 package |
| 1473 | ///< is like below: |
| 1474 | ///< Bit AM3/S1g3 pin name |
| 1475 | ///< 0 M[B,A]_CLK_H/L[0] |
| 1476 | ///< 1 M[B,A]_CLK_H/L[1] |
| 1477 | ///< 2 M[B,A]_CLK_H/L[2] |
| 1478 | ///< 3 M[B,A]_CLK_H/L[3] |
| 1479 | ///< 4 M[B,A]_CLK_H/L[4] |
| 1480 | ///< 5 M[B,A]_CLK_H/L[5] |
| 1481 | ///< 6 M[B,A]_CLK_H/L[6] |
| 1482 | ///< 7 M[B,A]_CLK_H/L[7] |
| 1483 | ///< And platform has the following routing: |
| 1484 | ///< CS0 M[B,A]_CLK_H/L[4] |
| 1485 | ///< CS1 M[B,A]_CLK_H/L[2] |
| 1486 | ///< CS2 M[B,A]_CLK_H/L[3] |
| 1487 | ///< CS3 M[B,A]_CLK_H/L[5] |
| 1488 | ///< Then MemClkDisMap should be pointed to the following array: |
| 1489 | ///< CLK_2 CLK_3 CLK_4 CLK_5 |
| 1490 | ///< 0x00, 0x00, 0x02, 0x04, 0x01, 0x08, 0x00, 0x00 |
| 1491 | ///< Each entry of the array is the bitmask of 8 chip selects. |
| 1492 | |
| 1493 | OUT UINT8 *CKETriMap; ///< This pointer will be set to point to an array that describes |
| 1494 | ///< the routing of CKE pins to the DIMMs' ranks. |
| 1495 | ///< The array must have 2 entries. Each entry, which associates with |
| 1496 | ///< one CKE pin, is a bitmap of 8 CS that that CKE is routed to. |
| 1497 | ///< AGESA will base on this array to disable unused CKE pins to save power. |
| 1498 | |
| 1499 | OUT UINT8 *ODTTriMap; ///< This pointer will be set to point to an array that describes |
| 1500 | ///< the routing of ODT pins to the DIMMs' ranks. |
| 1501 | ///< The array must have 4 entries. Each entry, which associates with |
| 1502 | ///< one ODT pin, is a bitmap of 8 CS that that ODT is routed to. |
| 1503 | ///< AGESA will base on this array to disable unused ODT pins to save power. |
| 1504 | |
| 1505 | OUT UINT8 *ChipSelTriMap; ///< This pointer will be set to point to an array that describes |
| 1506 | ///< the routing of chip select pins to the DIMMs' ranks. |
| 1507 | ///< The array must have 8 entries. Each entry is a bitmap of 8 CS. |
| 1508 | ///< AGESA will base on this array to disable unused Chip select pins to save power. |
| 1509 | |
| 1510 | OUT BOOLEAN ExtendTmp; ///< If extended temperature is supported on all dimms on a channel. |
| 1511 | |
| 1512 | OUT UINT8 MaxVref; ///< Maximum Vref Value for channel |
| 1513 | |
| 1514 | OUT UINT8 Reserved[100]; ///< Reserved |
| 1515 | } CH_DEF_STRUCT; |
| 1516 | |
| 1517 | /// |
| 1518 | /// DCT Channel Timing Parameters. |
| 1519 | /// This data structure sets timings that are specific to the channel. |
| 1520 | /// |
| 1521 | typedef struct _CH_TIMING_STRUCT { |
| 1522 | OUT UINT16 DctDimmValid; ///< For each bit n 0..3, 1=DIMM n is valid and is/will be configured where 4..7 are reserved. |
| 1523 | OUT UINT16 DimmMirrorPresent; ///< For each bit n 0..3, 1=DIMM n is OnDimmMirror capable where 4..7 are reserved. |
| 1524 | OUT UINT16 DimmSpdCse; ///< For each bit n 0..3, 1=DIMM n SPD checksum error where 4..7 are reserved. |
| 1525 | OUT UINT16 DimmExclude; ///< For each bit n 0..3, 1 = DIMM n gets excluded where 4..7 are reserved. |
| 1526 | OUT UINT16 CsPresent; ///< For each bit n 0..7, 1=Chip-select n is present |
| 1527 | OUT UINT16 CsEnabled; ///< For each bit n 0..7, 1=Chip-select n is enabled |
| 1528 | OUT UINT16 CsTestFail; ///< For each bit n 0..7, 1=Chip-select n is present but disabled |
| 1529 | OUT UINT16 CsTrainFail; ///< Bitmap showing which chipselects failed training |
| 1530 | OUT UINT16 DIMM1KPage; ///< For each bit n 0..3, 1=DIMM n contains 1K page devices. where 4..7 are reserved |
| 1531 | OUT UINT16 DimmQrPresent; ///< QuadRank DIMM present? |
| 1532 | OUT UINT16 DimmDrPresent; ///< Bitmap indicating that Dual Rank Dimms are present , where 4..7 are reserved |
| 1533 | OUT UINT8 DimmSRPresent; ///< Bitmap indicating that Single Rank Dimms are present, where 4..7 are reserved |
| 1534 | OUT UINT16 Dimmx4Present; ///< For each bit n 0..3, 1=DIMM n contains x4 data devices. where 4..7 are reserved |
| 1535 | OUT UINT16 Dimmx8Present; ///< For each bit n 0..3, 1=DIMM n contains x8 data devices. where 4..7 are reserved |
| 1536 | OUT UINT16 Dimmx16Present; ///< For each bit n 0..3, 1=DIMM n contains x16 data devices. where 4..7 are reserved |
| 1537 | |
| 1538 | OUT UINT16 DIMMTrcd; ///< Minimax Trcd*40 (ns) of DIMMs |
| 1539 | OUT UINT16 DIMMTrp; ///< Minimax Trp*40 (ns) of DIMMs |
| 1540 | OUT UINT16 DIMMTrtp; ///< Minimax Trtp*40 (ns) of DIMMs |
| 1541 | OUT UINT16 DIMMTras; ///< Minimax Tras*40 (ns) of DIMMs |
| 1542 | OUT UINT16 DIMMTrc; ///< Minimax Trc*40 (ns) of DIMMs |
| 1543 | OUT UINT16 DIMMTwr; ///< Minimax Twr*40 (ns) of DIMMs |
| 1544 | OUT UINT16 DIMMTrrd; ///< Minimax Trrd*40 (ns) of DIMMs |
| 1545 | OUT UINT16 DIMMTwtr; ///< Minimax Twtr*40 (ns) of DIMMs |
| 1546 | OUT UINT16 DIMMTfaw; ///< Minimax Tfaw*40 (ns) of DIMMs |
| 1547 | OUT UINT16 TargetSpeed; ///< Target DRAM bus speed in MHz |
| 1548 | OUT UINT16 Speed; ///< DRAM bus speed in MHz |
| 1549 | ///< 400 (MHz) |
| 1550 | ///< 533 (MHz) |
| 1551 | ///< 667 (MHz) |
| 1552 | ///< 800 (MHz) |
| 1553 | ///< and so on... |
| 1554 | #if CONFIG(AGESA_USE_1_0_0_4_HEADER) |
| 1555 | OUT UINT8 Mac; ///< Maximum Activate Count |
| 1556 | #endif |
| 1557 | OUT UINT8 CasL; ///< CAS latency DCT setting (busclocks) |
| 1558 | OUT UINT8 Trcd; ///< DCT Trcd (busclocks) |
| 1559 | OUT UINT8 Trp; ///< DCT Trp (busclocks) |
| 1560 | OUT UINT8 Trtp; ///< DCT Trtp (busclocks) |
| 1561 | OUT UINT8 Tras; ///< DCT Tras (busclocks) |
| 1562 | OUT UINT8 Trc; ///< DCT Trc (busclocks) |
| 1563 | OUT UINT8 Twr; ///< DCT Twr (busclocks) |
| 1564 | OUT UINT8 Trrd; ///< DCT Trrd (busclocks) |
| 1565 | OUT UINT8 Twtr; ///< DCT Twtr (busclocks) |
| 1566 | OUT UINT8 Tfaw; ///< DCT Tfaw (busclocks) |
| 1567 | OUT UINT8 Trfc0; ///< DCT Logical DIMM0 Trfc |
| 1568 | ///< 0 = 75ns (for 256Mb devs) |
| 1569 | ///< 1 = 105ns (for 512Mb devs) |
| 1570 | ///< 2 = 127.5ns (for 1Gb devs) |
| 1571 | ///< 3 = 195ns (for 2Gb devs) |
| 1572 | ///< 4 = 327.5ns (for 4Gb devs) |
| 1573 | OUT UINT8 Trfc1; ///< DCT Logical DIMM1 Trfc (see Trfc0 for format) |
| 1574 | OUT UINT8 Trfc2; ///< DCT Logical DIMM2 Trfc (see Trfc0 for format) |
| 1575 | OUT UINT8 Trfc3; ///< DCT Logical DIMM3 Trfc (see Trfc0 for format) |
| 1576 | OUT UINT32 DctMemSize; ///< Base[47:16], total DRAM size controlled by this DCT. |
| 1577 | ///< |
| 1578 | OUT BOOLEAN SlowMode; ///< 1T or 2T CMD mode (slow access mode) |
| 1579 | ///< FALSE = 1T |
| 1580 | ///< TRUE = 2T |
| 1581 | OUT UINT8 TrwtTO; ///< DCT TrwtTO (busclocks) |
| 1582 | OUT UINT8 Twrrd; ///< DCT Twrrd (busclocks) |
| 1583 | OUT UINT8 Twrwr; ///< DCT Twrwr (busclocks) |
| 1584 | OUT UINT8 Trdrd; ///< DCT Trdrd (busclocks) |
| 1585 | OUT UINT8 TrwtWB; ///< DCT TrwtWB (busclocks) |
| 1586 | OUT UINT8 TrdrdSD; ///< DCT TrdrdSD (busclocks) |
| 1587 | OUT UINT8 TwrwrSD; ///< DCT TwrwrSD (busclocks) |
| 1588 | OUT UINT8 TwrrdSD; ///< DCT TwrrdSD (busclocks) |
| 1589 | OUT UINT16 MaxRdLat; ///< Max Read Latency |
| 1590 | OUT UINT8 WrDatGrossH; ///< Temporary variables must be removed |
| 1591 | OUT UINT8 DqsRcvEnGrossL; ///< Temporary variables must be removed |
| 1592 | } CH_TIMING_STRUCT; |
| 1593 | |
| 1594 | /// |
| 1595 | /// Data for each DCT. |
| 1596 | /// This data structure defines data used to configure each DRAM controller. |
| 1597 | /// |
| 1598 | typedef struct _DCT_STRUCT { |
| 1599 | OUT UINT8 Dct; ///< Current Dct |
| 1600 | OUT CH_TIMING_STRUCT Timings; ///< Channel Timing structure |
| 1601 | OUT CH_TIMING_STRUCT *TimingsMemPs1; ///< Pointed to channel timing structure for memory Pstate 1 |
| 1602 | OUT CH_DEF_STRUCT *ChData; ///< Pointed to a dynamically allocated array of Channel structures |
| 1603 | OUT UINT8 ChannelCount; ///< Number of channel per this DCT |
| 1604 | OUT BOOLEAN BkIntDis; ///< Bank interleave requested but not enabled on current DCT |
| 1605 | OUT UINT8 BankAddrMap; ///< Bank Address Mapping |
| 1606 | OUT UINT8 EnabledChipSels; ///< Number of enabled chip selects on current DCT |
| 1607 | } DCT_STRUCT; |
| 1608 | |
| 1609 | |
| 1610 | /// |
| 1611 | /// Data Structure defining each Die. |
| 1612 | /// This data structure contains information that is used to configure each Die. |
| 1613 | /// |
| 1614 | typedef struct _DIE_STRUCT { |
| 1615 | |
| 1616 | /// Advanced: |
| 1617 | |
| 1618 | OUT UINT8 NodeId; ///< Node ID of current controller |
| 1619 | OUT UINT8 SocketId; ///< Socket ID of this Die |
| 1620 | OUT UINT8 DieId; ///< ID of this die relative to the socket |
| 1621 | OUT PCI_ADDR PciAddr; ///< Pci bus and device number of this controller. |
| 1622 | OUT AGESA_STATUS ErrCode; ///< Current error condition of Node |
| 1623 | ///< 0x0 = AGESA_SUCCESS |
| 1624 | ///< 0x1 = AGESA_UNSUPPORTED |
| 1625 | ///< 0x2 = AGESA_BOUNDS_CHK |
| 1626 | ///< 0x3 = AGESA_ALERT |
| 1627 | ///< 0x4 = AGESA_WARNING |
| 1628 | ///< 0x5 = AGESA_ERROR |
| 1629 | ///< 0x6 = AGESA_CRITICAL |
| 1630 | ///< 0x7 = AGESA_FATAL |
| 1631 | ///< |
| 1632 | OUT BOOLEAN ErrStatus[EsbEOL]; ///< Error Status bit Field |
| 1633 | ///< |
| 1634 | OUT BOOLEAN Status[SbEOL]; ///< Status bit Field |
| 1635 | ///< |
| 1636 | OUT UINT32 NodeMemSize; ///< Base[47:16], total DRAM size controlled by both DCT0 and DCT1 of this Node. |
| 1637 | ///< |
| 1638 | OUT UINT32 NodeSysBase; ///< Base[47:16] (system address) DRAM base address of this Node. |
| 1639 | ///< |
| 1640 | OUT UINT32 NodeHoleBase; ///< If not zero, Base[47:16] (system address) of dram hole for HW remapping. Dram hole exists on this Node |
| 1641 | ///< |
| 1642 | OUT UINT32 NodeSysLimit; ///< Base[47:16] (system address) DRAM limit address of this Node. |
| 1643 | ///< |
| 1644 | OUT UINT32 DimmPresent; ///< For each bit n 0..7, 1 = DIMM n is present. |
| 1645 | ///< DIMM# Select Signal |
| 1646 | ///< 0 MA0_CS_L[0, 1] |
| 1647 | ///< 1 MB0_CS_L[0, 1] |
| 1648 | ///< 2 MA1_CS_L[0, 1] |
| 1649 | ///< 3 MB1_CS_L[0, 1] |
| 1650 | ///< 4 MA2_CS_L[0, 1] |
| 1651 | ///< 5 MB2_CS_L[0, 1] |
| 1652 | ///< 6 MA3_CS_L[0, 1] |
| 1653 | ///< 7 MB3_CS_L[0, 1] |
| 1654 | ///< |
| 1655 | OUT UINT32 DimmValid; ///< For each bit n 0..7, 1 = DIMM n is valid and is / will be configured |
| 1656 | OUT UINT32 RegDimmPresent; ///< For each bit n 0..7, 1 = DIMM n is registered DIMM |
| 1657 | OUT UINT32 LrDimmPresent; ///< For each bit n 0..7, 1 = DIMM n is Load Reduced DIMM |
| 1658 | OUT UINT32 DimmEccPresent; ///< For each bit n 0..7, 1 = DIMM n is ECC capable. |
| 1659 | OUT UINT32 DimmParPresent; ///< For each bit n 0..7, 1 = DIMM n is ADR/CMD Parity capable. |
| 1660 | ///< |
| 1661 | OUT UINT16 DimmTrainFail; ///< Bitmap showing which dimms failed training |
| 1662 | OUT UINT16 ChannelTrainFail; ///< Bitmap showing the channel information about failed Chip Selects |
| 1663 | ///< 0 in any bit field indicates Channel 0 |
| 1664 | ///< 1 in any bit field indicates Channel 1 |
| 1665 | OUT UINT8 Dct; ///< Need to be removed |
| 1666 | ///< DCT pointer |
| 1667 | OUT BOOLEAN GangedMode; ///< Ganged mode |
| 1668 | ///< 0 = disabled |
| 1669 | ///< 1 = enabled |
| 1670 | OUT CPU_LOGICAL_ID LogicalCpuid; ///< The logical CPUID of the node |
| 1671 | ///< |
| 1672 | OUT UINT16 HostBiosSrvc1; ///< UINT16 sized general purpose field for use by host BIOS. Scratch space. |
| 1673 | ///< |
| 1674 | OUT UINT32 HostBiosSrvc2; ///< UINT32 sized general purpose field for use by host BIOS. Scratch space. |
| 1675 | ///< |
| 1676 | OUT UINT8 MLoad; ///< Need to be removed |
| 1677 | ///< Number of devices loading MAA bus |
| 1678 | ///< |
| 1679 | OUT UINT8 MaxAsyncLat; ///< Legacy wrapper |
| 1680 | ///< |
| 1681 | OUT UINT8 ChbD3Rcvrdly; ///< Legacy wrapper |
| 1682 | ///< |
| 1683 | OUT UINT16 ChaMaxRdLat; ///< Max Read Latency (ns) for DCT 0 |
| 1684 | ///< |
| 1685 | OUT UINT8 ChbD3BcRcvrdly; ///< CHB DIMM 3 Check UINT8 Receiver Enable Delay |
| 1686 | |
| 1687 | OUT DCT_STRUCT *DctData; ///< Pointed to a dynamically allocated array of DCT_STRUCTs |
| 1688 | OUT UINT8 DctCount; ///< Number of DCTs per this Die |
| 1689 | OUT UINT8 Reserved[16]; ///< Reserved |
| 1690 | } DIE_STRUCT; |
| 1691 | |
| 1692 | /********************************************************************** |
| 1693 | * S3 Support structure |
| 1694 | **********************************************************************/ |
| 1695 | /// AmdInitResume, AmdS3LateRestore, and AmdS3Save param structure |
| 1696 | typedef struct { |
| 1697 | OUT UINT32 Signature; ///< "ASTR" for AMD Suspend-To-RAM |
| 1698 | OUT UINT16 Version; ///< S3 Params version number |
| 1699 | IN OUT UINT32 Flags; ///< Indicates operation |
| 1700 | IN OUT VOID *NvStorage; ///< Pointer to memory critical save state data |
| 1701 | IN OUT UINT32 NvStorageSize; ///< Size in bytes of the NvStorage region |
| 1702 | IN OUT VOID *VolatileStorage; ///< Pointer to remaining AMD save state data |
| 1703 | IN OUT UINT32 VolatileStorageSize; ///< Size in bytes of the VolatileStorage region |
| 1704 | } AMD_S3_PARAMS; |
| 1705 | |
| 1706 | ///=============================================================================== |
| 1707 | /// MEM_PARAMETER_STRUCT |
| 1708 | /// This data structure is used to pass wrapper parameters to the memory configuration code |
| 1709 | /// |
| 1710 | typedef struct _MEM_PARAMETER_STRUCT { |
| 1711 | |
| 1712 | // Basic (Return parameters) |
| 1713 | // (This section contains the outbound parameters from the memory init code) |
| 1714 | |
| 1715 | OUT BOOLEAN GStatus[GsbEOL]; ///< Global Status bitfield. |
| 1716 | ///< |
| 1717 | OUT UINT32 HoleBase; ///< If not zero Base[47:16] (system address) of sub 4GB dram hole for HW remapping. |
| 1718 | ///< |
| 1719 | OUT UINT32 Sub4GCacheTop; ///< If not zero, the 32-bit top of cacheable memory. |
| 1720 | ///< |
| 1721 | OUT UINT32 Sub1THoleBase; ///< If not zero Base[47:16] (system address) of sub 1TB dram hole. |
| 1722 | ///< |
| 1723 | OUT UINT32 SysLimit; ///< Limit[47:16] (system address). |
| 1724 | ///< |
| 1725 | OUT DIMM_VOLTAGE DDR3Voltage; ///< Find support voltage and send back to platform BIOS. |
| 1726 | ///< |
| 1727 | OUT VDDP_VDDR_VOLTAGE VddpVddrVoltage; ///< For a given configuration, request is made to change the VDDP/VDDR |
| 1728 | ///< voltage in platform BIOS via AgesaHookBeforeDramInit callout and |
| 1729 | ///< MEM_PARAMETER_STRUCT.VddpVddrVoltage.Voltage parameter if |
| 1730 | ///< MEM_PARAMETER_STRUCT.VddpVddrVoltage.IsValid is TRUE. The |
| 1731 | ///< MEM_PARAMETER_STRUCT.VddpVddrVoltage.Voltage is defined in |
| 1732 | ///< MEMORY_PHY_VOLTAGE |
| 1733 | OUT UINT8 ExternalVrefValue; ///< Target reference voltage for external Vref for 2D training |
| 1734 | ///< |
| 1735 | OUT struct _MEM_DATA_STRUCT *MemData; ///< Access to global memory init data. |
| 1736 | |
| 1737 | // Advanced (Optional parameters) |
| 1738 | // Optional (all defaults values will be initialized by the |
| 1739 | // 'AmdMemInitDataStructDef' based on AMD defaults. It is up |
| 1740 | // to the IBV/OEM to change the defaults after initialization |
| 1741 | // but prior to the main entry to the memory code): |
| 1742 | |
| 1743 | // Memory Map/Mgt. |
| 1744 | |
| 1745 | IN UINT16 BottomIo; ///< Bottom of 32-bit IO space (8-bits). |
| 1746 | ///< NV_BOTTOM_IO[7:0]=Addr[31:24] |
| 1747 | ///< |
| 1748 | IN BOOLEAN MemHoleRemapping; ///< Memory Hole Remapping (1-bit). |
| 1749 | ///< FALSE = disable |
| 1750 | ///< TRUE = enable |
| 1751 | ///< |
| 1752 | IN BOOLEAN LimitMemoryToBelow1Tb;///< Limit memory address space to below 1 TB |
| 1753 | ///< FALSE = disable |
| 1754 | ///< TRUE = enable |
| 1755 | ///< |
| 1756 | ///< @BldCfgItem{BLDCFG_LIMIT_MEMORY_TO_BELOW_1TB} |
| 1757 | |
| 1758 | |
| 1759 | // Dram Timing |
| 1760 | |
| 1761 | IN UINT32 UserTimingMode; ///< User Memclock Mode. |
| 1762 | ///< @BldCfgItem{BLDCFG_TIMING_MODE_SELECT} |
| 1763 | |
| 1764 | IN UINT32 MemClockValue; ///< Memory Clock Value. |
| 1765 | ///< @BldCfgItem{BLDCFG_MEMORY_CLOCK_SELECT} |
| 1766 | |
| 1767 | |
| 1768 | // Dram Configuration |
| 1769 | |
| 1770 | IN BOOLEAN EnableBankIntlv; ///< Dram Bank (chip-select) Interleaving (1-bit). |
| 1771 | ///< - FALSE =disable (default) |
| 1772 | ///< - TRUE = enable |
| 1773 | ///< |
| 1774 | ///< @BldCfgItem{BLDCFG_MEMORY_ENABLE_BANK_INTERLEAVING} |
| 1775 | |
| 1776 | IN BOOLEAN EnableNodeIntlv; ///< Node Memory Interleaving (1-bit). |
| 1777 | ///< - FALSE = disable (default) |
| 1778 | ///< - TRUE = enable |
| 1779 | ///< |
| 1780 | ///< @BldCfgItem{BLDCFG_MEMORY_ENABLE_NODE_INTERLEAVING} |
| 1781 | |
| 1782 | IN BOOLEAN EnableChannelIntlv; ///< Channel Interleaving (1-bit). |
| 1783 | ///< - FALSE = disable (default) |
| 1784 | ///< - TRUE = enable |
| 1785 | ///< |
| 1786 | ///< @BldCfgItem{BLDCFG_MEMORY_CHANNEL_INTERLEAVING} |
| 1787 | // DllPDBypassMode |
| 1788 | |
| 1789 | IN BOOLEAN EnableDllPDBypassMode;///< Enable low-power DDR phy operation. This feature is used for low-power |
| 1790 | ///< solder-down DRAM motherboard designs with route matched CK/DQS/DQ signals. |
| 1791 | ///< It limits maximim achieveable DDR rates on the platform and should not be |
| 1792 | ///< enabled for systems requiring high DDR rate operation and/or DIMM-based systems. |
| 1793 | ///< - FALSE = disable |
| 1794 | ///< - TRUE = enable (default) |
| 1795 | ///< |
| 1796 | ///< @BldCfgItem{BLDCFG_DDR_PHY_DLL_BYPASS_MODE} |
| 1797 | // ECC |
| 1798 | |
| 1799 | IN BOOLEAN EnableEccFeature; ///< enable ECC error to go into MCE. |
| 1800 | ///< - FALSE = disable (default) |
| 1801 | ///< - TRUE = enable |
| 1802 | ///< |
| 1803 | ///< @BldCfgItem{BLDCFG_ENABLE_ECC_FEATURE} |
| 1804 | // Dram Power |
| 1805 | |
| 1806 | IN BOOLEAN EnablePowerDown; ///< CKE based power down mode (1-bit). |
| 1807 | ///< - FALSE =disable (default) |
| 1808 | ///< - TRUE =enable |
| 1809 | ///< |
| 1810 | ///< @BldCfgItem{BLDCFG_MEMORY_POWER_DOWN} |
| 1811 | |
| 1812 | #if CONFIG(AGESA_USE_1_0_0_4_HEADER) |
| 1813 | // Dram Mac Default |
| 1814 | |
| 1815 | IN UINT8 DramMacDefault; ///< Default Maximum Activate Count |
| 1816 | ///< |
| 1817 | ///< @BldCfgItem{BLDCFG_MEMORY_ALTERNATIVE_MAX_ACTIVATE_COUNT} |
| 1818 | |
| 1819 | // Dram Extended Temperature Range |
| 1820 | |
| 1821 | IN BOOLEAN EnableExtendedTemperatureRange; ///< enable extended temperature support. |
| 1822 | ///< - FALSE =disable (default) |
| 1823 | ///< - TRUE =enable |
| 1824 | ///< |
| 1825 | ///< @BldCfgItem{BLDCFG_MEMORY_EXTENDED_TEMPERATURE_RANGE} |
| 1826 | // Extended temperature range |
| 1827 | |
| 1828 | #endif |
| 1829 | // Online Spare |
| 1830 | |
| 1831 | IN BOOLEAN EnableOnLineSpareCtl; ///< Chip Select Spare Control bit 0. |
| 1832 | ///< - FALSE = disable Spare (default) |
| 1833 | ///< - TRUE = enable Spare |
| 1834 | ///< |
| 1835 | ///< @BldCfgItem{BLDCFG_ONLINE_SPARE} |
| 1836 | |
| 1837 | IN UINT8 *TableBasedAlterations; ///< Desired modifications to register settings. |
| 1838 | |
| 1839 | IN PSO_TABLE *PlatformMemoryConfiguration; |
| 1840 | ///< A table that contains platform specific settings. |
| 1841 | ///< For example, MemClk routing, the number of DIMM slots per channel, .... |
| 1842 | ///< AGESA initializes this pointer with DefaultPlatformMemoryConfiguration that |
| 1843 | ///< contains default conservative settings. Platform BIOS can either tweak |
| 1844 | ///< DefaultPlatformMemoryConfiguration or reassign this pointer to its own table. |
| 1845 | ///< |
| 1846 | IN BOOLEAN EnableParity; ///< Parity control. |
| 1847 | ///< - TRUE = enable |
| 1848 | ///< - FALSE = disable (default) |
| 1849 | ///< |
| 1850 | ///< @BldCfgItem{BLDCFG_MEMORY_PARITY_ENABLE} |
| 1851 | |
| 1852 | IN BOOLEAN EnableBankSwizzle; ///< BankSwizzle control. |
| 1853 | ///< - FALSE = disable |
| 1854 | ///< - TRUE = enable (default) |
| 1855 | ///< |
| 1856 | ///< @BldCfgItem{BLDCFG_BANK_SWIZZLE} |
| 1857 | |
| 1858 | ///< |
| 1859 | |
| 1860 | IN BOOLEAN EnableMemClr; ///< Memory Clear functionality control. |
| 1861 | ///< - FALSE = disable |
| 1862 | ///< - TRUE = enable (default) |
| 1863 | ///< |
| 1864 | |
| 1865 | // Uma Configuration |
| 1866 | |
| 1867 | IN UMA_MODE UmaMode; ///< Uma Mode |
| 1868 | ///< 0 = None |
| 1869 | ///< 1 = Specified |
| 1870 | ///< 2 = Auto |
| 1871 | IN OUT UINT32 UmaSize; ///< The size of shared graphics dram (16-bits) |
| 1872 | ///< NV_UMA_Size[31:0]=Addr[47:16] |
| 1873 | ///< |
| 1874 | OUT UINT32 UmaBase; ///< The allocated Uma base address (32-bits) |
| 1875 | ///< NV_UMA_Base[31:0]=Addr[47:16] |
| 1876 | ///< |
| 1877 | |
| 1878 | /// Memory Restore Feature |
| 1879 | |
| 1880 | IN BOOLEAN MemRestoreCtl; ///< Memory context restore control |
| 1881 | ///< FALSE = perform memory init as normal (AMD default) |
| 1882 | ///< TRUE = restore memory context and skip training. This requires |
| 1883 | ///< MemContext is valid before AmdInitPost |
| 1884 | ///< |
| 1885 | IN BOOLEAN SaveMemContextCtl; ///< Control switch to save memory context at the end of MemAuto |
| 1886 | ///< TRUE = AGESA will setup MemContext block before exit AmdInitPost |
| 1887 | ///< FALSE = AGESA will not setup MemContext block. Platform is |
| 1888 | ///< expected to call S3Save later in POST if it wants to |
| 1889 | ///< use memory context restore feature. |
| 1890 | ///< |
| 1891 | IN OUT AMD_S3_PARAMS MemContext; ///< Memory context block describes the data that platform needs to |
| 1892 | ///< save and restore for memory context restore feature to work. |
| 1893 | ///< It uses the subset of S3Save block to save/restore. Hence platform |
| 1894 | ///< may save only S3 block and uses it for both S3 resume and |
| 1895 | ///< memory context restore. |
| 1896 | ///< - If MemRestoreCtl is TRUE, platform needs to pass in MemContext |
| 1897 | ///< before AmdInitPost. |
| 1898 | ///< - If SaveMemContextCtl is TRUE, platform needs to save MemContext |
| 1899 | ///< right after AmdInitPost. |
| 1900 | ///< |
| 1901 | IN BOOLEAN IsCapsuleMode; ///< Capsule reboot control |
| 1902 | ///< FALSE = This is not a capsule reboot. |
| 1903 | ///< TRUE = This is a capsule reboot. |
| 1904 | ///< |
| 1905 | IN BOOLEAN ExternalVrefCtl; ///< Control the use of external Vref |
| 1906 | ///< TRUE = AGESA will use the function defined in "AGESA_EXTERNAL_VREF_CHANGE" in function list |
| 1907 | ///< to change the vref |
| 1908 | ///< FALSE = AGESA will will use the internal vref control. |
| 1909 | ///< @BldCfgItem{BLDCFG_ENABLE_EXTERNAL_VREF_FEATURE} |
| 1910 | ///< |
| 1911 | IN FORCE_TRAIN_MODE ForceTrainMode; ///< Training Mode |
| 1912 | ///< 0 = Force 1D Training for all configurations |
| 1913 | ///< 1 = Force 2D Training for all configurations |
| 1914 | ///< 2 = Auto - AGESA will control 1D or 2D |
| 1915 | IN TECHNOLOGY_TYPE DimmTypeUsedInMixedConfig; ///< Select the preferred technology type that AGESA will enable |
| 1916 | ///< when it is mixed with other technology types. |
| 1917 | ///< DDR3_TECHNOLOGY = Use DDR3 DIMMs |
| 1918 | ///< GDDR5_TECHNOLOGY = Use GDDR5 DIMMs |
| 1919 | ///< UNSUPPORTED_TECHNOLOGY = Exit with fatal error when DDR3 and GDDR5 DIMMs |
| 1920 | ///< are installed on the same system |
| 1921 | ///< @BldCfgItem{BLDCFG_DIMM_TYPE_USED_IN_MIXED_CONFIG} |
| 1922 | IN BOOLEAN AmpEnable; ///< AMP functionality control |
| 1923 | ///< TRUE = Enable, platform BIOS requests to enable memory overclocking function, and AGESA |
| 1924 | ///< detects if memory is capable of it |
| 1925 | ///< FALSE = Disable, there is no request to enable memory overclocking function |
| 1926 | ///< |
| 1927 | IN BOOLEAN AmpWarningMsgEnable; ///< AMP warning messages control |
| 1928 | ///< TRUE = Enable to log the warning messages of AMP |
| 1929 | ///< FALSE = Disable |
| 1930 | ///< |
| 1931 | OUT AMP_STATUS AmpStatus; ///< AMP status allows platform BIOS to check which voltage or warning message it should |
| 1932 | ///< use/apply. |
| 1933 | ///< |
| 1934 | ///< AmpVoltageValid : |
| 1935 | ///< TRUE - AGESA does enable AMP function, so use AmpVoltage for voltage adjustment |
| 1936 | ///< FALSE - AGESA does not enable AMP function, so use DDR3Voltage for voltage adjustment |
| 1937 | ///< |
| 1938 | ///< AmpSupportDetectedButNotEnabled : |
| 1939 | ///< TRUE - Display warning message of "AMP support detected but not enabled" |
| 1940 | ///< FALSE - No corresponding message should be displayed |
| 1941 | ///< |
| 1942 | ///< AmpSelectedButNotEnabled : |
| 1943 | ///< TRUE - Display warning message of "AMP selected but not enabled" |
| 1944 | ///< FALSE - No corresponding message should be displayed |
| 1945 | ///< |
| 1946 | ///< Note that both of warning message status reports are controlled by AmpWarningMsgEnable |
| 1947 | ///< |
| 1948 | OUT AMP_DIMM_VOLTAGE AmpVoltage; ///< AMP voltage which will be sent back to platform BIOS, and |
| 1949 | ///< the value in AmpVoltage is valid only if AmpStatus is TRUE returned |
| 1950 | IN BOOLEAN DataEyeEn; ///< Get 2D training data eye |
| 1951 | ///< TRUE = Enable to get the 2D data eye |
| 1952 | ///< FALSE = The 2D data eye is not enabled |
| 1953 | ///< @BldCfgItem{BLDCFG_ENABLE_DATA_EYE} |
| 1954 | IN BOOLEAN DramDoubleRefreshRate;///< Specify the average time between refresh requests to all DRAM devices. |
| 1955 | ///< TRUE = 2x refresh rate. |
| 1956 | ///< FALSE = 1x refresh rate. |
| 1957 | ///< @BldCfgItem{BLDCFG_DRAM_DOUBLE_REFRESH_RATE} |
| 1958 | IN PMU_TRAIN_MODE PmuTrainMode; ///< PMU Training Mode |
| 1959 | ///< @BldCfgItem{BLDCFG_PMU_TRAINING_MODE} |
| 1960 | ///< 0 = PMU 1D Training only for all configurations |
| 1961 | ///< 1 = PMU 1D and 2D Training read only for all configurations |
| 1962 | ///< 2 = PMU 1D and 2D Training for all configurations |
| 1963 | ///< 3 = AGESA control type of training depend on configurations |
| 1964 | } MEM_PARAMETER_STRUCT; |
| 1965 | |
| 1966 | |
| 1967 | /// |
| 1968 | /// Function definition. |
| 1969 | /// This data structure passes function pointers to the memory configuration code. |
| 1970 | /// The wrapper can use this structure with customized versions. |
| 1971 | /// |
| 1972 | typedef struct _MEM_FUNCTION_STRUCT { |
| 1973 | |
| 1974 | // PUBLIC required Internal functions |
| 1975 | |
| 1976 | IN OUT BOOLEAN (*amdMemGetPsCfgU) ( VOID *pMemData); ///< Proc for Unbuffered DIMMs, platform specific |
| 1977 | IN OUT BOOLEAN (*amdMemGetPsCfgR) (VOID *pMemData); ///< Proc for Registered DIMMs, platform specific |
| 1978 | |
| 1979 | // PUBLIC optional functions |
| 1980 | |
| 1981 | IN OUT VOID (*amdMemEccInit) (VOID *pMemData); ///< NB proc for ECC feature |
| 1982 | IN OUT VOID (*amdMemChipSelectInterleaveInit) (VOID *pMemData); ///< NB proc for CS interleave feature |
| 1983 | IN OUT VOID (*amdMemDctInterleavingInit) (VOID *pMemData); ///< NB proc for Channel interleave feature |
| 1984 | IN OUT VOID (*amdMemMctInterleavingInit) (VOID *pMemData); ///< NB proc for Node interleave feature |
| 1985 | IN OUT VOID (*amdMemParallelTraining) (VOID *pMemData); ///< NB proc for parallel training feature |
| 1986 | IN OUT VOID (*amdMemEarlySampleSupport) (VOID *pMemData); ///< NB code for early sample support feature |
| 1987 | IN OUT VOID (*amdMemMultiPartInitSupport) (VOID *pMemData); ///< NB code for 'multi-part' |
| 1988 | IN OUT VOID (*amdMemOnlineSpareSupport) (VOID *pMemData); ///< NB code for On-Line Spare feature |
| 1989 | IN OUT VOID (*amdMemUDimmInit) (VOID *pMemData); ///< NB code for UDIMMs |
| 1990 | IN OUT VOID (*amdMemRDimmInit) (VOID *pMemData); ///< NB code for RDIMMs |
| 1991 | IN OUT VOID (*amdMemLrDimmInit) (VOID *pMemData); ///< NB code for LRDIMMs |
| 1992 | IN OUT UINT32 Reserved[100]; ///< Reserved for later function definition |
| 1993 | } MEM_FUNCTION_STRUCT; |
| 1994 | |
| 1995 | /// |
| 1996 | /// Socket Structure |
| 1997 | /// |
| 1998 | /// |
| 1999 | typedef struct _MEM_SOCKET_STRUCT { |
| 2000 | OUT VOID *ChannelPtr[MAX_CHANNELS_PER_SOCKET]; ///< Pointers to each channels training data |
| 2001 | |
| 2002 | OUT VOID *TimingsPtr[MAX_CHANNELS_PER_SOCKET]; ///< Pointers to each channels timing data |
| 2003 | } MEM_SOCKET_STRUCT; |
| 2004 | |
| 2005 | /// |
| 2006 | /// Contains all data relevant to Memory Initialization. |
| 2007 | /// |
| 2008 | typedef struct _MEM_DATA_STRUCT { |
| 2009 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2010 | |
| 2011 | IN MEM_PARAMETER_STRUCT *ParameterListPtr; ///< List of input Parameters |
| 2012 | |
| 2013 | OUT MEM_FUNCTION_STRUCT FunctionList; ///< List of function Pointers |
| 2014 | |
| 2015 | IN OUT AGESA_STATUS (*GetPlatformCfg[MAX_PLATFORM_TYPES]) (struct _MEM_DATA_STRUCT *MemData, UINT8 SocketID, CH_DEF_STRUCT *CurrentChannel); ///< look-up platform info |
| 2016 | |
| 2017 | IN OUT BOOLEAN (*ErrorHandling)(struct _DIE_STRUCT *MCTPtr, UINT8 DCT, UINT16 ChipSelMask, AMD_CONFIG_PARAMS *StdHeader); ///< Error Handling |
| 2018 | |
| 2019 | |
| 2020 | OUT MEM_SOCKET_STRUCT SocketList[MAX_SOCKETS_SUPPORTED]; ///< Socket list for memory code. |
| 2021 | ///< SocketList is a shortcut for IBVs to retrieve training |
| 2022 | ///< and timing data for each channel indexed by socket/channel, |
| 2023 | ///< eliminating their need to parse die/dct/channel etc. |
| 2024 | ///< It contains pointers to the populated data structures for |
| 2025 | ///< each channel and skips the channel structures that are |
| 2026 | ///< unpopulated. In the case of channels sharing the same DCT, |
| 2027 | ///< the pTimings pointers will point to the same DCT Timing data. |
| 2028 | |
| 2029 | OUT DIE_STRUCT *DiesPerSystem; ///< Pointed to an array of DIE_STRUCTs |
| 2030 | OUT UINT8 DieCount; ///< Number of MCTs in the system. |
| 2031 | |
| 2032 | IN SPD_DEF_STRUCT *SpdDataStructure; ///< Pointer to SPD Data structure |
| 2033 | |
| 2034 | IN OUT struct _PLATFORM_CONFIGURATION *PlatFormConfig; ///< Platform profile/build option config structure |
| 2035 | |
| 2036 | IN OUT BOOLEAN IsFlowControlSupported; ///< Indicates if flow control is supported |
| 2037 | |
| 2038 | OUT UINT32 TscRate; ///< The rate at which the TSC increments in megahertz. |
| 2039 | IN BOOLEAN PhyReceiverLowPower; ///< Force PHY receiver in low power. |
| 2040 | ///< TRUE = PHY receiver low power |
| 2041 | ///< FALSE = PHY receiver high power |
| 2042 | } MEM_DATA_STRUCT; |
| 2043 | |
| 2044 | /// |
| 2045 | /// Uma Structure |
| 2046 | /// |
| 2047 | /// |
| 2048 | typedef struct _UMA_INFO { |
| 2049 | OUT UINT64 UmaBase; ///< UmaBase[63:0] = Addr[63:0] |
| 2050 | OUT UINT32 UmaSize; ///< UmaSize[31:0] = Addr[31:0] |
| 2051 | OUT UINT32 UmaAttributes; ///< Indicate the attribute of Uma |
| 2052 | OUT UINT8 UmaMode; ///< Indicate the mode of Uma |
| 2053 | OUT UINT16 MemClock; ///< Indicate memory running speed in MHz |
| 2054 | OUT UINT8 MemType; ///< Indicate the DRAM technology type that is being used |
| 2055 | OUT UINT8 Reserved[2]; ///< Reserved for future usage |
| 2056 | } UMA_INFO; |
| 2057 | |
| 2058 | |
| 2059 | /// Bitfield for ID |
| 2060 | typedef struct { |
| 2061 | OUT UINT16 SocketId:8; ///< Socket ID |
| 2062 | OUT UINT16 ModuleId:8; ///< Module ID |
| 2063 | } ID_FIELD; |
| 2064 | /// |
| 2065 | /// Union for ID of socket and module that will be passed out in call out |
| 2066 | /// |
| 2067 | typedef union { |
| 2068 | OUT ID_FIELD IdField; ///< Bitfield for ID |
| 2069 | OUT UINT16 IdInformation; ///< ID information for call out |
| 2070 | } ID_INFO; |
| 2071 | |
| 2072 | // AGESA MEMORY ERRORS |
| 2073 | |
| 2074 | // AGESA_SUCCESS memory events |
| 2075 | #define MEM_EVENT_CAPSULE_IN_EFFECT 0x04013600ul ///< Capsule is in effect |
| 2076 | #define MEM_EVENT_CONTEXT_RESTORE_IN_EFFECT 0x04023600ul ///< Context restore is in effect |
| 2077 | |
| 2078 | // AGESA_ALERT Memory Errors |
| 2079 | #define MEM_ALERT_USER_TMG_MODE_OVERRULED 0x04010000ul ///< TIMING_MODE_SPECIFIC is requested but |
| 2080 | ///< cannot be applied to current configurations. |
| 2081 | #define MEM_ALERT_ORG_MISMATCH_DIMM 0x04010100ul ///< DIMM organization miss-match |
| 2082 | #define MEM_ALERT_BK_INT_DIS 0x04010200ul ///< Bank interleaving disable for internal issue |
| 2083 | |
| 2084 | // AGESA_ERROR Memory Errors |
| 2085 | #define MEM_ERROR_NO_DQS_POS_RD_WINDOW 0x04010300ul ///< No DQS Position window for RD DQS |
| 2086 | #define MEM_ERROR_SMALL_DQS_POS_RD_WINDOW 0x04020300ul ///< Small DQS Position window for RD DQS |
| 2087 | #define MEM_ERROR_NO_DQS_POS_WR_WINDOW 0x04030300ul ///< No DQS Position window for WR DQS |
| 2088 | #define MEM_ERROR_SMALL_DQS_POS_WR_WINDOW 0x04040300ul ///< Small DQS Position window for WR DQS |
| 2089 | #define MEM_ERROR_DIMM_SPARING_NOT_ENABLED 0x04010500ul ///< DIMM sparing has not been enabled for an internal issues |
| 2090 | #define MEM_ERROR_RCVR_EN_VALUE_TOO_LARGE 0x04050300ul ///< Receive Enable value is too large |
| 2091 | #define MEM_ERROR_RCVR_EN_NO_PASSING_WINDOW 0x04060300ul ///< There is no DQS receiver enable window |
| 2092 | #define MEM_ERROR_DRAM_ENABLED_TIME_OUT 0x04010600ul ///< Time out when polling DramEnabled bit |
| 2093 | #define MEM_ERROR_DCT_ACCESS_DONE_TIME_OUT 0x04010700ul ///< Time out when polling DctAccessDone bit |
| 2094 | #define MEM_ERROR_SEND_CTRL_WORD_TIME_OUT 0x04010800ul ///< Time out when polling SendCtrlWord bit |
| 2095 | #define MEM_ERROR_PREF_DRAM_TRAIN_MODE_TIME_OUT 0x04010900ul ///< Time out when polling PrefDramTrainMode bit |
| 2096 | #define MEM_ERROR_ENTER_SELF_REF_TIME_OUT 0x04010A00ul ///< Time out when polling EnterSelfRef bit |
| 2097 | #define MEM_ERROR_FREQ_CHG_IN_PROG_TIME_OUT 0x04010B00ul ///< Time out when polling FreqChgInProg bit |
| 2098 | #define MEM_ERROR_EXIT_SELF_REF_TIME_OUT 0x04020A00ul ///< Time out when polling ExitSelfRef bit |
| 2099 | #define MEM_ERROR_SEND_MRS_CMD_TIME_OUT 0x04010C00ul ///< Time out when polling SendMrsCmd bit |
| 2100 | #define MEM_ERROR_SEND_ZQ_CMD_TIME_OUT 0x04010D00ul ///< Time out when polling SendZQCmd bit |
| 2101 | #define MEM_ERROR_DCT_EXTRA_ACCESS_DONE_TIME_OUT 0x04010E00ul ///< Time out when polling DctExtraAccessDone bit |
| 2102 | #define MEM_ERROR_MEM_CLR_BUSY_TIME_OUT 0x04010F00ul ///< Time out when polling MemClrBusy bit |
| 2103 | #define MEM_ERROR_MEM_CLEARED_TIME_OUT 0x04020F00ul ///< Time out when polling MemCleared bit |
| 2104 | #define MEM_ERROR_FLUSH_WR_TIME_OUT 0x04011000ul ///< Time out when polling FlushWr bit |
| 2105 | #define MEM_ERROR_NBPSTATE_TRANSITION_TIME_OUT 0x04012600ul ///< Time out when polling CurNBPstate bit |
| 2106 | #define MEM_ERROR_MAX_LAT_NO_WINDOW 0x04070300ul ///< Fail to find pass during Max Rd Latency training |
| 2107 | #define MEM_ERROR_PARALLEL_TRAINING_LAUNCH_FAIL 0x04080300ul ///< Fail to launch training code on an AP |
| 2108 | #define MEM_ERROR_PARALLEL_TRAINING_TIME_OUT 0x04090300ul ///< Fail to finish parallel training |
| 2109 | #define MEM_ERROR_NO_ADDRESS_MAPPING 0x04011100ul ///< No address mapping found for a dimm |
| 2110 | #define MEM_ERROR_RCVR_EN_NO_PASSING_WINDOW_EQUAL_LIMIT 0x040A0300ul ///< There is no DQS receiver enable window and the value is equal to the largest value |
| 2111 | #define MEM_ERROR_RCVR_EN_VALUE_TOO_LARGE_LIMIT_LESS_ONE 0x040B0300ul ///< Receive Enable value is too large and is 1 less than limit |
| 2112 | #define MEM_ERROR_CHECKSUM_NV_SPDCHK_RESTRT_ERROR 0x04011200ul ///< SPD Checksum error for NV_SPDCHK_RESTRT |
| 2113 | #define MEM_ERROR_NO_CHIPSELECT 0x04011300ul ///< No chipselects found |
| 2114 | #define MEM_ERROR_UNSUPPORTED_333MHZ_UDIMM 0x04011500ul ///< Unbuffered dimm is not supported at 333MHz |
| 2115 | #define MEM_ERROR_WL_PRE_OUT_OF_RANGE 0x040C0300ul ///< Returned PRE value during write levelizzation was out of range |
| 2116 | #define MEM_ERROR_NO_2D_RDDQS_WINDOW 0x040D0300ul ///< No 2D RdDqs Window |
| 2117 | #define MEM_ERROR_NO_2D_RDDQS_HEIGHT 0x040E0300ul ///< No 2D RdDqs Height |
| 2118 | #define MEM_ERROR_2D_DQS_ERROR 0x040F0300ul ///< 2d RdDqs Error |
| 2119 | #define MEM_ERROR_INVALID_2D_RDDQS_VALUE 0x04022400ul ///< 2d RdDqs invalid value found |
| 2120 | #define MEM_ERROR_2D_DQS_VREF_MARGIN_ERROR 0x04023400ul ///< 2d RdDqs Vef Margin error found |
| 2121 | #define MEM_ERROR_LR_IBT_NOT_FOUND 0x04013500ul ///< No LR dimm IBT value is found |
| 2122 | #define MEM_ERROR_MR0_NOT_FOUND 0x04023500ul ///< No MR0 value is found |
| 2123 | #define MEM_ERROR_ODT_PATTERN_NOT_FOUND 0x04033500ul ///< No odt pattern value is found |
| 2124 | #define MEM_ERROR_RC2_IBT_NOT_FOUND 0x04043500ul ///< No RC2 IBT value is found |
| 2125 | #define MEM_ERROR_RC10_OP_SPEED_NOT_FOUND 0x04053500ul ///< No RC10 op speed is found |
| 2126 | #define MEM_ERROR_RTT_NOT_FOUND 0x04063500ul ///< No RTT value is found |
| 2127 | #define MEM_ERROR_P2D_NOT_FOUND 0x04073500ul ///< No 2D training config value is found |
| 2128 | #define MEM_ERROR_SAO_NOT_FOUND 0x04083500ul ///< No slow access mode, Address timing and Output driver compensation value is found |
| 2129 | #define MEM_ERROR_CLK_DIS_MAP_NOT_FOUND 0x04093500ul ///< No CLK disable map is found |
| 2130 | #define MEM_ERROR_CKE_TRI_MAP_NOT_FOUND 0x040A3500ul ///< No CKE tristate map is found |
| 2131 | #define MEM_ERROR_ODT_TRI_MAP_NOT_FOUND 0x040B3500ul ///< No ODT tristate map is found |
| 2132 | #define MEM_ERROR_CS_TRI_MAP_NOT_FOUND 0x040C3500ul ///< No CS tristate map is found |
| 2133 | #define MEM_ERROR_TRAINING_SEED_NOT_FOUND 0x040D3500ul ///< No training seed is found |
| 2134 | #define MEM_ERROR_NO_2D_WRDAT_WINDOW 0x040D0400ul ///< No 2D WrDat Window |
| 2135 | #define MEM_ERROR_NO_2D_WRDAT_HEIGHT 0x040E0400ul ///< No 2D WrDat Height |
| 2136 | #define MEM_ERROR_2D_WRDAT_ERROR 0x040F0400ul ///< 2d WrDat Error |
| 2137 | #define MEM_ERROR_INVALID_2D_WRDAT_VALUE 0x04100400ul ///< 2d WrDat invalid value found |
| 2138 | #define MEM_ERROR_2D_WRDAT_VREF_MARGIN_ERROR 0x04110400ul ///< 2d WrDat Vef Margin error found |
| 2139 | #define MEM_ERROR_PMU_TRAINING 0x04120400ul ///< Fail PMU training. |
| 2140 | |
| 2141 | // AGESA_WARNING Memory Errors |
| 2142 | #define MEM_WARNING_UNSUPPORTED_QRDIMM 0x04011600ul ///< QR DIMMs detected but not supported |
| 2143 | #define MEM_WARNING_UNSUPPORTED_UDIMM 0x04021600ul ///< U DIMMs detected but not supported |
| 2144 | #define MEM_WARNING_UNSUPPORTED_SODIMM 0x04031600ul ///< SO-DIMMs detected but not supported |
| 2145 | #define MEM_WARNING_UNSUPPORTED_X4DIMM 0x04041600ul ///< x4 DIMMs detected but not supported |
| 2146 | #define MEM_WARNING_UNSUPPORTED_RDIMM 0x04051600ul ///< R DIMMs detected but not supported |
| 2147 | #define MEM_WARNING_UNSUPPORTED_LRDIMM 0x04061600ul ///< LR DIMMs detected but not supported |
| 2148 | #define MEM_WARNING_EMP_NOT_SUPPORTED 0x04011700ul ///< Processor is not capable for EMP |
| 2149 | #define MEM_WARNING_EMP_CONFLICT 0x04021700ul ///< EMP cannot be enabled if channel interleaving, |
| 2150 | #define MEM_WARNING_EMP_NOT_ENABLED 0x04031700ul ///< Memory size is not power of two. |
| 2151 | #define MEM_WARNING_ECC_DIS 0x04041700ul ///< ECC has been disabled as a result of an internal issue |
| 2152 | #define MEM_WARNING_PERFORMANCE_ENABLED_BATTERY_LIFE_PREFERRED 0x04011800ul ///< Performance has been enabled, but battery life is preferred. |
| 2153 | ///< bank interleaving, or bank swizzle is enabled. |
| 2154 | #define MEM_WARNING_NO_SPDTRC_FOUND 0x04011900ul ///< No Trc timing value found in SPD of a dimm. |
| 2155 | #define MEM_WARNING_NODE_INTERLEAVING_NOT_ENABLED 0x04012000ul ///< Node Interleaveing Requested, but could not be enabled |
| 2156 | #define MEM_WARNING_CHANNEL_INTERLEAVING_NOT_ENABLED 0x04012100ul ///< Channel Interleaveing Requested, but could not be enabled |
| 2157 | #define MEM_WARNING_BANK_INTERLEAVING_NOT_ENABLED 0x04012200ul ///< Bank Interleaveing Requested, but could not be enabled |
| 2158 | #define MEM_WARNING_VOLTAGE_1_35_NOT_SUPPORTED 0x04012300ul ///< Voltage 1.35 determined, but could not be supported |
| 2159 | #define MEM_WARNING_INITIAL_DDR3VOLT_NONZERO 0x04012400ul ///< DDR3 voltage initial value is not 0 |
| 2160 | #define MEM_WARNING_NO_COMMONLY_SUPPORTED_VDDIO 0x04012500ul ///< Cannot find a commonly supported VDDIO |
| 2161 | #define MEM_WARNING_AMP_SUPPORT_DETECTED_BUT_NOT_ENABLED 0x04012900ul ///< AMP support detected but not enabled |
| 2162 | #define MEM_WARNING_AMP_SELECTED_BUT_NOT_ENABLED 0x04022900ul ///< AMP selected but not enabled |
| 2163 | |
| 2164 | // AGESA_FATAL Memory Errors |
| 2165 | #define MEM_ERROR_MINIMUM_MODE 0x04011A00ul ///< Running in minimum mode |
| 2166 | #define MEM_ERROR_MODULE_TYPE_MISMATCH_DIMM 0x04011B00ul ///< DIMM modules are miss-matched |
| 2167 | #define MEM_ERROR_NO_DIMM_FOUND_ON_SYSTEM 0x04011C00ul ///< No DIMMs have been found |
| 2168 | #define MEM_ERROR_MISMATCH_DIMM_CLOCKS 0x04011D00ul ///< DIMM clocks miss-matched |
| 2169 | #define MEM_ERROR_NO_CYC_TIME 0x04011E00ul ///< No cycle time found |
| 2170 | #define MEM_ERROR_HEAP_ALLOCATE_DYN_STORING_OF_TRAINED_TIMINGS 0x04011F00ul ///< Heap allocation error with dynamic storing of trained timings |
| 2171 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_DCT_STRUCT_AND_CH_DEF_STRUCTs 0x04021F00ul ///< Heap allocation error for DCT_STRUCT and CH_DEF_STRUCT |
| 2172 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_REMOTE_TRAINING_ENV 0x04031F00ul ///< Heap allocation error with REMOTE_TRAINING_ENV |
| 2173 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_SPD 0x04041F00ul ///< Heap allocation error for SPD data |
| 2174 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_RECEIVED_DATA 0x04051F00ul ///< Heap allocation error for RECEIVED_DATA during parallel training |
| 2175 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_S3_SPECIAL_CASE_REGISTERS 0x04061F00ul ///< Heap allocation error for S3 "SPECIAL_CASE_REGISTER" |
| 2176 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_TRAINING_DATA 0x04071F00ul ///< Heap allocation error for Training Data |
| 2177 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_IDENTIFY_DIMM_MEM_NB_BLOCK 0x04081F00ul ///< Heap allocation error for DIMM Identify "MEM_NB_BLOCK |
| 2178 | #define MEM_ERROR_NO_CONSTRUCTOR_FOR_IDENTIFY_DIMM 0x04022300ul ///< No Constructor for DIMM Identify |
| 2179 | #define MEM_ERROR_VDDIO_UNSUPPORTED 0x04022500ul ///< VDDIO of the dimms on the board is not supported |
| 2180 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_2D 0x040B1F00ul ///< Heap allocation error for 2D training data |
| 2181 | #define MEM_ERROR_HEAP_DEALLOCATE_FOR_2D 0x040C1F00ul ///< Heap de-allocation error for 2D training data |
| 2182 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_DATAEYE 0x040F1F00ul ///< Heap allocation error for DATAEYE Storage |
| 2183 | #define MEM_ERROR_HEAP_DEALLOCATE_FOR_DATAEYE 0x040E1F00ul ///< Heap de-allocation error for DATAEYE Storage |
| 2184 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_PMU_SRAM_MSG_BLOCK 0x04101F00ul ///< Heap allocation error for PMU SRAM Message Block Storage |
| 2185 | #define MEM_ERROR_HEAP_DEALLOCATE_FOR_PMU_SRAM_MSG_BLOCK 0x04111F00ul ///< Heap de-allocation error for PMU SRAM Message Block Storage |
| 2186 | #define MEM_ERROR_HEAP_LOCATE_FOR_PMU_SRAM_MSG_BLOCK 0x04121F00ul ///< Heap location error for PMU SRAM Message Block Storage |
| 2187 | |
| 2188 | // AGESA_CRITICAL Memory Errors |
| 2189 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_DMI_TABLE_DDR3 0x04091F00ul ///< Heap allocation error for DMI table for DDR3 |
| 2190 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_DMI_TABLE_DDR2 0x040A1F00ul ///< Heap allocation error for DMI table for DDR2 |
| 2191 | #define MEM_ERROR_UNSUPPORTED_DIMM_CONFIG 0x04011400ul ///< Dimm population is not supported |
| 2192 | #define MEM_ERROR_HEAP_ALLOCATE_FOR_CRAT_MEM_AFFINITY 0x040D1F00ul ///< Heap allocation error for CRAT memory affinity info |
| 2193 | |
| 2194 | |
| 2195 | |
| 2196 | /*---------------------------------------------------------------------------- |
| 2197 | * |
| 2198 | * END OF MEMORY-SPECIFIC DATA STRUCTURES |
| 2199 | * |
| 2200 | *---------------------------------------------------------------------------- |
| 2201 | */ |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | |
| 2206 | /*---------------------------------------------------------------------------- |
| 2207 | * |
| 2208 | * CPU RELATED DEFINITIONS |
| 2209 | * |
| 2210 | *---------------------------------------------------------------------------- |
| 2211 | */ |
| 2212 | |
| 2213 | // CPU Event definitions. |
| 2214 | |
| 2215 | // Defines used to filter CPU events based on functional blocks |
| 2216 | #define CPU_EVENT_PM_EVENT_MASK 0xFF00FF00ul |
| 2217 | #define CPU_EVENT_PM_EVENT_CLASS 0x08000400ul |
| 2218 | |
| 2219 | //================================================================ |
| 2220 | // CPU General events |
| 2221 | // Heap allocation (AppFunction = 01h) |
| 2222 | #define CPU_ERROR_HEAP_BUFFER_IS_NOT_PRESENT 0x08000100ul |
| 2223 | #define CPU_ERROR_HEAP_IS_ALREADY_INITIALIZED 0x08010100ul |
| 2224 | #define CPU_ERROR_HEAP_IS_FULL 0x08020100ul |
| 2225 | #define CPU_ERROR_HEAP_BUFFER_HANDLE_IS_ALREADY_USED 0x08030100ul |
| 2226 | #define CPU_ERROR_HEAP_BUFFER_HANDLE_IS_NOT_PRESENT 0x08040100ul |
| 2227 | // BrandId (AppFunction = 02h) |
| 2228 | #define CPU_ERROR_BRANDID_HEAP_NOT_AVAILABLE 0x08000200ul |
| 2229 | // Micro code patch (AppFunction = 03h) |
| 2230 | #define CPU_ERROR_MICRO_CODE_PATCH_IS_NOT_LOADED 0x08000300ul |
| 2231 | // Power management (AppFunction = 04h) |
| 2232 | #define CPU_EVENT_PM_PSTATE_OVERCURRENT 0x08000400ul |
| 2233 | #define CPU_EVENT_PM_ALL_PSTATE_OVERCURRENT 0x08010400ul |
| 2234 | #define CPU_ERROR_PSTATE_HEAP_NOT_AVAILABLE 0x08020400ul |
| 2235 | #define CPU_ERROR_PM_NB_PSTATE_MISMATCH 0x08030400ul |
| 2236 | #define CPU_ERROR_PM_ALL_PSTATE_OVER_FREQUENCY_LIMIT 0x08040400ul |
| 2237 | #define CPU_EVENT_PM_PSTATE_FREQUENCY_LIMIT 0x08050400ul |
| 2238 | // Other CPU events (AppFunction = 05h) |
| 2239 | #define CPU_EVENT_BIST_ERROR 0x08000500ul |
| 2240 | #define CPU_EVENT_UNKNOWN_PROCESSOR_FAMILY 0x08010500ul |
| 2241 | #define CPU_EVENT_STACK_REENTRY 0x08020500ul |
| 2242 | #define CPU_EVENT_CORE_NOT_IDENTIFIED 0x08030500ul |
| 2243 | |
| 2244 | //================================================================= |
| 2245 | // CPU Feature events |
| 2246 | // Execution cache (AppFunction = 21h) |
| 2247 | // AGESA_CACHE_SIZE_REDUCED 2101 |
| 2248 | // AGESA_CACHE_REGIONS_ACROSS_1MB 2102 |
| 2249 | // AGESA_CACHE_REGIONS_ACROSS_4GB 2103 |
| 2250 | // AGESA_REGION_NOT_ALIGNED_ON_BOUNDARY 2104 |
| 2251 | // AGESA_CACHE_START_ADDRESS_LESS_D0000 2105 |
| 2252 | // AGESA_THREE_CACHE_REGIONS_ABOVE_1MB 2106 |
| 2253 | // AGESA_DEALLOCATE_CACHE_REGIONS 2107 |
| 2254 | #define CPU_EVENT_EXECUTION_CACHE_ALLOCATION_ERROR 0x08002100ul |
| 2255 | // Core Leveling (AppFunction = 22h) |
| 2256 | #define CPU_WARNING_ADJUSTED_LEVELING_MODE 0x08002200ul |
| 2257 | // SCS initialization (AppFunction = 24h) |
| 2258 | // AGESA_SCS_HEAP_ENTRY_MISSING 2401 |
| 2259 | // AGESA_SCS_BUFFER_EMPTY 2402 |
| 2260 | // AGESA_SCS_WEIGHTS_MISMATCH 2403 |
| 2261 | #define CPU_EVENT_SCS_INITIALIZATION_ERROR 0x08002400ul |
| 2262 | |
| 2263 | // CPU Build Configuration structures and definitions |
| 2264 | |
| 2265 | /// Build Configuration structure for BLDCFG_AP_MTRR_SETTINGS |
| 2266 | typedef struct { |
| 2267 | IN UINT32 MsrAddr; ///< Fixed-Sized MTRR address |
| 2268 | IN UINT64 MsrData; ///< MTRR Settings |
| 2269 | } AP_MTRR_SETTINGS; |
| 2270 | |
| 2271 | #define AMD_AP_MTRR_FIX64k_00000 0x00000250ul |
| 2272 | #define AMD_AP_MTRR_FIX16k_80000 0x00000258ul |
| 2273 | #define AMD_AP_MTRR_FIX16k_A0000 0x00000259ul |
| 2274 | #define AMD_AP_MTRR_FIX4k_C0000 0x00000268ul |
| 2275 | #define AMD_AP_MTRR_FIX4k_C8000 0x00000269ul |
| 2276 | #define AMD_AP_MTRR_FIX4k_D0000 0x0000026Aul |
| 2277 | #define AMD_AP_MTRR_FIX4k_D8000 0x0000026Bul |
| 2278 | #define AMD_AP_MTRR_FIX4k_E0000 0x0000026Cul |
| 2279 | #define AMD_AP_MTRR_FIX4k_E8000 0x0000026Dul |
| 2280 | #define AMD_AP_MTRR_FIX4k_F0000 0x0000026Eul |
| 2281 | #define AMD_AP_MTRR_FIX4k_F8000 0x0000026Ful |
| 2282 | #define CPU_LIST_TERMINAL 0xFFFFFFFFul |
| 2283 | |
| 2284 | /// Data structure for the Mapping Item between Unified ID for IDS Setup Option |
| 2285 | /// and the option value. |
| 2286 | /// |
| 2287 | typedef struct { |
| 2288 | IN UINT16 IdsNvId; ///< Unified ID for IDS Setup Option. |
| 2289 | OUT UINT16 IdsNvValue; ///< The value of IDS Setup Option. |
| 2290 | } IDS_NV_ITEM; |
| 2291 | |
| 2292 | /// Data Structure for IDS CallOut Function |
| 2293 | typedef struct { |
| 2294 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2295 | IN IDS_NV_ITEM *IdsNvPtr; ///< Memory Pointer of IDS NV Table |
| 2296 | IN OUT UINTN Reserved; ///< reserved |
| 2297 | } IDS_CALLOUT_STRUCT; |
| 2298 | |
| 2299 | /// Data Structure for Connected Standby Function |
| 2300 | typedef struct { |
| 2301 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2302 | IN VOID *CsRestoreTable; ///< Pointer to the CsRestoreTable |
| 2303 | IN UINT32 CsRestoreTableSize; ///< Size in bytes of the CsRestoreTable |
| 2304 | } CS_CALLOUT_STRUCT; |
| 2305 | |
| 2306 | /************************************************************************ |
| 2307 | * |
| 2308 | * AGESA interface Call-Out function parameter structures |
| 2309 | * |
| 2310 | ***********************************************************************/ |
| 2311 | |
| 2312 | /// Parameters structure for interface call-out AgesaAllocateBuffer |
| 2313 | typedef struct { |
| 2314 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2315 | IN OUT UINT32 BufferLength; ///< Size of buffer to allocate |
| 2316 | IN UINT32 BufferHandle; ///< Identifier or name for the buffer |
| 2317 | OUT VOID *BufferPointer; ///< location of the created buffer |
| 2318 | } AGESA_BUFFER_PARAMS; |
| 2319 | |
| 2320 | /// Parameters structure for interface call-out AgesaHeapRebase |
| 2321 | typedef struct { |
| 2322 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2323 | OUT UINTN HeapAddress; ///< The address which heap content will be temporarily stored in |
| 2324 | } AGESA_REBASE_PARAMS; |
| 2325 | |
| 2326 | /// Parameters structure for interface call-out AgesaRunCodeOnAp |
| 2327 | typedef struct { |
| 2328 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2329 | IN UINT32 FunctionNumber; ///< Index of the procedure to execute |
| 2330 | IN VOID *RelatedDataBlock; ///< Location of data structure the procedure will use |
| 2331 | IN UINT32 RelatedBlockLength; ///< Size of the related data block |
| 2332 | } AP_EXE_PARAMS; |
| 2333 | |
| 2334 | /// Parameters structure for the interface call-out AgesaReadSpd & AgesaReadSpdRecovery |
| 2335 | typedef struct { |
| 2336 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2337 | IN UINT8 SocketId; ///< Address of SPD - socket ID |
| 2338 | IN UINT8 MemChannelId; ///< Address of SPD - memory channel ID |
| 2339 | IN UINT8 DimmId; ///< Address of SPD - DIMM ID |
| 2340 | IN OUT UINT8 *Buffer; ///< Location where to place the SPD content |
| 2341 | IN OUT MEM_DATA_STRUCT *MemData; ///< Location of the MemData structure, for reference |
| 2342 | } AGESA_READ_SPD_PARAMS; |
| 2343 | |
| 2344 | /// VoltageType values |
| 2345 | typedef enum { |
| 2346 | VTYPE_CPU_VREF, ///< Cpu side Vref |
| 2347 | VTYPE_DIMM_VREF, ///< Dimm Side Vref |
| 2348 | VTYPE_VDDIO ///< Vddio |
| 2349 | } VTYPE; |
| 2350 | |
| 2351 | /// Parameters structure for the interface call-out AgesaExternalVoltageAdjust |
| 2352 | typedef struct _VOLTAGE_ADJUST { |
| 2353 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 2354 | IN OUT MEM_DATA_STRUCT *MemData; ///< Location of the MemData structure, for reference |
| 2355 | IN VTYPE VoltageType; ///< Which Voltage Type to adjust |
| 2356 | IN INT8 AdjustValue; ///< Positive/Negative Adjust Value |
| 2357 | } VOLTAGE_ADJUST; |
| 2358 | |
| 2359 | /// Buffer Handles |
| 2360 | typedef enum { |
| 2361 | AMD_DMI_INFO_BUFFER_HANDLE = 0x000D000, ///< Assign 0x000D000 buffer handle to DMI function |
| 2362 | AMD_PSTATE_DATA_BUFFER_HANDLE, ///< Assign 0x000D001 buffer handle to Pstate data |
| 2363 | AMD_PSTATE_ACPI_BUFFER_HANDLE, ///< Assign 0x000D002 buffer handle to Pstate table |
| 2364 | AMD_BRAND_ID_BUFFER_HANDLE, ///< Assign 0x000D003 buffer handle to Brand ID |
| 2365 | AMD_ACPI_SLIT_BUFFER_HANDLE, ///< Assign 0x000D004 buffer handle to SLIT function |
| 2366 | AMD_SRAT_INFO_BUFFER_HANDLE, ///< Assign 0x000D005 buffer handle to SRAT function |
| 2367 | AMD_WHEA_BUFFER_HANDLE, ///< Assign 0x000D006 buffer handle to WHEA function |
| 2368 | AMD_S3_INFO_BUFFER_HANDLE, ///< Assign 0x000D007 buffer handle to S3 function |
| 2369 | AMD_S3_NB_INFO_BUFFER_HANDLE, ///< Assign 0x000D008 buffer handle to S3 NB device info |
| 2370 | AMD_ACPI_ALIB_BUFFER_HANDLE, ///< Assign 0x000D009 buffer handle to ALIB SSDT table |
| 2371 | AMD_ACPI_IVRS_BUFFER_HANDLE, ///< Assign 0x000D00A buffer handle to IOMMU IVRS table |
| 2372 | AMD_CRAT_INFO_BUFFER_HANDLE, ///< Assign 0x000D00B buffer handle to CRAT function |
| 2373 | AMD_ACPI_CDIT_BUFFER_HANDLE ///< Assign 0x000D00C buffer handle to CDIT function |
| 2374 | } AMD_BUFFER_HANDLE; |
| 2375 | |
| 2376 | |
| 2377 | /************************************************************************ |
| 2378 | * |
| 2379 | * AGESA interface Call-Out function prototypes |
| 2380 | * |
| 2381 | ***********************************************************************/ |
| 2382 | |
| 2383 | VOID |
| 2384 | AgesaDoReset ( |
| 2385 | IN UINTN ResetType, |
| 2386 | IN OUT AMD_CONFIG_PARAMS *StdHeader |
| 2387 | ); |
| 2388 | |
| 2389 | AGESA_STATUS |
| 2390 | AgesaAllocateBuffer ( |
| 2391 | IN UINTN FcnData, |
| 2392 | IN OUT AGESA_BUFFER_PARAMS *AllocParams |
| 2393 | ); |
| 2394 | |
| 2395 | AGESA_STATUS |
| 2396 | AgesaDeallocateBuffer ( |
| 2397 | IN UINTN FcnData, |
| 2398 | IN OUT AGESA_BUFFER_PARAMS *DeallocParams |
| 2399 | ); |
| 2400 | |
| 2401 | AGESA_STATUS |
| 2402 | AgesaLocateBuffer ( |
| 2403 | IN UINTN FcnData, |
| 2404 | IN OUT AGESA_BUFFER_PARAMS *LocateParams |
| 2405 | ); |
| 2406 | |
| 2407 | AGESA_STATUS |
| 2408 | AgesaHeapRebase ( |
| 2409 | IN UINTN FcnData, |
| 2410 | IN OUT AGESA_REBASE_PARAMS *RebaseParams |
| 2411 | ); |
| 2412 | |
| 2413 | AGESA_STATUS |
| 2414 | AgesaReadSpd ( |
| 2415 | IN UINTN FcnData, |
| 2416 | IN OUT AGESA_READ_SPD_PARAMS *ReadSpd |
| 2417 | ); |
| 2418 | |
| 2419 | AGESA_STATUS |
| 2420 | AgesaReadSpdRecovery ( |
| 2421 | IN UINTN FcnData, |
| 2422 | IN OUT AGESA_READ_SPD_PARAMS *ReadSpd |
| 2423 | ); |
| 2424 | |
| 2425 | AGESA_STATUS |
| 2426 | AgesaHookBeforeDramInitRecovery ( |
| 2427 | IN UINTN FcnData, |
| 2428 | IN OUT MEM_DATA_STRUCT *MemData |
| 2429 | ); |
| 2430 | |
| 2431 | AGESA_STATUS |
| 2432 | AgesaRunFcnOnAp ( |
| 2433 | IN UINTN ApicIdOfCore, |
| 2434 | IN AP_EXE_PARAMS *LaunchApParams |
| 2435 | ); |
| 2436 | |
| 2437 | AGESA_STATUS |
| 2438 | AgesaHookBeforeDramInit ( |
| 2439 | IN UINTN SocketIdModuleId, |
| 2440 | IN OUT MEM_DATA_STRUCT *MemData |
| 2441 | ); |
| 2442 | |
| 2443 | AGESA_STATUS |
| 2444 | AgesaHookBeforeDQSTraining ( |
| 2445 | IN UINTN SocketIdModuleId, |
| 2446 | IN OUT MEM_DATA_STRUCT *MemData |
| 2447 | ); |
| 2448 | |
| 2449 | AGESA_STATUS |
| 2450 | AgesaHookBeforeExitSelfRefresh ( |
| 2451 | IN UINTN FcnData, |
| 2452 | IN OUT MEM_DATA_STRUCT *MemData |
| 2453 | ); |
| 2454 | |
| 2455 | AGESA_STATUS |
| 2456 | AgesaPcieSlotResetControl ( |
| 2457 | IN UINTN FcnData, |
| 2458 | IN PCIe_SLOT_RESET_INFO *ResetInfo |
| 2459 | ); |
| 2460 | |
| 2461 | AGESA_STATUS |
| 2462 | AgesaGetVbiosImage ( |
| 2463 | IN UINTN FcnData, |
| 2464 | IN OUT GFX_VBIOS_IMAGE_INFO *VbiosImageInfo |
| 2465 | ); |
| 2466 | |
| 2467 | AGESA_STATUS |
| 2468 | AgesaFchOemCallout ( |
| 2469 | IN VOID *FchData |
| 2470 | ); |
| 2471 | |
| 2472 | AGESA_STATUS |
| 2473 | AgesaExternal2dTrainVrefChange ( |
| 2474 | IN UINTN SocketIdModuleId, |
| 2475 | IN OUT MEM_DATA_STRUCT *MemData |
| 2476 | ); |
| 2477 | |
| 2478 | AGESA_STATUS |
| 2479 | AgesaGetIdsData ( |
| 2480 | IN UINTN Data, |
| 2481 | IN OUT IDS_CALLOUT_STRUCT *IdsCalloutData |
| 2482 | ); |
| 2483 | |
| 2484 | AGESA_STATUS |
| 2485 | AgesaExternalVoltageAdjust ( |
| 2486 | IN UINTN SocketIdModuleId, |
| 2487 | IN OUT VOLTAGE_ADJUST *AdjustValue |
| 2488 | ); |
| 2489 | |
| 2490 | AGESA_STATUS |
| 2491 | AgesaPublishCsRestorationData ( |
| 2492 | IN UINTN Reserved, |
| 2493 | IN OUT CS_CALLOUT_STRUCT *AdjustValue |
| 2494 | ); |
| 2495 | |
| 2496 | AGESA_STATUS |
| 2497 | AgesaGnbOemCallout ( |
| 2498 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 2499 | IN UINTN FcnData, |
| 2500 | IN OUT VOID *GnbCalloutData |
| 2501 | ); |
| 2502 | |
| 2503 | /************************************************************************ |
| 2504 | * |
| 2505 | * AGESA interface structure definition and function prototypes |
| 2506 | * |
| 2507 | ***********************************************************************/ |
| 2508 | |
| 2509 | /********************************************************************** |
| 2510 | * Platform Configuration: The parameters in boot branch function |
| 2511 | **********************************************************************/ |
| 2512 | |
| 2513 | /// The possible platform control flow settings. |
| 2514 | typedef enum { |
| 2515 | Nfcm, ///< Normal Flow Control Mode. |
| 2516 | UmaDr, ///< UMA using Display Refresh flow control. |
| 2517 | UmaIfcm, ///< UMA using Isochronous Flow Control. |
| 2518 | Ifcm, ///< Isochronous Flow Control Mode (other than for UMA). |
| 2519 | Iommu, ///< An IOMMU is in use in the system. |
| 2520 | MaxControlFlow ///< Not a control flow mode, use for limit checking. |
| 2521 | } PLATFORM_CONTROL_FLOW; |
| 2522 | |
| 2523 | /// The possible hardware prefetch mode settings. |
| 2524 | typedef enum { |
| 2525 | HARDWARE_PREFETCHER_AUTO, ///< Use the recommended setting for the processor. In most cases, the recommended setting is enabled. |
| 2526 | DISABLE_HW_PREFETCHER_TRAINING_ON_SOFTWARE_PREFETCHES, ///< Use the recommended setting for the hardware prefetcher, but disable training on software prefetches. |
| 2527 | DISABLE_L1_PREFETCHER, ///< Use the recommended settings for the hardware prefetcher, but disable L1 prefetching and above. |
| 2528 | DISABLE_L1_PREFETCHER_AND_HW_PREFETCHER_TRAINING_ON_SOFTWARE_PREFETCHES, ///< (deprecated) - This setting is deprecated; it has the same effect as DISABLE_L1_PREFETCHER |
| 2529 | DISABLE_L2_STRIDE_PREFETCHER, ///< Use the recommended settings for the hardware prefetcher, but disable the L2 stride prefetcher and above |
| 2530 | DISABLE_HARDWARE_PREFETCH, ///< Disable hardware prefetching. |
| 2531 | MAX_HARDWARE_PREFETCH_MODE ///< Not a hardware prefetch mode, use for limit checking. |
| 2532 | } HARDWARE_PREFETCH_MODE; |
| 2533 | |
| 2534 | /// The possible software prefetch mode settings. |
| 2535 | typedef enum { |
| 2536 | SOFTWARE_PREFETCHES_AUTO, ///< Use the recommended setting for the processor. In most cases, the recommended setting is enabled. |
| 2537 | DISABLE_SOFTWARE_PREFETCHES, ///< Disable software prefetches (convert software prefetch instructions to NOP). |
| 2538 | MAX_SOFTWARE_PREFETCH_MODE ///< Not a software prefetch mode, use for limit checking. |
| 2539 | } SOFTWARE_PREFETCH_MODE; |
| 2540 | |
| 2541 | /// Advanced performance tunings, prefetchers. |
| 2542 | /// These settings provide for performance tuning to optimize for specific workloads. |
| 2543 | typedef struct { |
| 2544 | IN HARDWARE_PREFETCH_MODE HardwarePrefetchMode; ///< This value provides for advanced performance tuning by controlling the hardware prefetcher setting. |
| 2545 | IN SOFTWARE_PREFETCH_MODE SoftwarePrefetchMode; ///< This value provides for advanced performance tuning by controlling the software prefetch instructions. |
| 2546 | IN DRAM_PREFETCH_MODE DramPrefetchMode; ///< This value provides for advanced performance tuning by controlling the DRAM prefetcher setting. |
| 2547 | } ADVANCED_PERFORMANCE_PROFILE; |
| 2548 | |
| 2549 | /// The possible platform power policy settings. |
| 2550 | typedef enum { |
| 2551 | Performance, ///< Optimize for performance. |
| 2552 | BatteryLife, ///< Optimize for battery life. |
| 2553 | MaxPowerPolicy ///< Not a power policy mode, use for limit checking. |
| 2554 | } PLATFORM_POWER_POLICY; |
| 2555 | |
| 2556 | /// Platform performance settings for optimized settings. |
| 2557 | /// Several configuration settings for the processor depend upon other parts and |
| 2558 | /// general designer choices for the system. The determination of these data points |
| 2559 | /// is not standard for all platforms, so the host environment needs to provide these |
| 2560 | /// to specify how the system is to be configured. |
| 2561 | typedef struct { |
| 2562 | IN PLATFORM_CONTROL_FLOW PlatformControlFlowMode; ///< The platform's control flow mode for optimum platform performance. |
| 2563 | ///< @BldCfgItem{BLDCFG_PLATFORM_CONTROL_FLOW_MODE} |
| 2564 | IN BOOLEAN Use32ByteRefresh; ///< Display Refresh traffic generates 32 byte requests. |
| 2565 | ///< @BldCfgItem{BLDCFG_USE_32_BYTE_REFRESH} |
| 2566 | IN BOOLEAN UseVariableMctIsocPriority; ///< The Memory controller will be set to Variable Isoc Priority. |
| 2567 | ///< @BldCfgItem{BLDCFG_USE_VARIABLE_MCT_ISOC_PRIORITY} |
| 2568 | IN ADVANCED_PERFORMANCE_PROFILE AdvancedPerformanceProfile; ///< The advanced platform performance settings. |
| 2569 | IN PLATFORM_POWER_POLICY PlatformPowerPolicy; ///< The platform's desired power policy |
| 2570 | ///< @BldCfgItem{BLDCFG_PLATFORM_POWER_POLICY_MODE} |
| 2571 | IN BOOLEAN NbPstatesSupported; ///< The Nb-Pstates is supported or not |
| 2572 | ///< @BldCfgItem{BLDCFG_NB_PSTATES_SUPPORTED} |
| 2573 | } PERFORMANCE_PROFILE; |
| 2574 | |
| 2575 | /// Platform settings that describe the voltage regulator modules of the system. |
| 2576 | /// Many power management settings are dependent upon the characteristics of the |
| 2577 | /// on-board voltage regulator module (VRM). The host environment needs to provide |
| 2578 | /// these to specify how the system is to be configured. |
| 2579 | typedef struct { |
| 2580 | IN UINT32 CurrentLimit; ///< Vrm Current Limit. |
| 2581 | ///< @BldCfgItem{BLDCFG_VRM_CURRENT_LIMIT} |
| 2582 | ///< @BldCfgItem{BLDCFG_VRM_NB_CURRENT_LIMIT} |
| 2583 | IN UINT32 LowPowerThreshold; ///< Vrm Low Power Threshold. |
| 2584 | ///< @BldCfgItem{BLDCFG_VRM_LOW_POWER_THRESHOLD} |
| 2585 | ///< @BldCfgItem{BLDCFG_VRM_NB_LOW_POWER_THRESHOLD} |
| 2586 | IN UINT32 SlewRate; ///< Vrm Slew Rate. |
| 2587 | ///< @BldCfgItem{BLDCFG_VRM_SLEW_RATE} |
| 2588 | ///< @BldCfgItem{BLDCFG_VRM_NB_SLEW_RATE} |
| 2589 | IN BOOLEAN HiSpeedEnable; ///< Select high speed VRM. |
| 2590 | ///< @BldCfgItem{BLDCFG_VRM_HIGH_SPEED_ENABLE} |
| 2591 | ///< @BldCfgItem{BLDCFG_VRM_NB_HIGH_SPEED_ENABLE} |
| 2592 | IN UINT32 MaximumCurrentLimit; ///< Vrm Maximum Current Limit. |
| 2593 | ///< @BldCfgItem{BLDCFG_VRM_MAXIMUM_CURRENT_LIMIT} |
| 2594 | ///< @BldCfgItem{BLDCFG_VRM_NB_MAXIMUM_CURRENT_LIMIT} |
| 2595 | IN UINT32 SviOcpLevel; ///< SVI OCP Level. |
| 2596 | ///< @BldCfgItem{BLDCFG_VRM_SVI_OCP_LEVEL} |
| 2597 | ///< @BldCfgItem{BLDCFG_VRM_NB_SVI_OCP_LEVEL} |
| 2598 | } PLATFORM_VRM_CONFIGURATION; |
| 2599 | |
| 2600 | /// The VRM types to characterize. |
| 2601 | typedef enum { |
| 2602 | CoreVrm, ///< VDD plane. |
| 2603 | NbVrm, ///< VDDNB plane. |
| 2604 | MaxVrmType ///< Not a valid VRM type, use for limit checking. |
| 2605 | } PLATFORM_VRM_TYPE; |
| 2606 | |
| 2607 | |
| 2608 | /// FCH Platform Configuration Policy |
| 2609 | typedef struct { |
| 2610 | IN UINT16 CfgSmbus0BaseAddress; ///< SMBUS0 Controller Base Address |
| 2611 | IN UINT16 CfgSmbus1BaseAddress; ///< SMBUS1 Controller Base Address |
| 2612 | IN UINT16 CfgSioPmeBaseAddress; ///< I/O base address for LPC I/O target range |
| 2613 | IN UINT16 CfgAcpiPm1EvtBlkAddr; ///< I/O base address of ACPI power management Event Block |
| 2614 | IN UINT16 CfgAcpiPm1CntBlkAddr; ///< I/O base address of ACPI power management Control Block |
| 2615 | IN UINT16 CfgAcpiPmTmrBlkAddr; ///< I/O base address of ACPI power management Timer Block |
| 2616 | IN UINT16 CfgCpuControlBlkAddr; ///< I/O base address of ACPI power management CPU Control Block |
| 2617 | IN UINT16 CfgAcpiGpe0BlkAddr; ///< I/O base address of ACPI power management General Purpose Event Block |
| 2618 | IN UINT16 CfgSmiCmdPortAddr; ///< I/O base address of ACPI SMI Command Block |
| 2619 | IN UINT16 CfgAcpiPmaCntBlkAddr; ///< I/O base address of ACPI power management additional control block |
| 2620 | IN UINT32 CfgGecShadowRomBase; ///< 32-bit base address to the GEC shadow ROM |
| 2621 | IN UINT32 CfgWatchDogTimerBase; ///< Watchdog Timer base address |
| 2622 | IN UINT32 CfgSpiRomBaseAddress; ///< Base address for the SPI ROM controller |
| 2623 | IN UINT32 CfgHpetBaseAddress; ///< HPET MMIO base address |
| 2624 | IN UINT32 CfgAzaliaSsid; ///< Subsystem ID of HD Audio controller |
| 2625 | IN UINT32 CfgSmbusSsid; ///< Subsystem ID of SMBUS controller |
| 2626 | IN UINT32 CfgIdeSsid; ///< Subsystem ID of IDE controller |
| 2627 | IN UINT32 CfgSataAhciSsid; ///< Subsystem ID of SATA controller in AHCI mode |
| 2628 | IN UINT32 CfgSataIdeSsid; ///< Subsystem ID of SATA controller in IDE mode |
| 2629 | IN UINT32 CfgSataRaid5Ssid; ///< Subsystem ID of SATA controller in RAID5 mode |
| 2630 | IN UINT32 CfgSataRaidSsid; ///< Subsystem ID of SATA controller in RAID mode |
| 2631 | IN UINT32 CfgEhciSsid; ///< Subsystem ID of EHCI |
| 2632 | IN UINT32 CfgOhciSsid; ///< Subsystem ID of OHCI |
| 2633 | IN UINT32 CfgLpcSsid; ///< Subsystem ID of LPC ISA Bridge |
| 2634 | IN UINT32 CfgSdSsid; ///< Subsystem ID of SecureDigital controller |
| 2635 | IN UINT32 CfgXhciSsid; ///< Subsystem ID of XHCI |
| 2636 | IN BOOLEAN CfgFchPort80BehindPcib; ///< Is port80 cycle going to the PCI bridge |
| 2637 | IN BOOLEAN CfgFchEnableAcpiSleepTrap; ///< ACPI sleep SMI enable/disable |
| 2638 | IN GPP_LINKMODE CfgFchGppLinkConfig; ///< GPP link configuration |
| 2639 | IN BOOLEAN CfgFchGppPort0Present; ///< Is FCH GPP port 0 present |
| 2640 | IN BOOLEAN CfgFchGppPort1Present; ///< Is FCH GPP port 1 present |
| 2641 | IN BOOLEAN CfgFchGppPort2Present; ///< Is FCH GPP port 2 present |
| 2642 | IN BOOLEAN CfgFchGppPort3Present; ///< Is FCH GPP port 3 present |
| 2643 | IN BOOLEAN CfgFchGppPort0HotPlug; ///< Is FCH GPP port 0 hotplug capable |
| 2644 | IN BOOLEAN CfgFchGppPort1HotPlug; ///< Is FCH GPP port 1 hotplug capable |
| 2645 | IN BOOLEAN CfgFchGppPort2HotPlug; ///< Is FCH GPP port 2 hotplug capable |
| 2646 | IN BOOLEAN CfgFchGppPort3HotPlug; ///< Is FCH GPP port 3 hotplug capable |
| 2647 | |
| 2648 | IN UINT8 CfgFchEsataPortBitMap; ///< ESATA Port definition, eg: [0]=1, means port 0 is ESATA capable |
| 2649 | IN UINT8 CfgFchIrPinControl; ///< Register bitfield describing Infrared Pin Control: |
| 2650 | ///< [0] - IR Enable 0 |
| 2651 | ///< [1] - IR Enable 1 |
| 2652 | ///< [2] - IR Tx0 |
| 2653 | ///< [3] - IR Tx1 |
| 2654 | ///< [4] - IR Open Drain |
| 2655 | ///< [5] - IR Enable LED |
| 2656 | IN SD_CLOCK_CONTROL CfgFchSdClockControl; ///< FCH SD Clock Control |
| 2657 | IN SCI_MAP_CONTROL *CfgFchSciMapControl; ///< FCH SCI Mapping Control |
| 2658 | IN SATA_PHY_CONTROL *CfgFchSataPhyControl; ///< FCH SATA PHY Control |
| 2659 | IN GPIO_CONTROL *CfgFchGpioControl; ///< FCH GPIO Control |
| 2660 | IN BOOLEAN CfgFchRtcWorkAround; ///< FCH RTC Workaround |
| 2661 | IN BOOLEAN CfgFchUsbPortDisWorkAround; ///< FCH USB Workaround |
| 2662 | } FCH_PLATFORM_POLICY; |
| 2663 | |
| 2664 | |
| 2665 | /// Build Option/Configuration Boolean Structure. |
| 2666 | typedef struct { |
| 2667 | IN AMD_CODE_HEADER VersionString; ///< AMD embedded code version string |
| 2668 | |
| 2669 | //Build Option Area |
| 2670 | IN BOOLEAN OptionUDimms; ///< @ref BLDOPT_REMOVE_UDIMMS_SUPPORT "BLDOPT_REMOVE_UDIMMS_SUPPORT" |
| 2671 | IN BOOLEAN OptionRDimms; ///< @ref BLDOPT_REMOVE_RDIMMS_SUPPORT "BLDOPT_REMOVE_RDIMMS_SUPPORT" |
| 2672 | IN BOOLEAN OptionLrDimms; ///< @ref BLDOPT_REMOVE_LRDIMMS_SUPPORT "BLDOPT_REMOVE_LRDIMMS_SUPPORT" |
| 2673 | IN BOOLEAN OptionEcc; ///< @ref BLDOPT_REMOVE_ECC_SUPPORT "BLDOPT_REMOVE_ECC_SUPPORT" |
| 2674 | IN BOOLEAN OptionBankInterleave; ///< @ref BLDOPT_REMOVE_BANK_INTERLEAVE "BLDOPT_REMOVE_BANK_INTERLEAVE" |
| 2675 | IN BOOLEAN OptionDctInterleave; ///< @ref BLDOPT_REMOVE_DCT_INTERLEAVE "BLDOPT_REMOVE_DCT_INTERLEAVE" |
| 2676 | IN BOOLEAN OptionNodeInterleave; ///< @ref BLDOPT_REMOVE_NODE_INTERLEAVE "BLDOPT_REMOVE_NODE_INTERLEAVE" |
| 2677 | IN BOOLEAN OptionParallelTraining; ///< @ref BLDOPT_REMOVE_PARALLEL_TRAINING "BLDOPT_REMOVE_PARALLEL_TRAINING" |
| 2678 | IN BOOLEAN OptionOnlineSpare; ///< @ref BLDOPT_REMOVE_ONLINE_SPARE_SUPPORT "BLDOPT_REMOVE_ONLINE_SPARE_SUPPORT" |
| 2679 | IN BOOLEAN OptionMemRestore; ///< @ref BLDOPT_REMOVE_MEM_RESTORE_SUPPORT "BLDOPT_REMOVE_MEM_RESTORE_SUPPORT" |
| 2680 | IN BOOLEAN OptionMultisocket; ///< @ref BLDOPT_REMOVE_MULTISOCKET_SUPPORT "BLDOPT_REMOVE_MULTISOCKET_SUPPORT" |
| 2681 | IN BOOLEAN OptionAcpiPstates; ///< @ref BLDOPT_REMOVE_ACPI_PSTATES "BLDOPT_REMOVE_ACPI_PSTATES" |
| 2682 | IN BOOLEAN OptionCrat; ///< @ref BLDOPT_REMOVE_CRAT "BLDOPT_REMOVE_CRAT" |
| 2683 | IN BOOLEAN OptionCdit; ///< @ref BLDOPT_REMOVE_CDIT "BLDOPT_REMOVE_CDIT" |
| 2684 | IN BOOLEAN OptionSrat; ///< @ref BLDOPT_REMOVE_SRAT "BLDOPT_REMOVE_SRAT" |
| 2685 | IN BOOLEAN OptionSlit; ///< @ref BLDOPT_REMOVE_SLIT "BLDOPT_REMOVE_SLIT" |
| 2686 | IN BOOLEAN OptionWhea; ///< @ref BLDOPT_REMOVE_WHEA "BLDOPT_REMOVE_WHEA" |
| 2687 | IN BOOLEAN OptionDmi; ///< @ref BLDOPT_REMOVE_DMI "BLDOPT_REMOVE_DMI" |
| 2688 | IN BOOLEAN OptionEarlySamples; ///< @ref BLDOPT_REMOVE_EARLY_SAMPLES "BLDOPT_REMOVE_EARLY_SAMPLES" |
| 2689 | IN BOOLEAN OptionAddrToCsTranslator; ///< ADDR_TO_CS_TRANSLATOR |
| 2690 | |
| 2691 | //Build Configuration Area |
| 2692 | IN UINT64 CfgPciMmioAddress; ///< Pci Mmio Base Address to use for PCI Config accesses. |
| 2693 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_PCI_MMIO_BASE} |
| 2694 | IN UINT32 CfgPciMmioSize; ///< Pci Mmio region Size. |
| 2695 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_PCI_MMIO_SIZE} |
| 2696 | IN PLATFORM_VRM_CONFIGURATION CfgPlatVrmCfg[MaxVrmType]; ///< Several configuration settings for the voltage regulator modules. |
| 2697 | IN UINT32 CfgCpuFrequencyLimit; ///< CPU frequency limit |
| 2698 | IN PLATFORM_CONNECTED_STANDBY_MODES CfgPlatformConnectedStandbyMode; ///< Enable or disable connected standby |
| 2699 | IN UINT32 CfgPlatNumIoApics; ///< The number of IO APICS for the platform. |
| 2700 | IN UINT32 CfgMemInitPstate; ///< Memory Init Pstate. |
| 2701 | IN PLATFORM_CSTATE_MODES CfgPlatformCStateMode; ///< Select the C-State Mode that will used. |
| 2702 | IN UINT32 CfgPlatformCStateOpData; ///< An IO port or additional C-State setup data, depends on C-State mode. |
| 2703 | IN UINT16 CfgPlatformCStateIoBaseAddress; ///< Specifies I/O ports that can be used to allow CPU to enter CStates |
| 2704 | IN PLATFORM_CPB_MODES CfgPlatformCpbMode; ///< Enable or disable core performance boost |
| 2705 | IN PLATFORM_LOW_POWER_PSTATE_MODES CfgLowPowerPstateForProcHot; ///< Low power Pstate for PROCHOT mode |
| 2706 | IN UINT32 CfgCoreLevelingMode; ///< Apply any downcoring or core count leveling as specified. |
| 2707 | IN PERFORMANCE_PROFILE CfgPerformanceProfile; ///< The platform's control flow mode and platform performance settings. |
| 2708 | |
| 2709 | IN UINT32 CfgAmdPlatformType; ///< Designate the platform as a Server, Desktop, or Mobile. |
| 2710 | IN UINT32 CfgAmdPowerCeiling; ///< PowerCeiling, specifies a maximum power usage limit for the platform |
| 2711 | IN UINT16 CfgHtcTemperatureLimit; ///< Hardware Thermal Control temperature limit in tenths of degrees Celsius. |
| 2712 | IN UINT16 CfgLhtcTemperatureLimit; ///< Local Hardware Thermal Control temperature limit in tenths of degrees Celsius. |
| 2713 | |
| 2714 | IN UINT32 CfgMemoryBusFrequencyLimit; ///< Memory Bus Frequency Limit. |
| 2715 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_MEMORY_BUS_FREQUENCY_LIMIT} |
| 2716 | IN BOOLEAN CfgMemoryModeUnganged; ///< Memory Mode Unganged. |
| 2717 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_MEMORY_MODE_UNGANGED} |
| 2718 | IN BOOLEAN CfgMemoryQuadRankCapable; ///< Memory Quad Rank Capable. |
| 2719 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_MEMORY_QUAD_RANK_CAPABLE} |
| 2720 | IN UINT32 CfgMemoryQuadrankType; ///< Memory Quadrank Type. |
| 2721 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_MEMORY_QUADRANK_TYPE} |
| 2722 | IN BOOLEAN CfgMemoryRDimmCapable; ///< Memory RDIMM Capable. |
| 2723 | IN BOOLEAN CfgMemoryLRDimmCapable; ///< Memory LRDIMM Capable. |
| 2724 | IN BOOLEAN CfgMemoryUDimmCapable; ///< Memory UDIMM Capable. |
| 2725 | IN BOOLEAN CfgMemorySODimmCapable; ///< Memory SODimm Capable. |
| 2726 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_MEMORY_SODIMM_CAPABLE} |
| 2727 | IN BOOLEAN CfgLimitMemoryToBelow1Tb; ///< Limit memory address space to below 1TB |
| 2728 | IN BOOLEAN CfgMemoryEnableBankInterleaving; ///< Memory Enable Bank Interleaving. |
| 2729 | IN BOOLEAN CfgMemoryEnableNodeInterleaving; ///< Memory Enable Node Interleaving. |
| 2730 | IN BOOLEAN CfgMemoryChannelInterleaving; ///< Memory Channel Interleaving. |
| 2731 | IN BOOLEAN CfgMemoryPowerDown; ///< Memory Power Down. |
| 2732 | #if CONFIG(AGESA_USE_1_0_0_4_HEADER) |
| 2733 | IN UINT8 CfgMemoryMacDefault; ///< Memory DRAM MAC Default |
| 2734 | IN BOOLEAN CfgMemoryExtendedTemperatureRange; ///< Memory Extended Temperature Range |
| 2735 | #endif |
| 2736 | IN UINT32 CfgPowerDownMode; ///< Power Down Mode. |
| 2737 | IN BOOLEAN CfgOnlineSpare; ///< Online Spare. |
| 2738 | IN BOOLEAN CfgMemoryParityEnable; ///< Memory Parity Enable. |
| 2739 | IN BOOLEAN CfgBankSwizzle; ///< Bank Swizzle. |
| 2740 | IN UINT32 CfgTimingModeSelect; ///< Timing Mode Select. |
| 2741 | IN UINT32 CfgMemoryClockSelect; ///< Memory Clock Select. |
| 2742 | IN BOOLEAN CfgDqsTrainingControl; ///< Dqs Training Control. |
| 2743 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_DQS_TRAINING_CONTROL} |
| 2744 | IN BOOLEAN CfgIgnoreSpdChecksum; ///< Ignore Spd Checksum. |
| 2745 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_IGNORE_SPD_CHECKSUM} |
| 2746 | IN BOOLEAN CfgUseBurstMode; ///< Use Burst Mode. |
| 2747 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_USE_BURST_MODE} |
| 2748 | IN BOOLEAN CfgMemoryAllClocksOn; ///< Memory All Clocks On. |
| 2749 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_MEMORY_ALL_CLOCKS_ON} |
| 2750 | IN BOOLEAN CfgDdrPhyDllBypassMode; ///< Enable DllPDBypassMode |
| 2751 | IN BOOLEAN CfgEnableEccFeature; ///< Enable ECC Feature. |
| 2752 | IN BOOLEAN CfgEccRedirection; ///< ECC Redirection. |
| 2753 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_ECC_REDIRECTION} |
| 2754 | IN UINT16 CfgScrubDramRate; ///< Scrub Dram Rate. |
| 2755 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_SCRUB_DRAM_RATE} |
| 2756 | IN UINT16 CfgScrubL2Rate; ///< Scrub L2Rate. |
| 2757 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_SCRUB_L2_RATE} |
| 2758 | IN UINT16 CfgScrubL3Rate; ///< Scrub L3Rate. |
| 2759 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_SCRUB_L3_RATE} |
| 2760 | IN UINT16 CfgScrubIcRate; ///< Scrub Ic Rate. |
| 2761 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_SCRUB_IC_RATE} |
| 2762 | IN UINT16 CfgScrubDcRate; ///< Scrub Dc Rate. |
| 2763 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_SCRUB_DC_RATE} |
| 2764 | IN BOOLEAN CfgEccSyncFlood; ///< ECC Sync Flood. |
| 2765 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_ECC_SYNC_FLOOD} |
| 2766 | IN UINT16 CfgEccSymbolSize; ///< ECC Symbol Size. |
| 2767 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_ECC_SYMBOL_SIZE} |
| 2768 | IN UINT64 CfgHeapDramAddress; ///< Heap contents will be temporarily stored in this address during the transition. |
| 2769 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_HEAP_DRAM_ADDRESS} |
| 2770 | IN BOOLEAN CfgNodeMem1GBAlign; ///< Node Mem 1GB boundary Alignment |
| 2771 | IN BOOLEAN CfgS3LateRestore; ///< S3 Late Restore |
| 2772 | IN BOOLEAN CfgAcpiPstateIndependent; ///< PSD method dependent/Independent |
| 2773 | IN UINT32 CfgAcpiPstatesPsdPolicy; ///< PSD policy |
| 2774 | IN AP_MTRR_SETTINGS *CfgApMtrrSettingsList; ///< The AP's MTRR settings before final halt |
| 2775 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_AP_MTRR_SETTINGS_LIST} |
| 2776 | IN UMA_MODE CfgUmaMode; ///< Uma Mode |
| 2777 | IN UINT32 CfgUmaSize; ///< Uma Size [31:0]=Addr[47:16] |
| 2778 | IN BOOLEAN CfgUmaAbove4G; ///< Uma Above 4G Support |
| 2779 | IN UMA_ALIGNMENT CfgUmaAlignment; ///< Uma alignment |
| 2780 | IN BOOLEAN CfgProcessorScopeInSb; ///< ACPI Processor Object in \\_SB scope |
| 2781 | IN CHAR8 CfgProcessorScopeName0; ///< OEM specific 1st character of processor scope name. |
| 2782 | IN CHAR8 CfgProcessorScopeName1; ///< OEM specific 2nd character of processor scope name. |
| 2783 | IN UINT8 CfgGnbHdAudio; ///< GNB HD Audio |
| 2784 | IN UINT8 CfgAbmSupport; ///< Abm Support |
| 2785 | IN UINT8 CfgDynamicRefreshRate; ///< DRR Dynamic Refresh Rate |
| 2786 | IN UINT16 CfgLcdBackLightControl; ///< LCD Backlight Control |
| 2787 | IN UINT8 CfgGnb3dStereoPinIndex; ///< 3D Stereo Pin ID. |
| 2788 | IN UINT32 CfgTempPcieMmioBaseAddress; ///< Temp pcie MMIO base Address |
| 2789 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_TEMP_PCIE_MMIO_BASE_ADDRESS} |
| 2790 | IN UINT32 CfgGnbIGPUSSID; ///< Gnb internal GPU SSID |
| 2791 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_IGPU_SUBSYSTEM_ID} |
| 2792 | IN UINT32 CfgGnbHDAudioSSID; ///< Gnb HD Audio SSID |
| 2793 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_IGPU_HD_AUDIO_SUBSYSTEM_ID} |
| 2794 | IN UINT32 CfgGnbPcieSSID; ///< Gnb PCIe SSID |
| 2795 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_APU_PCIE_PORTS_SUBSYSTEM_ID} |
| 2796 | IN UINT16 CfgLvdsSpreadSpectrum; ///< Lvds Spread Spectrum |
| 2797 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_GFX_LVDS_SPREAD_SPECTRUM} |
| 2798 | IN UINT16 CfgLvdsSpreadSpectrumRate; ///< Lvds Spread Spectrum Rate |
| 2799 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_GFX_LVDS_SPREAD_SPECTRUM_RATE} |
| 2800 | IN FCH_PLATFORM_POLICY *FchBldCfg; ///< FCH platform build configuration policy |
| 2801 | |
| 2802 | IN BOOLEAN CfgIommuSupport; ///< IOMMU support |
| 2803 | IN UINT8 CfgLvdsPowerOnSeqDigonToDe; ///< Panel initialization timing |
| 2804 | IN UINT8 CfgLvdsPowerOnSeqDeToVaryBl; ///< Panel initialization timing |
| 2805 | IN UINT8 CfgLvdsPowerOnSeqDeToDigon; ///< Panel initialization timing |
| 2806 | IN UINT8 CfgLvdsPowerOnSeqVaryBlToDe; ///< Panel initialization timing |
| 2807 | IN UINT8 CfgLvdsPowerOnSeqOnToOffDelay; ///< Panel initialization timing |
| 2808 | IN UINT8 CfgLvdsPowerOnSeqVaryBlToBlon; ///< Panel initialization timing |
| 2809 | IN UINT8 CfgLvdsPowerOnSeqBlonToVaryBl; ///< Panel initialization timing |
| 2810 | IN UINT16 CfgLvdsMaxPixelClockFreq; ///< The maximum pixel clock frequency supported |
| 2811 | IN UINT32 CfgLcdBitDepthControlValue; ///< The LCD bit depth control settings |
| 2812 | IN UINT8 CfgLvds24bbpPanelMode; ///< The LVDS 24 BBP mode |
| 2813 | IN LVDS_MISC_CONTROL CfgLvdsMiscControl; ///< THe LVDS Misc control |
| 2814 | IN UINT16 CfgPcieRefClkSpreadSpectrum; ///< PCIe Reference Clock Spread Spectrum |
| 2815 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_PCIE_REFCLK_SPREAD_SPECTRUM} |
| 2816 | IN BOOLEAN CfgExternalVrefCtlFeature; ///< External Vref control |
| 2817 | IN FORCE_TRAIN_MODE CfgForceTrainMode; ///< Force Train Mode |
| 2818 | IN BOOLEAN CfgGnbRemoteDisplaySupport; ///< Wireless Display Support |
| 2819 | IN IOMMU_EXCLUSION_RANGE_DESCRIPTOR *CfgIvrsExclusionRangeList; |
| 2820 | IN BOOLEAN CfgGnbSyncFloodPinAsNmi; ///< @ref BLDCFG_USE_SYNCFLOOD_AS_NMI "BLDCFG_USE_SYNCFLOOD_AS_NMI" |
| 2821 | IN UINT8 CfgIgpuEnableDisablePolicy; ///< This item defines the iGPU Enable/Disable policy |
| 2822 | ///< @li 0 = Auto - use current default |
| 2823 | ///< @li 2 = Disable iGPU if ANY PCI or PCIe Graphics card is present |
| 2824 | ///< @BldCfgItem{BLDCFG_IGPU_ENABLE_DISABLE_POLICY} |
| 2825 | IN UINT8 CfgGnbSwTjOffset; ///< Software-writeable TjOffset to account for changes in junction temperature |
| 2826 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_GNB_THERMAL_SENSOR_CORRECTION} |
| 2827 | IN UINT8 CfgLvdsMiscVoltAdjustment; ///< Register LVDS_CTRL_4 to adjust LVDS output voltage |
| 2828 | ///< Build-time customizable only - @BldCfgItem{BLDCFG_LVDS_MISC_VOL_ADJUSTMENT} |
| 2829 | IN DISPLAY_MISC_CONTROL CfgDisplayMiscControl; ///< The Display Misc control |
| 2830 | IN DP_FIXED_VOLT_SWING_TYPE CfgDpFixedVoltSwingType;///< To indicate fixed voltage swing value |
| 2831 | ///< @BldCfgItem{BLDCFG_DP_FIXED_VOLT_SWING} |
| 2832 | IN TECHNOLOGY_TYPE CfgDimmTypeUsedInMixedConfig; ///< Select the preferred technology type that AGESA will enable |
| 2833 | ///< when it is mixed with other technology types. |
| 2834 | IN BOOLEAN CfgHybridBoostEnable; ///< HyBrid Boost support |
| 2835 | ///< @BldCfgItem{BLDCFG_HYBRID_BOOST_ENABLE} |
| 2836 | IN UINT64 CfgGnbIoapicAddress; ///< GNB IOAPIC Base Address(NULL if platform configured) |
| 2837 | ///< @BldCfgItem{BLDCFG_GNB_IOAPIC_ADDRESS} |
| 2838 | IN BOOLEAN CfgDataEyeEn; ///< Enable get 2D Data Eye |
| 2839 | IN BOOLEAN CfgDockedTdpHeadroom; ///< @BldCfgItem{BLDCFG_DOCKED_TDP_HEADROOM} |
| 2840 | IN BOOLEAN CfgBatteryBoostEn; ///< @BldCfgItem{BLDCFG_BATTERY_BOOST_EN} |
| 2841 | IN UINT32 CfgBatteryBoostTune; ///< @BldCfgItem{BLDCFG_BATTERY_BOOST_TUNE} |
| 2842 | IN UINT32 CfgNumGfxCoresEnabled; ///< @BldCfgItem{BLDCFG_NUM_GFX_CORES_ENABLED} |
| 2843 | IN UINT32 CfgTdpAcDocked; ///< @BldCfgItem{BLDCFG_TDP_AC_DOCKED} |
| 2844 | IN UINT32 CfgTdpDcDocked; ///< @BldCfgItem{BLDCFG_TDP_DC_DOCKED} |
| 2845 | IN UINT32 CfgTdpAcUnDocked; ///< @BldCfgItem{BLDCFG_TDP_AC_UNDOCKED} |
| 2846 | IN UINT32 CfgTdpDcUnDocked; ///< @BldCfgItem{BLDCFG_TDP_DC_UNDOCKED} |
| 2847 | IN UINT32 CfgTspAcDocked; ///< @BldCfgItem{BLDCFG_TSP_AC_DOCKED} |
| 2848 | IN UINT32 CfgTspDcDocked; ///< @BldCfgItem{BLDCFG_TSP_DC_DOCKED} |
| 2849 | IN UINT32 CfgTspAcUnDocked; ///< @BldCfgItem{BLDCFG_TSP_AC_UNDOCKED} |
| 2850 | IN UINT32 CfgTspDcUnDocked; ///< @BldCfgItem{BLDCFG_TSP_DC_UNDOCKED} |
| 2851 | IN BOOLEAN CfgStapmEnAcDocked; ///< @BldCfgItem{BLDCFG_STAPM_EN_AC_DOCKED} |
| 2852 | IN BOOLEAN CfgStapmEnDcDocked; ///< @BldCfgItem{BLDCFG_STAPM_EN_DC_DOCKED} |
| 2853 | IN BOOLEAN CfgStapmEnAcUnDocked; ///< @BldCfgItem{BLDCFG_STAPM_EN_AC_UNDOCKED} |
| 2854 | IN BOOLEAN CfgStapmEnDcUnDocked; ///< @BldCfgItem{BLDCFG_STAPM_EN_DC_UNDOCKED} |
| 2855 | IN UINT32 CfgStapmPowerAcDocked; ///< @BldCfgItem{BLDCFG_STAPM_POWER_AC_DOCKED} |
| 2856 | IN UINT32 CfgStapmPowerDcDocked; ///< @BldCfgItem{BLDCFG_STAPM_POWER_DC_DOCKED} |
| 2857 | IN UINT32 CfgStapmPowerAcUnDocked; ///< @BldCfgItem{BLDCFG_STAPM_POWER_AC_UNDOCKED} |
| 2858 | IN UINT32 CfgStapmPowerDcUnDocked; ///< @BldCfgItem{BLDCFG_STAPM_POWER_DC_UNDOCKED} |
| 2859 | IN BOOLEAN CfgDramDoubleRefreshRateEn; ///< Double DRAM refresh rate |
| 2860 | IN ACP_SIZE CfgGnbAcpSize; ///< ACP size [31:0]=Addr[47:16] |
| 2861 | ///< @BldCfgItem{BLDCFG_ACP_SIZE} |
| 2862 | IN PMU_TRAIN_MODE CfgPmuTrainMode; ///< Force Train Mode |
| 2863 | ///< @BldCfgItem{BLDCFG_PMU_TRAINING_MODE} |
| 2864 | IN MEMORY_PHY_VOLTAGE CfgMemoryPhyVoltage; ///< Memory Phy voltage (VDDR) |
| 2865 | ///< @BldCfgItem{BLDCFG_MEMORY_PHY_VOLTAGE} |
| 2866 | IN UINT32 CfgGpuFrequencyLimit; ///< @BldCfgItem{BLDCFG_GPU_FREQUENCY_LIMIT} |
| 2867 | IN UINT8 CfgMaxNumAudioEndpoints; ///< @BldCfgItem{BLDCFG_MAX_NUM_AUDIO_ENDPOINTS} |
| 2868 | IN BOOLEAN Reserved; ///< reserved... |
| 2869 | } BUILD_OPT_CFG; |
| 2870 | |
| 2871 | /// A structure containing platform specific operational characteristics. This |
| 2872 | /// structure is initially populated by the initializer with a copy of the same |
| 2873 | /// structure that was created at build time using the build configuration controls. |
| 2874 | typedef struct _PLATFORM_CONFIGURATION { |
| 2875 | IN PERFORMANCE_PROFILE PlatformProfile; ///< Several configuration settings for the processor. |
| 2876 | IN UINT8 CoreLevelingMode; ///< Indicates how to balance the number of cores per processor. |
| 2877 | ///< @BldCfgItem{BLDCFG_CORE_LEVELING_MODE} |
| 2878 | IN PLATFORM_CSTATE_MODES CStateMode; ///< Specifies the method of C-State enablement - Disabled, or C6. |
| 2879 | ///< @BldCfgItem{BLDCFG_PLATFORM_CSTATE_MODE} |
| 2880 | IN UINT32 CStatePlatformData; ///< This element specifies some pertinent data needed for the operation of the Cstate feature |
| 2881 | ///< If CStateMode is CStateModeC6, this item is reserved |
| 2882 | ///< @BldCfgItem{BLDCFG_PLATFORM_CSTATE_OPDATA} |
| 2883 | IN UINT16 CStateIoBaseAddress; ///< This item specifies a free block of 8 consecutive bytes of I/O ports that |
| 2884 | ///< can be used to allow the CPU to enter Cstates. |
| 2885 | ///< @BldCfgItem{BLDCFG_PLATFORM_CSTATE_IO_BASE_ADDRESS} |
| 2886 | IN PLATFORM_CPB_MODES CpbMode; ///< Specifies the method of core performance boost enablement - Disabled, or Auto. |
| 2887 | ///< @BldCfgItem{BLDCFG_PLATFORM_CPB_MODE} |
| 2888 | IN BOOLEAN UserOptionDmi; ///< When set to TRUE, the DMI data table is generated. |
| 2889 | IN BOOLEAN UserOptionPState; ///< When set to TRUE, the PState data tables are generated. |
| 2890 | IN BOOLEAN UserOptionCrat; ///< When set to TRUE, the CRAT data table is generated. |
| 2891 | IN BOOLEAN UserOptionCdit; ///< When set to TRUE, the CDIT data table is generated. |
| 2892 | IN BOOLEAN UserOptionSrat; ///< When set to TRUE, the SRAT data table is generated. |
| 2893 | IN BOOLEAN UserOptionSlit; ///< When set to TRUE, the SLIT data table is generated. |
| 2894 | IN BOOLEAN UserOptionWhea; ///< When set to TRUE, the WHEA data table is generated. |
| 2895 | IN PLATFORM_LOW_POWER_PSTATE_MODES LowPowerPstateForProcHot; ///< Specifies the method of low power Pstate for PROCHOT enablement - Disabled, or Auto. |
| 2896 | IN UINT32 PowerCeiling; ///< P-State Ceiling Enabling Deck - Max power milli-watts. |
| 2897 | IN BOOLEAN ForcePstateIndependent; ///< Deprecated in favor of PstatesPsdPolicy. |
| 2898 | ///< P-State _PSD is forced independent. |
| 2899 | ///< @BldCfgItem{BLDCFG_FORCE_INDEPENDENT_PSD_OBJECT} |
| 2900 | IN UINT32 PstatesPsdPolicy; ///< PSD policy |
| 2901 | ///< @BldCfgItem{BLDCFG_ACPI_PSTATES_PSD_POLICY} |
| 2902 | IN UINT32 CpuFrequencyLimit; ///< @BldCfgItem{BLDCFG_CPU_FREQUENCY_LIMIT} |
| 2903 | IN PLATFORM_CONNECTED_STANDBY_MODES CfgPlatformConnectedStandbyMode; ///< @BldCfgItem{BLDCFG_CPU_CONNECTED_STANDBY_MODE} |
| 2904 | IN UINT32 NumberOfIoApics; ///< Number of I/O APICs in the system |
| 2905 | ///< @BldCfgItem{BLDCFG_PLATFORM_NUM_IO_APICS} |
| 2906 | IN PLATFORM_VRM_CONFIGURATION VrmProperties[MaxVrmType]; ///< Several configuration settings for the voltage regulator modules. |
| 2907 | IN BOOLEAN ProcessorScopeInSb; ///< ACPI Processor Object in \\_SB scope |
| 2908 | ///< @BldCfgItem{BLDCFG_PROCESSOR_SCOPE_IN_SB} |
| 2909 | IN CHAR8 ProcessorScopeName0; ///< OEM specific 1st character of processor scope name. |
| 2910 | ///< @BldCfgItem{BLDCFG_PROCESSOR_SCOPE_NAME0} |
| 2911 | IN CHAR8 ProcessorScopeName1; ///< OEM specific 2nd character of processor scope name. |
| 2912 | ///< @BldCfgItem{BLDCFG_PROCESSOR_SCOPE_NAME1} |
| 2913 | IN UINT8 GnbHdAudio; ///< Control GFX HD Audio controller(Used for HDMI and DP display output), |
| 2914 | ///< essentially it enables function 1 of graphics device. |
| 2915 | ///< @li 0 = HD Audio disable |
| 2916 | ///< @li 1 = HD Audio enable |
| 2917 | ///< @BldCfgItem{BLDCFG_CFG_GNB_HD_AUDIO} |
| 2918 | IN UINT8 AbmSupport; ///< Automatic adjust LVDS/eDP Back light level support.It is |
| 2919 | ///< characteristic specific to display panel which used by platform design. |
| 2920 | ///< @li 0 = ABM support disabled |
| 2921 | ///< @li 1 = ABM support enabled |
| 2922 | ///< @BldCfgItem{BLDCFG_CFG_ABM_SUPPORT} |
| 2923 | IN UINT8 DynamicRefreshRate; ///< Adjust refresh rate on LVDS/eDP. |
| 2924 | ///< @BldCfgItem{BLDCFG_CFG_DYNAMIC_REFRESH_RATE} |
| 2925 | IN UINT16 LcdBackLightControl; ///< The PWM frequency to LCD backlight control. |
| 2926 | ///< If equal to 0 backlight not controlled by iGPU |
| 2927 | ///< @BldCfgItem{BLDCFG_CFG_LCD_BACK_LIGHT_CONTROL} |
| 2928 | IN UINT16 HtcTemperatureLimit; ///< The Hardware Thermal Control temperature limit in tenths of degrees Celsius. |
| 2929 | ///< If equal to 0, use hardware defaults. |
| 2930 | ///< @BldCfgItem{BLDCFG_HTC_TEMPERATURE_LIMIT} |
| 2931 | IN UINT16 LhtcTemperatureLimit; ///< The Local Hardware Thermal Control temperature limit in tenths of degrees Celsius. |
| 2932 | ///< If equal to 0, use hardware defaults. |
| 2933 | ///< @BldCfgItem{BLDCFG_LHTC_TEMPERATURE_LIMIT} |
| 2934 | IN ACP_SIZE AcpSize; ///< The size of ACP dram |
| 2935 | ///< ACP_Size[31:0]=Addr[47:16] |
| 2936 | ///< @BldCfgItem{BLDCFG_ACP_SIZE} |
| 2937 | } PLATFORM_CONFIGURATION; |
| 2938 | |
| 2939 | |
| 2940 | /********************************************************************** |
| 2941 | * Structures for: AmdInitLate |
| 2942 | **********************************************************************/ |
| 2943 | #define PROC_VERSION_LENGTH 48 |
| 2944 | #define MAX_DIMMS_PER_SOCKET 16 |
| 2945 | #define PROC_MANU_LENGTH 29 |
| 2946 | |
| 2947 | /* Interface Parameter Structures */ |
| 2948 | /// DMI Type4 - Processor ID |
| 2949 | typedef struct { |
| 2950 | OUT UINT32 ProcIdLsd; ///< Lower half of 64b ID |
| 2951 | OUT UINT32 ProcIdMsd; ///< Upper half of 64b ID |
| 2952 | } TYPE4_PROC_ID; |
| 2953 | |
| 2954 | /// DMI Type 4 - Processor information |
| 2955 | typedef struct { |
| 2956 | OUT UINT8 T4ProcType; ///< CPU Type |
| 2957 | OUT UINT8 T4ProcFamily; ///< Family 1 |
| 2958 | OUT TYPE4_PROC_ID T4ProcId; ///< Id |
| 2959 | OUT UINT8 T4Voltage; ///< Voltage |
| 2960 | OUT UINT16 T4ExternalClock; ///< External clock |
| 2961 | OUT UINT16 T4MaxSpeed; ///< Max speed |
| 2962 | OUT UINT16 T4CurrentSpeed; ///< Current speed |
| 2963 | OUT UINT8 T4Status; ///< Status |
| 2964 | OUT UINT8 T4ProcUpgrade; ///< Up grade |
| 2965 | OUT UINT8 T4CoreCount; ///< Core count |
| 2966 | OUT UINT8 T4CoreEnabled; ///< Core Enable |
| 2967 | OUT UINT8 T4ThreadCount; ///< Thread count |
| 2968 | OUT UINT16 T4ProcCharacteristics; ///< Characteristics |
| 2969 | OUT UINT16 T4ProcFamily2; ///< Family 2 |
| 2970 | OUT CHAR8 T4ProcVersion[PROC_VERSION_LENGTH]; ///< Cpu version |
| 2971 | OUT CHAR8 T4ProcManufacturer[PROC_MANU_LENGTH]; ///< Manufacturer |
| 2972 | } TYPE4_DMI_INFO; |
| 2973 | |
| 2974 | /// DMI Type 7 - Cache information |
| 2975 | typedef struct _TYPE7_DMI_INFO { |
| 2976 | OUT UINT16 T7CacheCfg; ///< Cache cfg |
| 2977 | OUT UINT16 T7MaxCacheSize; ///< Max size |
| 2978 | OUT UINT16 T7InstallSize; ///< Install size |
| 2979 | OUT UINT16 T7SupportedSramType; ///< Supported Sram Type |
| 2980 | OUT UINT16 T7CurrentSramType; ///< Current type |
| 2981 | OUT UINT8 T7CacheSpeed; ///< Speed |
| 2982 | OUT UINT8 T7ErrorCorrectionType; ///< ECC type |
| 2983 | OUT UINT8 T7SystemCacheType; ///< Cache type |
| 2984 | OUT UINT8 T7Associativity; ///< Associativity |
| 2985 | } TYPE7_DMI_INFO; |
| 2986 | |
| 2987 | /// DMI Type 16 offset 04h - Location |
| 2988 | typedef enum { |
| 2989 | OtherLocation = 0x01, ///< Assign 01 to Other |
| 2990 | UnknownLocation, ///< Assign 02 to Unknown |
| 2991 | SystemboardOrMotherboard, ///< Assign 03 to systemboard or motherboard |
| 2992 | IsaAddonCard, ///< Assign 04 to ISA add-on card |
| 2993 | EisaAddonCard, ///< Assign 05 to EISA add-on card |
| 2994 | PciAddonCard, ///< Assign 06 to PCI add-on card |
| 2995 | McaAddonCard, ///< Assign 07 to MCA add-on card |
| 2996 | PcmciaAddonCard, ///< Assign 08 to PCMCIA add-on card |
| 2997 | ProprietaryAddonCard, ///< Assign 09 to proprietary add-on card |
| 2998 | NuBus, ///< Assign 0A to NuBus |
| 2999 | Pc98C20AddonCard, ///< Assign 0A0 to PC-98/C20 add-on card |
| 3000 | Pc98C24AddonCard, ///< Assign 0A1 to PC-98/C24 add-on card |
| 3001 | Pc98EAddoncard, ///< Assign 0A2 to PC-98/E add-on card |
| 3002 | Pc98LocalBusAddonCard ///< Assign 0A3 to PC-98/Local bus add-on card |
| 3003 | } DMI_T16_LOCATION; |
| 3004 | |
| 3005 | /// DMI Type 16 offset 05h - Memory Error Correction |
| 3006 | typedef enum { |
| 3007 | OtherUse = 0x01, ///< Assign 01 to Other |
| 3008 | UnknownUse, ///< Assign 02 to Unknown |
| 3009 | SystemMemory, ///< Assign 03 to system memory |
| 3010 | VideoMemory, ///< Assign 04 to video memory |
| 3011 | FlashMemory, ///< Assign 05 to flash memory |
| 3012 | NonvolatileRam, ///< Assign 06 to non-volatile RAM |
| 3013 | CacheMemory ///< Assign 07 to cache memory |
| 3014 | } DMI_T16_USE; |
| 3015 | |
| 3016 | /// DMI Type 16 offset 07h - Maximum Capacity |
| 3017 | typedef enum { |
| 3018 | Dmi16OtherErrCorrection = 0x01, ///< Assign 01 to Other |
| 3019 | Dmi16UnknownErrCorrection, ///< Assign 02 to Unknown |
| 3020 | Dmi16NoneErrCorrection, ///< Assign 03 to None |
| 3021 | Dmi16Parity, ///< Assign 04 to parity |
| 3022 | Dmi16SingleBitEcc, ///< Assign 05 to Single-bit ECC |
| 3023 | Dmi16MultiBitEcc, ///< Assign 06 to Multi-bit ECC |
| 3024 | Dmi16Crc ///< Assign 07 to CRC |
| 3025 | } DMI_T16_ERROR_CORRECTION; |
| 3026 | |
| 3027 | /// DMI Type 16 - Physical Memory Array |
| 3028 | typedef struct { |
| 3029 | OUT DMI_T16_LOCATION Location; ///< The physical location of the Memory Array, |
| 3030 | ///< whether on the system board or an add-in board. |
| 3031 | OUT DMI_T16_USE Use; ///< Identifies the function for which the array |
| 3032 | ///< is used. |
| 3033 | OUT DMI_T16_ERROR_CORRECTION MemoryErrorCorrection; ///< The primary hardware error correction or |
| 3034 | ///< detection method supported by this memory array. |
| 3035 | OUT UINT16 NumberOfMemoryDevices; ///< The number of slots or sockets available |
| 3036 | ///< for memory devices in this array. |
| 3037 | } TYPE16_DMI_INFO; |
| 3038 | |
| 3039 | /// DMI Type 17 offset 0Eh - Form Factor |
| 3040 | typedef enum { |
| 3041 | OtherFormFactor = 0x01, ///< Assign 01 to Other |
| 3042 | UnknowFormFactor, ///< Assign 02 to Unknown |
| 3043 | SimmFormFactor, ///< Assign 03 to SIMM |
| 3044 | SipFormFactor, ///< Assign 04 to SIP |
| 3045 | ChipFormFactor, ///< Assign 05 to Chip |
| 3046 | DipFormFactor, ///< Assign 06 to DIP |
| 3047 | ZipFormFactor, ///< Assign 07 to ZIP |
| 3048 | ProprietaryCardFormFactor, ///< Assign 08 to Proprietary Card |
| 3049 | DimmFormFactorFormFactor, ///< Assign 09 to DIMM |
| 3050 | TsopFormFactor, ///< Assign 10 to TSOP |
| 3051 | RowOfChipsFormFactor, ///< Assign 11 to Row of chips |
| 3052 | RimmFormFactor, ///< Assign 12 to RIMM |
| 3053 | SodimmFormFactor, ///< Assign 13 to SODIMM |
| 3054 | SrimmFormFactor, ///< Assign 14 to SRIMM |
| 3055 | FbDimmFormFactor ///< Assign 15 to FB-DIMM |
| 3056 | } DMI_T17_FORM_FACTOR; |
| 3057 | |
| 3058 | /// DMI Type 17 offset 12h - Memory Type |
| 3059 | typedef enum { |
| 3060 | OtherMemType = 0x01, ///< Assign 01 to Other |
| 3061 | UnknownMemType, ///< Assign 02 to Unknown |
| 3062 | DramMemType, ///< Assign 03 to DRAM |
| 3063 | EdramMemType, ///< Assign 04 to EDRAM |
| 3064 | VramMemType, ///< Assign 05 to VRAM |
| 3065 | SramMemType, ///< Assign 06 to SRAM |
| 3066 | RamMemType, ///< Assign 07 to RAM |
| 3067 | RomMemType, ///< Assign 08 to ROM |
| 3068 | FlashMemType, ///< Assign 09 to Flash |
| 3069 | EepromMemType, ///< Assign 10 to EEPROM |
| 3070 | FepromMemType, ///< Assign 11 to FEPROM |
| 3071 | EpromMemType, ///< Assign 12 to EPROM |
| 3072 | CdramMemType, ///< Assign 13 to CDRAM |
| 3073 | ThreeDramMemType, ///< Assign 14 to 3DRAM |
| 3074 | SdramMemType, ///< Assign 15 to SDRAM |
| 3075 | SgramMemType, ///< Assign 16 to SGRAM |
| 3076 | RdramMemType, ///< Assign 17 to RDRAM |
| 3077 | DdrMemType, ///< Assign 18 to DDR |
| 3078 | Ddr2MemType, ///< Assign 19 to DDR2 |
| 3079 | Ddr2FbdimmMemType, ///< Assign 20 to DDR2 FB-DIMM |
| 3080 | Ddr3MemType = 0x18, ///< Assign 24 to DDR3 |
| 3081 | Fbd2MemType ///< Assign 25 to FBD2 |
| 3082 | } DMI_T17_MEMORY_TYPE; |
| 3083 | |
| 3084 | /// DMI Type 17 offset 13h - Type Detail |
| 3085 | typedef struct { |
| 3086 | OUT UINT16 Reserved1:1; ///< Reserved |
| 3087 | OUT UINT16 Other:1; ///< Other |
| 3088 | OUT UINT16 Unknown:1; ///< Unknown |
| 3089 | OUT UINT16 FastPaged:1; ///< Fast-Paged |
| 3090 | OUT UINT16 StaticColumn:1; ///< Static column |
| 3091 | OUT UINT16 PseudoStatic:1; ///< Pseudo-static |
| 3092 | OUT UINT16 Rambus:1; ///< RAMBUS |
| 3093 | OUT UINT16 Synchronous:1; ///< Synchronous |
| 3094 | OUT UINT16 Cmos:1; ///< CMOS |
| 3095 | OUT UINT16 Edo:1; ///< EDO |
| 3096 | OUT UINT16 WindowDram:1; ///< Window DRAM |
| 3097 | OUT UINT16 CacheDram:1; ///< Cache Dram |
| 3098 | OUT UINT16 NonVolatile:1; ///< Non-volatile |
| 3099 | OUT UINT16 Registered:1; ///< Registered (Buffered) |
| 3100 | OUT UINT16 Unbuffered:1; ///< Unbuffered (Unregistered) |
| 3101 | OUT UINT16 Reserved2:1; ///< Reserved |
| 3102 | } DMI_T17_TYPE_DETAIL; |
| 3103 | |
| 3104 | /// DMI Type 17 - Memory Device |
| 3105 | typedef struct { |
| 3106 | OUT UINT16 Handle; ///< The temporary handle, or instance number, associated with the structure |
| 3107 | OUT UINT16 TotalWidth; ///< Total Width, in bits, of this memory device, including any check or error-correction bits. |
| 3108 | OUT UINT16 DataWidth; ///< Data Width, in bits, of this memory device. |
| 3109 | OUT UINT16 MemorySize; ///< The size of the memory device. |
| 3110 | OUT DMI_T17_FORM_FACTOR FormFactor; ///< The implementation form factor for this memory device. |
| 3111 | OUT UINT8 DeviceSet; ///< Identifies when the Memory Device is one of a set of |
| 3112 | ///< Memory Devices that must be populated with all devices of |
| 3113 | ///< the same type and size, and the set to which this device belongs. |
| 3114 | OUT CHAR8 DeviceLocator[8]; ///< The string number of the string that identifies the physically labeled socket or board position where the memory device is located. |
| 3115 | OUT CHAR8 BankLocator[10]; ///< The string number of the string that identifies the physically labeled bank where the memory device is located. |
| 3116 | OUT DMI_T17_MEMORY_TYPE MemoryType; ///< The type of memory used in this device. |
| 3117 | OUT DMI_T17_TYPE_DETAIL TypeDetail; ///< Additional detail on the memory device type |
| 3118 | OUT UINT16 Speed; ///< Identifies the speed of the device, in megahertz (MHz). |
| 3119 | OUT UINT64 ManufacturerIdCode; ///< Manufacturer ID code. |
| 3120 | OUT CHAR8 SerialNumber[9]; ///< Serial Number. |
| 3121 | OUT CHAR8 PartNumber[19]; ///< Part Number. |
| 3122 | OUT UINT8 Attributes; ///< Bits 7-4: Reserved, Bits 3-0: rank. |
| 3123 | OUT UINT32 ExtSize; ///< Extended Size. |
| 3124 | OUT UINT16 ConfigSpeed; ///< Configured memory clock speed |
| 3125 | } TYPE17_DMI_INFO; |
| 3126 | |
| 3127 | /// Memory DMI Type 17 - for memory use |
| 3128 | typedef struct { |
| 3129 | OUT UINT8 Socket:3; ///< Socket ID |
| 3130 | OUT UINT8 Channel:2; ///< Channel ID |
| 3131 | OUT UINT8 Dimm:2; ///< DIMM ID |
| 3132 | OUT UINT8 DimmPresent:1; ///< Dimm Present |
| 3133 | OUT UINT16 Handle; ///< The temporary handle, or instance number, associated with the structure |
| 3134 | OUT UINT16 TotalWidth; ///< Total Width, in bits, of this memory device, including any check or error-correction bits. |
| 3135 | OUT UINT16 DataWidth; ///< Data Width, in bits, of this memory device. |
| 3136 | OUT UINT16 MemorySize; ///< The size of the memory device. |
| 3137 | OUT DMI_T17_FORM_FACTOR FormFactor; ///< The implementation form factor for this memory device. |
| 3138 | OUT UINT8 DeviceLocator; ///< The string number of the string that identifies the physically labeled socket or board position where the memory device is located. |
| 3139 | OUT UINT8 BankLocator; ///< The string number of the string that identifies the physically labeled bank where the memory device is located. |
| 3140 | OUT UINT16 Speed; ///< Identifies the speed of the device, in megahertz (MHz). |
| 3141 | OUT UINT64 ManufacturerIdCode; ///< Manufacturer ID code. |
| 3142 | OUT UINT8 SerialNumber[4]; ///< Serial Number. |
| 3143 | OUT UINT8 PartNumber[18]; ///< Part Number. |
| 3144 | OUT UINT8 Attributes; ///< Bits 7-4: Reserved, Bits 3-0: rank. |
| 3145 | OUT UINT32 ExtSize; ///< Extended Size. |
| 3146 | OUT UINT16 ConfigSpeed; ///< Configured memory clock speed |
| 3147 | } MEM_DMI_PHYSICAL_DIMM_INFO; |
| 3148 | |
| 3149 | /// Memory DMI Type 20 - for memory use |
| 3150 | typedef struct { |
| 3151 | OUT UINT8 Socket:3; ///< Socket ID |
| 3152 | OUT UINT8 Channel:2; ///< Channel ID |
| 3153 | OUT UINT8 Dimm:2; ///< DIMM ID |
| 3154 | OUT UINT8 DimmPresent:1; ///< Dimm Present |
| 3155 | OUT UINT32 StartingAddr; ///< The physical address, in kilobytes, of a range |
| 3156 | ///< of memory mapped to the referenced Memory Device. |
| 3157 | OUT UINT32 EndingAddr; ///< The handle, or instance number, associated with |
| 3158 | ///< the Memory Device structure to which this address |
| 3159 | ///< range is mapped. |
| 3160 | OUT UINT16 MemoryDeviceHandle; ///< The handle, or instance number, associated with |
| 3161 | ///< the Memory Device structure to which this address |
| 3162 | ///< range is mapped. |
| 3163 | OUT UINT64 ExtStartingAddr; ///< The physical address, in bytes, of a range of |
| 3164 | ///< memory mapped to the referenced Memory Device. |
| 3165 | OUT UINT64 ExtEndingAddr; ///< The physical ending address, in bytes, of the last of |
| 3166 | ///< a range of addresses mapped to the referenced Memory Device. |
| 3167 | } MEM_DMI_LOGICAL_DIMM_INFO; |
| 3168 | |
| 3169 | /// DMI Type 19 - Memory Array Mapped Address |
| 3170 | typedef struct { |
| 3171 | OUT UINT32 StartingAddr; ///< The physical address, in kilobytes, |
| 3172 | ///< of a range of memory mapped to the |
| 3173 | ///< specified physical memory array. |
| 3174 | OUT UINT32 EndingAddr; ///< The physical ending address of the |
| 3175 | ///< last kilobyte of a range of addresses |
| 3176 | ///< mapped to the specified physical memory array. |
| 3177 | OUT UINT16 MemoryArrayHandle; ///< The handle, or instance number, associated |
| 3178 | ///< with the physical memory array to which this |
| 3179 | ///< address range is mapped. |
| 3180 | OUT UINT8 PartitionWidth; ///< Identifies the number of memory devices that |
| 3181 | ///< form a single row of memory for the address |
| 3182 | ///< partition defined by this structure. |
| 3183 | OUT UINT64 ExtStartingAddr; ///< The physical address, in bytes, of a range of |
| 3184 | ///< memory mapped to the specified Physical Memory Array. |
| 3185 | OUT UINT64 ExtEndingAddr; ///< The physical address, in bytes, of a range of |
| 3186 | ///< memory mapped to the specified Physical Memory Array. |
| 3187 | } TYPE19_DMI_INFO; |
| 3188 | |
| 3189 | ///DMI Type 20 - Memory Device Mapped Address |
| 3190 | typedef struct { |
| 3191 | OUT UINT32 StartingAddr; ///< The physical address, in kilobytes, of a range |
| 3192 | ///< of memory mapped to the referenced Memory Device. |
| 3193 | OUT UINT32 EndingAddr; ///< The handle, or instance number, associated with |
| 3194 | ///< the Memory Device structure to which this address |
| 3195 | ///< range is mapped. |
| 3196 | OUT UINT16 MemoryDeviceHandle; ///< The handle, or instance number, associated with |
| 3197 | ///< the Memory Device structure to which this address |
| 3198 | ///< range is mapped. |
| 3199 | OUT UINT16 MemoryArrayMappedAddressHandle; ///< The handle, or instance number, associated |
| 3200 | ///< with the Memory Array Mapped Address structure to |
| 3201 | ///< which this device address range is mapped. |
| 3202 | OUT UINT8 PartitionRowPosition; ///< Identifies the position of the referenced Memory |
| 3203 | ///< Device in a row of the address partition. |
| 3204 | OUT UINT8 InterleavePosition; ///< The position of the referenced Memory Device in |
| 3205 | ///< an interleave. |
| 3206 | OUT UINT8 InterleavedDataDepth; ///< The maximum number of consecutive rows from the |
| 3207 | ///< referenced Memory Device that are accessed in a |
| 3208 | ///< single interleaved transfer. |
| 3209 | OUT UINT64 ExtStartingAddr; ///< The physical address, in bytes, of a range of |
| 3210 | ///< memory mapped to the referenced Memory Device. |
| 3211 | OUT UINT64 ExtEndingAddr; ///< The physical ending address, in bytes, of the last of |
| 3212 | ///< a range of addresses mapped to the referenced Memory Device. |
| 3213 | } TYPE20_DMI_INFO; |
| 3214 | |
| 3215 | /// Collection of pointers to the DMI records |
| 3216 | typedef struct { |
| 3217 | OUT TYPE4_DMI_INFO T4[MAX_SOCKETS_SUPPORTED]; ///< Type 4 struc |
| 3218 | OUT TYPE7_DMI_INFO T7L1[MAX_SOCKETS_SUPPORTED]; ///< Type 7 struc 1 |
| 3219 | OUT TYPE7_DMI_INFO T7L2[MAX_SOCKETS_SUPPORTED]; ///< Type 7 struc 2 |
| 3220 | OUT TYPE7_DMI_INFO T7L3[MAX_SOCKETS_SUPPORTED]; ///< Type 7 struc 3 |
| 3221 | OUT TYPE16_DMI_INFO T16; ///< Type 16 struc |
| 3222 | OUT TYPE17_DMI_INFO T17[MAX_SOCKETS_SUPPORTED][MAX_CHANNELS_PER_SOCKET][MAX_DIMMS_PER_CHANNEL]; ///< Type 17 struc |
| 3223 | OUT TYPE19_DMI_INFO T19; ///< Type 19 struc |
| 3224 | OUT TYPE20_DMI_INFO T20[MAX_SOCKETS_SUPPORTED][MAX_CHANNELS_PER_SOCKET][MAX_DIMMS_PER_CHANNEL]; ///< Type 20 struc |
| 3225 | } DMI_INFO; |
| 3226 | |
| 3227 | /********************************************************************** |
| 3228 | * Interface call: AllocateExecutionCache |
| 3229 | **********************************************************************/ |
| 3230 | #define MAX_CACHE_REGIONS 3 |
| 3231 | |
| 3232 | /// AllocateExecutionCache sub param structure for cached memory region |
| 3233 | typedef struct { |
| 3234 | IN OUT UINT32 ExeCacheStartAddr; ///< Start address |
| 3235 | IN OUT UINT32 ExeCacheSize; ///< Size |
| 3236 | } EXECUTION_CACHE_REGION; |
| 3237 | |
| 3238 | /********************************************************************** |
| 3239 | * Interface call: AmdGetAvailableExeCacheSize |
| 3240 | **********************************************************************/ |
| 3241 | /// Get available Cache remain |
| 3242 | typedef struct { |
| 3243 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3244 | OUT UINT32 AvailableExeCacheSize; ///< Remain size |
| 3245 | } AMD_GET_EXE_SIZE_PARAMS; |
| 3246 | |
| 3247 | AGESA_STATUS |
| 3248 | AmdGetAvailableExeCacheSize ( |
| 3249 | IN OUT AMD_GET_EXE_SIZE_PARAMS *AmdGetExeSizeParams |
| 3250 | ); |
| 3251 | |
| 3252 | /// Selection type for core leveling |
| 3253 | typedef enum { |
| 3254 | CORE_LEVEL_LOWEST, ///< Level to lowest common denominator |
| 3255 | CORE_LEVEL_TWO, ///< Level to 2 cores |
| 3256 | CORE_LEVEL_POWER_OF_TWO, ///< Level to 1,2,4 or 8 |
| 3257 | CORE_LEVEL_NONE, ///< Do no leveling |
| 3258 | CORE_LEVEL_COMPUTE_UNIT, ///< Level cores to one core per compute unit |
| 3259 | CORE_LEVEL_COMPUTE_UNIT_TWO, ///< Level cores to two cores per compute unit |
| 3260 | CORE_LEVEL_COMPUTE_UNIT_THREE, ///< Level cores to three cores per compute unit |
| 3261 | CORE_LEVEL_ONE, ///< Level to 1 core |
| 3262 | CORE_LEVEL_THREE, ///< Level to 3 cores |
| 3263 | CORE_LEVEL_FOUR, ///< Level to 4 cores |
| 3264 | CORE_LEVEL_FIVE, ///< Level to 5 cores |
| 3265 | CORE_LEVEL_SIX, ///< Level to 6 cores |
| 3266 | CORE_LEVEL_SEVEN, ///< Level to 7 cores |
| 3267 | CORE_LEVEL_EIGHT, ///< Level to 8 cores |
| 3268 | CORE_LEVEL_NINE, ///< Level to 9 cores |
| 3269 | CORE_LEVEL_TEN, ///< Level to 10 cores |
| 3270 | CORE_LEVEL_ELEVEN, ///< Level to 11 cores |
| 3271 | CORE_LEVEL_TWELVE, ///< Level to 12 cores |
| 3272 | CORE_LEVEL_THIRTEEN, ///< Level to 13 cores |
| 3273 | CORE_LEVEL_FOURTEEN, ///< Level to 14 cores |
| 3274 | CORE_LEVEL_FIFTEEN, ///< Level to 15 cores |
| 3275 | CoreLevelModeMax ///< Used for bounds checking |
| 3276 | } CORE_LEVELING_TYPE; |
| 3277 | |
| 3278 | |
| 3279 | |
| 3280 | |
| 3281 | |
| 3282 | /************************************************************************ |
| 3283 | * |
| 3284 | * AGESA Basic Level interface structure definition and function prototypes |
| 3285 | * |
| 3286 | ***********************************************************************/ |
| 3287 | |
| 3288 | /********************************************************************** |
| 3289 | * Interface call: AmdCreateStruct |
| 3290 | **********************************************************************/ |
| 3291 | AGESA_STATUS |
| 3292 | AmdCreateStruct ( |
| 3293 | IN OUT AMD_INTERFACE_PARAMS *InterfaceParams |
| 3294 | ); |
| 3295 | |
| 3296 | /********************************************************************** |
| 3297 | * Interface call: AmdReleaseStruct |
| 3298 | **********************************************************************/ |
| 3299 | AGESA_STATUS |
| 3300 | AmdReleaseStruct ( |
| 3301 | IN OUT AMD_INTERFACE_PARAMS *InterfaceParams |
| 3302 | ); |
| 3303 | |
| 3304 | /********************************************************************** |
| 3305 | * Interface call: AmdInitReset |
| 3306 | **********************************************************************/ |
| 3307 | /// AmdInitReset param structure |
| 3308 | typedef struct { |
| 3309 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3310 | IN EXECUTION_CACHE_REGION CacheRegion[3]; ///< The cached memory region |
| 3311 | IN FCH_RESET_INTERFACE FchInterface; ///< Interface for FCH configuration |
| 3312 | } AMD_RESET_PARAMS; |
| 3313 | |
| 3314 | AGESA_STATUS |
| 3315 | AmdInitReset ( |
| 3316 | IN OUT AMD_RESET_PARAMS *ResetParams |
| 3317 | ); |
| 3318 | |
| 3319 | |
| 3320 | /********************************************************************** |
| 3321 | * Interface call: AmdInitEarly |
| 3322 | **********************************************************************/ |
| 3323 | /// InitEarly param structure |
| 3324 | /// |
| 3325 | /// Provide defaults or customizations to each service performed in AmdInitEarly. |
| 3326 | /// |
| 3327 | typedef struct { |
| 3328 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3329 | IN EXECUTION_CACHE_REGION CacheRegion[3]; ///< Execution Map Interface |
| 3330 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3331 | IN GNB_CONFIGURATION GnbConfig; ///< GNB configuration |
| 3332 | } AMD_EARLY_PARAMS; |
| 3333 | |
| 3334 | AGESA_STATUS |
| 3335 | AmdInitEarly ( |
| 3336 | IN OUT AMD_EARLY_PARAMS *EarlyParams |
| 3337 | ); |
| 3338 | |
| 3339 | |
| 3340 | /********************************************************************** |
| 3341 | * Interface call: AmdInitPost |
| 3342 | **********************************************************************/ |
| 3343 | /// AmdInitPost param structure |
| 3344 | typedef struct { |
| 3345 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3346 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3347 | IN MEM_PARAMETER_STRUCT MemConfig; ///< Memory post param |
| 3348 | IN GNB_POST_CONFIGURATION GnbPostConfig; ///< GNB post param |
| 3349 | } AMD_POST_PARAMS; |
| 3350 | |
| 3351 | AGESA_STATUS |
| 3352 | AmdInitPost ( |
| 3353 | IN OUT AMD_POST_PARAMS *PostParams ///< Amd Cpu init param |
| 3354 | ); |
| 3355 | |
| 3356 | |
| 3357 | /********************************************************************** |
| 3358 | * Interface call: AmdInitEnv |
| 3359 | **********************************************************************/ |
| 3360 | /// AmdInitEnv param structure |
| 3361 | typedef struct { |
| 3362 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3363 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3364 | IN GNB_ENV_CONFIGURATION GnbEnvConfiguration; ///< GNB configuration |
| 3365 | IN FCH_INTERFACE FchInterface; ///< FCH configuration |
| 3366 | } AMD_ENV_PARAMS; |
| 3367 | |
| 3368 | AGESA_STATUS |
| 3369 | AmdInitEnv ( |
| 3370 | IN OUT AMD_ENV_PARAMS *EnvParams |
| 3371 | ); |
| 3372 | |
| 3373 | |
| 3374 | /********************************************************************** |
| 3375 | * Interface call: AmdInitMid |
| 3376 | **********************************************************************/ |
| 3377 | /// AmdInitMid param structure |
| 3378 | typedef struct { |
| 3379 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3380 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3381 | IN GNB_MID_CONFIGURATION GnbMidConfiguration; ///< GNB configuration |
| 3382 | IN FCH_INTERFACE FchInterface; ///< FCH configuration |
| 3383 | } AMD_MID_PARAMS; |
| 3384 | |
| 3385 | AGESA_STATUS |
| 3386 | AmdInitMid ( |
| 3387 | IN OUT AMD_MID_PARAMS *MidParams |
| 3388 | ); |
| 3389 | |
| 3390 | |
| 3391 | /********************************************************************** |
| 3392 | * Interface call: AmdInitLate |
| 3393 | **********************************************************************/ |
| 3394 | /// AmdInitLate param structure |
| 3395 | typedef struct { |
| 3396 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3397 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3398 | IN IOMMU_EXCLUSION_RANGE_DESCRIPTOR *IvrsExclusionRangeList; ///< Pointer to array of exclusion ranges |
| 3399 | OUT DMI_INFO *DmiTable; ///< DMI Interface |
| 3400 | OUT VOID *AcpiPState; ///< Acpi Pstate SSDT Table |
| 3401 | OUT VOID *AcpiSrat; ///< SRAT Table |
| 3402 | OUT VOID *AcpiSlit; ///< SLIT Table |
| 3403 | OUT VOID *AcpiWheaMce; ///< WHEA MCE Table |
| 3404 | OUT VOID *AcpiWheaCmc; ///< WHEA CMC Table |
| 3405 | OUT VOID *AcpiAlib; ///< ACPI SSDT table with ALIB implementation |
| 3406 | OUT VOID *AcpiIvrs; ///< IOMMU ACPI IVRS(I/O Virtualization Reporting Structure) table |
| 3407 | OUT VOID *AcpiCrat; ///< Component Resource Affinity Table table |
| 3408 | OUT VOID *AcpiCdit; ///< Component Locality Distance Information table |
| 3409 | IN GNB_LATE_CONFIGURATION GnbLateConfiguration; ///< GNB configuration |
| 3410 | } AMD_LATE_PARAMS; |
| 3411 | |
| 3412 | AGESA_STATUS |
| 3413 | AmdInitLate ( |
| 3414 | IN OUT AMD_LATE_PARAMS *LateParams |
| 3415 | ); |
| 3416 | |
| 3417 | /********************************************************************** |
| 3418 | * Interface call: AmdInitRecovery |
| 3419 | **********************************************************************/ |
| 3420 | /// CPU Recovery Parameters |
| 3421 | typedef struct { |
| 3422 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3423 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3424 | } AMD_CPU_RECOVERY_PARAMS; |
| 3425 | |
| 3426 | /// AmdInitRecovery param structure |
| 3427 | typedef struct { |
| 3428 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3429 | IN MEM_PARAMETER_STRUCT MemConfig; ///< Memory post param |
| 3430 | IN EXECUTION_CACHE_REGION CacheRegion[3]; ///< The cached memory region. And the max cache region is 3 |
| 3431 | IN AMD_CPU_RECOVERY_PARAMS CpuRecoveryParams; ///< Params for CPU related recovery init. |
| 3432 | } AMD_RECOVERY_PARAMS; |
| 3433 | |
| 3434 | AGESA_STATUS |
| 3435 | AmdInitRecovery ( |
| 3436 | IN OUT AMD_RECOVERY_PARAMS *RecoveryParams |
| 3437 | ); |
| 3438 | |
| 3439 | /********************************************************************** |
| 3440 | * Interface call: AmdInitResume |
| 3441 | **********************************************************************/ |
| 3442 | /// AmdInitResume param structure |
| 3443 | typedef struct { |
| 3444 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3445 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< Platform operational characteristics |
| 3446 | IN AMD_S3_PARAMS S3DataBlock; ///< Save state data |
| 3447 | } AMD_RESUME_PARAMS; |
| 3448 | |
| 3449 | AGESA_STATUS |
| 3450 | AmdInitResume ( |
| 3451 | IN AMD_RESUME_PARAMS *ResumeParams |
| 3452 | ); |
| 3453 | |
| 3454 | |
| 3455 | /********************************************************************** |
| 3456 | * Interface call: AmdS3LateRestore |
| 3457 | **********************************************************************/ |
| 3458 | /// AmdS3LateRestore param structure |
| 3459 | typedef struct { |
| 3460 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3461 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3462 | IN AMD_S3_PARAMS S3DataBlock; ///< Save state data |
| 3463 | } AMD_S3LATE_PARAMS; |
| 3464 | |
| 3465 | AGESA_STATUS |
| 3466 | AmdS3LateRestore ( |
| 3467 | IN OUT AMD_S3LATE_PARAMS *S3LateParams |
| 3468 | ); |
| 3469 | |
| 3470 | |
| 3471 | /********************************************************************** |
| 3472 | * Interface call: AmdS3Save |
| 3473 | **********************************************************************/ |
| 3474 | /// AmdS3Save param structure |
| 3475 | typedef struct { |
| 3476 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3477 | IN PLATFORM_CONFIGURATION PlatformConfig; ///< platform operational characteristics. |
| 3478 | OUT AMD_S3_PARAMS S3DataBlock; ///< Standard header |
| 3479 | IN FCH_INTERFACE FchInterface; ///< FCH configuration |
| 3480 | } AMD_S3SAVE_PARAMS; |
| 3481 | |
| 3482 | AGESA_STATUS |
| 3483 | AmdS3Save ( |
| 3484 | IN OUT AMD_S3SAVE_PARAMS *AmdS3SaveParams |
| 3485 | ); |
| 3486 | |
| 3487 | |
| 3488 | /********************************************************************** |
| 3489 | * Interface call: AmdLateRunApTask |
| 3490 | **********************************************************************/ |
| 3491 | /** |
| 3492 | * Entry point for AP tasking. |
| 3493 | */ |
| 3494 | AGESA_STATUS |
| 3495 | AmdLateRunApTask ( |
| 3496 | IN AP_EXE_PARAMS *AmdApExeParams |
| 3497 | ); |
| 3498 | |
| 3499 | // |
| 3500 | // General Services API |
| 3501 | // |
| 3502 | |
| 3503 | /********************************************************************** |
| 3504 | * Interface service call: AmdGetApicId |
| 3505 | **********************************************************************/ |
| 3506 | /// Request the APIC ID of a particular core. |
| 3507 | |
| 3508 | typedef struct { |
| 3509 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3510 | IN UINT8 Socket; ///< The Core's Socket. |
| 3511 | IN UINT8 Core; ///< The Core id. |
| 3512 | OUT BOOLEAN IsPresent; ///< The Core is present, and ApicAddress is valid. |
| 3513 | OUT UINT8 ApicAddress; ///< The Core's APIC ID. |
| 3514 | } AMD_APIC_PARAMS; |
| 3515 | |
| 3516 | /** |
| 3517 | * Get a specified Core's APIC ID. |
| 3518 | */ |
| 3519 | AGESA_STATUS |
| 3520 | AmdGetApicId ( |
| 3521 | IN OUT AMD_APIC_PARAMS *AmdParamApic |
| 3522 | ); |
| 3523 | |
| 3524 | /********************************************************************** |
| 3525 | * Interface service call: AmdGetPciAddress |
| 3526 | **********************************************************************/ |
| 3527 | /// Request the PCI Address of a Processor Module (that is, its Northbridge) |
| 3528 | |
| 3529 | typedef struct { |
| 3530 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3531 | IN UINT8 Socket; ///< The Processor's socket |
| 3532 | IN UINT8 Module; ///< The Module in that Processor |
| 3533 | OUT BOOLEAN IsPresent; ///< The Core is present, and PciAddress is valid. |
| 3534 | OUT PCI_ADDR PciAddress; ///< The Processor's PCI Config Space address (Function 0, Register 0) |
| 3535 | } AMD_GET_PCI_PARAMS; |
| 3536 | |
| 3537 | /** |
| 3538 | * Get Processor Module's PCI Config Space address. |
| 3539 | */ |
| 3540 | AGESA_STATUS |
| 3541 | AmdGetPciAddress ( |
| 3542 | IN OUT AMD_GET_PCI_PARAMS *AmdParamGetPci |
| 3543 | ); |
| 3544 | |
| 3545 | /********************************************************************** |
| 3546 | * Interface service call: AmdIdentifyCore |
| 3547 | **********************************************************************/ |
| 3548 | /// Request the identity (Socket, Module, Core) of the current Processor Core |
| 3549 | |
| 3550 | typedef struct { |
| 3551 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3552 | OUT UINT8 Socket; ///< The current Core's Socket |
| 3553 | OUT UINT8 Module; ///< The current Core's Processor Module |
| 3554 | OUT UINT8 Core; ///< The current Core's core id. |
| 3555 | } AMD_IDENTIFY_PARAMS; |
| 3556 | |
| 3557 | /** |
| 3558 | * "Who am I" for the current running core. |
| 3559 | */ |
| 3560 | AGESA_STATUS |
| 3561 | AmdIdentifyCore ( |
| 3562 | IN OUT AMD_IDENTIFY_PARAMS *AmdParamIdentify |
| 3563 | ); |
| 3564 | |
| 3565 | /********************************************************************** |
| 3566 | * Interface service call: AmdReadEventLog |
| 3567 | **********************************************************************/ |
| 3568 | /// An Event Log Entry. |
| 3569 | typedef struct { |
| 3570 | IN AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3571 | OUT UINT32 EventClass; ///< The severity of this event, matches AGESA_STATUS. |
| 3572 | OUT UINT32 EventInfo; ///< The unique event identifier, zero means "no event". |
| 3573 | OUT UINT32 DataParam1; ///< Data specific to the Event. |
| 3574 | OUT UINT32 DataParam2; ///< Data specific to the Event. |
| 3575 | OUT UINT32 DataParam3; ///< Data specific to the Event. |
| 3576 | OUT UINT32 DataParam4; ///< Data specific to the Event. |
| 3577 | } EVENT_PARAMS; |
| 3578 | |
| 3579 | /** |
| 3580 | * Read an Event from the Event Log. |
| 3581 | */ |
| 3582 | AGESA_STATUS |
| 3583 | AmdReadEventLog ( |
| 3584 | IN EVENT_PARAMS *Event |
| 3585 | ); |
| 3586 | |
| 3587 | /********************************************************************** |
| 3588 | * Interface service call: AmdIdentifyDimm |
| 3589 | **********************************************************************/ |
| 3590 | /// Request the identity of dimm from system address |
| 3591 | |
| 3592 | typedef struct { |
| 3593 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3594 | IN UINT64 MemoryAddress; ///< System Address that needs to be translated to dimm identification. |
| 3595 | OUT UINT8 SocketId; ///< The socket on which the targeted address locates. |
| 3596 | OUT UINT8 MemChannelId; ///< The channel on which the targeted address locates. |
| 3597 | OUT UINT8 DimmId; ///< The dimm on which the targeted address locates. |
| 3598 | OUT UINT8 ChipSelect; ///< The chip select on which the targeted address locates. |
| 3599 | OUT UINT8 Bank; ///< The Bank for which the error address resides |
| 3600 | OUT UINT32 Row; ///< The Row for which the error address resides |
| 3601 | OUT UINT16 Column; ///< The Column for which the error address resides |
| 3602 | } AMD_IDENTIFY_DIMM; |
| 3603 | |
| 3604 | /** |
| 3605 | * Get the dimm identification for the address. |
| 3606 | */ |
| 3607 | AGESA_STATUS |
| 3608 | AmdIdentifyDimm ( |
| 3609 | IN OUT AMD_IDENTIFY_DIMM *AmdDimmIdentify |
| 3610 | ); |
| 3611 | |
| 3612 | AGESA_STATUS |
| 3613 | AmdIdsRunApTaskLate ( |
| 3614 | IN AP_EXE_PARAMS *AmdApExeParams |
| 3615 | ); |
| 3616 | |
| 3617 | /// Request the 2D Data Eye Training Data |
| 3618 | #define RD_DATAEYE 0 |
| 3619 | #define WR_DATAEYE 1 |
| 3620 | |
| 3621 | /********************************************************************** |
| 3622 | * Interface service call: AmdGet2DDataEye |
| 3623 | **********************************************************************/ |
| 3624 | /// Request the training data eye on Socket, Channel, Dimm. |
| 3625 | |
| 3626 | typedef struct _AMD_GET_DATAEYE { |
| 3627 | IN OUT AMD_CONFIG_PARAMS StdHeader; ///< Standard configuration header |
| 3628 | IN OUT AMD_POST_PARAMS *PostParamsPtr; ///< Pointer to AMD_POST_PARAMS |
| 3629 | IN UINT8 SocketId; ///< The socket number to get the 2D data eye |
| 3630 | IN UINT8 MemChannelId; ///< The channel number to get the 2D data eye |
| 3631 | IN UINT8 DimmId; ///< The dimm number to get the 2D data eye |
| 3632 | IN UINT8 DataEyeType; ///< Get the 2D data eye on read or write training |
| 3633 | OUT UINT8* DataEyeBuffer; ///< The buffer to stores the 2D data eye |
| 3634 | } AMD_GET_DATAEYE; |
| 3635 | |
| 3636 | AGESA_STATUS |
| 3637 | AmdGet2DDataEye ( |
| 3638 | IN OUT AMD_GET_DATAEYE *AmdGetDataEye |
| 3639 | ); |
| 3640 | |
| 3641 | #define AGESA_IDS_DFT_VAL 0xFFFF ///< Default value of every uninitlized NV item, the action for it will be ignored |
| 3642 | #define AGESA_IDS_NV_END 0xFFFF ///< Flag specify end of option structure |
| 3643 | /// WARNING: Don't change the comment below, it used as signature for script |
| 3644 | /// AGESA IDS NV ID Definitions |
| 3645 | typedef enum { |
| 3646 | AGESA_IDS_EXT_ID_START = 0x0000,///< 0x0000 specify the start of external NV id |
| 3647 | |
| 3648 | AGESA_IDS_NV_UCODE, ///< 0x0001 Enable or disable microcode patching |
| 3649 | |
| 3650 | AGESA_IDS_NV_TARGET_PSTATE, ///< 0x0002 Set the P-state required to be activated |
| 3651 | AGESA_IDS_NV_POSTPSTATE, ///< 0x0003 Set the P-state required to be activated through POST |
| 3652 | |
| 3653 | AGESA_IDS_NV_BANK_INTERLEAVE, ///< 0x0004 Enable or disable Bank Interleave |
| 3654 | AGESA_IDS_NV_CHANNEL_INTERLEAVE, ///< 0x0005 Enable or disable Channel Interleave |
| 3655 | AGESA_IDS_NV_NODE_INTERLEAVE, ///< 0x0006 Enable or disable Node Interleave |
| 3656 | AGESA_IDS_NV_MEMHOLE, ///< 0x0007 Enables or disable memory hole |
| 3657 | |
| 3658 | AGESA_IDS_NV_SCRUB_REDIRECTION, ///< 0x0008 Enable or disable a write to dram with corrected data |
| 3659 | AGESA_IDS_NV_DRAM_SCRUB, ///< 0x0009 Set the rate of background scrubbing for DRAM |
| 3660 | AGESA_IDS_NV_DCACHE_SCRUB, ///< 0x000A Set the rate of background scrubbing for the DCache. |
| 3661 | AGESA_IDS_NV_L2_SCRUB, ///< 0x000B Set the rate of background scrubbing for the L2 cache |
| 3662 | AGESA_IDS_NV_L3_SCRUB, ///< 0x000C Set the rate of background scrubbing for the L3 cache |
| 3663 | AGESA_IDS_NV_ICACHE_SCRUB, ///< 0x000D Set the rate of background scrubbing for the Icache |
| 3664 | AGESA_IDS_NV_SYNC_ON_ECC_ERROR, ///< 0x000E Enable or disable the sync flood on un-correctable ECC error |
| 3665 | AGESA_IDS_NV_ECC_SYMBOL_SIZE, ///< 0x000F Set ECC symbol size |
| 3666 | |
| 3667 | AGESA_IDS_NV_ALL_MEMCLKS, ///< 0x0010 Enable or disable all memory clocks enable |
| 3668 | AGESA_IDS_NV_DCT_GANGING_MODE, ///< 0x0011 Set the Ganged mode |
| 3669 | AGESA_IDS_NV_DRAM_BURST_LENGTH32, ///< 0x0012 Set the DRAM Burst Length 32 |
| 3670 | AGESA_IDS_NV_MEMORY_POWER_DOWN, ///< 0x0013 Enable or disable Memory power down mode |
| 3671 | AGESA_IDS_NV_MEMORY_POWER_DOWN_MODE, ///< 0x0014 Set the Memory power down mode |
| 3672 | AGESA_IDS_NV_DLL_SHUT_DOWN, ///< 0x0015 Enable or disable DLLShutdown |
| 3673 | AGESA_IDS_NV_ONLINE_SPARE, ///< 0x0016 Enable or disable the Dram controller to designate a DIMM bank as a spare for logical swap |
| 3674 | |
| 3675 | AGESA_IDS_NV_HDTOUT, ///< 0x0017 Enable or disable HDTOUT feature |
| 3676 | |
| 3677 | AGESA_IDS_NV_GNBHDAUDIOEN, ///< 0x0018 Enable or disable GNB HD Audio |
| 3678 | |
| 3679 | AGESA_IDS_NV_CPB_EN, ///< 0x0019 Core Performance Boost |
| 3680 | |
| 3681 | AGESA_IDS_NV_HTC_EN, ///< 0x001A HTC Enable |
| 3682 | AGESA_IDS_NV_HTC_OVERRIDE, ///< 0x001B HTC Override |
| 3683 | AGESA_IDS_NV_HTC_PSTATE_LIMIT, ///< 0x001C HTC P-state limit select |
| 3684 | AGESA_IDS_NV_HTC_TEMP_HYS, ///< 0x001D HTC Temperature Hysteresis |
| 3685 | AGESA_IDS_NV_HTC_ACT_TEMP, ///< 0x001E HTC Activation Temp |
| 3686 | |
| 3687 | AGESA_IDS_NV_POWER_POLICY, ///< 0x001F Select Platform Power Policy |
| 3688 | AGESA_IDS_NV_DRAMCON, ///< 0x0020 Specify the mode for controller initialization |
| 3689 | AGESA_IDS_EXT_ID_END, ///< 0x0021 specify the end of external NV ID |
| 3690 | } IDS_EX_NV_ID; |
| 3691 | |
| 3692 | |
| 3693 | #define IDS_NUM_EXT_NV_ITEM (AGESA_IDS_EXT_ID_END - AGESA_IDS_EXT_ID_START + 1) |
| 3694 | |
| 3695 | |
| 3696 | #endif // _AGESA_H_ |