boot_earlyprintk = true;
if (!strcmp(param, "debug"))
boot_console_loglevel = CONSOLE_LOGLEVEL_DEBUG;
+ if (!strcmp(param, "bootdebug"))
+ bootdebug = true;
if (!strcmp(param, "quiet"))
boot_console_loglevel = CONSOLE_LOGLEVEL_QUIET;
if (!strcmp(param, "ignore_loglevel"))
char __bootdata(boot_rb)[PAGE_SIZE * 2];
bool __bootdata(boot_earlyprintk);
size_t __bootdata(boot_rb_off);
+bool __bootdata(bootdebug);
static void boot_rb_add(const char *str, size_t len)
{
/* always print emergency messages */
if (level > LOGLEVEL_EMERG && !boot_earlyprintk)
return;
+ /* print debug messages only when bootdebug is enabled */
+ if (level == LOGLEVEL_DEBUG && !bootdebug)
+ return;
if (boot_ignore_loglevel || level < boot_console_loglevel)
sclp_early_printk(printk_skip_level(buf));
}
extern char boot_rb[PAGE_SIZE * 2];
extern bool boot_earlyprintk;
extern size_t boot_rb_off;
+extern bool bootdebug;
#define boot_rb_foreach(cb) \
do { \
decompressor_handled_param(nokaslr);
decompressor_handled_param(cmma);
decompressor_handled_param(relocate_lowcore);
+decompressor_handled_param(bootdebug);
#if IS_ENABLED(CONFIG_KVM)
decompressor_handled_param(prot_virt);
#endif
char __bootdata(boot_rb)[PAGE_SIZE * 2];
bool __bootdata(boot_earlyprintk);
size_t __bootdata(boot_rb_off);
+bool __bootdata(bootdebug);
unsigned long __bootdata_preserved(VMALLOC_START);
EXPORT_SYMBOL(VMALLOC_START);
}
/*
- * Print avoiding interpretation of % in buf
+ * Print avoiding interpretation of % in buf and taking bootdebug option
+ * into consideration.
*/
static void __init print_rb_entry(char *buf)
{
char fmt[] = KERN_SOH "0boot: %s";
+ int level = printk_get_level(buf);
- fmt[1] = printk_get_level(buf);
+ if (level == KERN_DEBUG[1] && !bootdebug)
+ return;
+
+ fmt[1] = level;
printk(fmt, printk_skip_level(buf));
}