From 1bb79bcf893d5abee14de4569e9230454116bfea Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Sat, 23 Jun 2012 17:30:19 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/1320 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/southbridge/intel/bd82x6x/smihandler.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } } -- cgit v1.2.3