summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2012-06-23 17:30:19 -0700
committerRonald G. Minnich <rminnich@gmail.com>2012-07-26 20:29:58 +0200
commit1bb79bcf893d5abee14de4569e9230454116bfea (patch)
treec464e22e43cfc980216be933f39ccfc35eebf372 /src
parentcfb64bda83f5f47762845b8b6666783bae82ec34 (diff)
downloadcoreboot-1bb79bcf893d5abee14de4569e9230454116bfea.tar.xz
ELOG: Log run-time SMI southbridge events
Events are logged for SMIs that trigger ACPI sleeps state entry and when the power button press triggers an SMI such as at the developer/recovery screens. Generate ACPI sleep state events and power button events and verify they show up in the log: 153 | 2012-06-23 17:12:59 | ACPI Enter | S5 184 | 2012-06-23 17:15:50 | ACPI Enter | S3 216 | 2012-06-23 17:28:58 | Power Button Change-Id: Iba134d619780e459bce189d36d57844997ffb009 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://review.coreboot.org/1320 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/southbridge/intel/bd82x6x/smihandler.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c
index e4d1512142..29f1a1e9ad 100644
--- a/src/southbridge/intel/bd82x6x/smihandler.c
+++ b/src/southbridge/intel/bd82x6x/smihandler.c
@@ -346,6 +346,12 @@ static void southbridge_smi_sleep(unsigned int node, smm_state_save_area_t *stat
if (mainboard_sleep)
mainboard_sleep(slp_typ);
+#if CONFIG_ELOG_GSMI
+ /* Log S3, S4, and S5 entry */
+ if (slp_typ >= 5)
+ elog_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ-2);
+#endif
+
/* Next, do the deed.
*/
@@ -526,6 +532,9 @@ static void southbridge_smi_pm1(unsigned int node, smm_state_save_area_t *state_
// power button pressed
u32 reg32;
reg32 = (7 << 10) | (1 << 13);
+#if CONFIG_ELOG_GSMI
+ elog_add_event(ELOG_TYPE_POWER_BUTTON);
+#endif
outl(reg32, pmbase + PM1_CNT);
}
}