aboutsummaryrefslogtreecommitdiff
path: root/src/acpi/acpigen_extern.asl
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-01-19 14:12:19 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-01-28 08:58:13 +0000
commitfa5f9b5aff2279d6304a8b197e12714934025575 (patch)
treeb98a0171164a119eca68ebf699e545c5c32d9f9c /src/acpi/acpigen_extern.asl
parente76ce871c8f84aef38fbf9df9c8bee3c10c085d7 (diff)
ACPI: Declare GNVS variables globally
There is a common place where acpigen generates these, so the declarations for the OperationRegions should be centralized too. Change-Id: I772492ca9e651b60244c565d1e926dc2ad33cfd8 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49795 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi/acpigen_extern.asl')
-rw-r--r--src/acpi/acpigen_extern.asl20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/acpi/acpigen_extern.asl b/src/acpi/acpigen_extern.asl
new file mode 100644
index 0000000000..73d626fbea
--- /dev/null
+++ b/src/acpi/acpigen_extern.asl
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/*
+ * Global ACPI memory region. This region is used for passing information
+ * between coreboot (aka "the system bios"), ACPI, and the SMI handler.
+ * Since we don't know where this will end up in memory at ACPI compile time,
+ * we provide it runtime via NVBx and NVSx variables from acpigen.
+ */
+
+#if CONFIG(ACPI_SOC_NVS)
+External (NVB0, IntObj)
+External (NVS0, IntObj)
+OperationRegion (GNVS, SystemMemory, NVB0, NVS0)
+#endif
+
+#if CONFIG(ACPI_HAS_DEVICE_NVS)
+External (NVB1, IntObj)
+External (NVS1, IntObj)
+OperationRegion (DNVS, SystemMemory, NVB1, NVS1)
+#endif