Angel Pons | 8a3453f | 2020-04-02 23:48:19 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <string.h> |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 5 | #include <acpi/acpi.h> |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 6 | #include <bootstate.h> |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 7 | #include <cbfs.h> |
Kyösti Mälkki | 43f6d9d | 2019-03-14 14:59:31 +0200 | [diff] [blame] | 8 | #include <timestamp.h> |
| 9 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 10 | #include <northbridge/amd/agesa/state_machine.h> |
| 11 | #include <northbridge/amd/agesa/agesa_helper.h> |
| 12 | #include <northbridge/amd/agesa/BiosCallOuts.h> |
Elyes HAOUAS | 19f5ba8 | 2018-10-14 14:52:06 +0200 | [diff] [blame] | 13 | #include <amdlib.h> |
Kyösti Mälkki | c6918f9 | 2018-06-11 08:52:22 +0300 | [diff] [blame] | 14 | |
Elyes HAOUAS | 19f5ba8 | 2018-10-14 14:52:06 +0200 | [diff] [blame] | 15 | #include <AMD.h> |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 16 | |
Kyösti Mälkki | 11cac78 | 2022-04-07 07:16:48 +0300 | [diff] [blame] | 17 | #if ENV_RAMINIT |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 18 | #include <PlatformMemoryConfiguration.h> |
| 19 | CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = {PSO_END}; |
| 20 | #endif |
| 21 | |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 22 | static void agesa_locate_image(AMD_CONFIG_PARAMS *StdHeader) |
| 23 | { |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 24 | const char ModuleIdentifier[] = AGESA_ID; |
| 25 | const void *agesa, *image; |
| 26 | size_t file_size; |
| 27 | |
Julius Werner | 834b3ec | 2020-03-04 16:52:08 -0800 | [diff] [blame] | 28 | agesa = cbfs_map((const char *)CONFIG_AGESA_CBFS_NAME, &file_size); |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 29 | if (agesa == NULL) |
| 30 | return; |
| 31 | |
| 32 | image = LibAmdLocateImage(agesa, agesa + file_size, 4096, |
| 33 | ModuleIdentifier); |
Elyes Haouas | 76c6323 | 2022-07-16 09:47:00 +0200 | [diff] [blame] | 34 | StdHeader->ImageBasePtr = (void *)image; |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 35 | } |
| 36 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 37 | void agesa_set_interface(struct sysinfo *cb) |
| 38 | { |
| 39 | memset(&cb->StdHeader, 0, sizeof(AMD_CONFIG_PARAMS)); |
| 40 | |
| 41 | cb->StdHeader.CalloutPtr = GetBiosCallout; |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 42 | |
Arthur Heymans | 81a4fef | 2022-11-01 23:33:45 +0100 | [diff] [blame] | 43 | agesa_locate_image(&cb->StdHeader); |
| 44 | AMD_IMAGE_HEADER *image = |
| 45 | (void *)(uintptr_t)cb->StdHeader.ImageBasePtr; |
| 46 | ASSERT(image); |
| 47 | AMD_MODULE_HEADER *module = |
| 48 | (void *)(uintptr_t)image->ModuleInfoOffset; |
| 49 | ASSERT(module && module->ModuleDispatcher); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | AGESA_STATUS module_dispatch(AGESA_STRUCT_NAME func, |
| 53 | AMD_CONFIG_PARAMS *StdHeader) |
| 54 | { |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 55 | MODULE_ENTRY dispatcher; |
| 56 | |
Elyes HAOUAS | b0b0c8c | 2018-07-08 12:33:47 +0200 | [diff] [blame] | 57 | AMD_IMAGE_HEADER *image = (void *)(uintptr_t)StdHeader->ImageBasePtr; |
| 58 | AMD_MODULE_HEADER *module = (void *)(uintptr_t)image->ModuleInfoOffset; |
Kyösti Mälkki | dbd6495 | 2017-07-16 16:08:58 +0300 | [diff] [blame] | 59 | dispatcher = module->ModuleDispatcher; |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 60 | |
| 61 | StdHeader->Func = func; |
| 62 | return dispatcher(StdHeader); |
| 63 | } |
| 64 | |
| 65 | static AGESA_STATUS amd_create_struct(AMD_INTERFACE_PARAMS *aip, |
| 66 | AGESA_STRUCT_NAME func, void *buf, size_t len) |
| 67 | { |
| 68 | aip->AgesaFunctionName = func; |
| 69 | aip->AllocationMethod = 0; |
| 70 | aip->NewStructPtr = buf; |
| 71 | aip->NewStructSize = len; |
| 72 | if (buf != NULL && len != 0) |
| 73 | aip->AllocationMethod = ByHost; |
| 74 | |
| 75 | return module_dispatch(AMD_CREATE_STRUCT, &aip->StdHeader); |
| 76 | } |
| 77 | |
| 78 | static AGESA_STATUS amd_release_struct(AMD_INTERFACE_PARAMS *aip) |
| 79 | { |
| 80 | /* Cannot release AMD_LATE_PARAMS until ACPI tables are done. */ |
| 81 | if (aip->AgesaFunctionName == AMD_INIT_LATE) |
| 82 | return AGESA_SUCCESS; |
| 83 | |
| 84 | return module_dispatch(AMD_RELEASE_STRUCT, &aip->StdHeader); |
| 85 | } |
| 86 | |
| 87 | /* By design, for each valid AGESA_STRUCT_NAME, AMD_CONFIG_PARAMS |
| 88 | * can be evaluated to apply correct typecast based on Func field. |
| 89 | */ |
| 90 | |
Kyösti Mälkki | a18f58b | 2017-07-25 11:34:43 +0300 | [diff] [blame] | 91 | static AGESA_STATUS romstage_dispatch(struct sysinfo *cb, |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 92 | AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader) |
| 93 | { |
| 94 | AGESA_STATUS status = AGESA_UNSUPPORTED; |
| 95 | |
| 96 | switch (func) |
| 97 | { |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 98 | case AMD_INIT_RESET: |
| 99 | { |
| 100 | AMD_RESET_PARAMS *param = (void *)StdHeader; |
| 101 | platform_BeforeInitReset(cb, param); |
| 102 | board_BeforeInitReset(cb, param); |
| 103 | status = module_dispatch(func, StdHeader); |
| 104 | break; |
| 105 | } |
| 106 | |
| 107 | case AMD_INIT_EARLY: |
| 108 | { |
| 109 | AMD_EARLY_PARAMS *param = (void *)StdHeader; |
| 110 | platform_BeforeInitEarly(cb, param); |
| 111 | board_BeforeInitEarly(cb, param); |
| 112 | status = module_dispatch(func, StdHeader); |
| 113 | break; |
| 114 | } |
| 115 | |
| 116 | case AMD_INIT_POST: |
| 117 | { |
| 118 | AMD_POST_PARAMS *param = (void *)StdHeader; |
| 119 | platform_BeforeInitPost(cb, param); |
| 120 | board_BeforeInitPost(cb, param); |
| 121 | status = module_dispatch(func, StdHeader); |
Kyösti Mälkki | 43f6d9d | 2019-03-14 14:59:31 +0200 | [diff] [blame] | 122 | |
| 123 | /* FIXME: Detect if TSC frequency really |
| 124 | * changed during raminit? */ |
| 125 | timestamp_rescale_table(1, 4); |
| 126 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 127 | platform_AfterInitPost(cb, param); |
| 128 | break; |
| 129 | } |
| 130 | |
| 131 | case AMD_INIT_RESUME: |
| 132 | { |
| 133 | AMD_RESUME_PARAMS *param = (void *)StdHeader; |
| 134 | platform_BeforeInitResume(cb, param); |
| 135 | status = module_dispatch(func, StdHeader); |
Kyösti Mälkki | 43f6d9d | 2019-03-14 14:59:31 +0200 | [diff] [blame] | 136 | |
| 137 | /* FIXME: Detect if TSC frequency really |
| 138 | * changed during raminit? */ |
| 139 | timestamp_rescale_table(1, 4); |
| 140 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 141 | platform_AfterInitResume(cb, param); |
| 142 | break; |
| 143 | } |
| 144 | |
Kyösti Mälkki | a18f58b | 2017-07-25 11:34:43 +0300 | [diff] [blame] | 145 | default: |
| 146 | { |
| 147 | break; |
| 148 | } |
Kyösti Mälkki | a18f58b | 2017-07-25 11:34:43 +0300 | [diff] [blame] | 149 | } |
| 150 | return status; |
| 151 | } |
| 152 | |
| 153 | static AGESA_STATUS ramstage_dispatch(struct sysinfo *cb, |
| 154 | AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader) |
| 155 | { |
| 156 | AGESA_STATUS status = AGESA_UNSUPPORTED; |
| 157 | |
| 158 | switch (func) |
| 159 | { |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 160 | case AMD_INIT_ENV: |
| 161 | { |
| 162 | AMD_ENV_PARAMS *param = (void *)StdHeader; |
| 163 | platform_BeforeInitEnv(cb, param); |
| 164 | board_BeforeInitEnv(cb, param); |
| 165 | status = module_dispatch(func, StdHeader); |
| 166 | platform_AfterInitEnv(cb, param); |
| 167 | break; |
| 168 | } |
| 169 | |
| 170 | case AMD_S3LATE_RESTORE: |
| 171 | { |
| 172 | AMD_S3LATE_PARAMS *param = (void *)StdHeader; |
| 173 | platform_BeforeS3LateRestore(cb, param); |
| 174 | status = module_dispatch(func, StdHeader); |
| 175 | platform_AfterS3LateRestore(cb, param); |
| 176 | break; |
| 177 | } |
Kyösti Mälkki | 21e609c | 2017-03-09 20:08:15 +0200 | [diff] [blame] | 178 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 179 | case AMD_INIT_MID: |
| 180 | { |
| 181 | AMD_MID_PARAMS *param = (void *)StdHeader; |
| 182 | platform_BeforeInitMid(cb, param); |
| 183 | board_BeforeInitMid(cb, param); |
| 184 | status = module_dispatch(func, StdHeader); |
| 185 | break; |
| 186 | } |
| 187 | |
| 188 | case AMD_S3_SAVE: |
| 189 | { |
| 190 | AMD_S3SAVE_PARAMS *param = (void *)StdHeader; |
| 191 | status = module_dispatch(func, StdHeader); |
| 192 | platform_AfterS3Save(cb, param); |
| 193 | break; |
| 194 | } |
Kyösti Mälkki | a18f58b | 2017-07-25 11:34:43 +0300 | [diff] [blame] | 195 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 196 | case AMD_INIT_LATE: |
| 197 | { |
| 198 | AMD_LATE_PARAMS *param = (void *)StdHeader; |
Michał Żygowski | 506b9c1 | 2019-12-20 16:57:13 +0100 | [diff] [blame] | 199 | platform_BeforeInitLate(cb, param); |
| 200 | board_BeforeInitLate(cb, param); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 201 | status = module_dispatch(func, StdHeader); |
| 202 | platform_AfterInitLate(cb, param); |
| 203 | completion_InitLate(cb, param); |
| 204 | break; |
| 205 | } |
Kyösti Mälkki | a18f58b | 2017-07-25 11:34:43 +0300 | [diff] [blame] | 206 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 207 | default: |
| 208 | { |
| 209 | break; |
| 210 | } |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 211 | } |
| 212 | return status; |
| 213 | } |
| 214 | |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 215 | int agesa_execute_state(struct sysinfo *cb, AGESA_STRUCT_NAME func) |
| 216 | { |
| 217 | AMD_INTERFACE_PARAMS aip; |
| 218 | union { |
| 219 | AMD_RESET_PARAMS reset; |
Kyösti Mälkki | 21e609c | 2017-03-09 20:08:15 +0200 | [diff] [blame] | 220 | AMD_S3LATE_PARAMS s3late; |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 221 | } agesa_params; |
| 222 | void *buf = NULL; |
| 223 | size_t len = 0; |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 224 | |
| 225 | AGESA_STATUS status, final; |
| 226 | |
| 227 | struct agesa_state task; |
| 228 | memset(&task, 0, sizeof(task)); |
Kyösti Mälkki | d1d4f93 | 2017-09-24 08:21:00 +0300 | [diff] [blame] | 229 | agesa_state_on_entry(&task, func); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 230 | |
| 231 | aip.StdHeader = cb->StdHeader; |
| 232 | |
| 233 | /* For these calls, heap is not available. */ |
Kyösti Mälkki | 21e609c | 2017-03-09 20:08:15 +0200 | [diff] [blame] | 234 | if (func == AMD_INIT_RESET || func == AMD_S3LATE_RESTORE) { |
Elyes Haouas | 76c6323 | 2022-07-16 09:47:00 +0200 | [diff] [blame] | 235 | buf = (void *)&agesa_params; |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 236 | len = sizeof(agesa_params); |
| 237 | memcpy(buf, &cb->StdHeader, sizeof(cb->StdHeader)); |
| 238 | } |
| 239 | |
| 240 | status = amd_create_struct(&aip, func, buf, len); |
| 241 | ASSERT(status == AGESA_SUCCESS); |
| 242 | |
| 243 | /* Must call the function buffer was allocated for.*/ |
| 244 | AMD_CONFIG_PARAMS *StdHeader = aip.NewStructPtr; |
Jacob Garber | 176670e | 2019-06-04 15:13:46 -0600 | [diff] [blame] | 245 | ASSERT(StdHeader != NULL && StdHeader->Func == func); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 246 | |
Kyösti Mälkki | 43f6d9d | 2019-03-14 14:59:31 +0200 | [diff] [blame] | 247 | if (CONFIG(AGESA_EXTRA_TIMESTAMPS) && task.ts_entry_id) |
| 248 | timestamp_add_now(task.ts_entry_id); |
| 249 | |
Kyösti Mälkki | 11cac78 | 2022-04-07 07:16:48 +0300 | [diff] [blame] | 250 | if (ENV_RAMINIT) |
Kyösti Mälkki | a18f58b | 2017-07-25 11:34:43 +0300 | [diff] [blame] | 251 | final = romstage_dispatch(cb, func, StdHeader); |
| 252 | |
| 253 | if (ENV_RAMSTAGE) |
| 254 | final = ramstage_dispatch(cb, func, StdHeader); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 255 | |
Kyösti Mälkki | 43f6d9d | 2019-03-14 14:59:31 +0200 | [diff] [blame] | 256 | if (CONFIG(AGESA_EXTRA_TIMESTAMPS) && task.ts_exit_id) |
| 257 | timestamp_add_now(task.ts_exit_id); |
| 258 | |
Kyösti Mälkki | d1d4f93 | 2017-09-24 08:21:00 +0300 | [diff] [blame] | 259 | agesawrapper_trace(final, StdHeader, task.function_name); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 260 | ASSERT(final < AGESA_FATAL); |
| 261 | |
| 262 | status = amd_release_struct(&aip); |
| 263 | ASSERT(status == AGESA_SUCCESS); |
| 264 | |
Kyösti Mälkki | d1d4f93 | 2017-09-24 08:21:00 +0300 | [diff] [blame] | 265 | agesa_state_on_exit(&task, &aip.StdHeader); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 266 | |
| 267 | return (final < AGESA_FATAL) ? 0 : -1; |
| 268 | } |
| 269 | |
| 270 | #if ENV_RAMSTAGE |
| 271 | |
| 272 | static void amd_bs_ramstage_init(void *arg) |
| 273 | { |
| 274 | struct sysinfo *cb = arg; |
| 275 | |
| 276 | agesa_set_interface(cb); |
Kyösti Mälkki | 21e609c | 2017-03-09 20:08:15 +0200 | [diff] [blame] | 277 | |
| 278 | if (!acpi_is_wakeup_s3()) |
| 279 | agesa_execute_state(cb, AMD_INIT_ENV); |
| 280 | else { |
Kyösti Mälkki | 21e609c | 2017-03-09 20:08:15 +0200 | [diff] [blame] | 281 | agesa_execute_state(cb, AMD_S3LATE_RESTORE); |
Kyösti Mälkki | 38aff1a | 2017-07-26 00:57:30 +0300 | [diff] [blame] | 282 | fchs3earlyrestore(&cb->StdHeader); |
Kyösti Mälkki | 21e609c | 2017-03-09 20:08:15 +0200 | [diff] [blame] | 283 | } |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | void sb_After_Pci_Restore_Init(void); |
| 287 | |
| 288 | static void amd_bs_dev_enable(void *arg) |
| 289 | { |
| 290 | struct sysinfo *cb = arg; |
| 291 | |
| 292 | if (!acpi_is_wakeup_s3()) |
| 293 | agesa_execute_state(cb, AMD_INIT_MID); |
| 294 | |
| 295 | /* FIXME */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 296 | if (CONFIG(AMD_SB_CIMX) && acpi_is_wakeup_s3()) |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 297 | sb_After_Pci_Restore_Init(); |
| 298 | } |
| 299 | |
| 300 | static void amd_bs_post_device(void *arg) |
| 301 | { |
| 302 | struct sysinfo *cb = arg; |
| 303 | |
Kyösti Mälkki | 38aff1a | 2017-07-26 00:57:30 +0300 | [diff] [blame] | 304 | if (acpi_is_wakeup_s3()) { |
| 305 | fchs3laterestore(&cb->StdHeader); |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 306 | return; |
Kyösti Mälkki | 38aff1a | 2017-07-26 00:57:30 +0300 | [diff] [blame] | 307 | } |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 308 | |
| 309 | agesa_execute_state(cb, AMD_INIT_LATE); |
| 310 | |
| 311 | if (!acpi_s3_resume_allowed()) |
| 312 | return; |
| 313 | |
| 314 | agesa_execute_state(cb, AMD_S3_SAVE); |
| 315 | } |
| 316 | |
| 317 | static struct sysinfo state_machine; |
| 318 | |
| 319 | BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, amd_bs_ramstage_init, |
| 320 | &state_machine); |
| 321 | |
| 322 | BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, amd_bs_dev_enable, |
| 323 | &state_machine); |
| 324 | |
| 325 | BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_EXIT, amd_bs_post_device, |
| 326 | &state_machine); |
| 327 | |
| 328 | #endif /* ENV_RAMSTAGE */ |
| 329 | |
| 330 | /* Empty stubs for cases board does not need to override anything. */ |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 331 | void __weak |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 332 | board_BeforeInitReset(struct sysinfo *cb, AMD_RESET_PARAMS *Reset) { } |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 333 | void __weak |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 334 | board_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early) { } |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 335 | void __weak |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 336 | board_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post) { } |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 337 | void __weak |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 338 | board_BeforeInitEnv(struct sysinfo *cb, AMD_ENV_PARAMS *Env) { } |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 339 | void __weak |
Kyösti Mälkki | 28c4d2f | 2016-11-25 11:21:02 +0200 | [diff] [blame] | 340 | board_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *Mid) { } |
Michał Żygowski | 506b9c1 | 2019-12-20 16:57:13 +0100 | [diff] [blame] | 341 | void __weak |
| 342 | board_BeforeInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late) { } |
Kyösti Mälkki | 38aff1a | 2017-07-26 00:57:30 +0300 | [diff] [blame] | 343 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 344 | AGESA_STATUS __weak |
Kyösti Mälkki | 38aff1a | 2017-07-26 00:57:30 +0300 | [diff] [blame] | 345 | fchs3earlyrestore(AMD_CONFIG_PARAMS *StdHeader) |
| 346 | { |
| 347 | return AGESA_SUCCESS; |
| 348 | } |
| 349 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 350 | AGESA_STATUS __weak |
Kyösti Mälkki | 38aff1a | 2017-07-26 00:57:30 +0300 | [diff] [blame] | 351 | fchs3laterestore(AMD_CONFIG_PARAMS *StdHeader) |
| 352 | { |
| 353 | return AGESA_SUCCESS; |
| 354 | } |