AGESA f15tn f16kb: Fix ACPI S3 resume for FCH
This recovers FCH configuration on S3 resume path.
Appearst to work, but other defects of HAVE_ACPI_RESUME
must be fixed also before S3 support is re-enabled.
Change-Id: I8d07d2e9dc161b67d854fcc8ec1da1f36900f989
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/21376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/src/northbridge/amd/agesa/state_machine.c b/src/northbridge/amd/agesa/state_machine.c
index 3f61c58..7743603 100644
--- a/src/northbridge/amd/agesa/state_machine.c
+++ b/src/northbridge/amd/agesa/state_machine.c
@@ -330,6 +330,7 @@
if (IS_ENABLED(CONFIG_LATE_CBMEM_INIT))
cbmem_initialize();
agesa_execute_state(cb, AMD_S3LATE_RESTORE);
+ fchs3earlyrestore(&cb->StdHeader);
}
}
@@ -351,8 +352,10 @@
{
struct sysinfo *cb = arg;
- if (acpi_is_wakeup_s3())
+ if (acpi_is_wakeup_s3()) {
+ fchs3laterestore(&cb->StdHeader);
return;
+ }
agesa_execute_state(cb, AMD_INIT_LATE);
@@ -386,3 +389,15 @@
board_BeforeInitEnv(struct sysinfo *cb, AMD_ENV_PARAMS *Env) { }
void __attribute__((weak))
board_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *Mid) { }
+
+AGESA_STATUS __attribute__((weak))
+fchs3earlyrestore(AMD_CONFIG_PARAMS *StdHeader)
+{
+ return AGESA_SUCCESS;
+}
+
+AGESA_STATUS __attribute__((weak))
+fchs3laterestore(AMD_CONFIG_PARAMS *StdHeader)
+{
+ return AGESA_SUCCESS;
+}