summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-06-28 12:12:01 +0300
committerPatrick Georgi <pgeorgi@google.com>2020-07-01 05:14:24 +0000
commit239abaf759dbade7feb2423d335df6a52f1f8930 (patch)
treef8e56e6433ad377243a4078bb9d690e8c59b1345 /src/soc
parent6bed1c47f614143728cac64e6a7510230a7cfc28 (diff)
ACPI GNVS: Replace uses of smm_get_gnvs()
Change-Id: I7b657750b10f98524f011f5254e533217fe94fd8 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/baytrail/smihandler.c7
-rw-r--r--src/soc/intel/braswell/smihandler.c7
-rw-r--r--src/soc/intel/broadwell/smihandler.c10
-rw-r--r--src/soc/intel/common/block/smm/smihandler.c8
-rw-r--r--src/soc/intel/common/block/smm/smitraphandler.c2
-rw-r--r--src/soc/intel/denverton_ns/smihandler.c9
6 files changed, 4 insertions, 39 deletions
diff --git a/src/soc/intel/baytrail/smihandler.c b/src/soc/intel/baytrail/smihandler.c
index 2a56f84949..e5f53ff4aa 100644
--- a/src/soc/intel/baytrail/smihandler.c
+++ b/src/soc/intel/baytrail/smihandler.c
@@ -18,8 +18,6 @@
#include <soc/pmc.h>
#include <soc/nvs.h>
-/* GNVS needs to be set by coreboot initiating a software SMI. */
-static struct global_nvs *gnvs;
static int smm_initialized;
int southbridge_io_trap_handler(int smif)
@@ -44,11 +42,6 @@ void southbridge_smi_set_eos(void)
enable_smi(EOS);
}
-struct global_nvs *smm_get_gnvs(void)
-{
- return gnvs;
-}
-
static void busmaster_disable_on_bus(int bus)
{
int slot, func;
diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c
index 28765d0780..a2c26c119f 100644
--- a/src/soc/intel/braswell/smihandler.c
+++ b/src/soc/intel/braswell/smihandler.c
@@ -18,8 +18,6 @@
#include <soc/gpio.h>
#include <smmstore.h>
-/* GNVS needs to be set by coreboot initiating a software SMI. */
-static struct global_nvs *gnvs;
static int smm_initialized;
int southbridge_io_trap_handler(int smif)
@@ -45,11 +43,6 @@ void southbridge_smi_set_eos(void)
enable_smi(EOS);
}
-struct global_nvs *smm_get_gnvs(void)
-{
- return gnvs;
-}
-
static void busmaster_disable_on_bus(int bus)
{
int slot, func;
diff --git a/src/soc/intel/broadwell/smihandler.c b/src/soc/intel/broadwell/smihandler.c
index c7cefdc576..86be400e71 100644
--- a/src/soc/intel/broadwell/smihandler.c
+++ b/src/soc/intel/broadwell/smihandler.c
@@ -25,16 +25,6 @@
static u8 smm_initialized = 0;
-/*
- * GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
- * by coreboot.
- */
-static struct global_nvs *gnvs;
-struct global_nvs *smm_get_gnvs(void)
-{
- return gnvs;
-}
-
int southbridge_io_trap_handler(int smif)
{
switch (smif) {
diff --git a/src/soc/intel/common/block/smm/smihandler.c b/src/soc/intel/common/block/smm/smihandler.c
index 73dfda5741..7bd17c3e78 100644
--- a/src/soc/intel/common/block/smm/smihandler.c
+++ b/src/soc/intel/common/block/smm/smihandler.c
@@ -26,9 +26,6 @@
#include <spi-generic.h>
#include <stdint.h>
-/* GNVS needs to be set by coreboot initiating a software SMI. */
-static struct global_nvs *gnvs;
-
/* SoC overrides. */
__weak const struct smm_save_state_ops *get_smm_save_state_ops(void)
@@ -125,11 +122,6 @@ void southbridge_smi_set_eos(void)
pmc_enable_smi(EOS);
}
-struct global_nvs *smm_get_gnvs(void)
-{
- return gnvs;
-}
-
static void busmaster_disable_on_bus(int bus)
{
int slot, func;
diff --git a/src/soc/intel/common/block/smm/smitraphandler.c b/src/soc/intel/common/block/smm/smitraphandler.c
index 1d6fb816bb..99825f10ba 100644
--- a/src/soc/intel/common/block/smm/smitraphandler.c
+++ b/src/soc/intel/common/block/smm/smitraphandler.c
@@ -24,7 +24,6 @@
/* Inherited from cpu/x86/smm.h resulting in a different signature */
int southbridge_io_trap_handler(int smif)
{
- struct global_nvs *gnvs = smm_get_gnvs();
switch (smif) {
case 0x32:
printk(BIOS_DEBUG, "OS Init\n");
@@ -61,7 +60,6 @@ void smihandler_southbridge_monitor(
u32 data, mask = 0;
u8 trap_sts;
int i;
- struct global_nvs *gnvs = smm_get_gnvs();
/* TRSR - Trap Status Register */
trap_sts = pcr_read8(PID_PSTH, PCR_PSTH_TRPST);
diff --git a/src/soc/intel/denverton_ns/smihandler.c b/src/soc/intel/denverton_ns/smihandler.c
index aa87630906..5eecba7a31 100644
--- a/src/soc/intel/denverton_ns/smihandler.c
+++ b/src/soc/intel/denverton_ns/smihandler.c
@@ -16,8 +16,6 @@
#include <soc/pm.h>
#include <soc/nvs.h>
-/* GNVS needs to be set by coreboot initiating a software SMI. */
-static struct global_nvs *gnvs;
static int smm_initialized;
int southbridge_io_trap_handler(int smif)
@@ -37,9 +35,10 @@ int southbridge_io_trap_handler(int smif)
return 0;
}
-void southbridge_smi_set_eos(void) { enable_smi(EOS); }
-
-struct global_nvs *smm_get_gnvs(void) { return gnvs; }
+void southbridge_smi_set_eos(void)
+{
+ enable_smi(EOS);
+}
static void busmaster_disable_on_bus(int bus)
{