Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 1 | /* $NoKeywords:$ */ |
| 2 | /** |
| 3 | * @file |
| 4 | * |
| 5 | * KB service installation file |
| 6 | * |
| 7 | * |
| 8 | * |
| 9 | * @xrefitem bom "File Content Label" "Release Content" |
| 10 | * @e project: AGESA |
| 11 | * @e sub-project: GNB |
| 12 | * @e \$Revision: 86079 $ @e \$Date: 2013-01-16 00:59:04 -0600 (Wed, 16 Jan 2013) $ |
| 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 | */ |
| 45 | |
| 46 | #ifndef _GNB_INIT_KB_INSTALL_H_ |
| 47 | #define _GNB_INIT_KB_INSTALL_H_ |
| 48 | |
| 49 | //----------------------------------------------------------------------- |
| 50 | // Specify definition used by module services |
| 51 | //----------------------------------------------------------------------- |
| 52 | |
| 53 | #include "GnbPcie.h" |
| 54 | #include "GnbUraServices.h" |
| 55 | #include "GnbPcieFamServices.h" |
| 56 | #include "GnbFamServices.h" |
| 57 | #include "GnbGfxFamServices.h" |
| 58 | |
| 59 | //----------------------------------------------------------------------- |
| 60 | // Export services |
| 61 | //----------------------------------------------------------------------- |
| 62 | |
| 63 | #if (AGESA_ENTRY_INIT_EARLY == TRUE) |
| 64 | |
| 65 | extern F_PCIEFMGETSBCONFIGINFO PcieGetSbConfigInfoKB; |
| 66 | extern F_PCIEFMGETCOMPLEXDATALENGTH PcieGetComplexDataLengthKB; |
| 67 | extern F_PCIEFMBUILDCOMPLEXCONFIGURATION PcieBuildComplexConfigurationKB; |
| 68 | extern F_PCIEFMCONFIGUREENGINESLANEALLOCATION PcieConfigureEnginesLaneAllocationKB; |
| 69 | extern F_PCIEFMCHECKPORTPCIDEVICEMAPPING PcieCheckPortPciDeviceMappingKB; |
| 70 | extern F_PCIEFMMAPPORTPCIADDRESS PcieMapPortPciAddressKB; |
| 71 | extern F_PCIEFMCHECKPORTPCIELANECANBEMUXED PcieCheckPortPcieLaneCanBeMuxedKB; |
| 72 | |
| 73 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 74 | CONST PCIe_FAM_CONFIG_SERVICES GnbPcieConfigProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 75 | PcieGetComplexDataLengthKB, |
| 76 | PcieBuildComplexConfigurationKB, |
| 77 | PcieConfigureEnginesLaneAllocationKB, |
| 78 | PcieCheckPortPciDeviceMappingKB, |
| 79 | PcieMapPortPciAddressKB, |
| 80 | PcieCheckPortPcieLaneCanBeMuxedKB, |
| 81 | PcieGetSbConfigInfoKB |
| 82 | }; |
| 83 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 84 | CONST GNB_SERVICE GnbPcieCongigServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 85 | GnbPcieFamConfigService, |
| 86 | AMD_FAMILY_KB, |
| 87 | &GnbPcieConfigProtocolKB, |
| 88 | SERVICES_POINTER |
| 89 | }; |
| 90 | #undef SERVICES_POINTER |
| 91 | #define SERVICES_POINTER &GnbPcieCongigServicesKB |
| 92 | #endif |
| 93 | |
| 94 | #if (AGESA_ENTRY_INIT_EARLY == TRUE) || (AGESA_ENTRY_INIT_POST == TRUE) || (AGESA_ENTRY_INIT_MID == TRUE) |
| 95 | extern F_PCIEFMGETCORECONFIGURATIONVALUE PcieGetCoreConfigurationValueKB; |
| 96 | extern F_PCIEFMGETLINKSPEEDCAP PcieGetLinkSpeedCapKB; |
| 97 | extern F_PCIEFMGETNATIVEPHYLANEBITMAP PcieGetNativePhyLaneBitmapKB; |
| 98 | extern F_PCIEFMSETLINKSPEEDCAP PcieSetLinkSpeedCapV4; |
| 99 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 100 | CONST PCIe_FAM_INIT_SERVICES GnbPcieInitProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 101 | PcieGetCoreConfigurationValueKB, |
| 102 | PcieGetLinkSpeedCapKB, |
| 103 | PcieGetNativePhyLaneBitmapKB, |
| 104 | PcieSetLinkSpeedCapV4 |
| 105 | }; |
| 106 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 107 | CONST GNB_SERVICE GnbPcieInitServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 108 | GnbPcieFamInitService, |
| 109 | AMD_FAMILY_KB, |
| 110 | &GnbPcieInitProtocolKB, |
| 111 | SERVICES_POINTER |
| 112 | }; |
| 113 | #undef SERVICES_POINTER |
| 114 | #define SERVICES_POINTER &GnbPcieInitServicesKB |
| 115 | #endif |
| 116 | |
| 117 | #if (AGESA_ENTRY_INIT_EARLY == TRUE) || (AGESA_ENTRY_INIT_POST == TRUE) || (AGESA_ENTRY_INIT_MID == TRUE) |
| 118 | #if IDSOPT_IDS_ENABLED == TRUE |
| 119 | #if IDSOPT_TRACING_ENABLED == TRUE |
| 120 | extern F_PCIEFMDEBUGGETHOSTREGADDRESSSPACESTRING PcieDebugGetHostRegAddressSpaceStringKB; |
| 121 | extern F_PCIEFMDEBUGGETWRAPPERNAMESTRING PcieDebugGetWrapperNameStringKB; |
| 122 | extern F_PCIEFMDEBUGGETCORECONFIGURATIONSTRING PcieDebugGetCoreConfigurationStringKB; |
| 123 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 124 | CONST PCIe_FAM_DEBUG_SERVICES GnbPcieDebugProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 125 | PcieDebugGetHostRegAddressSpaceStringKB, |
| 126 | PcieDebugGetWrapperNameStringKB, |
| 127 | PcieDebugGetCoreConfigurationStringKB |
| 128 | }; |
| 129 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 130 | CONST GNB_SERVICE GnbPcieDebugServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 131 | GnbPcieFamDebugService, |
| 132 | AMD_FAMILY_KB, |
| 133 | &GnbPcieDebugProtocolKB, |
| 134 | SERVICES_POINTER |
| 135 | }; |
| 136 | #undef SERVICES_POINTER |
| 137 | #define SERVICES_POINTER &GnbPcieDebugServicesKB |
| 138 | #endif |
| 139 | #endif |
| 140 | #endif |
| 141 | |
| 142 | #if (AGESA_ENTRY_INIT_EARLY == TRUE) || (AGESA_ENTRY_INIT_POST == TRUE) || (AGESA_ENTRY_INIT_MID == TRUE) || (AGESA_ENTRY_INIT_LATE == TRUE) |
| 143 | extern F_GNB_REGISTER_ACCESS GnbRegisterReadKB; |
| 144 | extern F_GNB_REGISTER_ACCESS GnbRegisterWriteKB; |
| 145 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 146 | CONST GNB_REGISTER_SERVICE GnbRegisterAccessProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 147 | GnbRegisterReadKB, |
| 148 | GnbRegisterWriteKB |
| 149 | }; |
| 150 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 151 | CONST GNB_SERVICE GnbRegisterAccessServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 152 | GnbRegisterAccessService, |
| 153 | AMD_FAMILY_KB, |
| 154 | &GnbRegisterAccessProtocolKB, |
| 155 | SERVICES_POINTER |
| 156 | }; |
| 157 | #undef SERVICES_POINTER |
| 158 | #define SERVICES_POINTER &GnbRegisterAccessServicesKB |
| 159 | |
| 160 | extern F_GNBURASERVICELOCATEREGTBL GnbUraLocateRegTblKB; |
| 161 | extern F_GNBURASERVICEGET GnbUraGetKB; |
| 162 | extern F_GNBURASERVICESET GnbUraSetKB; |
| 163 | extern F_GNBURASERVICESTREAMSET GnbUraStreamSetKB; |
| 164 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 165 | CONST GNB_URA_SERVICE GnbUraProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 166 | GnbUraLocateRegTblKB, |
| 167 | GnbUraGetKB, |
| 168 | GnbUraSetKB, |
| 169 | GnbUraStreamSetKB |
| 170 | }; |
| 171 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 172 | CONST GNB_SERVICE GnbUraServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 173 | GnbUraService, |
| 174 | AMD_FAMILY_KB, |
| 175 | &GnbUraProtocolKB, |
| 176 | SERVICES_POINTER |
| 177 | }; |
| 178 | #undef SERVICES_POINTER |
| 179 | #define SERVICES_POINTER &GnbUraServicesKB |
| 180 | |
| 181 | extern F_GFXMAPENGINETODISPLAYPATH GfxMapEngineToDisplayPathKB; |
| 182 | extern F_GFXDISABLECONTROLLER GfxDisableControllerKB; |
| 183 | extern F_GFXCALCULATECLOCK GfxCalculateClockKB; |
| 184 | extern F_GFXISVBIOSPOSTED GfxIsVbiosPostedKB; |
| 185 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 186 | CONST GFX_FAM_SERVICES GfxFamilyServiceProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 187 | GfxMapEngineToDisplayPathKB, |
| 188 | GfxDisableControllerKB, |
| 189 | GfxCalculateClockKB, |
| 190 | GfxIsVbiosPostedKB |
| 191 | }; |
| 192 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 193 | CONST GNB_SERVICE GfxFamilyServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 194 | GfxFamService, |
| 195 | AMD_FAMILY_KB, |
| 196 | &GfxFamilyServiceProtocolKB, |
| 197 | SERVICES_POINTER |
| 198 | }; |
| 199 | #undef SERVICES_POINTER |
| 200 | #define SERVICES_POINTER &GfxFamilyServicesKB |
| 201 | |
| 202 | extern F_GNBTIMESTAMP GnbTimeStampKB; |
| 203 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 204 | CONST GNB_FAM_TS_SERVICES GnbFamTsProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 205 | GnbTimeStampKB, |
| 206 | }; |
| 207 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 208 | CONST GNB_SERVICE GnbFamTsServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 209 | GnbFamTsService, |
| 210 | AMD_FAMILY_KB, |
| 211 | &GnbFamTsProtocolKB, |
| 212 | SERVICES_POINTER |
| 213 | }; |
| 214 | #undef SERVICES_POINTER |
| 215 | #define SERVICES_POINTER &GnbFamTsServicesKB |
| 216 | |
| 217 | |
| 218 | extern F_PCIE_MAXPAYLOAD_SETTING PcieMaxPayloadKB; |
| 219 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 220 | CONST PCIE_MAXPAYLOAD_SERVICE PcieMaxPayloadProtocolKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 221 | PcieMaxPayloadKB |
| 222 | }; |
| 223 | |
Arthur Heymans | b80de18 | 2022-05-16 15:29:53 +0200 | [diff] [blame^] | 224 | CONST GNB_SERVICE PcieMaxPayloadServicesKB = { |
Siyuan Wang | affe85f | 2013-07-25 15:14:15 +0800 | [diff] [blame] | 225 | GnbPcieMaxPayloadService, |
| 226 | AMD_FAMILY_KB, |
| 227 | &PcieMaxPayloadProtocolKB, |
| 228 | SERVICES_POINTER |
| 229 | }; |
| 230 | #undef SERVICES_POINTER |
| 231 | #define SERVICES_POINTER &PcieMaxPayloadServicesKB |
| 232 | |
| 233 | #endif |
| 234 | #endif // _GNB_INIT_KB_INSTALL_H_ |