Esempio n. 1
0
static int __init setup_early_printk(char *buf)
{
	int keep;

	if (!buf)
		return 0;

	if (early_console)
		return 0;

	keep = (strstr(buf, "keep") != NULL);

	while (*buf != '\0') {
		if (!strncmp(buf, "serial", 6)) {
			buf += 6;
			early_serial_init(buf);
			early_console_register(&early_serial_console, keep);
			if (!strncmp(buf, ",ttyS", 5))
				buf += 5;
		}
		if (!strncmp(buf, "ttyS", 4)) {
			early_serial_init(buf + 4);
			early_console_register(&early_serial_console, keep);
		}
		if (!strncmp(buf, "vga", 3) &&
		    boot_params.screen_info.orig_video_isVGA == 1) {
			max_xpos = boot_params.screen_info.orig_video_cols;
			max_ypos = boot_params.screen_info.orig_video_lines;
			current_ypos = boot_params.screen_info.orig_y;
			early_console_register(&early_vga_console, keep);
		}
#ifdef CONFIG_EARLY_PRINTK_DBGP
		if (!strncmp(buf, "dbgp", 4) && !early_dbgp_init(buf + 4))
			early_console_register(&early_dbgp_console, keep);
#endif
#ifdef CONFIG_HVC_XEN
		if (!strncmp(buf, "xen", 3))
			early_console_register(&xenboot_console, keep);
#endif
#ifdef CONFIG_EARLY_PRINTK_INTEL_MID
		if (!strncmp(buf, "mrst", 4)) {
			mrst_early_console_init();
			early_console_register(&early_mrst_console, keep);
		}
		if (!strncmp(buf, "mrfld", 5)) {
			mrfld_early_console_init();
			early_console_register(&early_mrfld_console, keep);
		}
		if (!strncmp(buf, "hsu", 3)) {
			hsu_early_console_init(buf + 3);
			early_console_register(&early_hsu_console, keep);
		}
		if (!strncmp(buf, "pti", 3))
			early_console_register(&early_pti_console, keep);
#endif
		buf++;
	}
	return 0;
}
static void dw_kmsg_dump(struct kmsg_dumper *dumper,
			 enum kmsg_dump_reason reason)
{
	static char line[1024];
	size_t len;

	/* When run to this, we'd better re-init the HW */
	mrst_early_console_init();

	while (kmsg_dump_get_line(dumper, true, line, sizeof(line), &len))
		early_mrst_console.write(&early_mrst_console, line, len);
}
Esempio n. 3
0
static void dw_kmsg_dump(struct kmsg_dumper *dumper,
			enum kmsg_dump_reason reason,
			const char *s1, unsigned long l1,
			const char *s2, unsigned long l2)
{
	int i;

	/* When run to this, we'd better re-init the HW */
	mrst_early_console_init();

	for (i = 0; i < l1; i++)
		early_mrst_console.write(&early_mrst_console, s1 + i, 1);
	for (i = 0; i < l2; i++)
		early_mrst_console.write(&early_mrst_console, s2 + i, 1);
}