chromeos: Provide common watchdog reboot support

Hardware / Coreboot - Julius Werner [chromium.org] - 17 April 2015 02:56 UTC

Many ChromeOS devices use a GPIO to reset the system, in order to guarantee that the TPM cannot be reset without also resetting the CPU. Often chipset/SoC hardware watchdogs trigger some kind of built-in CPU reset, bypassing this GPIO and thus leaving the TPM locked. These ChromeOS devices need to detect that condition in their bootblock and trigger a second (proper) reboot.

This patch adds some code to generalize this previously mainboard-specific functionality and uses it on Veyron boards. It also provides some code to add the proper eventlog entry for a watchdog reset. Since the second reboot has to happen before firmware
verification and the eventlog is usually only initialized afterwards, we provide the functionality to place a tombstone in a memlayout-defined location (which could be SRAM or some MMIO register that is preserved across reboots).

[pg: Integrates 'mips: Temporarily work around build error caused by mismatch]

BRANCH=veyron BUG=chrome-os-partner:35705 TEST=Run 'mem w 0xff800000 0x9' on a Jerry, watch how a "Hardware watchdog reset" event appears in the eventlog after the reboot.

Change-Id: I0a33820b236c9328b2f9b20905b69cb934326f2a

105f5b7 chromeos: Provide common watchdog reboot support
src/mainboard/google/veyron_jerry/bootblock.c | 6 ++--
src/mainboard/google/veyron_jerry/mainboard.c | 1 +
src/mainboard/google/veyron_mighty/bootblock.c | 6 ++--
src/mainboard/google/veyron_mighty/mainboard.c | 1 +
src/mainboard/google/veyron_pinky/bootblock.c | 6 ++--
src/mainboard/google/veyron_pinky/mainboard.c | 1 +
src/mainboard/google/veyron_speedy/bootblock.c | 6 ++--
src/mainboard/google/veyron_speedy/mainboard.c | 1 +
src/soc/rockchip/rk3288/include/soc/memlayout.ld | 1 +
src/vendorcode/google/chromeos/Makefile.inc | 4 +++
src/vendorcode/google/chromeos/chromeos.h | 6 ++++
src/vendorcode/google/chromeos/memlayout.h | 4 +++
src/vendorcode/google/chromeos/symbols.h | 4 +++
src/vendorcode/google/chromeos/watchdog.c | 42 ++++++++++++++++++++++
14 files changed, 73 insertions(+), 16 deletions(-)

Upstream: review.coreboot.org


  • Share