aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/google')
-rw-r--r--src/vendorcode/google/chromeos/chromeos.h2
-rw-r--r--src/vendorcode/google/chromeos/watchdog.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h
index 03f1516ee0..57a2f71b29 100644
--- a/src/vendorcode/google/chromeos/chromeos.h
+++ b/src/vendorcode/google/chromeos/chromeos.h
@@ -34,10 +34,12 @@ void elog_add_boot_reason(void);
/* functions implemented in watchdog.c */
void elog_add_watchdog_reset(void);
+void mark_watchdog_tombstone(void);
void reboot_from_watchdog(void);
#else
static inline void elog_add_boot_reason(void) { return; }
static inline void elog_add_watchdog_reset(void) { return; }
+static inline void mark_watchdog_tombstone(void) { return; }
static inline void reboot_from_watchdog(void) { return; }
#endif /* CONFIG_CHROMEOS */
diff --git a/src/vendorcode/google/chromeos/watchdog.c b/src/vendorcode/google/chromeos/watchdog.c
index 79f7dde711..a2b18b75e5 100644
--- a/src/vendorcode/google/chromeos/watchdog.c
+++ b/src/vendorcode/google/chromeos/watchdog.c
@@ -30,9 +30,14 @@ void elog_add_watchdog_reset(void)
write32(_watchdog_tombstone, 0);
}
+void mark_watchdog_tombstone(void)
+{
+ write32(_watchdog_tombstone, WATCHDOG_TOMBSTONE_MAGIC);
+}
+
void reboot_from_watchdog(void)
{
printk(BIOS_INFO, "Last reset was watchdog, reboot again to reset TPM!\n");
- write32(_watchdog_tombstone, WATCHDOG_TOMBSTONE_MAGIC);
+ mark_watchdog_tombstone();
hard_reset();
}