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>
This commit is contained in:
Duncan Laurie 2012-06-23 17:30:19 -07:00 committed by Ronald G. Minnich
parent cfb64bda83
commit 1bb79bcf89
1 changed files with 9 additions and 0 deletions

View File

@ -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);
}
}