summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-05-17 19:08:32 +0200
committerNico Huber <nico.h@gmx.de>2017-08-14 11:01:41 +0000
commit4b7b18d14ac99d2337796facd3028647799b4f66 (patch)
tree9d1901ff0cbce1f64f05c16533f02738b00f9440 /src/include
parentc3cbe9433c22b5ac3bd616c858fb87b0de3ebab8 (diff)
console: Add weak method to notify about death
Call weak method die_notify. The method should be overwritten in mainboard directory to signal that a fatal error had occurred. On boards that do share the same EC and where the EC is capable of controlling LEDs or a buzzer the method can be overwritten in EC directory instead. Tested on Lenovo T500. Change-Id: I71f8ddfc96047e8a0d39f084588db1fe2f251612 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/19696 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/console/console.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/console/console.h b/src/include/console/console.h
index aab0411600..aa935e4579 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -42,6 +42,12 @@ void post_log_clear(void);
void mainboard_post(u8 value);
void __attribute__((noreturn)) die(const char *msg);
+/*
+ * This function is weak and can be overridden to provide additional
+ * feedback to the user. Possible use case: Play a beep.
+ */
+void die_notify(void);
+
#define __CONSOLE_ENABLE__ \
((ENV_BOOTBLOCK && IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) || \
(ENV_POSTCAR && IS_ENABLED(CONFIG_POSTCAR_CONSOLE)) || \