Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 1 | /* $NoKeywords:$ */ |
| 2 | /** |
| 3 | * @file |
| 4 | * |
| 5 | * AMD AGESA Input Structure Creation |
| 6 | * |
| 7 | * Contains AGESA input creation structures. |
| 8 | * |
| 9 | * @xrefitem bom "File Content Label" "Release Content" |
| 10 | * @e project: AGESA |
| 11 | * @e sub-project: Common |
| 12 | * @e \$Revision: 34897 $ @e \$Date: 2010-07-14 10:07:10 +0800 (Wed, 14 Jul 2010) $ |
| 13 | * |
| 14 | */ |
| 15 | /* |
| 16 | ***************************************************************************** |
| 17 | * |
| 18 | * Copyright (c) 2011, Advanced Micro Devices, Inc. |
| 19 | * All rights reserved. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 20 | * |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 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. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 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 |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 30 | * from this software without specific prior written permission. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 31 | * |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 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. |
Edward O'Callaghan | e963b38 | 2014-07-06 19:27:14 +1000 | [diff] [blame] | 42 | * |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 43 | * *************************************************************************** |
| 44 | * |
| 45 | */ |
| 46 | |
| 47 | #ifndef _CREATE_STRUCT_H_ |
| 48 | #define _CREATE_STRUCT_H_ |
| 49 | |
| 50 | /** |
| 51 | * A constructor method. |
| 52 | * |
| 53 | * Sets inputs to valid, basic level, defaults for the specific service instance. |
| 54 | * Constructors should avoid using the header, since these routines should not |
| 55 | * do operations which may fail or require status back to the user. The constructor |
| 56 | * should always SUCCEED. |
| 57 | * |
| 58 | * @param[in] StdHeader Opaque handle to standard config header |
| 59 | * @param[in] ServiceInterface Service Interface structure to initialize. |
| 60 | * |
| 61 | * @retval AGESA_SUCCESS Constructors are not allowed to fail |
| 62 | */ |
| 63 | typedef AGESA_STATUS |
| 64 | F_AGESA_FUNCTION ( |
| 65 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 66 | IN VOID *ServiceInterface |
| 67 | ); |
| 68 | |
| 69 | /// Reference to a Method. |
| 70 | typedef F_AGESA_FUNCTION *PF_AGESA_FUNCTION; |
| 71 | |
| 72 | /** |
| 73 | * A Destructor method. |
| 74 | * |
| 75 | * Sets inputs to valid, basic level, defaults for the specific service instance. |
| 76 | * The constructor should always SUCCEED. |
| 77 | * |
| 78 | * @param[in] StdHeader Opaque handle to standard config header. |
| 79 | * @param[in] ServiceInterface Service Interface structure to initialize. |
| 80 | * |
| 81 | * @retval AGESA_SUCCESS Constructors are not allowed to fail |
| 82 | */ |
| 83 | typedef AGESA_STATUS |
| 84 | F_AGESA_DESTRUCTOR ( |
| 85 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 86 | IN VOID *ServiceInterface |
| 87 | ); |
| 88 | |
| 89 | /// Reference to a Method. |
| 90 | typedef F_AGESA_DESTRUCTOR *PF_AGESA_DESTRUCTOR; |
| 91 | |
| 92 | /** |
| 93 | * Provide the information needed to invoke each service constructor. |
| 94 | */ |
| 95 | typedef struct { |
| 96 | IN AGESA_STRUCT_NAME AgesaFunctionName; ///< Identifies the service |
| 97 | IN UINT16 CreateStructSize; ///< The service's input struct size. |
| 98 | /// Do NOT include a config params header! |
| 99 | OUT PF_AGESA_FUNCTION AgesaFunction; ///< The constructor function |
| 100 | OUT PF_AGESA_DESTRUCTOR AgesaDestructor; ///< The destructor function. |
efdesign98 | 84cbce2 | 2011-08-04 12:09:17 -0600 | [diff] [blame] | 101 | IN UINT32 BufferHandle; ///< The buffer handle id for the service. |
Frank Vibrans | 2b4c831 | 2011-02-14 18:30:54 +0000 | [diff] [blame] | 102 | } FUNCTION_PARAMS_INFO; |
| 103 | |
| 104 | /** |
| 105 | * All available services have their constructor info here. |
| 106 | */ |
| 107 | AGESA_STATUS |
| 108 | AmdInitResetConstructor ( |
| 109 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 110 | IN AMD_RESET_PARAMS *AmdResetParams |
| 111 | ); |
| 112 | |
| 113 | AGESA_STATUS |
| 114 | AmdInitRecoveryInitializer ( |
| 115 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 116 | IN OUT AMD_RECOVERY_PARAMS *AmdRecoveryParamsPtr |
| 117 | ); |
| 118 | |
| 119 | AGESA_STATUS |
| 120 | AmdInitEarlyInitializer ( |
| 121 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 122 | IN OUT AMD_EARLY_PARAMS *EarlyParams |
| 123 | ); |
| 124 | |
| 125 | AGESA_STATUS |
| 126 | AmdInitPostInitializer ( |
| 127 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 128 | IN OUT AMD_POST_PARAMS *PostParamsPtr |
| 129 | ); |
| 130 | |
| 131 | AGESA_STATUS |
| 132 | AmdInitPostDestructor ( |
| 133 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 134 | IN AMD_POST_PARAMS *PostParamsPtr |
| 135 | ); |
| 136 | |
| 137 | AGESA_STATUS |
| 138 | AmdInitEnvInitializer ( |
| 139 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 140 | IN OUT AMD_ENV_PARAMS *EnvParamsPtr |
| 141 | ); |
| 142 | |
| 143 | AGESA_STATUS |
| 144 | AmdInitMidInitializer ( |
| 145 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 146 | IN OUT AMD_MID_PARAMS *MidParamsPtr |
| 147 | ); |
| 148 | |
| 149 | AGESA_STATUS |
| 150 | AmdInitLateInitializer ( |
| 151 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 152 | IN OUT AMD_LATE_PARAMS *LateParamsPtr |
| 153 | ); |
| 154 | |
| 155 | AGESA_STATUS |
| 156 | AmdInitLateDestructor ( |
| 157 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 158 | IN AMD_LATE_PARAMS *LateParamsPtr |
| 159 | ); |
| 160 | |
| 161 | AGESA_STATUS |
| 162 | AmdInitResumeInitializer ( |
| 163 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 164 | IN OUT AMD_RESUME_PARAMS *ResumeParams |
| 165 | ); |
| 166 | |
| 167 | AGESA_STATUS |
| 168 | AmdInitResumeDestructor ( |
| 169 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 170 | IN OUT AMD_RESUME_PARAMS *ResumeParams |
| 171 | ); |
| 172 | |
| 173 | AGESA_STATUS |
| 174 | AmdS3SaveInitializer ( |
| 175 | IN OUT AMD_CONFIG_PARAMS *StdHeader, |
| 176 | IN OUT AMD_S3SAVE_PARAMS *S3SaveParams |
| 177 | ); |
| 178 | |
| 179 | AGESA_STATUS |
| 180 | AmdS3SaveDestructor ( |
| 181 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 182 | IN OUT AMD_S3SAVE_PARAMS *S3SaveParams |
| 183 | ); |
| 184 | |
| 185 | AGESA_STATUS |
| 186 | AmdS3LateRestoreInitializer ( |
| 187 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 188 | IN OUT AMD_S3LATE_PARAMS *S3LateParams |
| 189 | ); |
| 190 | |
| 191 | AGESA_STATUS |
| 192 | AmdLateRunApTaskInitializer ( |
| 193 | IN AMD_CONFIG_PARAMS *StdHeader, |
| 194 | IN OUT AP_EXE_PARAMS *AmdApExeParams |
| 195 | ); |
| 196 | #endif // _CREATE_STRUCT_H_ |
| 197 | |