summaryrefslogtreecommitdiffstats
path: root/src/soc
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2022-12-02 15:38:18 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-12-07 11:23:15 +0000
commit2c3ebd8b9d56c01d8e4adadf6f4e4d5b56cdb4e1 (patch)
treebc2c00b2dfb95cd5358a04f51cfdcbc6ac56649b /src/soc
parent3c528f283079261aae50c3760a1e048aaeb54890 (diff)
downloadcoreboot-2c3ebd8b9d56c01d8e4adadf6f4e4d5b56cdb4e1.tar.gz
coreboot-2c3ebd8b9d56c01d8e4adadf6f4e4d5b56cdb4e1.tar.bz2
coreboot-2c3ebd8b9d56c01d8e4adadf6f4e4d5b56cdb4e1.zip
mb,sb,soc/intel: Drop useless IO trap handlers
There are four requirements for the SMI to hit a printk() this commit now removes. Build must have DEBUG_SMI=y, otherwise any printk() is a no-op inside SMM. ASL must have a TRAP() with argument 0x99 or 0x32 for SMIF value. Platform needs to have IO Trap #3 enabled at IO 0x800. The SMI monitor must call io_trap_handler for IO Trap #3. At the moment, only getac/p470 would meet the above criteria with TRAP(0x32) in its DSDT _INI method. The ASL ignores any return value of TRAP() calls made. A mainboard IO trap handler should have precedence over a southbridge IO trap handler. At the moment we seem to have no cases of the latter to support, so remove the latter. Change-Id: I3a3298c8d9814db8464fbf7444c6e0e6ac6ac008 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70365 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/baytrail/smihandler.c18
-rw-r--r--src/soc/intel/braswell/smihandler.c18
-rw-r--r--src/soc/intel/broadwell/pch/smihandler.c17
-rw-r--r--src/soc/intel/common/block/smm/smitraphandler.c18
-rw-r--r--src/soc/intel/denverton_ns/smihandler.c17
5 files changed, 0 insertions, 88 deletions
diff --git a/src/soc/intel/baytrail/smihandler.c b/src/soc/intel/baytrail/smihandler.c
index 20e15902b10b..9a478437fda6 100644
--- a/src/soc/intel/baytrail/smihandler.c
+++ b/src/soc/intel/baytrail/smihandler.c
@@ -20,24 +20,6 @@
#include <soc/nvs.h>
#include <soc/device_nvs.h>
-int southbridge_io_trap_handler(int smif)
-{
- switch (smif) {
- case 0x32:
- printk(BIOS_DEBUG, "OS Init\n");
- /*
- * gnvs->smif:
- * On success, the IO Trap Handler returns 0
- * On failure, the IO Trap Handler returns a value != 0
- */
- gnvs->smif = 0;
- return 1; /* IO trap handled */
- }
-
- /* Not handled */
- return 0;
-}
-
void southbridge_smi_set_eos(void)
{
enable_smi(EOS);
diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c
index 138dc339df07..f34eb6448f2d 100644
--- a/src/soc/intel/braswell/smihandler.c
+++ b/src/soc/intel/braswell/smihandler.c
@@ -18,24 +18,6 @@
#include <soc/gpio.h>
#include <smmstore.h>
-int southbridge_io_trap_handler(int smif)
-{
- switch (smif) {
- case 0x32:
- printk(BIOS_DEBUG, "OS Init\n");
- /*
- * gnvs->smif:
- * On success, the IO Trap Handler returns 0
- * On failure, the IO Trap Handler returns a value != 0
- */
- gnvs->smif = 0;
- return 1; /* IO trap handled */
- }
-
- /* Not handled */
- return 0;
-}
-
void southbridge_smi_set_eos(void)
{
enable_smi(EOS);
diff --git a/src/soc/intel/broadwell/pch/smihandler.c b/src/soc/intel/broadwell/pch/smihandler.c
index b9d5e5048201..14d08af7af86 100644
--- a/src/soc/intel/broadwell/pch/smihandler.c
+++ b/src/soc/intel/broadwell/pch/smihandler.c
@@ -23,23 +23,6 @@
#include <drivers/intel/gma/i915_reg.h>
#include <smmstore.h>
-int southbridge_io_trap_handler(int smif)
-{
- switch (smif) {
- case 0x32:
- printk(BIOS_DEBUG, "OS Init\n");
- /* gnvs->smif:
- * On success, the IO Trap Handler returns 0
- * On failure, the IO Trap Handler returns a value != 0
- */
- gnvs->smif = 0;
- return 1; /* IO trap handled */
- }
-
- /* Not handled */
- return 0;
-}
-
/**
* @brief Set the EOS bit
*/
diff --git a/src/soc/intel/common/block/smm/smitraphandler.c b/src/soc/intel/common/block/smm/smitraphandler.c
index 42bab8388b68..c7ef4e3f07bd 100644
--- a/src/soc/intel/common/block/smm/smitraphandler.c
+++ b/src/soc/intel/common/block/smm/smitraphandler.c
@@ -21,24 +21,6 @@
/* Trapped write data */
#define PCR_PSTH_TRPD 0x1E18
-/* Inherited from cpu/x86/smm.h resulting in a different signature */
-int southbridge_io_trap_handler(int smif)
-{
- switch (smif) {
- case 0x32:
- printk(BIOS_DEBUG, "OS Init\n");
- /*
- * gnvs->smif:
- * - On success, the IO Trap Handler returns 0
- * - On failure, the IO Trap Handler returns a value != 0
- */
- gnvs->smif = 0;
- return 1; /* IO trap handled */
- }
-
- /* Not handled */
- return 0;
-}
void smihandler_southbridge_mc(
const struct smm_save_state_ops *save_state_ops)
diff --git a/src/soc/intel/denverton_ns/smihandler.c b/src/soc/intel/denverton_ns/smihandler.c
index 68e85192c062..3bdc2a47ac5a 100644
--- a/src/soc/intel/denverton_ns/smihandler.c
+++ b/src/soc/intel/denverton_ns/smihandler.c
@@ -17,23 +17,6 @@
#include <soc/pm.h>
#include <soc/nvs.h>
-int southbridge_io_trap_handler(int smif)
-{
- switch (smif) {
- case 0x32:
- printk(BIOS_DEBUG, "OS Init\n");
- /* gnvs->smif:
- * On success, the IO Trap Handler returns 0
- * On failure, the IO Trap Handler returns a value != 0
- */
- gnvs->smif = 0;
- return 1; /* IO trap handled */
- }
-
- /* Not handled */
- return 0;
-}
-
void southbridge_smi_set_eos(void)
{
enable_smi(EOS);