summaryrefslogtreecommitdiff
path: root/src/include/console/console.h
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2012-08-03 13:20:57 -0500
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2012-08-04 19:31:20 +0200
commitf88204e02b2ece82a76544070f37a4e2e2bd0f11 (patch)
treeb25502b96b427247e0c6e2fa8d74d62fbb8c0c43 /src/include/console/console.h
parent16b022a15c78780e212e57c8284494ccf2d40d23 (diff)
Add a capability for mainboard-specific posting.
Some mainboards have really nice capabilities for posting, beyond simple POST cards. Further, some can not use a POST card. This change defines a weak symbol (mainboard_post) that can be overridden by a real mainboard_post function. If, for example, you'd like to do something fancy before the payload starts, you can add this to mainboard.c: void mainboard_post(u8 value) { switch(value){ case POST_TIME_TO_PARTY: some_fancy_lights(); break; } } Maybe the post function should be an entry in the device. We're beginning to over-use weak symbols. BUG=None TEST=Build and boot a google chromebook. Observe that it still works. Use it to drive some pretty lights. Change-Id: I3512d2ec34a66c747287191851c3f68b6a7cc1b2 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/1397 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/include/console/console.h')
-rw-r--r--src/include/console/console.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/console/console.h b/src/include/console/console.h
index 56e202d99b..00be96f80f 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -69,6 +69,8 @@ extern int console_loglevel;
#ifndef __ROMCC__
void console_init(void);
void post_code(u8 value);
+/* this function is weak and can be overridden by a mainboard function. */
+void mainboard_post(u8 value);
void __attribute__ ((noreturn)) die(const char *msg);
int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));