[coreboot-gerrit] Change in coreboot[master]: soc/intel/skylake: Define mask for SMI handlers that can be run in SC...
Furquan Shaikh (Code Review)
gerrit at coreboot.org
Wed Oct 18 01:11:44 CEST 2017
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/22087
Change subject: soc/intel/skylake: Define mask for SMI handlers that can be run in SCI mode
......................................................................
soc/intel/skylake: Define mask for SMI handlers that can be run in SCI mode
This change adds a mask to allow SMI handlers to be run even in SCI
mode. This prevents any SMI handlers from accidentally taking
unnecessary action in SCI mode.
Add APM_STS and SMI_ON_SLP_EN_STS to this mask to allow gsmi and sleep
to work in SCI mode.
BUG=b:67874513
Change-Id: I298f8f6ce28c9746cbc1fb6fc96035b98a17a9e3
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/soc/intel/skylake/smihandler.c
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/22087/1
diff --git a/src/soc/intel/skylake/smihandler.c b/src/soc/intel/skylake/smihandler.c
index 20c4109..211432c 100644
--- a/src/soc/intel/skylake/smihandler.c
+++ b/src/soc/intel/skylake/smihandler.c
@@ -510,6 +510,13 @@
[MONITOR_STS_BIT] = southbridge_smi_monitor,
};
+#define SMI_HANDLER_SCI_EN(__bit) (1 << (__bit))
+
+/* SMI handlers that should be serviced in SCI mode too. */
+uint32_t smi_handler_sci_mask =
+ SMI_HANDLER_SCI_EN(APM_STS_BIT) |
+ SMI_HANDLER_SCI_EN(SMI_ON_SLP_EN_STS_BIT);
+
/*
* Interrupt handler for SMI#
*/
@@ -524,6 +531,17 @@
*/
smi_sts = pmc_clear_smi_status();
+ /*
+ * In SCI mode, execute only those SMI handlers that have
+ * declared themselves as available for service in that mode
+ * using smi_handler_sci_mask.
+ */
+ if (pmc_read_pm1_control() & SCI_EN)
+ smi_sts &= smi_handler_sci_mask;
+
+ if (!smi_sts)
+ return;
+
/* Call SMI sub handler for each of the status bits */
for (i = 0; i < ARRAY_SIZE(southbridge_smi); i++) {
if (smi_sts & (1 << i)) {
--
To view, visit https://review.coreboot.org/22087
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I298f8f6ce28c9746cbc1fb6fc96035b98a17a9e3
Gerrit-Change-Number: 22087
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171017/035e796a/attachment-0001.html>
More information about the coreboot-gerrit
mailing list