Daniel Kurtz has uploaded this change for review. ( https://review.coreboot.org/26930
Change subject: amd/stoneyridge: Set SCI_MAP for SCI enabled GPIOs.
......................................................................
amd/stoneyridge: Set SCI_MAP for SCI enabled GPIOs.
By default we use a 1:1 mapping between GEVENT bits and the corresponding
SCI_MAP entry. However, we still must program the SCI_MAP entries
with the GEVENT number.
Signed-off-by: Daniel Kurtz <djkurtz(a)chromium.org>
BUG=b:109759838
TEST=(1) powerd_dbus_suspend
(2) move finger on touchpad for ~1 second
=> system resumes from S3
Change-Id: Ie7be45264f9bfec56efc47a03071fdb924d16b6a
---
M src/soc/amd/stoneyridge/gpio.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/26930/1
diff --git a/src/soc/amd/stoneyridge/gpio.c b/src/soc/amd/stoneyridge/gpio.c
index 1b7f055..b09e79d 100644
--- a/src/soc/amd/stoneyridge/gpio.c
+++ b/src/soc/amd/stoneyridge/gpio.c
@@ -235,6 +235,7 @@
gpio_ptr = (uint32_t *)gpio_get_address(gpio);
if (control_flags & GPIO_SPECIAL_FLAG) {
+ uint8_t *sci_map;
gevent_num = get_gpio_gevent(gpio);
if (gevent_num < 0) {
printk(BIOS_WARNING, "Warning: GPIO pin %d has"
@@ -267,6 +268,10 @@
edge_level |= bit_edge << gevent_num;
direction |= bit_level << gevent_num;
mask |= (1 << gevent_num);
+ sci_map = (uint8_t*)(uintptr_t)(APU_SMI_BASE +
+ SMI_SCI_MAP(gevent_num));
+
+ write8(sci_map, gevent_num);
break;
default:
printk(BIOS_WARNING, "Error, flags 0x%08x\n",
--
To view, visit https://review.coreboot.org/26930
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7be45264f9bfec56efc47a03071fdb924d16b6a
Gerrit-Change-Number: 26930
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Kurtz <djkurtz(a)google.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz(a)chromium.org>
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/26927
Change subject: kahlee: Make CPU1 handle all SMIs
......................................................................
kahlee: Make CPU1 handle all SMIs
If CPU0 handles the ELOG_GSMI_APM_CNT SMI after the SMI handler
completes, the system will reboot. Forcing CPU1 to always handle the SMI
fixes the issue. I have not been able to find an explanation for this.
I realize this is a terrible and ugly hack but it makes it possible to
shutdown consistently.
BUG=b:80539294
TEST=built on grunt and tried `halt` a few times in a row.
Change-Id: Ibb2784648a8e827887170f34a01dcd5f411522e2
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
---
M src/cpu/x86/smm/smm_module_handler.c
1 file changed, 20 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/26927/1
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c
index c2001ec..46c4a7e 100644
--- a/src/cpu/x86/smm/smm_module_handler.c
+++ b/src/cpu/x86/smm/smm_module_handler.c
@@ -117,6 +117,13 @@
return base;
}
+static void pause(void)
+{
+ asm volatile (
+ ".byte 0xf3, 0x90\n" /* PAUSE */
+ );
+}
+
asmlinkage void smm_handler_start(void *arg)
{
const struct smm_module_params *p;
@@ -139,14 +146,24 @@
return;
}
+#if defined(CONFIG_BOARD_GOOGLE_BASEBOARD_KAHLEE)
+ /*
+ * Force CPU 1 to handle all SMIs. We need to do this because if CPU0
+ * handles an SMI for ELOG_GSMI_APM_CNT it will cause the system to
+ * reboot.
+ */
+ while (cpu == 0 && smi_handler_status == SMI_UNLOCKED) {
+ // Wait for the other CPU to get the lock
+ pause();
+ }
+#endif
+
/* Are we ok to execute the handler? */
if (!smi_obtain_lock()) {
/* For security reasons we don't release the other CPUs
* until the CPU with the lock is actually done */
while (smi_handler_status == SMI_LOCKED) {
- asm volatile (
- ".byte 0xf3, 0x90\n" /* PAUSE */
- );
+ pause();
}
return;
}
--
To view, visit https://review.coreboot.org/26927
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb2784648a8e827887170f34a01dcd5f411522e2
Gerrit-Change-Number: 26927
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>