5 * AMD Family_15 specific utility functions.
7 * Provides numerous utility functions specific to family 15h.
9 * @xrefitem bom "File Content Label" "Release Content"
11 * @e sub-project: CPU/Family/0x15
12 * @e \$Revision: 55600 $ @e \$Date: 2011-06-23 12:39:18 -0600 (Thu, 23 Jun 2011) $
16 ******************************************************************************
18 * Copyright (C) 2012 Advanced Micro Devices, Inc.
19 * All rights reserved.
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.
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.
43 ******************************************************************************
46 #ifndef _CPU_F15_UTILITES_H_
47 #define _CPU_F15_UTILITES_H_
50 /*---------------------------------------------------------------------------------------
51 * M I X E D (Definitions And Macros / Typedefs, Structures, Enums)
52 *---------------------------------------------------------------------------------------
56 /*---------------------------------------------------------------------------------------
57 * D E F I N I T I O N S A N D M A C R O S
58 *---------------------------------------------------------------------------------------
62 /*---------------------------------------------------------------------------------------
63 * T Y P E D E F S, S T R U C T U R E S, E N U M S
64 *---------------------------------------------------------------------------------------
66 /// The structure for Software Initiated NB Voltage Transitions
68 UINT32 VidCode; ///< VID code to transition to
69 BOOLEAN SlamMode; ///< Whether voltage is to be slammed, or stepped
72 /*---------------------------------------------------------------------------------------
73 * F U N C T I O N P R O T O T Y P E
74 *---------------------------------------------------------------------------------------
79 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
81 IN AMD_CONFIG_PARAMS *StdHeader
86 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
88 IN BOOLEAN WaitForTransition,
89 IN AMD_CONFIG_PARAMS *StdHeader
94 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
95 OUT UINT32 *FrequencyInMHz,
96 IN AMD_CONFIG_PARAMS *StdHeader
101 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
105 IN UINT32 PrimaryCoreNum,
106 IN AMD_CONFIG_PARAMS *StdHeader
110 F15HtPhyOverrideDllCompensation (
112 IN AMD_CONFIG_PARAMS *StdHeader
116 F15GetNextHtLinkFeatures (
117 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
119 IN OUT PCI_ADDR *LinkBase,
120 OUT HT_HOST_FEATS *HtHostFeats,
121 IN AMD_CONFIG_PARAMS *StdHeader
125 F15NextLinkHasHtPhyFeats (
126 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
127 IN OUT PCI_ADDR *HtHostCapability,
129 IN HT_PHY_LINK_FEATS *HtPhyLinkType,
130 OUT BOOLEAN *MatchedSublink1,
131 OUT HT_FREQUENCIES *Frequency0,
132 OUT HT_FREQUENCIES *Frequency1,
133 IN AMD_CONFIG_PARAMS *StdHeader
137 F15SetHtPhyRegister (
138 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
139 IN HT_PHY_TYPE_ENTRY_DATA *HtPhyEntry,
140 IN PCI_ADDR CapabilitySet,
142 IN AMD_CONFIG_PARAMS *StdHeader
146 F15CommonGetNbCofVidUpdate (
147 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
148 IN PCI_ADDR *PciAddress,
149 OUT BOOLEAN *NbVidUpdateAll,
150 IN AMD_CONFIG_PARAMS *StdHeader
154 F15IsNbPstateEnabled (
155 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
156 IN PLATFORM_CONFIGURATION *PlatformConfig,
157 IN AMD_CONFIG_PARAMS *StdHeader
160 #endif // _CPU_F15_UTILITES_H_