1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_BOOT_DATA_H
4 #include <linux/string.h>
8 extern char early_command_line[COMMAND_LINE_SIZE];
9 extern struct ipl_parameter_block ipl_block;
10 extern int ipl_block_valid;
11 extern int ipl_secure_flag;
13 extern unsigned long ipl_cert_list_addr;
14 extern unsigned long ipl_cert_list_size;
16 extern unsigned long early_ipl_comp_list_addr;
17 extern unsigned long early_ipl_comp_list_size;
19 extern char boot_rb[PAGE_SIZE * 2];
20 extern bool boot_earlyprintk;
21 extern size_t boot_rb_off;
22 extern char bootdebug_filter[128];
23 extern bool bootdebug;
25 #define boot_rb_foreach(cb) \
27 size_t off = boot_rb_off + strlen(boot_rb + boot_rb_off) + 1; \
29 for (; off < sizeof(boot_rb) && (len = strlen(boot_rb + off)); off += len + 1) \
31 for (off = 0; off < boot_rb_off && (len = strlen(boot_rb + off)); off += len + 1) \
36 * bootdebug_filter is a comma separated list of strings,
37 * where each string can be a prefix of the message.
39 static inline bool bootdebug_filter_match(const char *buf)
41 char *p = bootdebug_filter, *s;
50 s = memscan(p, ',', end - p);
51 if (!strncmp(p, buf, s - p))
58 static inline const char *skip_timestamp(const char *buf)
60 #ifdef CONFIG_PRINTK_TIME
61 const char *p = memchr(buf, ']', strlen(buf));
69 #endif /* _ASM_S390_BOOT_DATA_H */