2018-05-15 13:28:53 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _ASM_S390_BOOT_DATA_H
|
|
|
|
|
2024-11-23 00:02:25 +01:00
|
|
|
#include <linux/string.h>
|
2018-05-15 13:28:53 +02:00
|
|
|
#include <asm/setup.h>
|
|
|
|
#include <asm/ipl.h>
|
|
|
|
|
|
|
|
extern char early_command_line[COMMAND_LINE_SIZE];
|
2019-04-01 19:10:51 +02:00
|
|
|
extern struct ipl_parameter_block ipl_block;
|
|
|
|
extern int ipl_block_valid;
|
2019-02-21 14:23:04 +01:00
|
|
|
extern int ipl_secure_flag;
|
|
|
|
|
|
|
|
extern unsigned long ipl_cert_list_addr;
|
|
|
|
extern unsigned long ipl_cert_list_size;
|
|
|
|
|
|
|
|
extern unsigned long early_ipl_comp_list_addr;
|
|
|
|
extern unsigned long early_ipl_comp_list_size;
|
2018-05-15 13:28:53 +02:00
|
|
|
|
2024-11-20 20:10:50 +01:00
|
|
|
extern char boot_rb[PAGE_SIZE * 2];
|
2024-11-20 21:46:17 +01:00
|
|
|
extern bool boot_earlyprintk;
|
2024-11-20 20:10:50 +01:00
|
|
|
extern size_t boot_rb_off;
|
2024-11-23 00:02:25 +01:00
|
|
|
extern char bootdebug_filter[128];
|
2024-11-20 22:23:48 +01:00
|
|
|
extern bool bootdebug;
|
2024-11-20 20:10:50 +01:00
|
|
|
|
|
|
|
#define boot_rb_foreach(cb) \
|
|
|
|
do { \
|
|
|
|
size_t off = boot_rb_off + strlen(boot_rb + boot_rb_off) + 1; \
|
|
|
|
size_t len; \
|
|
|
|
for (; off < sizeof(boot_rb) && (len = strlen(boot_rb + off)); off += len + 1) \
|
|
|
|
cb(boot_rb + off); \
|
|
|
|
for (off = 0; off < boot_rb_off && (len = strlen(boot_rb + off)); off += len + 1) \
|
|
|
|
cb(boot_rb + off); \
|
|
|
|
} while (0)
|
|
|
|
|
2024-11-23 00:02:25 +01:00
|
|
|
/*
|
|
|
|
* bootdebug_filter is a comma separated list of strings,
|
|
|
|
* where each string can be a prefix of the message.
|
|
|
|
*/
|
|
|
|
static inline bool bootdebug_filter_match(const char *buf)
|
|
|
|
{
|
|
|
|
char *p = bootdebug_filter, *s;
|
|
|
|
char *end;
|
|
|
|
|
|
|
|
if (!*p)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
end = p + strlen(p);
|
|
|
|
while (p < end) {
|
|
|
|
p = skip_spaces(p);
|
|
|
|
s = memscan(p, ',', end - p);
|
|
|
|
if (!strncmp(p, buf, s - p))
|
|
|
|
return true;
|
|
|
|
p = s + 1;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-11-29 12:56:48 +01:00
|
|
|
static inline const char *skip_timestamp(const char *buf)
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_PRINTK_TIME
|
|
|
|
const char *p = memchr(buf, ']', strlen(buf));
|
|
|
|
|
|
|
|
if (p && p[1] == ' ')
|
|
|
|
return p + 2;
|
|
|
|
#endif
|
|
|
|
return buf;
|
|
|
|
}
|
|
|
|
|
2018-05-15 13:28:53 +02:00
|
|
|
#endif /* _ASM_S390_BOOT_DATA_H */
|