[coreboot-gerrit] Change in coreboot[master]: intel/common/pmc: Disable all GPEs during pmc_init

Furquan Shaikh (Code Review) gerrit at coreboot.org
Wed Oct 11 23:58:23 CEST 2017


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/21969


Change subject: intel/common/pmc: Disable all GPEs during pmc_init
......................................................................

intel/common/pmc: Disable all GPEs during pmc_init

If GPEs are not cleared during pmc_init, it could result in issues if
standard wake events are generated while coreboot is
initializing. e.g. (Observed on soraka):
1. Suspend to S3
2. Lidclose
3. Lidopen
4. EC wakes up the host using WAKE# pin
5. On wakeup, pmc_init occurs which does not clear GPEs
6. MP init enables SMI
7. In order to add wake event to elog, coreboot sets wake mask on the
EC, which causes the EC to assert WAKE#.
8. Since WAKE# is asserted, it results in an SMI#. However, EC does
not de-assert WAKE# until host queries and clears the host event
bit (which does not happen since coreboot is stuck in handling the
SMIs).

This is one of the issues that can occur when GPEs are unnecessarily
enabled in coreboot. Before the move to PMC common library, SKL PMC
driver set all GPEs to 0 and hence this issue did not occur.

This change explicitly disables all GPEs during pmc init in order to
avoid any side-effects.

BUG=b:67712608
TEST=Verified that device resumes fine using lidclose/lidopen to
suspend and resume.

Change-Id: Ic5be02a23a8dbf43c4d7adf00251639ded4a94c9
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/soc/intel/common/block/pmc/pmclib.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/21969/1

diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index b8a14ce..5f8f664 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -558,4 +558,6 @@
 
 	/* Set the routes in the GPIO communities as well. */
 	gpio_route_gpe(dw0, dw1, dw2);
+
+	pmc_disable_all_gpe();
 }

-- 
To view, visit https://review.coreboot.org/21969
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5be02a23a8dbf43c4d7adf00251639ded4a94c9
Gerrit-Change-Number: 21969
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/20171011/37d210eb/attachment.html>


More information about the coreboot-gerrit mailing list