Thought somebody of you might also have a use for this patch. It's my
hack that makes printk() over the serial interface usable from
immediately after kernel entry even before console_init(). It's a
dirty hack, so I don't want to see this going into CVS.
Enjoy,
Ralf
Index: kernel/printk.c
===================================================================
RCS file: /usr/src/cvs/linux/kernel/printk.c,v
retrieving revision 1.25
diff -u -r1.25 printk.c
--- printk.c 1999/10/07 16:20:50 1.25
+++ printk.c 2000/01/17 20:47:49
@@ -304,6 +304,11 @@
c = c->next;
}
}
+#if 1
+ /* HACK: Enable printing during early bootup */
+ if (!console_drivers)
+ prom_printf(msg);
+#endif
if (line_feed)
msg_level = -1;
}
Index: arch/mips64/arc/console.c
===================================================================
RCS file: /usr/src/cvs/linux/arch/mips64/arc/console.c,v
retrieving revision 1.3
diff -u -r1.3 console.c
--- console.c 1999/10/19 20:51:44 1.3
+++ console.c 2000/01/13 16:34:25
@@ -11,12 +11,32 @@
#include <linux/init.h>
#include <asm/sgialib.h>
+#include <asm/sn/addrs.h>
+#include <asm/sn/sn0/hub.h>
+#include <asm/sn/klconfig.h>
+#include <asm/ioc3.h>
+
+static void inline ip27_putchar(char c)
+{
+ struct ioc3 *ioc3;
+ struct ioc3_uartregs *uart;
+ nasid_t nid;
+
+ nid = get_nasid();
+ ioc3 = (struct ioc3 *) KL_CONFIG_CH_CONS_INFO(nid)->memory_base;
+ uart = &ioc3->sregs.uarta;
+
+ while ((uart->iu_lsr & 0x20) == 0);
+ uart->iu_thr = c;
+}
+
void __init prom_putchar(char c)
{
ULONG cnt;
CHAR it = c;
- ArcWrite(1, &it, 1, &cnt);
+ //ArcWrite(1, &it, 1, &cnt);
+ ip27_putchar(c);
}
char __init prom_getchar(void)
|