// SPDX-License-Identifier: GPL-2.0-or-later /* * PDC early console support - use PDC firmware to dump text via boot console * * Copyright (C) 2001-2022 Helge Deller <deller@gmx.de>
*/
#include <linux/console.h> #include <linux/init.h> #include <linux/serial_core.h> #include <linux/kgdb.h> #include <asm/page.h> /* for PAGE0 */ #include <asm/pdc.h> /* for iodc_call() proto and friends */
staticvoid pdc_console_write(struct console *co, constchar *s, unsigned count)
{ int i = 0;
do {
i += pdc_iodc_print(s + i, count - i);
} while (i < count);
}
#ifdef CONFIG_KGDB staticint kgdb_pdc_read_char(void)
{ int c = pdc_iodc_getc();
return (c <= 0) ? NO_POLL_CHAR : c;
}
staticvoid kgdb_pdc_write_char(u8 chr)
{ /* no need to print char as it's shown on standard console */ /* pdc_iodc_print(&chr, 1); */
}
/* If the console is duplex then copy the COUT parameters to CIN. */ if (PAGE0->mem_cons.cl_class == CL_DUPLEX)
memcpy(&PAGE0->mem_kbd, &PAGE0->mem_cons, sizeof(PAGE0->mem_cons));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.