5 * AMD AGESA Input Structure Creation
7 * Contains AGESA input creation structures.
9 * @xrefitem bom "File Content Label" "Release Content"
11 * @e sub-project: Common
12 * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 02:16:51 -0700 (Wed, 22 Dec 2010) $
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 _CREATE_STRUCT_H_
47 #define _CREATE_STRUCT_H_
50 * A constructor method.
52 * Sets inputs to valid, basic level, defaults for the specific service instance.
53 * Constructors should avoid using the header, since these routines should not
54 * do operations which may fail or require status back to the user. The constructor
55 * should always SUCCEED.
57 * @param[in] StdHeader Opaque handle to standard config header
58 * @param[in] ServiceInterface Service Interface structure to initialize.
60 * @retval AGESA_SUCCESS Constructors are not allowed to fail
64 IN AMD_CONFIG_PARAMS *StdHeader,
65 IN VOID *ServiceInterface
68 /// Reference to a Method.
69 typedef F_AGESA_FUNCTION *PF_AGESA_FUNCTION;
72 * A Destructor method.
74 * Sets inputs to valid, basic level, defaults for the specific service instance.
75 * The constructor should always SUCCEED.
77 * @param[in] StdHeader Opaque handle to standard config header.
78 * @param[in] ServiceInterface Service Interface structure to initialize.
80 * @retval AGESA_SUCCESS Constructors are not allowed to fail
84 IN AMD_CONFIG_PARAMS *StdHeader,
85 IN VOID *ServiceInterface
88 /// Reference to a Method.
89 typedef F_AGESA_DESTRUCTOR *PF_AGESA_DESTRUCTOR;
92 * Provide the information needed to invoke each service constructor.
95 IN AGESA_STRUCT_NAME AgesaFunctionName; ///< Identifies the service
96 IN UINT16 CreateStructSize; ///< The service's input struct size.
97 /// Do NOT include a config params header!
98 OUT PF_AGESA_FUNCTION AgesaFunction; ///< The constructor function
99 OUT PF_AGESA_DESTRUCTOR AgesaDestructor; ///< The destructor function.
100 IN AGESA_BUFFER_HANDLE BufferHandle; ///< The buffer handle id for the service.
101 } FUNCTION_PARAMS_INFO;
104 * All available services have their constructor info here.
107 AmdInitResetConstructor (
108 IN AMD_CONFIG_PARAMS *StdHeader,
109 IN AMD_RESET_PARAMS *AmdResetParams
113 AmdInitRecoveryInitializer (
114 IN AMD_CONFIG_PARAMS *StdHeader,
115 IN OUT AMD_RECOVERY_PARAMS *AmdRecoveryParamsPtr
119 AmdInitEarlyInitializer (
120 IN AMD_CONFIG_PARAMS *StdHeader,
121 IN OUT AMD_EARLY_PARAMS *EarlyParams
125 AmdInitPostInitializer (
126 IN AMD_CONFIG_PARAMS *StdHeader,
127 IN OUT AMD_POST_PARAMS *PostParamsPtr
131 AmdInitPostDestructor (
132 IN AMD_CONFIG_PARAMS *StdHeader,
133 IN AMD_POST_PARAMS *PostParamsPtr
137 AmdInitEnvInitializer (
138 IN AMD_CONFIG_PARAMS *StdHeader,
139 IN OUT AMD_ENV_PARAMS *EnvParamsPtr
143 AmdInitMidInitializer (
144 IN AMD_CONFIG_PARAMS *StdHeader,
145 IN OUT AMD_MID_PARAMS *MidParamsPtr
149 AmdInitLateInitializer (
150 IN AMD_CONFIG_PARAMS *StdHeader,
151 IN OUT AMD_LATE_PARAMS *LateParamsPtr
155 AmdInitLateDestructor (
156 IN AMD_CONFIG_PARAMS *StdHeader,
157 IN AMD_LATE_PARAMS *LateParamsPtr
161 AmdInitResumeInitializer (
162 IN AMD_CONFIG_PARAMS *StdHeader,
163 IN OUT AMD_RESUME_PARAMS *ResumeParams
167 AmdInitResumeDestructor (
168 IN AMD_CONFIG_PARAMS *StdHeader,
169 IN OUT AMD_RESUME_PARAMS *ResumeParams
173 AmdS3SaveInitializer (
174 IN OUT AMD_CONFIG_PARAMS *StdHeader,
175 IN OUT AMD_S3SAVE_PARAMS *S3SaveParams
179 AmdS3SaveDestructor (
180 IN AMD_CONFIG_PARAMS *StdHeader,
181 IN OUT AMD_S3SAVE_PARAMS *S3SaveParams
185 AmdS3LateRestoreInitializer (
186 IN AMD_CONFIG_PARAMS *StdHeader,
187 IN OUT AMD_S3LATE_PARAMS *S3LateParams
191 AmdLateRunApTaskInitializer (
192 IN AMD_CONFIG_PARAMS *StdHeader,
193 IN OUT AP_EXE_PARAMS *AmdApExeParams
195 #endif // _CREATE_STRUCT_H_