diff options
Diffstat (limited to 'src/include/console/console.h')
-rw-r--r-- | src/include/console/console.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/console/console.h b/src/include/console/console.h index edd49e0f84..496571b6fa 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -74,6 +74,15 @@ 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(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE + +static inline void printk(int LEVEL, const char *fmt, ...); +static inline void printk(int LEVEL, const char *fmt, ...) { + /* Do nothing. */ +} + +#else /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */ + #undef WE_CLEANED_UP_ALL_SIDE_EFFECTS /* We saw some strange effects in the past like coreboot crashing while * disabling cache as ram for a maximum console log level of 6 and above while @@ -109,6 +118,8 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, } while(0) #endif +#endif /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */ + #define print_emerg(STR) printk(BIOS_EMERG, "%s", (STR)) #define print_alert(STR) printk(BIOS_ALERT, "%s", (STR)) #define print_crit(STR) printk(BIOS_CRIT, "%s", (STR)) |