summaryrefslogtreecommitdiff
path: root/src/acpi/gnvs.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-01-15 05:58:42 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-02-16 09:28:42 +0000
commit4de1a31cb04f0363b6d257d9de392cdfe8d5644c (patch)
tree80a674e5d82d33c5e133d31676ab48bad409798e /src/acpi/gnvs.c
parentcdd2f63947549e9b478f26942daf400cf4f246e6 (diff)
downloadcoreboot-4de1a31cb04f0363b6d257d9de392cdfe8d5644c.tar.gz
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>
Diffstat (limited to 'src/acpi/gnvs.c')
-rw-r--r--src/acpi/gnvs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c
index 63740d037f..01aff62907 100644
--- a/src/acpi/gnvs.c
+++ b/src/acpi/gnvs.c
@@ -92,3 +92,16 @@ void acpi_fill_gnvs(void)
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;
+}