Print console messages for overtemp and shutdown

I have a system with bad temperature sensors and the EC is
constantly shutting the system down, but provides no
visible indication that it is doing so.

I have serious concerns about the EC behavior in this case
as it seems to be doing things it shouldn't.  However just
providing indication via the console about what it is doing
is at least useful for development and debug.

BUG=none
TEST=boot on system with bad temp sensors and see that
the EC indicates it is initiating a shutdown.

[14.008340 critical temperature; shutting down]
[14.008660 x86 power force shutdown]
[14.009153 LPC RESET# asserted]

Change-Id: I6beeb269a135bd8c245c0357670fe29648d48968
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27553
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Duncan Laurie
2012-07-16 14:40:50 -07:00
committed by Gerrit
parent 0e6daeb6ab
commit a42edb86c5
2 changed files with 7 additions and 1 deletions

View File

@@ -105,6 +105,8 @@ static void smi_sensor_failure_warning(void)
static void overheated_action(void)
{
if (overheated[THRESHOLD_POWER_DOWN]) {
cprintf(CC_CHIPSET,
"[%T critical temperature; shutting down]\n");
x86_power_force_shutdown();
return;
}

View File

@@ -181,8 +181,10 @@ void x86_power_cpu_overheated(int too_hot)
if (too_hot) {
overheat_count++;
if (overheat_count > 3)
if (overheat_count > 3) {
CPRINTF("[%T overheated; shutting down]\n");
x86_power_force_shutdown();
}
} else {
overheat_count = 0;
}
@@ -190,6 +192,8 @@ void x86_power_cpu_overheated(int too_hot)
void x86_power_force_shutdown(void)
{
CPRINTF("[%T x86 power force shutdown]\n");
/*
* Force x86 off. This condition will reset once the state machine
* transitions to G3.