ACPI: Add acpi_reset_gnvs_for_wake()
With chipset_power_state filled in romstage CBMEM hooks and
GNVS allocated early in ramstage, GNVS wake source is now
also filled for normal boot path.
Change-Id: I2d44770392d14d2d6e22cc98df9d1751c8717ff3
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50004
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c
index 63740d0..01aff62 100644
--- a/src/acpi/gnvs.c
+++ b/src/acpi/gnvs.c
@@ -92,3 +92,16 @@
acpigen_pop_len();
}
}
+
+int acpi_reset_gnvs_for_wake(struct global_nvs **gnvs_)
+{
+ if (!gnvs)
+ return -1;
+
+ /* Set unknown wake source */
+ gnvs->pm1i = -1;
+ gnvs->gpei = -1;
+
+ *gnvs_ = gnvs;
+ return 0;
+}