Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 1 | /* $NoKeywords:$ */ |
| 2 | /** |
| 3 | * @file |
| 4 | * |
| 5 | * FCH routine definition |
| 6 | * |
| 7 | * |
| 8 | * |
| 9 | * @xrefitem bom "File Content Label" "Release Content" |
| 10 | * @e project: AGESA |
| 11 | * @e sub-project: FCH |
| 12 | * @e \$Revision: 84150 $ @e \$Date: 2012-12-12 15:46:25 -0600 (Wed, 12 Dec 2012) $ |
| 13 | * |
| 14 | */ |
| 15 | /* |
| 16 | ***************************************************************************** |
| 17 | * |
| 18 | * Copyright (c) 2008 - 2013, 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 | #ifndef _FCH_DEF_H_ |
| 45 | #define _FCH_DEF_H_ |
| 46 | |
| 47 | |
| 48 | UINT32 ReadAlink (IN UINT32 Index, IN AMD_CONFIG_PARAMS *StdHeader); |
| 49 | VOID WriteAlink (IN UINT32 Index, IN UINT32 Data, IN AMD_CONFIG_PARAMS *StdHeader); |
| 50 | VOID RwAlink (IN UINT32 Index, IN UINT32 AndMask, IN UINT32 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 51 | VOID ReadMem (IN UINT32 Address, IN UINT8 OpFlag, IN VOID *ValuePtr); |
| 52 | VOID WriteMem (IN UINT32 Address, IN UINT8 OpFlag, IN VOID *ValuePtr); |
| 53 | VOID RwMem (IN UINT32 Address, IN UINT8 OpFlag, IN UINT32 Mask, IN UINT32 Data); |
| 54 | VOID ReadPci (IN UINT32 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 55 | VOID WritePci (IN UINT32 Address, IN UINT8 OpFlag, CONST IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 56 | VOID RwPci (IN UINT32 Address, IN UINT8 OpFlag, IN UINT32 Mask, IN UINT32 Data, IN AMD_CONFIG_PARAMS *StdHeader); |
| 57 | VOID ProgramPciByteTable (IN REG8_MASK* pPciByteTable, IN UINT16 dwTableSize, IN AMD_CONFIG_PARAMS *StdHeader); |
| 58 | VOID ProgramFchAcpiMmioTbl (IN ACPI_REG_WRITE *pAcpiTbl, IN AMD_CONFIG_PARAMS *StdHeader); |
| 59 | VOID ProgramFchSciMapTbl (IN SCI_MAP_CONTROL *pSciMapTbl, IN FCH_RESET_DATA_BLOCK *FchResetDataBlock); |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 60 | VOID ProgramFchGpioTbl (CONST IN GPIO_CONTROL *pGpioTbl, IN FCH_RESET_DATA_BLOCK *FchResetDataBlock); |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 61 | VOID ProgramFchSataPhyTbl (IN SATA_PHY_CONTROL *pSataPhyTbl, IN FCH_RESET_DATA_BLOCK *FchResetDataBlock); |
| 62 | VOID GetChipSysMode (IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 63 | BOOLEAN IsImcEnabled (IN AMD_CONFIG_PARAMS *StdHeader); |
| 64 | VOID ReadPmio (IN UINT8 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 65 | VOID WritePmio (IN UINT8 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 66 | VOID RwPmio (IN UINT8 Address, IN UINT8 OpFlag, IN UINT32 AndMask, IN UINT32 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 67 | VOID ReadPmio2 (IN UINT8 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 68 | VOID WritePmio2 (IN UINT8 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 69 | VOID RwPmio2 (IN UINT8 Address, IN UINT8 OpFlag, IN UINT32 AndMask, IN UINT32 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 70 | VOID ReadBiosram (IN UINT8 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 71 | VOID WriteBiosram (IN UINT8 Address, IN UINT8 OpFlag, IN VOID *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 72 | VOID GetFchAcpiMmioBase (OUT UINT32 *AcpiMmioBase, IN AMD_CONFIG_PARAMS *StdHeader); |
| 73 | VOID GetFchAcpiPmBase (OUT UINT16 *AcpiPmBase, IN AMD_CONFIG_PARAMS *StdHeader); |
| 74 | UINT8 ReadFchSleepType (IN AMD_CONFIG_PARAMS *StdHeader); |
| 75 | |
| 76 | /// |
| 77 | /// Fch Ab Routines |
| 78 | /// |
| 79 | /// Pei Phase |
| 80 | /// |
| 81 | VOID FchInitResetAb (IN VOID* FchDataPtr); |
| 82 | VOID FchProgramAbPowerOnReset (IN VOID* FchDataPtr); |
| 83 | /// |
| 84 | /// Dxe Phase |
| 85 | /// |
| 86 | VOID FchInitEnvAb (IN VOID* FchDataPtr); |
| 87 | VOID FchInitEnvAbSpecial (IN VOID* FchDataPtr); |
| 88 | VOID FchInitMidAb (IN VOID* FchDataPtr); |
| 89 | VOID FchInitLateAb (IN VOID* FchDataPtr); |
| 90 | /// |
| 91 | /// Other Public Routines |
| 92 | /// |
| 93 | VOID FchInitEnvAbLinkInit (IN VOID* FchDataPtr); |
| 94 | BOOLEAN IsUmiOneLaneGen1Mode (IN AMD_CONFIG_PARAMS *StdHeader); |
| 95 | VOID FchAbLateProgram (IN VOID* FchDataPtr); |
| 96 | |
| 97 | /// |
| 98 | /// Fch Pcie Routines |
| 99 | /// |
| 100 | /// Pei Phase |
| 101 | /// |
| 102 | VOID FchInitResetPcie (IN VOID* FchDataPtr); |
| 103 | /// |
| 104 | /// Dxe Phase |
| 105 | /// |
| 106 | VOID FchInitEnvPcie (IN VOID* FchDataPtr); |
| 107 | VOID FchInitMidPcie (IN VOID* FchDataPtr); |
| 108 | VOID FchInitLatePcie (IN VOID* FchDataPtr); |
| 109 | VOID ProgramPcieNativeMode (IN VOID* FchDataPtr); |
| 110 | |
| 111 | /// |
| 112 | /// Fch Gpp Routines |
| 113 | /// |
| 114 | /// Pei Phase |
| 115 | /// |
| 116 | VOID FchInitResetGpp (IN VOID* FchDataPtr); |
| 117 | VOID ProgramFchGppInitReset (IN FCH_GPP *FchGpp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 118 | VOID FchResetPcie (IN RESET_BLOCK ResetBlock, IN RESET_OP ResetOp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 119 | |
| 120 | /// |
| 121 | /// Dxe Phase |
| 122 | /// |
| 123 | VOID FchInitEnvGpp (IN VOID* FchDataPtr); |
| 124 | VOID FchInitMidGpp (IN VOID* FchDataPtr); |
| 125 | VOID FchInitLateGpp (IN VOID* FchDataPtr); |
| 126 | |
| 127 | /// |
| 128 | /// Common Gpp Routines |
| 129 | /// |
| 130 | VOID ProgramGppTogglePcieReset (IN BOOLEAN DoToggling, IN AMD_CONFIG_PARAMS *StdHeader); |
| 131 | VOID FchGppForceGen1 (IN FCH_GPP *FchGpp, IN CONST UINT8 ActivePorts, IN AMD_CONFIG_PARAMS *StdHeader); |
| 132 | VOID FchGppForceGen2 (IN FCH_GPP *FchGpp, IN CONST UINT8 ActivePorts, IN AMD_CONFIG_PARAMS *StdHeader); |
| 133 | VOID FchGppDynamicPowerSaving (IN FCH_GPP *FchGpp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 134 | UINT8 GppPortPollingLtssm (IN FCH_GPP *FchGpp, IN UINT8 ActivePorts, IN BOOLEAN IsGen2, IN AMD_CONFIG_PARAMS *StdHeader); |
| 135 | VOID GppGen2Workaround (IN FCH_GPP *FchGpp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 136 | UINT8 FchFindPciCap (IN UINT32 PciAddress, IN UINT8 TargetCapId, IN AMD_CONFIG_PARAMS *StdHeader); |
| 137 | VOID FchGppPortInit (IN FCH_GPP *FchGpp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 138 | VOID FchGppPortInitPhaseII (IN FCH_GPP *FchGpp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 139 | VOID FchGppPortInitS3Phase (IN FCH_GPP *FchGpp, IN AMD_CONFIG_PARAMS *StdHeader); |
| 140 | UINT32 GppGetFchTempBus (IN AMD_CONFIG_PARAMS *StdHeader); |
| 141 | |
| 142 | /// |
| 143 | /// Fch Azalia Routines |
| 144 | /// |
| 145 | /// Pei Phase |
| 146 | /// |
| 147 | VOID FchInitResetF1 (IN VOID *FchDataPtr); |
| 148 | /// |
| 149 | /// Dxe Phase |
| 150 | /// |
| 151 | VOID FchInitEnvAzalia (IN VOID *FchDataPtr); |
| 152 | VOID FchInitMidAzalia (IN VOID *FchDataPtr); |
| 153 | VOID FchInitLateAzalia (IN VOID *FchDataPtr); |
| 154 | |
| 155 | |
| 156 | /// Other Public Routines |
| 157 | /// |
| 158 | VOID FchInitGecController (IN VOID* FchDataPtr); |
| 159 | VOID FchSwInitGecBootRom (IN VOID* FchDataPtr); |
| 160 | |
| 161 | /// |
| 162 | /// Fch HwAcpi Routines |
| 163 | /// |
| 164 | /// Pei Phase |
| 165 | /// |
| 166 | VOID FchInitResetHwAcpiP (IN VOID *FchDataPtr); |
| 167 | VOID FchInitResetHwAcpi (IN VOID *FchDataPtr); |
| 168 | VOID ProgramFchHwAcpiResetP (IN VOID *FchDataPtr); |
| 169 | /// |
| 170 | /// Dxe Phase |
| 171 | /// |
| 172 | VOID FchInitEnvHwAcpiP (IN VOID *FchDataPtr); |
| 173 | VOID FchInitEnvHwAcpi (IN VOID *FchDataPtr); |
| 174 | VOID ProgramEnvPFchAcpiMmio (IN VOID *FchDataPtr); |
| 175 | VOID ProgramFchEnvHwAcpiPciReg (IN VOID *FchDataPtr); |
| 176 | VOID ProgramSpecificFchInitEnvAcpiMmio (IN VOID *FchDataPtr); |
| 177 | VOID ProgramFchEnvSpreadSpectrum (IN VOID *FchDataPtr); |
| 178 | VOID FchInitMidHwAcpi (IN VOID *FchDataPtr); |
| 179 | VOID FchInitLateHwAcpi (IN VOID *FchDataPtr); |
| 180 | |
| 181 | /// |
| 182 | /// Other Public Routines |
| 183 | /// |
| 184 | VOID HpetInit (IN VOID *FchDataPtr); |
| 185 | VOID C3PopupSetting (IN VOID *FchDataPtr); |
| 186 | VOID MtC1eEnable (IN VOID *FchDataPtr); |
| 187 | VOID GcpuRelatedSetting (IN VOID *FchDataPtr); |
| 188 | VOID StressResetModeLate (IN VOID *FchDataPtr); |
| 189 | |
| 190 | /// |
| 191 | /// Fch Hwm Routines |
| 192 | /// |
| 193 | /// Pei Phase |
| 194 | /// |
| 195 | /// |
| 196 | /// Dxe Phase |
| 197 | /// |
| 198 | /// |
| 199 | /// Other Public Routines |
| 200 | /// |
| 201 | VOID HwmInitRegister (IN VOID* FchDataPtr); |
| 202 | VOID FchECfancontrolservice (IN VOID* FchDataPtr); |
| 203 | |
| 204 | |
| 205 | /// |
| 206 | /// Fch Ide Routines |
| 207 | /// |
| 208 | VOID FchInitEnvIde (IN VOID* FchDataPtr); |
| 209 | VOID FchInitMidIde (IN VOID* FchDataPtr); |
| 210 | VOID FchInitLateIde (IN VOID* FchDataPtr); |
| 211 | |
| 212 | |
| 213 | /// |
| 214 | /// Fch Imc Routines |
| 215 | /// |
| 216 | /// Pei Phase |
| 217 | /// |
| 218 | VOID FchInitResetImc (IN VOID *FchDataPtr); |
| 219 | /// |
| 220 | /// Dxe Phase |
| 221 | /// |
| 222 | VOID FchInitEnvImc (IN VOID *FchDataPtr); |
| 223 | VOID FchInitMidImc (IN VOID *FchDataPtr); |
| 224 | VOID FchInitLateImc (IN VOID *FchDataPtr); |
| 225 | VOID FchInitEnvEc (IN VOID *FchDataPtr); |
| 226 | VOID FchInitMidEc (IN VOID *FchDataPtr); |
| 227 | VOID FchInitLateEc (IN VOID *FchDataPtr); |
| 228 | /// |
| 229 | /// Other Public Routines |
| 230 | /// |
| 231 | VOID EnterEcConfig (IN AMD_CONFIG_PARAMS *StdHeader); |
| 232 | VOID ExitEcConfig (IN AMD_CONFIG_PARAMS *StdHeader); |
| 233 | VOID ReadEc8 (IN UINT8 Address, IN UINT8* Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 234 | VOID WriteEc8 (IN UINT8 Address, IN UINT8* Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 235 | VOID RwEc8 (IN UINT8 Address, IN UINT8 AndMask, IN UINT8 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 236 | VOID WriteECmsg (IN UINT8 Address, IN UINT8 OpFlag, IN VOID* Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 237 | VOID ReadECmsg (IN UINT8 Address, IN UINT8 OpFlag, OUT VOID* Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 238 | VOID WaitForEcLDN9MailboxCmdAck (IN AMD_CONFIG_PARAMS *StdHeader); |
| 239 | |
| 240 | VOID ImcSleep (IN VOID *FchDataPtr); |
| 241 | VOID ImcEnableSurebootTimer (IN VOID *FchDataPtr); |
| 242 | VOID ImcDisarmSurebootTimer (IN VOID *FchDataPtr); |
| 243 | VOID ImcDisableSurebootTimer (IN VOID *FchDataPtr); |
| 244 | VOID ImcWakeup (IN VOID *FchDataPtr); |
| 245 | VOID ImcIdle (IN VOID *FchDataPtr); |
| 246 | BOOLEAN ValidateImcFirmware (IN VOID *FchDataPtr); |
| 247 | VOID SoftwareToggleImcStrapping (IN VOID *FchDataPtr); |
WANG Siyuan | 7b6d412 | 2013-07-31 16:55:26 +0800 | [diff] [blame] | 248 | VOID SoftwareDisableImc (IN VOID *FchDataPtr); |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 249 | |
| 250 | |
| 251 | /// |
| 252 | /// Fch Ir Routines |
| 253 | /// |
| 254 | /// Dxe Phase |
| 255 | /// |
| 256 | |
| 257 | /// |
| 258 | /// Fch Pcib Routines |
| 259 | /// |
| 260 | /// Pei Phase |
| 261 | /// |
| 262 | VOID FchInitResetPcib (IN VOID* FchDataPtr); |
| 263 | VOID FchInitResetPcibPort80Enable (IN VOID* FchDataPtr); |
| 264 | |
| 265 | |
| 266 | |
| 267 | /// |
| 268 | /// Fch SATA Routines |
| 269 | /// |
| 270 | /// Pei Phase |
| 271 | /// |
| 272 | VOID FchInitResetSata (IN VOID *FchDataPtr); |
| 273 | VOID FchInitResetSataProgram (IN VOID *FchDataPtr); |
| 274 | /// |
| 275 | /// Dxe Phase |
| 276 | /// |
| 277 | VOID FchInitMidSata (IN VOID *FchDataPtr); |
| 278 | VOID FchInitEnvSata (IN VOID *FchDataPtr); |
| 279 | VOID FchInitEnvProgramSataPciRegs (IN VOID *FchDataPtr); |
| 280 | VOID FchInitMidProgramSataRegs (IN VOID *FchDataPtr); |
| 281 | VOID FchInitLateProgramSataRegs (IN VOID *FchDataPtr); |
| 282 | |
| 283 | VOID FchInitLateSata (IN VOID *FchDataPtr); |
| 284 | VOID FchInitEnvSataIde (IN VOID *FchDataPtr); |
| 285 | VOID FchInitMidSataIde (IN VOID *FchDataPtr); |
| 286 | VOID FchInitLateSataIde (IN VOID *FchDataPtr); |
| 287 | VOID FchInitEnvSataAhci (IN VOID *FchDataPtr); |
| 288 | VOID FchInitMidSataAhci (IN VOID *FchDataPtr); |
| 289 | VOID FchInitLateSataAhci (IN VOID *FchDataPtr); |
| 290 | VOID FchInitEnvSataRaid (IN VOID *FchDataPtr); |
| 291 | VOID FchInitMidSataRaid (IN VOID *FchDataPtr); |
| 292 | VOID FchInitLateSataRaid (IN VOID *FchDataPtr); |
| 293 | VOID FchInitEnvSataIde2Ahci (IN VOID *FchDataPtr); |
| 294 | VOID FchInitMidSataIde2Ahci (IN VOID *FchDataPtr); |
| 295 | VOID FchInitLateSataIde2Ahci (IN VOID *FchDataPtr); |
| 296 | |
| 297 | VOID SataAhciSetDeviceNumMsi (IN VOID *FchDataPtr); |
| 298 | VOID SataRaidSetDeviceNumMsi (IN VOID *FchDataPtr); |
| 299 | VOID SataIde2AhciSetDeviceNumMsi (IN VOID *FchDataPtr); |
| 300 | VOID SataSetIrqIntResource (IN VOID *FchDataPtr, IN AMD_CONFIG_PARAMS *StdHeader); |
| 301 | VOID SataBar5setting (IN VOID *FchDataPtr, IN UINT32 *Bar5Ptr); |
| 302 | VOID SataEnableWriteAccess (IN AMD_CONFIG_PARAMS *StdHeader); |
| 303 | VOID SataDisableWriteAccess (IN AMD_CONFIG_PARAMS *StdHeader); |
| 304 | VOID SataSetDeviceNumMsi (IN VOID *FchDataPtr); |
| 305 | VOID FchSataSetDeviceNumMsi (IN VOID *FchDataPtr); |
| 306 | VOID ShutdownUnconnectedSataPortClock (IN VOID *FchDataPtr, IN UINT32 Bar5); |
| 307 | VOID FchShutdownUnconnectedSataPortClock (IN VOID *FchDataPtr, IN UINT32 Bar5); |
| 308 | VOID SataDriveDetection (IN VOID *FchDataPtr, IN UINT32 *Bar5Ptr); |
| 309 | VOID FchSataDriveDetection (IN VOID *FchDataPtr, IN UINT32 *Bar5Ptr); |
| 310 | VOID FchSataGpioInitial (IN VOID *FchDataPtr); |
| 311 | VOID SataBar5RegSet (IN VOID *FchDataPtr); |
| 312 | VOID SataSetPortGenMode (IN VOID *FchDataPtr); |
| 313 | VOID FchSataSetPortGenMode (IN VOID *FchDataPtr); |
| 314 | VOID FchProgramSataPhy (IN AMD_CONFIG_PARAMS *StdHeader); |
| 315 | VOID FchSataDriveFpga (IN VOID *FchDataPtr); |
| 316 | |
| 317 | /// |
| 318 | /// FCH USB Controller Public Function |
| 319 | /// |
| 320 | /// Pei Phase |
| 321 | /// |
| 322 | VOID FchInitResetUsb (IN VOID *FchDataPtr); |
| 323 | VOID FchInitResetOhci (IN VOID *FchDataPtr); |
| 324 | VOID FchInitResetEhci (IN VOID *FchDataPtr); |
| 325 | VOID FchInitResetXhci (IN VOID *FchDataPtr); |
| 326 | VOID FchInitResetXhciProgram (IN VOID *FchDataPtr); |
| 327 | /// |
| 328 | /// Dxe Phase |
| 329 | /// |
| 330 | VOID FchInitEnvUsb (IN VOID *FchDataPtr); |
| 331 | VOID FchInitMidUsb (IN VOID *FchDataPtr); |
| 332 | VOID FchInitLateUsb (IN VOID *FchDataPtr); |
| 333 | VOID FchInitEnvUsbOhci (IN VOID *FchDataPtr); |
| 334 | VOID FchInitMidUsbOhci (IN VOID *FchDataPtr); |
| 335 | VOID FchInitLateUsbOhci (IN VOID *FchDataPtr); |
| 336 | VOID FchInitEnvUsbEhci (IN VOID *FchDataPtr); |
| 337 | VOID FchInitMidUsbEhci (IN VOID *FchDataPtr); |
| 338 | VOID FchInitLateUsbEhci (IN VOID *FchDataPtr); |
| 339 | VOID FchInitEnvUsbXhci (IN VOID *FchDataPtr); |
| 340 | VOID FchInitMidUsbXhci (IN VOID *FchDataPtr); |
| 341 | VOID FchInitLateUsbXhci (IN VOID *FchDataPtr); |
| 342 | VOID FchInitMidUsbOhci1 (IN VOID *FchDataPtr); |
| 343 | VOID FchInitMidUsbOhci2 (IN VOID *FchDataPtr); |
| 344 | VOID FchInitMidUsbOhci3 (IN VOID *FchDataPtr); |
| 345 | VOID FchInitMidUsbOhci4 (IN VOID *FchDataPtr); |
| 346 | VOID FchInitMidUsbEhci1 (IN FCH_DATA_BLOCK *FchDataPtr); |
| 347 | VOID FchInitMidUsbEhci2 (IN FCH_DATA_BLOCK *FchDataPtr); |
| 348 | VOID FchInitMidUsbEhci3 (IN FCH_DATA_BLOCK *FchDataPtr); |
| 349 | /// |
| 350 | /// Other Public Routines |
| 351 | /// |
| 352 | VOID FchSetUsbEnableReg (IN FCH_DATA_BLOCK *FchDataPtr); |
| 353 | VOID FchOhciInitAfterPciInit (IN UINT32 Value, IN FCH_DATA_BLOCK* FchDataPtr); |
| 354 | VOID FchEhciInitAfterPciInit (IN UINT32 Value, IN FCH_DATA_BLOCK* FchDataPtr); |
| 355 | VOID FchXhciInitBeforePciInit (IN FCH_DATA_BLOCK* FchDataPtr); |
| 356 | VOID FchXhciInitIndirectReg (IN FCH_DATA_BLOCK* FchDataPtr); |
| 357 | VOID FchInitLateUsbXhciProgram (IN VOID *FchDataPtr); |
| 358 | VOID FchXhciUsbPhyCalibrated (IN FCH_DATA_BLOCK* FchDataPtr); |
WANG Siyuan | 7b6d412 | 2013-07-31 16:55:26 +0800 | [diff] [blame] | 359 | UINT8 FchUsbCommonPhyCalibration (IN FCH_DATA_BLOCK* FchDataPtr); |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 360 | |
| 361 | /// |
| 362 | /// Fch Sd Routines |
| 363 | /// |
| 364 | VOID FchInitEnvSd (IN VOID *FchDataPtr); |
| 365 | VOID FchInitMidSd (IN VOID *FchDataPtr); |
| 366 | VOID FchInitLateSd (IN VOID *FchDataPtr); |
| 367 | |
| 368 | /// |
| 369 | /// Other Public Routines |
| 370 | /// |
| 371 | |
| 372 | VOID FchInitEnvSdProgram (IN VOID *FchDataPtr); |
| 373 | |
| 374 | /// |
| 375 | /// Fch Spi Routines |
| 376 | /// |
| 377 | /// Pei Phase |
| 378 | /// |
| 379 | VOID FchInitResetSpi (IN VOID *FchDataPtr); |
| 380 | VOID FchInitResetLpc (IN VOID *FchDataPtr); |
| 381 | VOID FchInitResetLpcProgram (IN VOID *FchDataPtr); |
| 382 | /// |
| 383 | /// Dxe Phase |
| 384 | /// |
| 385 | VOID FchInitEnvSpi (IN VOID *FchDataPtr); |
| 386 | VOID FchInitMidSpi (IN VOID *FchDataPtr); |
| 387 | VOID FchInitLateSpi (IN VOID *FchDataPtr); |
| 388 | VOID FchInitEnvLpc (IN VOID *FchDataPtr); |
| 389 | VOID FchInitMidLpc (IN VOID *FchDataPtr); |
| 390 | VOID FchInitLateLpc (IN VOID *FchDataPtr); |
| 391 | VOID FchInitEnvLpcProgram (IN VOID *FchDataPtr); |
| 392 | /// |
| 393 | /// Other Public Routines |
| 394 | /// |
| 395 | VOID FchSpiUnlock (IN VOID *FchDataPtr); |
| 396 | VOID FchSpiLock (IN VOID *FchDataPtr); |
| 397 | |
| 398 | /*--------------------------- Documentation Pages ---------------------------*/ |
| 399 | VOID FchStall (IN UINT32 uSec, IN AMD_CONFIG_PARAMS *StdHeader); |
| 400 | VOID CimFchStall (IN UINT32 uSec, IN AMD_CONFIG_PARAMS *StdHeader); |
| 401 | VOID FchPciReset (IN AMD_CONFIG_PARAMS *StdHeader); |
| 402 | VOID OutPort80 (IN UINT32 pcode, IN AMD_CONFIG_PARAMS *StdHeader); |
| 403 | VOID TurnOffCG2 (OUT VOID); |
| 404 | VOID BackUpCG2 (OUT VOID); |
| 405 | VOID FchCopyMem (IN VOID* pDest, IN VOID* pSource, IN UINTN Length); |
| 406 | VOID* GetRomSigPtr (IN UINTN* RomSigPtr, IN AMD_CONFIG_PARAMS *StdHeader); |
| 407 | VOID RwXhciIndReg (IN UINT32 Index, IN UINT32 AndMask, IN UINT32 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 408 | VOID RwXhci0IndReg (IN UINT32 Index, IN UINT32 AndMask, IN UINT32 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 409 | VOID RwXhci1IndReg (IN UINT32 Index, IN UINT32 AndMask, IN UINT32 OrMask, IN AMD_CONFIG_PARAMS *StdHeader); |
| 410 | VOID ReadXhci0Phy (IN UINT32 Port, IN UINT32 Address, IN UINT32 *Value, IN AMD_CONFIG_PARAMS *StdHeader); |
| 411 | VOID AcLossControl (IN UINT8 AcLossControlValue); |
| 412 | VOID FchVgaInit (OUT VOID); |
| 413 | VOID RecordFchConfigPtr (IN UINT32 FchConfigPtr); |
| 414 | VOID ValidateFchVariant (IN VOID *FchDataPtr); |
| 415 | VOID RecordSmiStatus (IN AMD_CONFIG_PARAMS *StdHeader); |
| 416 | BOOLEAN IsGCPU (IN VOID *FchDataPtr); |
| 417 | BOOLEAN IsExternalClockMode (IN VOID *FchDataPtr); |
| 418 | VOID SbSleepTrapControl (IN BOOLEAN SleepTrap); |
| 419 | |
| 420 | AGESA_STATUS |
| 421 | FchSpiTransfer ( |
| 422 | IN UINT8 PrefixCode, |
| 423 | IN UINT8 Opcode, |
| 424 | IN OUT UINT8 *DataPtr, |
| 425 | IN UINT8 *AddressPtr, |
| 426 | IN UINT8 Length, |
| 427 | IN BOOLEAN WriteFlag, |
| 428 | IN BOOLEAN AddressFlag, |
| 429 | IN BOOLEAN DataFlag, |
| 430 | IN BOOLEAN FinishedFlag |
| 431 | ); |
| 432 | |
| 433 | BOOLEAN |
| 434 | FchPlatformSpiQe ( |
| 435 | IN VOID *FchDataPtr |
| 436 | ); |
| 437 | |
| 438 | #endif |