5 * Family 15h 'early sample' support
7 * This file defines the required structures for family 15h pre-production processors.
9 * @xrefitem bom "File Content Label" "Release Content"
11 * @e sub-project: Core
12 * @e \$Revision: 53356 $ @e \$Date: 2011-05-18 14:14:18 -0600 (Wed, 18 May 2011) $
14 /*****************************************************************************
16 * Copyright (C) 2012 Advanced Micro Devices, Inc.
17 * All rights reserved.
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are met:
21 * * Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * * Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
27 * its contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
31 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
34 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
37 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 ***************************************************************************/
44 #ifndef _OPTION_FAMILY_15H_EARLY_SAMPLE_H_
45 #define _OPTION_FAMILY_15H_EARLY_SAMPLE_H_
48 /*---------------------------------------------------------------------------------------
49 * M I X E D (Definitions And Macros / Typedefs, Structures, Enums)
50 *---------------------------------------------------------------------------------------
54 /*---------------------------------------------------------------------------------------
55 * D E F I N I T I O N S A N D M A C R O S
56 *---------------------------------------------------------------------------------------
60 /*---------------------------------------------------------------------------------------
61 * T Y P E D E F S, S T R U C T U R E S, E N U M S
62 *---------------------------------------------------------------------------------------
66 * Install family 15h model 0x00 - 0x0F Early Sample support
70 * Early sample hook point during HTC initialization
72 * @param[in,out] HtcRegister Value of F3x64 to be written.
73 * @param[in] StdHeader Handle of Header for calling lib functions and services.
76 typedef VOID F_F15_OR_ES_HTC_INIT_HOOK (
77 IN OUT UINT32 *HtcRegister,
78 IN AMD_CONFIG_PARAMS *StdHeader
81 /// Reference to a Method.
82 typedef F_F15_OR_ES_HTC_INIT_HOOK *PF_F15_OR_ES_HTC_INIT_HOOK;
84 /// Hook points in the core functionality necessary for
85 /// providing support for pre-production CPUs.
87 PF_F15_OR_ES_HTC_INIT_HOOK F15OrHtcInitHook; ///< Allows for override of a certain processor register value during HTC init
88 } F15_OR_ES_CORE_SUPPORT;
91 * Returns whether or not the processor should enable the CPB feature.
93 * @param[in,out] IsEnabled Whether or not to enable CPB
94 * @param[in] StdHeader Handle of Header for calling lib functions and services.
97 typedef VOID F_F15_OR_ES_IS_CPB_SUPPORTED (
98 IN OUT BOOLEAN *IsEnabled,
99 IN AMD_CONFIG_PARAMS *StdHeader
102 /// Reference to a Method.
103 typedef F_F15_OR_ES_IS_CPB_SUPPORTED *PF_F15_OR_ES_IS_CPB_SUPPORTED;
107 /// Hook points in the CPB feature necessary for
108 /// providing support for pre-production CPUs.
110 PF_F15_OR_ES_IS_CPB_SUPPORTED F15OrIsCpbSupportedHook; ///< CPB enablement override
111 } F15_OR_ES_CPB_SUPPORT;
114 * Returns whether or not the processor should enable the C6 feature.
116 * @param[in,out] IsEnabled Whether or not to enable C6
117 * @param[in] StdHeader Handle of Header for calling lib functions and services.
120 typedef VOID F_F15_OR_ES_IS_C6_SUPPORTED (
121 IN OUT BOOLEAN *IsEnabled,
122 IN AMD_CONFIG_PARAMS *StdHeader
125 /// Reference to a Method.
126 typedef F_F15_OR_ES_IS_C6_SUPPORTED *PF_F15_OR_ES_IS_C6_SUPPORTED;
130 /// Hook points in the C6 feature necessary for
131 /// providing support for pre-production CPUs.
133 PF_F15_OR_ES_IS_C6_SUPPORTED F15OrIsC6SupportedHook; ///< C6 enablement override
134 } F15_OR_ES_C6_SUPPORT;
138 * Workaround to avoid patch loading from causing NB cycles
140 * @param[in,out] StdHeader - Config handle for library and services.
141 * @param[in,out] SavedMsrValue - Saved a MSR value
144 typedef VOID F_F15_OR_ES_AVOID_NB_CYCLES_START (
145 IN OUT AMD_CONFIG_PARAMS *StdHeader,
146 IN UINT64 *SavedMsrValue
149 /// Reference to a Method.
150 typedef F_F15_OR_ES_AVOID_NB_CYCLES_START *PF_F15_OR_ES_AVOID_NB_CYCLES_START;
153 * Workaround to avoid patch loading from causing NB cycles
155 * @param[in,out] StdHeader - Config handle for library and services.
156 * @param[in] SavedMsrValue - Saved a MSR value
160 typedef VOID F_F15_OR_ES_AVOID_NB_CYCLES_END (
161 IN OUT AMD_CONFIG_PARAMS *StdHeader,
162 IN UINT64 *SavedMsrValue
165 /// Reference to a Method.
166 typedef F_F15_OR_ES_AVOID_NB_CYCLES_END *PF_F15_OR_ES_AVOID_NB_CYCLES_END;
169 * Workaround for Ax processors after patch is loaded.
171 * @param[in] StdHeader - Config handle for library and services.
172 * @param[in] IsPatchLoaded - Is patch loaded
176 typedef VOID F_F15_OR_ES_AFTER_PATCH_LOADED (
177 IN OUT AMD_CONFIG_PARAMS *StdHeader,
178 IN BOOLEAN IsPatchLoaded
181 /// Reference to a Method.
182 typedef F_F15_OR_ES_AFTER_PATCH_LOADED *PF_F15_OR_ES_AFTER_PATCH_LOADED;
185 * Update the CPU microcode.
187 * @param[in] StdHeader - Config handle for library and services.
189 * @retval TRUE - Patch Loaded Successfully.
190 * @retval FALSE - Patch Did Not Get Loaded.
193 typedef BOOLEAN F_F15_OR_ES_LOAD_MCU_PATCH (
194 IN OUT AMD_CONFIG_PARAMS *StdHeader
197 /// Reference to a Method.
198 typedef F_F15_OR_ES_LOAD_MCU_PATCH *PF_F15_OR_ES_LOAD_MCU_PATCH;
201 /// Hook points in the Microcode Update feature necessary for
202 /// providing support for pre-production CPUs.
204 PF_F15_OR_ES_AVOID_NB_CYCLES_START F15OrESAvoidNbCyclesStart; ///< Workaround to avoid patch loading from causing NB cycles
205 PF_F15_OR_ES_AVOID_NB_CYCLES_END F15OrESAvoidNbCyclesEnd; ///< Workaround to avoid patch loading from causing NB cycles
206 PF_F15_OR_ES_LOAD_MCU_PATCH F15OrUpdateMcuPatchHook; ///< Processor MCU Update override
207 PF_F15_OR_ES_AFTER_PATCH_LOADED F15OrESAfterPatchLoaded; ///< Workaround for Ax processors after patch is loaded
208 } F15_OR_ES_MCU_PATCH;
212 typedef BOOLEAN F_F15_TN_ES_LOAD_MCU_PATCH (
213 IN OUT AMD_CONFIG_PARAMS *StdHeader
216 /// Reference to a Method.
217 typedef F_F15_TN_ES_LOAD_MCU_PATCH *PF_F15_TN_ES_LOAD_MCU_PATCH;
219 /// Hook points in the Microcode Update feature necessary for
220 /// providing support for pre-production CPUs.
222 PF_F15_TN_ES_LOAD_MCU_PATCH F15TnUpdateMcuPatchHook; ///< Processor MCU Update override
223 } F15_TN_ES_MCU_PATCH;
225 /*---------------------------------------------------------------------------------------
226 * F U N C T I O N P R O T O T Y P E
227 *---------------------------------------------------------------------------------------
231 #endif // _OPTION_FAMILY_15H_EARLY_SAMPLE_H_