diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2013-05-03 18:25:27 +0200 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-05-10 17:33:49 +0200 |
commit | 711a6fde0db2f7a0c388fc97faec1013caaa2789 (patch) | |
tree | 7c830d4aa59b8204b858710b30134ac31da0eb39 /src/include/console | |
parent | c5e036a04368186fe73925c6fb101c594513391c (diff) | |
download | coreboot-711a6fde0db2f7a0c388fc97faec1013caaa2789.tar.xz |
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 <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/3188
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/include/console')
-rw-r--r-- | src/include/console/console.h | 32 |
1 files changed, 1 insertions, 31 deletions
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)) |