blob: dc7cb1556c3430d706c175b878d1ff5cc207eaec [file] [log] [blame]
zbao7d94cf92012-07-02 14:19:14 +08001/* $NoKeywords:$ */
2/**
3 * @file
4 *
5 * Tn 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: 63425 $ @e \$Date: 2011-12-22 11:24:10 -0600 (Thu, 22 Dec 2011) $
13 *
14 */
15/*
16*****************************************************************************
17*
Siyuan Wang641f00c2013-06-08 11:50:55 +080018 * Copyright (c) 2008 - 2012, 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.
zbao7d94cf92012-07-02 14:19:14 +080042* ***************************************************************************
43*
44*/
45
46#ifndef _GNB_INIT_TN_INSTALL_H_
47#define _GNB_INIT_TN_INSTALL_H_
48
49//-----------------------------------------------------------------------
50// Specify definition used by module services
51//-----------------------------------------------------------------------
52
Alexandru Gagniuc986349d2014-03-29 16:52:46 -050053#include <Proc/GNB/Common/GnbPcie.h>
54#include <Proc/GNB/Common/GnbPcieFamServices.h>
55#include <Proc/GNB/Common/GnbFamServices.h>
zbao7d94cf92012-07-02 14:19:14 +080056
57//-----------------------------------------------------------------------
58// Export services
59//-----------------------------------------------------------------------
60
61#if (AGESA_ENTRY_INIT_EARLY == TRUE)
62 extern F_PCIEFMGETCOMPLEXDATALENGTH PcieGetComplexDataLengthTN;
63 extern F_PCIEFMBUILDCOMPLEXCONFIGURATION PcieBuildComplexConfigurationTN;
64 extern F_PCIEFMCONFIGUREENGINESLANEALLOCATION PcieConfigureEnginesLaneAllocationTN;
65 extern F_PCIEFMCHECKPORTPCIDEVICEMAPPING PcieCheckPortPciDeviceMappingTN;
66 extern F_PCIEFMMAPPORTPCIADDRESS PcieMapPortPciAddressTN;
67 extern F_PCIEFMCHECKPORTPCIELANECANBEMUXED PcieCheckPortPcieLaneCanBeMuxedTN;
68 extern F_PCIEFMGETSBCONFIGINFO PcieGetSbConfigInfoTN;
Arthur Heymans8d3640d2022-05-16 12:27:36 +020069CONST PCIe_FAM_CONFIG_SERVICES GnbPcieConfigProtocolTN = {
zbao7d94cf92012-07-02 14:19:14 +080070 PcieGetComplexDataLengthTN,
71 PcieBuildComplexConfigurationTN,
72 PcieConfigureEnginesLaneAllocationTN,
73 PcieCheckPortPciDeviceMappingTN,
74 PcieMapPortPciAddressTN,
75 PcieCheckPortPcieLaneCanBeMuxedTN,
76 PcieGetSbConfigInfoTN
77 };
78
Arthur Heymans8d3640d2022-05-16 12:27:36 +020079 CONST GNB_SERVICE GnbPcieCongigServicesTN = {
zbao7d94cf92012-07-02 14:19:14 +080080 GnbPcieFamConfigService,
81 AMD_FAMILY_TN,
82 &GnbPcieConfigProtocolTN,
83 SERVICES_POINTER
84 };
85 #undef SERVICES_POINTER
86 #define SERVICES_POINTER &GnbPcieCongigServicesTN
87#endif
88
89#if (AGESA_ENTRY_INIT_EARLY == TRUE) || (AGESA_ENTRY_INIT_POST == TRUE) || (AGESA_ENTRY_INIT_MID == TRUE)
90 extern F_PCIEFMGETCORECONFIGURATIONVALUE PcieGetCoreConfigurationValueTN;
91 extern F_PCIEFMGETLINKSPEEDCAP PcieGetLinkSpeedCapTN;
92 extern F_PCIEFMGETNATIVEPHYLANEBITMAP PcieGetNativePhyLaneBitmapTN;
93 extern F_PCIEFMSETLINKSPEEDCAP PcieSetLinkSpeedCapV4;
94
Arthur Heymans8d3640d2022-05-16 12:27:36 +020095 CONST PCIe_FAM_INIT_SERVICES GnbPcieInitProtocolTN = {
zbao7d94cf92012-07-02 14:19:14 +080096 PcieGetCoreConfigurationValueTN,
97 PcieGetLinkSpeedCapTN,
98 PcieGetNativePhyLaneBitmapTN,
99 PcieSetLinkSpeedCapV4
100 };
101
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200102 CONST GNB_SERVICE GnbPcieInitServicesTN = {
zbao7d94cf92012-07-02 14:19:14 +0800103 GnbPcieFamInitService,
104 AMD_FAMILY_TN,
105 &GnbPcieInitProtocolTN,
106 SERVICES_POINTER
107 };
108 #undef SERVICES_POINTER
109 #define SERVICES_POINTER &GnbPcieInitServicesTN
110#endif
111
112#if (AGESA_ENTRY_INIT_EARLY == TRUE) || (AGESA_ENTRY_INIT_POST == TRUE) || (AGESA_ENTRY_INIT_MID == TRUE)
113 #if IDSOPT_IDS_ENABLED == TRUE
114 #if IDSOPT_TRACING_ENABLED == TRUE
115 extern F_PCIEFMDEBUGGETHOSTREGADDRESSSPACESTRING PcieDebugGetHostRegAddressSpaceStringTN;
116 extern F_PCIEFMDEBUGGETWRAPPERNAMESTRING PcieDebugGetWrapperNameStringTN;
117 extern F_PCIEFMDEBUGGETCORECONFIGURATIONSTRING PcieDebugGetCoreConfigurationStringTN;
118
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200119 CONST PCIe_FAM_DEBUG_SERVICES GnbPcieDebugProtocolTN = {
zbao7d94cf92012-07-02 14:19:14 +0800120 PcieDebugGetHostRegAddressSpaceStringTN,
121 PcieDebugGetWrapperNameStringTN,
122 PcieDebugGetCoreConfigurationStringTN
123 };
124
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200125 CONST GNB_SERVICE GnbPcieDebugServicesTN = {
zbao7d94cf92012-07-02 14:19:14 +0800126 GnbPcieFamDebugService,
127 AMD_FAMILY_TN,
128 &GnbPcieDebugProtocolTN,
129 SERVICES_POINTER
130 };
131 #undef SERVICES_POINTER
132 #define SERVICES_POINTER &GnbPcieDebugServicesTN
133 #endif
134 #endif
135#endif
136
137#if (AGESA_ENTRY_INIT_EARLY == TRUE) || (AGESA_ENTRY_INIT_POST == TRUE) || (AGESA_ENTRY_INIT_MID == TRUE) || (AGESA_ENTRY_INIT_LATE == TRUE)
138 extern F_GNB_REGISTER_ACCESS GnbRegisterReadServiceTN;
139 extern F_GNB_REGISTER_ACCESS GnbRegisterWriteServiceTN;
140
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200141 CONST GNB_REGISTER_SERVICE GnbRegiterAccessProtocol = {
zbao7d94cf92012-07-02 14:19:14 +0800142 GnbRegisterReadServiceTN,
143 GnbRegisterWriteServiceTN
144 };
145
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200146 CONST GNB_SERVICE GnbRegisterAccessServicesTN = {
zbao7d94cf92012-07-02 14:19:14 +0800147 GnbRegisterAccessService,
148 AMD_FAMILY_TN,
149 &GnbRegiterAccessProtocol,
150 SERVICES_POINTER
151 };
152 #undef SERVICES_POINTER
153 #define SERVICES_POINTER &GnbRegisterAccessServicesTN
154
155 extern F_GNBFMCREATEIVRSENTRY GnbCreateIvrsEntryTN;
156 extern F_GNBFMCHECKIOMMUPRESENT GnbCheckIommuPresentTN;
157
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200158 CONST GNB_FAM_IOMMU_SERVICES GnbIommuConfigProtocolTN = {
zbao7d94cf92012-07-02 14:19:14 +0800159 GnbCheckIommuPresentTN,
160 GnbCreateIvrsEntryTN
161 };
162
Arthur Heymans8d3640d2022-05-16 12:27:36 +0200163 CONST GNB_SERVICE GnbIommuConfigServicesTN = {
zbao7d94cf92012-07-02 14:19:14 +0800164 GnbIommuService,
165 AMD_FAMILY_TN,
166 &GnbIommuConfigProtocolTN,
167 SERVICES_POINTER
168 };
169 #undef SERVICES_POINTER
170 #define SERVICES_POINTER &GnbIommuConfigServicesTN
171
172#endif
173#endif // _GNB_INIT_TN_INSTALL_H_