diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-05-17 19:08:32 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-08-14 11:01:41 +0000 |
commit | 4b7b18d14ac99d2337796facd3028647799b4f66 (patch) | |
tree | 9d1901ff0cbce1f64f05c16533f02738b00f9440 /src/console | |
parent | c3cbe9433c22b5ac3bd616c858fb87b0de3ebab8 (diff) | |
download | coreboot-4b7b18d14ac99d2337796facd3028647799b4f66.tar.xz |
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/console')
-rw-r--r-- | src/console/die.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/console/die.c b/src/console/die.c index ea46f51dfa..79babeceee 100644 --- a/src/console/die.c +++ b/src/console/die.c @@ -21,10 +21,21 @@ #ifndef __ROMCC__ #define NORETURN __attribute__((noreturn)) +/* + * 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. + */ +__attribute__ ((weak)) void die_notify(void) +{ +} + /* Report a fatal error */ void NORETURN die(const char *msg) { printk(BIOS_EMERG, "%s", msg); + die_notify(); halt(); } #endif |