From 711a6fde0db2f7a0c388fc97faec1013caaa2789 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Fri, 3 May 2013 18:25:27 +0200 Subject: Get rid of MAXIMUM_CONSOLE_LOGLEVEL; compile all messages into the coreboot binary This option has never had much if any use. It solved a problem over 10 years ago that resulted from an argument over the value or lack thereof of including all the debug strings in a coreboot image. The answer is in: it's a good idea to maintain the capability to print all messages, for many reasons. This option is also misleading people, as in a recent discussion, to believe that log messges are controlled at build time in a way they are not. For the record, from this day forward, we can print messages at all log levels and the default log level is set at boot time, as directed by DEFAULT_CONSOLE_LOGLEVEL. You can set the default to 0 at build time and if you are having trouble override it in CMOS and get more messages. Besides, a quick glance shows it's always set to max (9 in this case) in the very few cases (1) in which it is set. Change-Id: I60c4cdaf4dcd318b841a6d6c70546417c5626f21 Signed-off-by: Ronald G. Minnich Reviewed-on: http://review.coreboot.org/3188 Tested-by: build bot (Jenkins) --- src/include/console/console.h | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'src/include') diff --git a/src/include/console/console.h b/src/include/console/console.h index d32009384d..9112f35c9b 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -86,41 +86,11 @@ static inline void printk(int LEVEL, const char *fmt, ...) { #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 - * it worked fine without. In order to catch such issues reliably we are - * always doing a function call to do_printk with the full number of arguments. - * Our favorite reason to do it this way was: - * disable_car(); - * printk(BIOS_DEBUG, "CAR disabled\n"); // oops, garbage stack pointer - * move_stack(); - * This slightly increases the code size and some unprinted strings will end - * up in the final coreboot binary (most of them compressed). If you want to - * avoid this, do a - * #define WE_CLEANED_UP_ALL_SIDE_EFFECTS - */ -#ifdef WE_CLEANED_UP_ALL_SIDE_EFFECTS - #define printk(LEVEL, fmt, args...) \ do { \ - if (CONFIG_MAXIMUM_CONSOLE_LOGLEVEL >= LEVEL) { \ - do_printk(LEVEL, fmt, ##args); \ - } \ + do_printk(LEVEL, fmt, ##args); \ } while(0) -#else - -#define printk(LEVEL, fmt, args...) \ - do { \ - if (CONFIG_MAXIMUM_CONSOLE_LOGLEVEL >= LEVEL) { \ - do_printk(LEVEL, fmt, ##args); \ - } else { \ - do_printk(BIOS_NEVER, fmt, ##args); \ - } \ - } while(0) -#endif - #endif /* defined(__PRE_RAM__) && !CONFIG_EARLY_CONSOLE */ #define print_emerg(STR) printk(BIOS_EMERG, "%s", (STR)) -- cgit v1.2.3