ChromeOS: Separate NVS from global GNVS
Allocate chromeos_acpi in CBMEM separately from GNVS.
Change-Id: Ide55964ed53ea1d5b3c1c4e3ebd67286b7d568e4
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index 12fa213..5f9767e8 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -1704,6 +1704,8 @@
if (CONFIG(ACPI_SOC_NVS))
acpi_fill_gnvs();
+ if (CONFIG(CHROMEOS_NVS))
+ acpi_fill_cnvs();
for (dev = all_devices; dev; dev = dev->next)
if (dev->ops && dev->ops->acpi_inject_dsdt)
diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c
index 856c105..d7fe380 100644
--- a/src/acpi/gnvs.c
+++ b/src/acpi/gnvs.c
@@ -37,11 +37,6 @@
if (CONFIG(CONSOLE_CBMEM))
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
-
- if (CONFIG(CHROMEOS_NVS)) {
- chromeos_acpi_t *init = (void *)((u8 *)gnvs + GNVS_CHROMEOS_ACPI_OFFSET);
- chromeos_init_chromeos_acpi(init);
- }
}
void *acpi_get_gnvs(void)
@@ -70,8 +65,6 @@
void acpi_fill_gnvs(void)
{
const struct opregion gnvs_op = OPREGION("GNVS", SYSTEMMEMORY, (uintptr_t)gnvs, 0x100);
- const struct opregion cnvs_op = OPREGION("CNVS", SYSTEMMEMORY,
- (uintptr_t)gnvs + GNVS_CHROMEOS_ACPI_OFFSET, 0xf00);
const struct opregion dnvs_op = OPREGION("DNVS", SYSTEMMEMORY,
(uintptr_t)gnvs + GNVS_DEVICE_NVS_OFFSET, 0x1000);
@@ -84,9 +77,6 @@
acpigen_write_scope("\\");
acpigen_write_opregion(&gnvs_op);
- if (CONFIG(CHROMEOS_NVS))
- acpigen_write_opregion(&cnvs_op);
-
if (CONFIG(ACPI_HAS_DEVICE_NVS))
acpigen_write_opregion(&dnvs_op);