Kernel parameter: kgdb8250

You can build the make the kgdb8250 driver as a kernel module "8250_kgdb.ko" or as a built-in. Either way you must pass the parameter kgdb8250=<args described below> to configure the I/O driver. Alternately if you used the kgdb8250 kgdb I/O driver as a built-in you can configure it at run time by using the echo command to send the configuration into the sysfs parameters. Note that when using sysfs, you omit the "kgdb8250=" For example:

You can also return kgdb back to the unregistered state by using:

When loading the 8250_kgdb.ko module or using the kgdb8250 driver as a built in, the configuration takes one of two forms.

  1. Full serial address specification:

    • kgdb8250=<io|mmio|mbase>,<address>[/<regshift>],<baud rate>,<irq>

    • The values io or mmio refer to if the address being passed next needs to be memory mapped (mmio) or not. The mbase (short for membase) parameter is only used if mapbase is set to zero for uart definition, which is the case for some ppc boards. The address must be passed in hex and is the hardware address and will be remapped if passed as mmio. An optional regshift value can be given to express address spreading of the 8250 registers. regshift just as the succeeding baud rate and irq values are base-10. The supported values for baud rate are 9600, 19200, 38400, 57600, and 115200.

      To specify the values of the serial port at boot:

      kgdb8250=io,3f8,115200,3

      On certain non x86 archs it might look something like:

      kgdb8250=mmio,0xff5e0000,115200,74

  2. Simple configuration:

    • kgdb8250=<tty_name>,<baud rate>

    • The simple configuration can be used so long as you are not trying to perform "early" debugging on a platform that supports early debugging. Early debugging allows you to debug the kernel prior to console_init() and the tty driver registration. In the case of the simple configuration the address, port type and irq information can be obtained dynamically by the kgdb I/O driver after the tty's are registered. Here is an example of the simple configuration parameter for ttyS0:

      kgdb8250=ttyS0,115200

If you do use the full serial address configuration and the kgdbwait parameter to boot your kernel, on some architectures it may be able to stop before console output has started in which it might look like the target machine is hung when in reality it is just waiting for the debugger.

Finally, it should be noted that you should not try to multiplex a standard serial console and use the kgdb8250 driver at the same time if you have a single serial port IE: "console=ttyS0,11520 kgdb8250=ttyS0,115200". You should use the kgdboc and not the kgdb8250 driver if this is what you want to do.