console: Move newline translation outside console_tx_byte
This gives us completely transparent low-level function to transmit data. Change-Id: I706791ff43d80a36a7252a4da0e6f3af92520db7 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5336 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
committed by
Patrick Georgi
parent
b3356bbff4
commit
657e0be464
@ -62,25 +62,26 @@ void post_log_clear(void);
|
||||
/* 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)));
|
||||
|
||||
#if defined(__BOOT_BLOCK__) && !CONFIG_BOOTBLOCK_CONSOLE || \
|
||||
defined(__SMM__) && !CONFIG_DEBUG_SMI || \
|
||||
(defined(__PRE_RAM__) && !defined(__BOOT_BLOCK__)) && !CONFIG_EARLY_CONSOLE
|
||||
|
||||
static inline void printk(int LEVEL, const char *fmt, ...);
|
||||
static inline void printk(int LEVEL, const char *fmt, ...) {
|
||||
/* Do nothing. */
|
||||
}
|
||||
/* Do nothing. */
|
||||
static inline void printk(int LEVEL, const char *fmt, ...) {}
|
||||
static inline void do_putchar(unsigned char byte) {}
|
||||
|
||||
#else /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */
|
||||
#else
|
||||
|
||||
int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
void do_putchar(unsigned char byte);
|
||||
|
||||
#define printk(LEVEL, fmt, args...) \
|
||||
do { \
|
||||
do_printk(LEVEL, fmt, ##args); \
|
||||
} while(0)
|
||||
|
||||
#endif /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */
|
||||
#endif
|
||||
|
||||
#if CONFIG_CHROMEOS
|
||||
/* FIXME: Collision of varargs with AMD headers without guard. */
|
||||
|
Reference in New Issue
Block a user