KDB early not working since 2.6.10 on IA-64

Francois Wellenreiter Francois.Wellenreiter at bull.net
Wed Mar 2 02:09:31 PST 2005


		Hi all,


	Since console configuration have been deeply modified on 2.6.10
linux kernel, I noticed that enabling "kdb=early" wasn't working well
on my Tiger4 machine. It produced KDB traces on the screen, but keyboard
seemed to be disabled. The following patch may enable this.

Best regards,

			Francois WELLENREITER


-- Attached file included as plaintext by Ecartis --
-- File: Bull-kdbearly-2610.patch

diff -auNr linux-2.6.10/drivers/serial/8250_early.c linux-2.6.10_kdbearly/drivers/serial/8250_early.c
--- linux-2.6.10/drivers/serial/8250_early.c	2004-12-24 22:34:33.000000000 +0100
+++ linux-2.6.10_kdbearly/drivers/serial/8250_early.c	2005-03-01 15:13:39.628943456 +0100
@@ -35,6 +35,13 @@
 #include <asm/io.h>
 #include <asm/serial.h>
 
+
+#ifdef	CONFIG_KDB
+#include <linux/kdb.h>
+
+static int  kdb_serial_line = -1;
+#endif
+
 struct early_uart_device {
 	struct uart_port port;
 	char options[16];		/* e.g., 115200n8 */
@@ -191,6 +198,31 @@
 	if ((err = parse_options(device, options)) < 0)
 		return err;
 
+
+#ifdef	CONFIG_KDB
+	/*
+	 * Remember the line number of the first serial
+	 * console.  We'll make this the kdb serial console too.
+	 */
+	if (kdb_serial_line == -1) {
+	  kdb_serial_line = console->index;
+	  kdb_serial.io_type = device->port.iotype;
+	  switch (device->port.iotype) {
+	  case SERIAL_IO_MEM:
+#ifdef  SERIAL_IO_MEM32
+	  case SERIAL_IO_MEM32:
+#endif
+	    kdb_serial.iobase = (unsigned long)(device->port.membase);
+	    kdb_serial.ioreg_shift = device->port.regshift;
+	    break;
+	  default:
+	    kdb_serial.iobase = device->port.iobase;
+	    kdb_serial.ioreg_shift = 0;
+	    break;
+	  }
+	}
+#endif	/* CONFIG_KDB */
+
 	init_port(device);
 	return 0;
 }


---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.


More information about the kdb mailing list