summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/baytrail/smihandler.c20
-rw-r--r--src/soc/intel/baytrail/southcluster.c2
-rw-r--r--src/soc/intel/braswell/acpi.c3
-rw-r--r--src/soc/intel/braswell/smihandler.c20
-rw-r--r--src/soc/intel/broadwell/pch/lpc.c3
-rw-r--r--src/soc/intel/broadwell/pch/smihandler.c21
-rw-r--r--src/soc/intel/common/block/acpi/acpi.c2
-rw-r--r--src/soc/intel/common/block/smm/smihandler.c21
-rw-r--r--src/soc/intel/denverton_ns/acpi.c2
-rw-r--r--src/soc/intel/denverton_ns/smihandler.c17
-rw-r--r--src/soc/intel/skylake/acpi.c2
11 files changed, 0 insertions, 113 deletions
diff --git a/src/soc/intel/baytrail/smihandler.c b/src/soc/intel/baytrail/smihandler.c
index 1810821ec8..6fedba7f69 100644
--- a/src/soc/intel/baytrail/smihandler.c
+++ b/src/soc/intel/baytrail/smihandler.c
@@ -18,8 +18,6 @@
#include <soc/pm.h>
#include <soc/nvs.h>
-static int smm_initialized;
-
int southbridge_io_trap_handler(int smif)
{
switch (smif) {
@@ -282,7 +280,6 @@ static void southbridge_smi_store(void)
static void southbridge_smi_apmc(void)
{
uint8_t reg8;
- em64t100_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -312,23 +309,6 @@ static void southbridge_smi_apmc(void)
enable_pm1_control(SCI_EN);
printk(BIOS_DEBUG, "SMI#: ACPI enabled.\n");
break;
- case APM_CNT_GNVS_UPDATE:
- if (smm_initialized) {
- printk(BIOS_DEBUG, "SMI#: SMM structures already initialized!\n");
- return;
- }
- state = smi_apmc_find_state_save(reg8);
- if (state) {
- /* EBX in the state save contains the GNVS pointer */
- gnvs = (struct global_nvs *)((uint32_t)state->rbx);
- if (smm_points_to_smram(gnvs, sizeof(*gnvs))) {
- printk(BIOS_ERR, "SMI#: ERROR: GNVS overlaps SMM\n");
- return;
- }
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
- }
- break;
case APM_CNT_ELOG_GSMI:
if (CONFIG(ELOG_GSMI))
southbridge_smi_gsmi();
diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c
index 967a710c2a..2df6410e64 100644
--- a/src/soc/intel/baytrail/southcluster.c
+++ b/src/soc/intel/baytrail/southcluster.c
@@ -497,8 +497,6 @@ static void southcluster_inject_dsdt(const struct device *device)
if (gnvs) {
acpi_create_gnvs(gnvs);
- /* And tell SMI about it */
- apm_control(APM_CNT_GNVS_UPDATE);
/* Add it to DSDT. */
acpigen_write_scope("\\");
diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c
index aa805fbc10..c9df5268ef 100644
--- a/src/soc/intel/braswell/acpi.c
+++ b/src/soc/intel/braswell/acpi.c
@@ -397,9 +397,6 @@ void southcluster_inject_dsdt(const struct device *device)
else
gnvs->cid1 = WRDD_DEFAULT_REGULATORY_DOMAIN;
- /* And tell SMI about it */
- apm_control(APM_CNT_GNVS_UPDATE);
-
/* Add it to DSDT */
acpigen_write_scope("\\");
acpigen_write_name_dword("NVSA", (u32) gnvs);
diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c
index 6e250d81cc..a4fdb013cb 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>
-static int smm_initialized;
-
int southbridge_io_trap_handler(int smif)
{
switch (smif) {
@@ -261,7 +259,6 @@ static void southbridge_smi_store(void)
static void southbridge_smi_apmc(void)
{
uint8_t reg8;
- em64t100_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -291,23 +288,6 @@ static void southbridge_smi_apmc(void)
enable_pm1_control(SCI_EN);
printk(BIOS_DEBUG, "SMI#: ACPI enabled.\n");
break;
- case APM_CNT_GNVS_UPDATE:
- if (smm_initialized) {
- printk(BIOS_DEBUG, "SMI#: SMM structures already initialized!\n");
- return;
- }
- state = smi_apmc_find_state_save(reg8);
- if (state) {
- /* EBX in the state save contains the GNVS pointer */
- gnvs = (struct global_nvs *)((uint32_t)state->rbx);
- if (smm_points_to_smram(gnvs, sizeof(*gnvs))) {
- printk(BIOS_ERR, "SMI#: ERROR: GNVS overlaps SMM\n");
- return;
- }
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
- }
- break;
case APM_CNT_ELOG_GSMI:
if (CONFIG(ELOG_GSMI))
southbridge_smi_gsmi();
diff --git a/src/soc/intel/broadwell/pch/lpc.c b/src/soc/intel/broadwell/pch/lpc.c
index 73b83e4e09..5a29b02396 100644
--- a/src/soc/intel/broadwell/pch/lpc.c
+++ b/src/soc/intel/broadwell/pch/lpc.c
@@ -646,9 +646,6 @@ static void southcluster_inject_dsdt(const struct device *device)
}
}
- /* And tell SMI about it */
- apm_control(APM_CNT_GNVS_UPDATE);
-
/* Add it to DSDT. */
acpigen_write_scope("\\");
acpigen_write_name_dword("NVSA", (u32) gnvs);
diff --git a/src/soc/intel/broadwell/pch/smihandler.c b/src/soc/intel/broadwell/pch/smihandler.c
index fd5d4522fa..5ed52d8fbd 100644
--- a/src/soc/intel/broadwell/pch/smihandler.c
+++ b/src/soc/intel/broadwell/pch/smihandler.c
@@ -23,8 +23,6 @@
#include <drivers/intel/gma/i915_reg.h>
#include <smmstore.h>
-static u8 smm_initialized = 0;
-
int southbridge_io_trap_handler(int smif)
{
switch (smif) {
@@ -313,7 +311,6 @@ static void southbridge_smi_store(void)
static void southbridge_smi_apmc(void)
{
u8 reg8;
- em64t101_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -333,24 +330,6 @@ static void southbridge_smi_apmc(void)
enable_pm1_control(SCI_EN);
printk(BIOS_DEBUG, "SMI#: ACPI enabled.\n");
break;
- case APM_CNT_GNVS_UPDATE:
- if (smm_initialized) {
- printk(BIOS_DEBUG,
- "SMI#: SMM structures already initialized!\n");
- return;
- }
- state = smi_apmc_find_state_save(reg8);
- if (state) {
- /* EBX in the state save contains the GNVS pointer */
- gnvs = (struct global_nvs *)((u32)state->rbx);
- if (smm_points_to_smram(gnvs, sizeof(*gnvs))) {
- printk(BIOS_ERR, "SMI#: ERROR: GNVS overlaps SMM\n");
- return;
- }
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
- }
- break;
case APM_CNT_ELOG_GSMI:
if (CONFIG(ELOG_GSMI))
southbridge_smi_gsmi();
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index e3e72fddd4..4a53c55902 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -252,8 +252,6 @@ void southbridge_inject_dsdt(const struct device *device)
if (gnvs) {
acpi_create_gnvs(gnvs);
- /* And tell SMI about it */
- apm_control(APM_CNT_GNVS_UPDATE);
/* Add it to DSDT. */
acpigen_write_scope("\\");
diff --git a/src/soc/intel/common/block/smm/smihandler.c b/src/soc/intel/common/block/smm/smihandler.c
index dc32970267..51a3003195 100644
--- a/src/soc/intel/common/block/smm/smihandler.c
+++ b/src/soc/intel/common/block/smm/smihandler.c
@@ -330,8 +330,6 @@ void smihandler_southbridge_apmc(
const struct smm_save_state_ops *save_state_ops)
{
uint8_t reg8;
- void *state = NULL;
- static int smm_initialized = 0;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -361,25 +359,6 @@ void smihandler_southbridge_apmc(
pmc_enable_pm1_control(SCI_EN);
printk(BIOS_DEBUG, "SMI#: ACPI enabled.\n");
break;
- case APM_CNT_GNVS_UPDATE:
- if (smm_initialized) {
- printk(BIOS_DEBUG,
- "SMI#: SMM structures already initialized!\n");
- return;
- }
- state = find_save_state(save_state_ops, reg8);
- if (state) {
- /* EBX in the state save contains the GNVS pointer */
- uint32_t reg_ebx = save_state_ops->get_reg(state, RBX);
- gnvs = (struct global_nvs *)(uintptr_t)reg_ebx;
- if (smm_points_to_smram(gnvs, sizeof(*gnvs))) {
- printk(BIOS_ERR, "SMI#: ERROR: GNVS overlaps SMM\n");
- return;
- }
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
- }
- break;
case APM_CNT_ELOG_GSMI:
if (CONFIG(ELOG_GSMI))
southbridge_smi_gsmi(save_state_ops);
diff --git a/src/soc/intel/denverton_ns/acpi.c b/src/soc/intel/denverton_ns/acpi.c
index 994b8b1ea4..993338a961 100644
--- a/src/soc/intel/denverton_ns/acpi.c
+++ b/src/soc/intel/denverton_ns/acpi.c
@@ -259,8 +259,6 @@ void southcluster_inject_dsdt(const struct device *device)
if (gnvs) {
acpi_create_gnvs(gnvs);
- /* And tell SMI about it */
- apm_control(APM_CNT_GNVS_UPDATE);
/* Add it to DSDT. */
acpigen_write_scope("\\");
diff --git a/src/soc/intel/denverton_ns/smihandler.c b/src/soc/intel/denverton_ns/smihandler.c
index cae8b9b5f8..ae15795db9 100644
--- a/src/soc/intel/denverton_ns/smihandler.c
+++ b/src/soc/intel/denverton_ns/smihandler.c
@@ -17,8 +17,6 @@
#include <soc/pm.h>
#include <soc/nvs.h>
-static int smm_initialized;
-
int southbridge_io_trap_handler(int smif)
{
switch (smif) {
@@ -221,7 +219,6 @@ static void southbridge_smi_store(void)
static void southbridge_smi_apmc(void)
{
uint8_t reg8;
- em64t100_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -252,20 +249,6 @@ static void southbridge_smi_apmc(void)
case APM_CNT_FINALIZE:
finalize();
break;
- case APM_CNT_GNVS_UPDATE:
- if (smm_initialized) {
- printk(BIOS_DEBUG,
- "SMI#: SMM structures already initialized!\n");
- return;
- }
- state = smi_apmc_find_state_save(reg8);
- if (state) {
- /* EBX in the state save contains the GNVS pointer */
- gnvs = (struct global_nvs *)((uint32_t)state->rbx);
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
- }
- break;
case APM_CNT_SMMSTORE:
if (CONFIG(SMMSTORE))
southbridge_smi_store();
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c
index a7b538755c..4272954a0a 100644
--- a/src/soc/intel/skylake/acpi.c
+++ b/src/soc/intel/skylake/acpi.c
@@ -553,8 +553,6 @@ void southbridge_inject_dsdt(const struct device *device)
if (gnvs) {
acpi_create_gnvs(gnvs);
- /* And tell SMI about it */
- apm_control(APM_CNT_GNVS_UPDATE);
/* Add it to DSDT. */
acpigen_write_scope("\\");