ACPI: Select ACPI_SOC_NVS only where suitable
Having some symmetry with <soc/nvs.h> now allows to reduce
the amount of gluelogic to determine the size and cbmc field
of struct global_nvs.
Since GNVS creation is now controlled by ACPI_SOC_NVS,
drivers/amd/agesa/nvs.c becomes obsolete and soc/amd/cezanne
cannot have this selected until <soc/nvs.h> exists.
Change-Id: Ia9ec853ff7f5e7908f7e8fc179ac27d0da08e19d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49344
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lance Zhao
diff --git a/src/acpi/nvs.c b/src/acpi/nvs.c
index 0638191..a7915f2 100644
--- a/src/acpi/nvs.c
+++ b/src/acpi/nvs.c
@@ -15,9 +15,13 @@
}
/* Some <soc/nvs.h> have no chromeos entry. */
-#if CONFIG(MAINBOARD_HAS_CHROMEOS)
void *gnvs_chromeos_ptr(struct global_nvs *gnvs)
{
+#if CONFIG(BOARD_EMULATION_QEMU_X86_Q35)
+ return NULL;
+#elif CONFIG(MAINBOARD_HAS_CHROMEOS)
return &gnvs->chromeos;
-}
+#else
+ return NULL;
#endif
+}
diff --git a/src/drivers/amd/agesa/Makefile.inc b/src/drivers/amd/agesa/Makefile.inc
index 246ed8b..6d80c4c 100644
--- a/src/drivers/amd/agesa/Makefile.inc
+++ b/src/drivers/amd/agesa/Makefile.inc
@@ -20,7 +20,6 @@
ramstage-y += eventlog.c
ramstage-y += heapmanager.c
ramstage-y += acpi_tables.c
-ramstage-y += nvs.c
romstage-$(CONFIG_CPU_AMD_AGESA) += oem_s3.c
ramstage-$(CONFIG_CPU_AMD_AGESA) += oem_s3.c s3_mtrr.c
diff --git a/src/drivers/amd/agesa/nvs.c b/src/drivers/amd/agesa/nvs.c
deleted file mode 100644
index 5bde9d5..0000000
--- a/src/drivers/amd/agesa/nvs.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-#include <acpi/acpi_gnvs.h>
-#include <stdint.h>
-
-size_t gnvs_size_of_array(void)
-{
- return 0;
-}
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index d040a0e..53ba753 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -449,7 +449,7 @@
threads_initialize();
/* Initialise GNVS early. */
- if (CONFIG(HAVE_ACPI_TABLES))
+ if (CONFIG(ACPI_SOC_NVS))
gnvs_get_or_create();
/* Schedule the static boot state entries. */
diff --git a/src/mainboard/acer/g43t-am3/acpi_tables.c b/src/mainboard/acer/g43t-am3/acpi_tables.c
index 2bdb744..faf91e7 100644
--- a/src/mainboard/acer/g43t-am3/acpi_tables.c
+++ b/src/mainboard/acer/g43t-am3/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801jx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/apple/macbook21/acpi_tables.c b/src/mainboard/apple/macbook21/acpi_tables.c
index 6970dfc..cc64c30 100644
--- a/src/mainboard/apple/macbook21/acpi_tables.c
+++ b/src/mainboard/apple/macbook21/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/apple/macbook21/smihandler.c b/src/mainboard/apple/macbook21/smihandler.c
index d6fe470..8219d60 100644
--- a/src/mainboard/apple/macbook21/smihandler.c
+++ b/src/mainboard/apple/macbook21/smihandler.c
@@ -2,7 +2,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#define GPE_EC_SCI 12
diff --git a/src/mainboard/apple/macbookair4_2/gnvs.c b/src/mainboard/apple/macbookair4_2/gnvs.c
index 06763d3..5ec2f712 100644
--- a/src/mainboard/apple/macbookair4_2/gnvs.c
+++ b/src/mainboard/apple/macbookair4_2/gnvs.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asrock/b75pro3-m/acpi_tables.c b/src/mainboard/asrock/b75pro3-m/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/asrock/b75pro3-m/acpi_tables.c
+++ b/src/mainboard/asrock/b75pro3-m/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asrock/b85m_pro4/acpi_tables.c b/src/mainboard/asrock/b85m_pro4/acpi_tables.c
index 59c4186..230584e 100644
--- a/src/mainboard/asrock/b85m_pro4/acpi_tables.c
+++ b/src/mainboard/asrock/b85m_pro4/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asrock/g41c-gs/acpi_tables.c b/src/mainboard/asrock/g41c-gs/acpi_tables.c
index 720652663..99bf06a 100644
--- a/src/mainboard/asrock/g41c-gs/acpi_tables.c
+++ b/src/mainboard/asrock/g41c-gs/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p5qc/acpi_tables.c b/src/mainboard/asus/p5qc/acpi_tables.c
index 0d0b24c..1e75ed6 100644
--- a/src/mainboard/asus/p5qc/acpi_tables.c
+++ b/src/mainboard/asus/p5qc/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801jx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p5ql-em/acpi_tables.c b/src/mainboard/asus/p5ql-em/acpi_tables.c
index e678bab..dcc7849 100644
--- a/src/mainboard/asus/p5ql-em/acpi_tables.c
+++ b/src/mainboard/asus/p5ql-em/acpi_tables.c
@@ -2,7 +2,7 @@
#include <acpi/acpigen.h>
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801jx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p5qpl-am/acpi_tables.c b/src/mainboard/asus/p5qpl-am/acpi_tables.c
index 720652663..99bf06a 100644
--- a/src/mainboard/asus/p5qpl-am/acpi_tables.c
+++ b/src/mainboard/asus/p5qpl-am/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi_tables.c b/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi_tables.c
+++ b/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p8h61-m_pro/acpi_tables.c b/src/mainboard/asus/p8h61-m_pro/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/asus/p8h61-m_pro/acpi_tables.c
+++ b/src/mainboard/asus/p8h61-m_pro/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p8z77-m_pro/acpi_tables.c b/src/mainboard/asus/p8z77-m_pro/acpi_tables.c
index c1da5cb..a4204f1 100644
--- a/src/mainboard/asus/p8z77-m_pro/acpi_tables.c
+++ b/src/mainboard/asus/p8z77-m_pro/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/asus/p8z77-v_lx2/acpi_tables.c b/src/mainboard/asus/p8z77-v_lx2/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/asus/p8z77-v_lx2/acpi_tables.c
+++ b/src/mainboard/asus/p8z77-v_lx2/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/compulab/intense_pc/acpi_tables.c b/src/mainboard/compulab/intense_pc/acpi_tables.c
index fba85e1..e8e2657 100644
--- a/src/mainboard/compulab/intense_pc/acpi_tables.c
+++ b/src/mainboard/compulab/intense_pc/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
/* FIXME: check this function. */
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/dell/optiplex_9010/acpi_tables.c b/src/mainboard/dell/optiplex_9010/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/dell/optiplex_9010/acpi_tables.c
+++ b/src/mainboard/dell/optiplex_9010/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/emulation/qemu-q35/acpi_tables.c b/src/mainboard/emulation/qemu-q35/acpi_tables.c
index b95e34c..93c4f90 100644
--- a/src/mainboard/emulation/qemu-q35/acpi_tables.c
+++ b/src/mainboard/emulation/qemu-q35/acpi_tables.c
@@ -11,7 +11,7 @@
#include "../qemu-i440fx/fw_cfg.h"
#include "../qemu-i440fx/acpi.h"
-#include <southbridge/intel/i82801ix/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/foxconn/g41s-k/acpi_tables.c b/src/mainboard/foxconn/g41s-k/acpi_tables.c
index 38c0704..3728539 100644
--- a/src/mainboard/foxconn/g41s-k/acpi_tables.c
+++ b/src/mainboard/foxconn/g41s-k/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/getac/p470/acpi_tables.c b/src/mainboard/getac/p470/acpi_tables.c
index 96e3d31..69d1896 100644
--- a/src/mainboard/getac/p470/acpi_tables.c
+++ b/src/mainboard/getac/p470/acpi_tables.c
@@ -5,7 +5,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
#include "mainboard.h"
diff --git a/src/mainboard/getac/p470/smihandler.c b/src/mainboard/getac/p470/smihandler.c
index 21f4e3e..e69627a 100644
--- a/src/mainboard/getac/p470/smihandler.c
+++ b/src/mainboard/getac/p470/smihandler.c
@@ -4,7 +4,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <southbridge/intel/i82801gx/i82801gx.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/gpio.h>
#include <ec/acpi/ec.h>
#include "ec_oem.c"
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c b/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
index f22470c..64f3f04 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/acpi_tables.c b/src/mainboard/gigabyte/ga-g41m-es2l/acpi_tables.c
index 78f2ad6..15238b3 100644
--- a/src/mainboard/gigabyte/ga-g41m-es2l/acpi_tables.c
+++ b/src/mainboard/gigabyte/ga-g41m-es2l/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/google/beltino/acpi_tables.c b/src/mainboard/google/beltino/acpi_tables.c
index e96edad..c3c90a4 100644
--- a/src/mainboard/google/beltino/acpi_tables.c
+++ b/src/mainboard/google/beltino/acpi_tables.c
@@ -3,7 +3,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/lynxpoint/pch.h>
#include <variant/thermal.h>
diff --git a/src/mainboard/google/beltino/smihandler.c b/src/mainboard/google/beltino/smihandler.c
index 3e09606..4280f7a 100644
--- a/src/mainboard/google/beltino/smihandler.c
+++ b/src/mainboard/google/beltino/smihandler.c
@@ -5,7 +5,7 @@
#include <cpu/x86/smm.h>
#include <northbridge/intel/haswell/haswell.h>
#include <southbridge/intel/lynxpoint/me.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/lynxpoint/pch.h>
#include <superio/ite/it8772f/it8772f.h>
diff --git a/src/mainboard/google/butterfly/acpi_tables.c b/src/mainboard/google/butterfly/acpi_tables.c
index ba1aa81..29faea3 100644
--- a/src/mainboard/google/butterfly/acpi_tables.c
+++ b/src/mainboard/google/butterfly/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/google/butterfly/mainboard_smi.c b/src/mainboard/google/butterfly/mainboard_smi.c
index d71d9bf..1f45055 100644
--- a/src/mainboard/google/butterfly/mainboard_smi.c
+++ b/src/mainboard/google/butterfly/mainboard_smi.c
@@ -3,7 +3,7 @@
#include <acpi/acpi_gnvs.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
diff --git a/src/mainboard/google/link/acpi_tables.c b/src/mainboard/google/link/acpi_tables.c
index cc3f9a8..9a23474 100644
--- a/src/mainboard/google/link/acpi_tables.c
+++ b/src/mainboard/google/link/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/google/link/mainboard_smi.c b/src/mainboard/google/link/mainboard_smi.c
index 827ec17..8d4b4bd 100644
--- a/src/mainboard/google/link/mainboard_smi.c
+++ b/src/mainboard/google/link/mainboard_smi.c
@@ -4,7 +4,7 @@
#include <acpi/acpi_gnvs.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/pmbase.h>
diff --git a/src/mainboard/google/parrot/acpi_tables.c b/src/mainboard/google/parrot/acpi_tables.c
index 2a2e242..1cb4597 100644
--- a/src/mainboard/google/parrot/acpi_tables.c
+++ b/src/mainboard/google/parrot/acpi_tables.c
@@ -7,7 +7,7 @@
#include "ec.h"
#include <southbridge/intel/bd82x6x/pch.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
#include "onboard.h"
diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c
index e0192ce..c5fb853 100644
--- a/src/mainboard/google/parrot/smihandler.c
+++ b/src/mainboard/google/parrot/smihandler.c
@@ -2,7 +2,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/pmutil.h>
diff --git a/src/mainboard/google/slippy/acpi_tables.c b/src/mainboard/google/slippy/acpi_tables.c
index 023107e..1198f41 100644
--- a/src/mainboard/google/slippy/acpi_tables.c
+++ b/src/mainboard/google/slippy/acpi_tables.c
@@ -4,7 +4,7 @@
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <southbridge/intel/lynxpoint/pch.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
diff --git a/src/mainboard/google/slippy/smihandler.c b/src/mainboard/google/slippy/smihandler.c
index 7ac5ef7..81fcb0a 100644
--- a/src/mainboard/google/slippy/smihandler.c
+++ b/src/mainboard/google/slippy/smihandler.c
@@ -4,7 +4,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/lynxpoint/pch.h>
#include <southbridge/intel/common/gpio.h>
#include <southbridge/intel/lynxpoint/me.h>
diff --git a/src/mainboard/google/stout/acpi_tables.c b/src/mainboard/google/stout/acpi_tables.c
index 88ff2ae..fe12e30 100644
--- a/src/mainboard/google/stout/acpi_tables.c
+++ b/src/mainboard/google/stout/acpi_tables.c
@@ -9,7 +9,7 @@
#include "onboard.h"
#include <southbridge/intel/bd82x6x/pch.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/google/stout/mainboard_smi.c b/src/mainboard/google/stout/mainboard_smi.c
index ef4b4cd..d282bc7 100644
--- a/src/mainboard/google/stout/mainboard_smi.c
+++ b/src/mainboard/google/stout/mainboard_smi.c
@@ -4,7 +4,7 @@
#include <device/pci_ops.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/pmbase.h>
diff --git a/src/mainboard/hp/compaq_8200_elite_sff/acpi_tables.c b/src/mainboard/hp/compaq_8200_elite_sff/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/hp/compaq_8200_elite_sff/acpi_tables.c
+++ b/src/mainboard/hp/compaq_8200_elite_sff/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/hp/folio_9480m/acpi_tables.c b/src/mainboard/hp/folio_9480m/acpi_tables.c
index c7fd96e..7aac816f 100644
--- a/src/mainboard/hp/folio_9480m/acpi_tables.c
+++ b/src/mainboard/hp/folio_9480m/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/hp/snb_ivb_laptops/acpi_tables.c b/src/mainboard/hp/snb_ivb_laptops/acpi_tables.c
index 20a67f7..06ca470 100644
--- a/src/mainboard/hp/snb_ivb_laptops/acpi_tables.c
+++ b/src/mainboard/hp/snb_ivb_laptops/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/hp/z220_sff_workstation/acpi_tables.c b/src/mainboard/hp/z220_sff_workstation/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/hp/z220_sff_workstation/acpi_tables.c
+++ b/src/mainboard/hp/z220_sff_workstation/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/ibase/mb899/acpi_tables.c b/src/mainboard/ibase/mb899/acpi_tables.c
index 6970dfc..cc64c30 100644
--- a/src/mainboard/ibase/mb899/acpi_tables.c
+++ b/src/mainboard/ibase/mb899/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/intel/baskingridge/acpi_tables.c b/src/mainboard/intel/baskingridge/acpi_tables.c
index 4aee97a..7e83b8d 100644
--- a/src/mainboard/intel/baskingridge/acpi_tables.c
+++ b/src/mainboard/intel/baskingridge/acpi_tables.c
@@ -4,7 +4,7 @@
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <southbridge/intel/lynxpoint/pch.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
diff --git a/src/mainboard/intel/baskingridge/mainboard_smi.c b/src/mainboard/intel/baskingridge/mainboard_smi.c
index 2c4e44e..59a3c04 100644
--- a/src/mainboard/intel/baskingridge/mainboard_smi.c
+++ b/src/mainboard/intel/baskingridge/mainboard_smi.c
@@ -3,7 +3,7 @@
#include <acpi/acpi.h>
#include <arch/io.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/lynxpoint/pch.h>
#include <southbridge/intel/lynxpoint/me.h>
#include <northbridge/intel/haswell/haswell.h>
diff --git a/src/mainboard/intel/dcp847ske/acpi_tables.c b/src/mainboard/intel/dcp847ske/acpi_tables.c
index ac2f3fb..b8d4421 100644
--- a/src/mainboard/intel/dcp847ske/acpi_tables.c
+++ b/src/mainboard/intel/dcp847ske/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/intel/dg41wv/acpi_tables.c b/src/mainboard/intel/dg41wv/acpi_tables.c
index 720652663..99bf06a 100644
--- a/src/mainboard/intel/dg41wv/acpi_tables.c
+++ b/src/mainboard/intel/dg41wv/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/intel/dg43gt/acpi_tables.c b/src/mainboard/intel/dg43gt/acpi_tables.c
index 0d0b24c..1e75ed6 100644
--- a/src/mainboard/intel/dg43gt/acpi_tables.c
+++ b/src/mainboard/intel/dg43gt/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801jx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/intel/emeraldlake2/acpi_tables.c b/src/mainboard/intel/emeraldlake2/acpi_tables.c
index f0b11c6..3e75d32 100644
--- a/src/mainboard/intel/emeraldlake2/acpi_tables.c
+++ b/src/mainboard/intel/emeraldlake2/acpi_tables.c
@@ -3,7 +3,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
diff --git a/src/mainboard/intel/emeraldlake2/smihandler.c b/src/mainboard/intel/emeraldlake2/smihandler.c
index 19712d9..b1676d4 100644
--- a/src/mainboard/intel/emeraldlake2/smihandler.c
+++ b/src/mainboard/intel/emeraldlake2/smihandler.c
@@ -3,7 +3,7 @@
#include <acpi/acpi.h>
#include <arch/io.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c
index 6970dfc..cc64c30 100644
--- a/src/mainboard/kontron/986lcd-m/acpi_tables.c
+++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/kontron/ktqm77/acpi_tables.c b/src/mainboard/kontron/ktqm77/acpi_tables.c
index f22470c..64f3f04 100644
--- a/src/mainboard/kontron/ktqm77/acpi_tables.c
+++ b/src/mainboard/kontron/ktqm77/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
diff --git a/src/mainboard/lenovo/l520/acpi_tables.c b/src/mainboard/lenovo/l520/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/l520/acpi_tables.c
+++ b/src/mainboard/lenovo/l520/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/s230u/acpi_tables.c b/src/mainboard/lenovo/s230u/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/s230u/acpi_tables.c
+++ b/src/mainboard/lenovo/s230u/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t400/acpi_tables.c b/src/mainboard/lenovo/t400/acpi_tables.c
index 643c106a..ad9bf6a 100644
--- a/src/mainboard/lenovo/t400/acpi_tables.c
+++ b/src/mainboard/lenovo/t400/acpi_tables.c
@@ -5,7 +5,7 @@
#include <acpi/acpi_gnvs.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
-#include <southbridge/intel/i82801ix/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t410/acpi_tables.c b/src/mainboard/lenovo/t410/acpi_tables.c
index 45ae4d3..36d3e85 100644
--- a/src/mainboard/lenovo/t410/acpi_tables.c
+++ b/src/mainboard/lenovo/t410/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/ibexpeak/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t410/smihandler.c b/src/mainboard/lenovo/t410/smihandler.c
index 08b5d2f..ad88a2e 100644
--- a/src/mainboard/lenovo/t410/smihandler.c
+++ b/src/mainboard/lenovo/t410/smihandler.c
@@ -3,7 +3,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/ibexpeak/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include <northbridge/intel/ironlake/ironlake.h>
#include <ec/acpi/ec.h>
diff --git a/src/mainboard/lenovo/t420/acpi_tables.c b/src/mainboard/lenovo/t420/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/t420/acpi_tables.c
+++ b/src/mainboard/lenovo/t420/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t420s/acpi_tables.c b/src/mainboard/lenovo/t420s/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/t420s/acpi_tables.c
+++ b/src/mainboard/lenovo/t420s/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t430/acpi_tables.c b/src/mainboard/lenovo/t430/acpi_tables.c
index 29d8eba..43c7302 100644
--- a/src/mainboard/lenovo/t430/acpi_tables.c
+++ b/src/mainboard/lenovo/t430/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t430s/acpi_tables.c b/src/mainboard/lenovo/t430s/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/t430s/acpi_tables.c
+++ b/src/mainboard/lenovo/t430s/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t440p/acpi_tables.c b/src/mainboard/lenovo/t440p/acpi_tables.c
index 93016a8..0301443 100644
--- a/src/mainboard/lenovo/t440p/acpi_tables.c
+++ b/src/mainboard/lenovo/t440p/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/lynxpoint/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t520/acpi_tables.c b/src/mainboard/lenovo/t520/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/t520/acpi_tables.c
+++ b/src/mainboard/lenovo/t520/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t530/acpi_tables.c b/src/mainboard/lenovo/t530/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/t530/acpi_tables.c
+++ b/src/mainboard/lenovo/t530/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t60/acpi_tables.c b/src/mainboard/lenovo/t60/acpi_tables.c
index 4a9c6ae..d48f1ec 100644
--- a/src/mainboard/lenovo/t60/acpi_tables.c
+++ b/src/mainboard/lenovo/t60/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/t60/smihandler.c b/src/mainboard/lenovo/t60/smihandler.c
index 69ffe33..12a1e53 100644
--- a/src/mainboard/lenovo/t60/smihandler.c
+++ b/src/mainboard/lenovo/t60/smihandler.c
@@ -5,7 +5,7 @@
#include <device/pci_def.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include <ec/acpi/ec.h>
#include "dock.h"
diff --git a/src/mainboard/lenovo/thinkcentre_a58/acpi_tables.c b/src/mainboard/lenovo/thinkcentre_a58/acpi_tables.c
index 720652663..99bf06a 100644
--- a/src/mainboard/lenovo/thinkcentre_a58/acpi_tables.c
+++ b/src/mainboard/lenovo/thinkcentre_a58/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x131e/acpi_tables.c b/src/mainboard/lenovo/x131e/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/x131e/acpi_tables.c
+++ b/src/mainboard/lenovo/x131e/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c b/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
+++ b/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x200/acpi_tables.c b/src/mainboard/lenovo/x200/acpi_tables.c
index 643c106a..ad9bf6a 100644
--- a/src/mainboard/lenovo/x200/acpi_tables.c
+++ b/src/mainboard/lenovo/x200/acpi_tables.c
@@ -5,7 +5,7 @@
#include <acpi/acpi_gnvs.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
-#include <southbridge/intel/i82801ix/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x201/acpi_tables.c b/src/mainboard/lenovo/x201/acpi_tables.c
index 45ae4d3..36d3e85 100644
--- a/src/mainboard/lenovo/x201/acpi_tables.c
+++ b/src/mainboard/lenovo/x201/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/ibexpeak/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x201/smihandler.c b/src/mainboard/lenovo/x201/smihandler.c
index 08b5d2f..ad88a2e 100644
--- a/src/mainboard/lenovo/x201/smihandler.c
+++ b/src/mainboard/lenovo/x201/smihandler.c
@@ -3,7 +3,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/ibexpeak/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include <northbridge/intel/ironlake/ironlake.h>
#include <ec/acpi/ec.h>
diff --git a/src/mainboard/lenovo/x220/acpi_tables.c b/src/mainboard/lenovo/x220/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/x220/acpi_tables.c
+++ b/src/mainboard/lenovo/x220/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x230/acpi_tables.c b/src/mainboard/lenovo/x230/acpi_tables.c
index 9669ca2..36d3e85 100644
--- a/src/mainboard/lenovo/x230/acpi_tables.c
+++ b/src/mainboard/lenovo/x230/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c
index 4a9c6ae..d48f1ec 100644
--- a/src/mainboard/lenovo/x60/acpi_tables.c
+++ b/src/mainboard/lenovo/x60/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/lenovo/x60/smihandler.c b/src/mainboard/lenovo/x60/smihandler.c
index b5889db..ab8a1e8 100644
--- a/src/mainboard/lenovo/x60/smihandler.c
+++ b/src/mainboard/lenovo/x60/smihandler.c
@@ -4,7 +4,7 @@
#include <device/pci_ops.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include <ec/acpi/ec.h>
#include <option.h>
diff --git a/src/mainboard/msi/ms7707/acpi_tables.c b/src/mainboard/msi/ms7707/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/msi/ms7707/acpi_tables.c
+++ b/src/mainboard/msi/ms7707/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/packardbell/ms2290/smihandler.c b/src/mainboard/packardbell/ms2290/smihandler.c
index b7f9aa9..517c5e5 100644
--- a/src/mainboard/packardbell/ms2290/smihandler.c
+++ b/src/mainboard/packardbell/ms2290/smihandler.c
@@ -3,7 +3,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <device/pci_ops.h>
-#include <southbridge/intel/ibexpeak/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include <northbridge/intel/ironlake/ironlake.h>
#include <ec/acpi/ec.h>
diff --git a/src/mainboard/roda/rk886ex/acpi_tables.c b/src/mainboard/roda/rk886ex/acpi_tables.c
index 6970dfc..cc64c30 100644
--- a/src/mainboard/roda/rk886ex/acpi_tables.c
+++ b/src/mainboard/roda/rk886ex/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/i82801gx/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/roda/rk9/acpi_tables.c b/src/mainboard/roda/rk9/acpi_tables.c
index 1eaadce..f201f59 100644
--- a/src/mainboard/roda/rk9/acpi_tables.c
+++ b/src/mainboard/roda/rk9/acpi_tables.c
@@ -5,7 +5,7 @@
#include <acpi/acpi_gnvs.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
-#include <southbridge/intel/i82801ix/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/roda/rk9/smihandler.c b/src/mainboard/roda/rk9/smihandler.c
index 95ecd11..d411528 100644
--- a/src/mainboard/roda/rk9/smihandler.c
+++ b/src/mainboard/roda/rk9/smihandler.c
@@ -2,7 +2,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/i82801ix/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/i82801ix/i82801ix.h>
#include <ec/acpi/ec.h>
diff --git a/src/mainboard/roda/rv11/acpi_tables.c b/src/mainboard/roda/rv11/acpi_tables.c
index bee9643..765575c 100644
--- a/src/mainboard/roda/rv11/acpi_tables.c
+++ b/src/mainboard/roda/rv11/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <variant/thermal.h>
diff --git a/src/mainboard/samsung/lumpy/acpi_tables.c b/src/mainboard/samsung/lumpy/acpi_tables.c
index de3ea9e..c697457 100644
--- a/src/mainboard/samsung/lumpy/acpi_tables.c
+++ b/src/mainboard/samsung/lumpy/acpi_tables.c
@@ -4,7 +4,7 @@
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <ec/acpi/ec.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
diff --git a/src/mainboard/samsung/lumpy/smihandler.c b/src/mainboard/samsung/lumpy/smihandler.c
index 0d6a2ac..773c344 100644
--- a/src/mainboard/samsung/lumpy/smihandler.c
+++ b/src/mainboard/samsung/lumpy/smihandler.c
@@ -2,7 +2,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/pmbase.h>
diff --git a/src/mainboard/samsung/stumpy/acpi_tables.c b/src/mainboard/samsung/stumpy/acpi_tables.c
index 46e3f45..dfe9f47 100644
--- a/src/mainboard/samsung/stumpy/acpi_tables.c
+++ b/src/mainboard/samsung/stumpy/acpi_tables.c
@@ -3,7 +3,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include "thermal.h"
diff --git a/src/mainboard/samsung/stumpy/smihandler.c b/src/mainboard/samsung/stumpy/smihandler.c
index 9cd81db..635cc52 100644
--- a/src/mainboard/samsung/stumpy/smihandler.c
+++ b/src/mainboard/samsung/stumpy/smihandler.c
@@ -3,7 +3,7 @@
#include <acpi/acpi.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
diff --git a/src/mainboard/sapphire/pureplatinumh61/acpi_tables.c b/src/mainboard/sapphire/pureplatinumh61/acpi_tables.c
index d27cf01..92b9d1c 100644
--- a/src/mainboard/sapphire/pureplatinumh61/acpi_tables.c
+++ b/src/mainboard/sapphire/pureplatinumh61/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/mainboard/supermicro/x9scl/acpi_tables.c b/src/mainboard/supermicro/x9scl/acpi_tables.c
index e68746c..230584e 100644
--- a/src/mainboard/supermicro/x9scl/acpi_tables.c
+++ b/src/mainboard/supermicro/x9scl/acpi_tables.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
-#include <southbridge/intel/bd82x6x/nvs.h>
+#include <soc/nvs.h>
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig
index b916e71..50b8777 100644
--- a/src/soc/amd/cezanne/Kconfig
+++ b/src/soc/amd/cezanne/Kconfig
@@ -9,7 +9,6 @@
config SOC_SPECIFIC_OPTIONS
def_bool y
- select ACPI_SOC_NVS
select ARCH_BOOTBLOCK_X86_32
select ARCH_VERSTAGE_X86_32
select ARCH_ROMSTAGE_X86_32
diff --git a/src/southbridge/intel/bd82x6x/Kconfig b/src/southbridge/intel/bd82x6x/Kconfig
index 3b05a3e..06ac5c6 100644
--- a/src/southbridge/intel/bd82x6x/Kconfig
+++ b/src/southbridge/intel/bd82x6x/Kconfig
@@ -11,6 +11,7 @@
config SOUTH_BRIDGE_OPTIONS # dummy
def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ACPI_SOC_NVS
select AZALIA_PLUGIN_SUPPORT
select SOUTHBRIDGE_INTEL_COMMON_FINALIZE
select SOUTHBRIDGE_INTEL_COMMON_RCBA_PIRQ
diff --git a/src/southbridge/intel/bd82x6x/Makefile.inc b/src/southbridge/intel/bd82x6x/Makefile.inc
index 687fc97..a591aab 100644
--- a/src/southbridge/intel/bd82x6x/Makefile.inc
+++ b/src/southbridge/intel/bd82x6x/Makefile.inc
@@ -38,4 +38,6 @@
romstage-y += early_me_mrc.c early_usb_mrc.c
endif
+CPPFLAGS_common += -I$(src)/southbridge/intel/bd82x6x/include
+
endif
diff --git a/src/southbridge/intel/bd82x6x/nvs.h b/src/southbridge/intel/bd82x6x/include/soc/nvs.h
similarity index 100%
rename from src/southbridge/intel/bd82x6x/nvs.h
rename to src/southbridge/intel/bd82x6x/include/soc/nvs.h
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c
index 73946d2..c2e7a86 100644
--- a/src/southbridge/intel/bd82x6x/lpc.c
+++ b/src/southbridge/intel/bd82x6x/lpc.c
@@ -18,13 +18,13 @@
#include <string.h>
#include "chip.h"
#include "pch.h"
-#include "nvs.h"
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <southbridge/intel/common/pciehp.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <southbridge/intel/common/pmutil.h>
#include <southbridge/intel/common/rtc.h>
#include <southbridge/intel/common/spi.h>
+#include <soc/nvs.h>
#define NMI_OFF 0
@@ -641,16 +641,6 @@
pch_enable(dev);
}
-size_t gnvs_size_of_array(void)
-{
- return sizeof(struct global_nvs);
-}
-
-void *gnvs_chromeos_ptr(struct global_nvs *gnvs)
-{
- return &gnvs->chromeos;
-}
-
void soc_fill_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c
index 3b37b06..bef98fa 100644
--- a/src/southbridge/intel/bd82x6x/smihandler.c
+++ b/src/southbridge/intel/bd82x6x/smihandler.c
@@ -9,6 +9,7 @@
#include <cpu/x86/smm.h>
#include <cpu/intel/em64t101_save_state.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
+#include <soc/nvs.h>
#include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/gpio.h>
#include <cpu/intel/model_206ax/model_206ax.h>
@@ -16,7 +17,6 @@
#include <southbridge/intel/common/finalize.h>
#include "pch.h"
-#include "nvs.h"
int southbridge_io_trap_handler(int smif)
{
diff --git a/src/southbridge/intel/i82371eb/acpi_tables.c b/src/southbridge/intel/i82371eb/acpi_tables.c
index 433555d..7507cd5 100644
--- a/src/southbridge/intel/i82371eb/acpi_tables.c
+++ b/src/southbridge/intel/i82371eb/acpi_tables.c
@@ -2,7 +2,6 @@
#include <console/console.h>
#include <acpi/acpi.h>
-#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
#include <device/device.h>
#include "i82371eb.h"
@@ -45,8 +44,3 @@
/* chipset doesn't have mmconfig */
return current;
}
-
-size_t gnvs_size_of_array(void)
-{
- return 0;
-}
diff --git a/src/southbridge/intel/i82801dx/fadt.c b/src/southbridge/intel/i82801dx/fadt.c
index 66aa3f1..84ea73a 100644
--- a/src/southbridge/intel/i82801dx/fadt.c
+++ b/src/southbridge/intel/i82801dx/fadt.c
@@ -2,7 +2,6 @@
#include <device/pci_ops.h>
#include <acpi/acpi.h>
-#include <acpi/acpi_gnvs.h>
#include <version.h>
/* FIXME: This needs to go into a separate .h file
@@ -80,8 +79,3 @@
fadt->x_gpe0_blk.addrl = pmbase + 0x28;
fadt->x_gpe0_blk.addrh = 0x0;
}
-
-size_t gnvs_size_of_array(void)
-{
- return 0;
-}
diff --git a/src/southbridge/intel/i82801gx/Kconfig b/src/southbridge/intel/i82801gx/Kconfig
index 2cd56e9..c880793 100644
--- a/src/southbridge/intel/i82801gx/Kconfig
+++ b/src/southbridge/intel/i82801gx/Kconfig
@@ -3,6 +3,7 @@
config SOUTHBRIDGE_INTEL_I82801GX
bool
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ACPI_SOC_NVS
select AZALIA_PLUGIN_SUPPORT
select IOAPIC
select USE_WATCHDOG_ON_BOOT
diff --git a/src/southbridge/intel/i82801gx/Makefile.inc b/src/southbridge/intel/i82801gx/Makefile.inc
index 11a9c00..95402a1 100644
--- a/src/southbridge/intel/i82801gx/Makefile.inc
+++ b/src/southbridge/intel/i82801gx/Makefile.inc
@@ -25,4 +25,6 @@
romstage-y += early_init.c
romstage-y += early_cir.c
+CPPFLAGS_common += -I$(src)/southbridge/intel/i82801gx/include
+
endif
diff --git a/src/southbridge/intel/i82801gx/nvs.h b/src/southbridge/intel/i82801gx/include/soc/nvs.h
similarity index 100%
rename from src/southbridge/intel/i82801gx/nvs.h
rename to src/southbridge/intel/i82801gx/include/soc/nvs.h
diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c
index 74cadc8..4b7898c 100644
--- a/src/southbridge/intel/i82801gx/lpc.c
+++ b/src/southbridge/intel/i82801gx/lpc.c
@@ -21,10 +21,10 @@
#include <southbridge/intel/common/hpet.h>
#include <southbridge/intel/common/pmbase.h>
#include <southbridge/intel/common/spi.h>
+#include <soc/nvs.h>
#include "chip.h"
#include "i82801gx.h"
-#include "nvs.h"
#define NMI_OFF 0
@@ -464,11 +464,6 @@
outb(POST_OS_BOOT, 0x80);
}
-size_t gnvs_size_of_array(void)
-{
- return sizeof(struct global_nvs);
-}
-
void soc_fill_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
diff --git a/src/southbridge/intel/i82801gx/smihandler.c b/src/southbridge/intel/i82801gx/smihandler.c
index 03480a7..67a8cf8 100644
--- a/src/southbridge/intel/i82801gx/smihandler.c
+++ b/src/southbridge/intel/i82801gx/smihandler.c
@@ -4,6 +4,7 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <device/pci_def.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include "i82801gx.h"
@@ -15,8 +16,6 @@
#define G_SMRANE (1 << 3)
#define C_BASE_SEG ((0 << 2) | (1 << 1) | (0 << 0))
-#include "nvs.h"
-
/* While we read PMBASE dynamically in case it changed, let's initialize it with a sane value */
u16 pmbase = DEFAULT_PMBASE;
diff --git a/src/southbridge/intel/i82801ix/Kconfig b/src/southbridge/intel/i82801ix/Kconfig
index be640db..3ee2943 100644
--- a/src/southbridge/intel/i82801ix/Kconfig
+++ b/src/southbridge/intel/i82801ix/Kconfig
@@ -3,6 +3,7 @@
config SOUTHBRIDGE_INTEL_I82801IX
bool
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ACPI_SOC_NVS
select AZALIA_PLUGIN_SUPPORT
select HAVE_SMI_HANDLER if !NO_SMM
select HAVE_USBDEBUG_OPTIONS
diff --git a/src/southbridge/intel/i82801ix/Makefile.inc b/src/southbridge/intel/i82801ix/Makefile.inc
index 516a344..8eabd49 100644
--- a/src/southbridge/intel/i82801ix/Makefile.inc
+++ b/src/southbridge/intel/i82801ix/Makefile.inc
@@ -29,4 +29,6 @@
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += ../../../cpu/x86/smm/smmrelocate.S
endif
+CPPFLAGS_common += -I$(src)/southbridge/intel/i82801ix/include
+
endif
diff --git a/src/southbridge/intel/i82801ix/nvs.h b/src/southbridge/intel/i82801ix/include/soc/nvs.h
similarity index 100%
rename from src/southbridge/intel/i82801ix/nvs.h
rename to src/southbridge/intel/i82801ix/include/soc/nvs.h
diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c
index 0b58e67..b84b458 100644
--- a/src/southbridge/intel/i82801ix/lpc.c
+++ b/src/southbridge/intel/i82801ix/lpc.c
@@ -12,13 +12,11 @@
#include <device/pci_ops.h>
#include <arch/ioapic.h>
#include <acpi/acpi.h>
-#include <acpi/acpi_gnvs.h>
#include <cpu/x86/smm.h>
#include <acpi/acpigen.h>
#include <string.h>
#include "chip.h"
#include "i82801ix.h"
-#include "nvs.h"
#include <southbridge/intel/common/pciehp.h>
#include <southbridge/intel/common/pmutil.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
@@ -452,17 +450,6 @@
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
}
-size_t gnvs_size_of_array(void)
-{
- return sizeof(struct global_nvs);
-}
-
-/* To build emulation/qemu-q35 with CHROMEOS. */
-void *gnvs_chromeos_ptr(struct global_nvs *gnvs)
-{
- return 0;
-}
-
static const char *lpc_acpi_name(const struct device *dev)
{
return "LPCB";
diff --git a/src/southbridge/intel/i82801ix/smihandler.c b/src/southbridge/intel/i82801ix/smihandler.c
index 046cc2b..0483447 100644
--- a/src/southbridge/intel/i82801ix/smihandler.c
+++ b/src/southbridge/intel/i82801ix/smihandler.c
@@ -7,7 +7,7 @@
#include <southbridge/intel/common/pmutil.h>
#include "i82801ix.h"
-#include "nvs.h"
+#include <soc/nvs.h>
#if !CONFIG(SMM_TSEG)
/* For qemu/x86-q35 to build properly. */
diff --git a/src/southbridge/intel/i82801jx/Kconfig b/src/southbridge/intel/i82801jx/Kconfig
index 687cb45..bd553ee 100644
--- a/src/southbridge/intel/i82801jx/Kconfig
+++ b/src/southbridge/intel/i82801jx/Kconfig
@@ -3,6 +3,7 @@
config SOUTHBRIDGE_INTEL_I82801JX
bool
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ACPI_SOC_NVS
select AZALIA_PLUGIN_SUPPORT
select HAVE_POWER_STATE_AFTER_FAILURE
select HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
diff --git a/src/southbridge/intel/i82801jx/Makefile.inc b/src/southbridge/intel/i82801jx/Makefile.inc
index 9885bc0..f4893c2 100644
--- a/src/southbridge/intel/i82801jx/Makefile.inc
+++ b/src/southbridge/intel/i82801jx/Makefile.inc
@@ -23,4 +23,6 @@
smm-y += smihandler.c
+CPPFLAGS_common += -I$(src)/southbridge/intel/i82801jx/include
+
endif
diff --git a/src/southbridge/intel/i82801jx/nvs.h b/src/southbridge/intel/i82801jx/include/soc/nvs.h
similarity index 100%
rename from src/southbridge/intel/i82801jx/nvs.h
rename to src/southbridge/intel/i82801jx/include/soc/nvs.h
diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c
index 26ba5d2..9065069 100644
--- a/src/southbridge/intel/i82801jx/lpc.c
+++ b/src/southbridge/intel/i82801jx/lpc.c
@@ -12,14 +12,12 @@
#include <device/pci_ops.h>
#include <arch/ioapic.h>
#include <acpi/acpi.h>
-#include <acpi/acpi_gnvs.h>
#include <cpu/x86/smm.h>
#include <acpi/acpigen.h>
#include <arch/smp/mpspec.h>
#include <string.h>
#include "chip.h"
#include "i82801jx.h"
-#include "nvs.h"
#include <southbridge/intel/common/pciehp.h>
#include <southbridge/intel/common/pmutil.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
@@ -476,11 +474,6 @@
}
}
-size_t gnvs_size_of_array(void)
-{
- return sizeof(struct global_nvs);
-}
-
static const char *lpc_acpi_name(const struct device *dev)
{
return "LPCB";
diff --git a/src/southbridge/intel/i82801jx/smihandler.c b/src/southbridge/intel/i82801jx/smihandler.c
index 6a6c5b4..03a6442 100644
--- a/src/southbridge/intel/i82801jx/smihandler.c
+++ b/src/southbridge/intel/i82801jx/smihandler.c
@@ -4,11 +4,10 @@
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <device/pci_def.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include "i82801jx.h"
-#include "nvs.h"
-
/* While we read PMBASE dynamically in case it changed, let's
* initialize it with a sane value
*/
diff --git a/src/southbridge/intel/ibexpeak/Kconfig b/src/southbridge/intel/ibexpeak/Kconfig
index c54c7e4..cea0efe 100644
--- a/src/southbridge/intel/ibexpeak/Kconfig
+++ b/src/southbridge/intel/ibexpeak/Kconfig
@@ -8,6 +8,7 @@
config SOUTH_BRIDGE_OPTIONS # dummy
def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ACPI_SOC_NVS
select AZALIA_PLUGIN_SUPPORT
select IOAPIC
select HAVE_SMI_HANDLER
diff --git a/src/southbridge/intel/ibexpeak/Makefile.inc b/src/southbridge/intel/ibexpeak/Makefile.inc
index 277f686..643687f 100644
--- a/src/southbridge/intel/ibexpeak/Makefile.inc
+++ b/src/southbridge/intel/ibexpeak/Makefile.inc
@@ -36,4 +36,6 @@
romstage-y += early_cir.c
romstage-y += early_usb.c
+CPPFLAGS_common += -I$(src)/southbridge/intel/ibexpeak/include
+
endif
diff --git a/src/southbridge/intel/ibexpeak/nvs.h b/src/southbridge/intel/ibexpeak/include/soc/nvs.h
similarity index 100%
rename from src/southbridge/intel/ibexpeak/nvs.h
rename to src/southbridge/intel/ibexpeak/include/soc/nvs.h
diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c
index 2a612ba..9bc8e6b 100644
--- a/src/southbridge/intel/ibexpeak/lpc.c
+++ b/src/southbridge/intel/ibexpeak/lpc.c
@@ -20,10 +20,10 @@
#include <cpu/x86/smm.h>
#include "chip.h"
#include "pch.h"
-#include "nvs.h"
#include <southbridge/intel/common/pciehp.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <southbridge/intel/common/spi.h>
+#include <soc/nvs.h>
#define NMI_OFF 0
@@ -541,11 +541,6 @@
pch_enable(dev);
}
-size_t gnvs_size_of_array(void)
-{
- return sizeof(struct global_nvs);
-}
-
void soc_fill_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
diff --git a/src/southbridge/intel/ibexpeak/smihandler.c b/src/southbridge/intel/ibexpeak/smihandler.c
index e83a9de..41f92b5 100644
--- a/src/southbridge/intel/ibexpeak/smihandler.c
+++ b/src/southbridge/intel/ibexpeak/smihandler.c
@@ -8,13 +8,12 @@
#include <cpu/x86/smm.h>
#include <cpu/intel/em64t101_save_state.h>
#include <cpu/intel/model_2065x/model_2065x.h>
+#include <soc/nvs.h>
#include <southbridge/intel/common/finalize.h>
#include <southbridge/intel/common/pmbase.h>
#include <southbridge/intel/ibexpeak/me.h>
#include "pch.h"
-#include "nvs.h"
-
/* We are using PCIe accesses for now
* 1. the chipset can do it
* 2. we don't need to worry about how we leave 0xcf8/0xcfc behind
diff --git a/src/southbridge/intel/lynxpoint/Kconfig b/src/southbridge/intel/lynxpoint/Kconfig
index a88a9a8..7ad3c00 100644
--- a/src/southbridge/intel/lynxpoint/Kconfig
+++ b/src/southbridge/intel/lynxpoint/Kconfig
@@ -8,6 +8,7 @@
config SOUTH_BRIDGE_OPTIONS # dummy
def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ACPI_SOC_NVS
select AZALIA_PLUGIN_SUPPORT
select SOUTHBRIDGE_INTEL_COMMON_SMBUS
select SOUTHBRIDGE_INTEL_COMMON_EARLY_SMBUS
diff --git a/src/southbridge/intel/lynxpoint/Makefile.inc b/src/southbridge/intel/lynxpoint/Makefile.inc
index 9694cc3..d0b342b 100644
--- a/src/southbridge/intel/lynxpoint/Makefile.inc
+++ b/src/southbridge/intel/lynxpoint/Makefile.inc
@@ -46,4 +46,6 @@
verstage-$(CONFIG_VBOOT_SEPARATE_VERSTAGE) += pmutil.c
verstage-$(CONFIG_VBOOT_SEPARATE_VERSTAGE) += lp_gpio.c
+CPPFLAGS_common += -I$(src)/southbridge/intel/lynxpoint/include
+
endif
diff --git a/src/southbridge/intel/lynxpoint/acpi.c b/src/southbridge/intel/lynxpoint/acpi.c
index e699c5d..aa6e650 100644
--- a/src/southbridge/intel/lynxpoint/acpi.c
+++ b/src/southbridge/intel/lynxpoint/acpi.c
@@ -5,9 +5,9 @@
#include <acpi/acpigen.h>
#include <string.h>
#include <version.h>
+#include <soc/nvs.h>
#include "pch.h"
-#include "nvs.h"
static void acpi_create_serialio_ssdt_entry(int id, struct global_nvs *gnvs)
{
diff --git a/src/southbridge/intel/lynxpoint/nvs.h b/src/southbridge/intel/lynxpoint/include/soc/nvs.h
similarity index 100%
rename from src/southbridge/intel/lynxpoint/nvs.h
rename to src/southbridge/intel/lynxpoint/include/soc/nvs.h
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index a561f55..4868441 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -16,12 +16,12 @@
#include <string.h>
#include "chip.h"
#include "iobp.h"
-#include "nvs.h"
#include "pch.h"
#include <acpi/acpigen.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <southbridge/intel/common/rtc.h>
#include <southbridge/intel/common/spi.h>
+#include <soc/nvs.h>
#define NMI_OFF 0
@@ -679,21 +679,6 @@
pch_enable(dev);
}
-size_t gnvs_size_of_array(void)
-{
- return sizeof(struct global_nvs);
-}
-
-uint32_t *gnvs_cbmc_ptr(struct global_nvs *gnvs)
-{
- return &gnvs->cbmc;
-}
-
-void *gnvs_chromeos_ptr(struct global_nvs *gnvs)
-{
- return &gnvs->chromeos;
-}
-
void soc_fill_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
diff --git a/src/southbridge/intel/lynxpoint/serialio.c b/src/southbridge/intel/lynxpoint/serialio.c
index d212d88..0687cec 100644
--- a/src/southbridge/intel/lynxpoint/serialio.c
+++ b/src/southbridge/intel/lynxpoint/serialio.c
@@ -7,10 +7,10 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <soc/nvs.h>
#include "chip.h"
#include "iobp.h"
#include "pch.h"
-#include "nvs.h"
/* Enable clock in PCI mode */
static void serialio_enable_clock(struct resource *bar0)
diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c
index bd44500..22845ec 100644
--- a/src/southbridge/intel/lynxpoint/smihandler.c
+++ b/src/southbridge/intel/lynxpoint/smihandler.c
@@ -14,10 +14,10 @@
#include <southbridge/intel/common/finalize.h>
#include <northbridge/intel/haswell/haswell.h>
#include <cpu/intel/haswell/haswell.h>
+#include <soc/nvs.h>
#include <smmstore.h>
#include "me.h"
#include "pch.h"
-#include "nvs.h"
int southbridge_io_trap_handler(int smif)
{