console: Add printk helper for ChromeOS
Do not expose console_tx_flush() to ChromeOS as that function is part of lower-level implementation. Change-Id: I1e31662da88a60e83f8e5d307a4b53441c130aab Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5347 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
parent
56ae13983b
commit
b3356bbff4
|
@ -40,3 +40,11 @@ int do_printk(int msg_level, const char *fmt, ...)
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_CHROMEOS
|
||||||
|
void do_vtxprintf(const char *fmt, va_list args)
|
||||||
|
{
|
||||||
|
vtxprintf(console_tx_byte, fmt, args);
|
||||||
|
console_tx_flush();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -82,6 +82,16 @@ static inline void printk(int LEVEL, const char *fmt, ...) {
|
||||||
|
|
||||||
#endif /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */
|
#endif /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */
|
||||||
|
|
||||||
|
#if CONFIG_CHROMEOS
|
||||||
|
/* FIXME: Collision of varargs with AMD headers without guard. */
|
||||||
|
#include <console/vtxprintf.h>
|
||||||
|
#if !defined(__PRE_RAM__) || CONFIG_EARLY_CONSOLE
|
||||||
|
void do_vtxprintf(const char *fmt, va_list args);
|
||||||
|
#else
|
||||||
|
static inline void do_vtxprintf(const char *fmt, va_list args) {};
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define print_emerg(STR) printk(BIOS_EMERG, "%s", (STR))
|
#define print_emerg(STR) printk(BIOS_EMERG, "%s", (STR))
|
||||||
#define print_alert(STR) printk(BIOS_ALERT, "%s", (STR))
|
#define print_alert(STR) printk(BIOS_ALERT, "%s", (STR))
|
||||||
#define print_crit(STR) printk(BIOS_CRIT, "%s", (STR))
|
#define print_crit(STR) printk(BIOS_CRIT, "%s", (STR))
|
||||||
|
|
|
@ -64,8 +64,7 @@ out:
|
||||||
/* Helper routines for the vboot stub. */
|
/* Helper routines for the vboot stub. */
|
||||||
static void log_msg(const char *fmt, va_list args)
|
static void log_msg(const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
vtxprintf(console_tx_byte, fmt, args);
|
do_vtxprintf(fmt, args);
|
||||||
console_tx_flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fatal_error(void)
|
static void fatal_error(void)
|
||||||
|
|
Loading…
Reference in New Issue