<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Kernel parameter: kgdb8250</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0" /><link rel="start" href="index.html" title="Using kgdb and the kgdb Internals" /><link rel="up" href="ch03.html" title="Chapter 3. Enable kgdb for debugging" /><link rel="prev" href="ch03.html" title="Chapter 3. Enable kgdb for debugging" /><link rel="next" href="ch03s03.html" title="Kernel parameter: kgdboc" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kernel parameter: kgdb8250</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Enable kgdb for debugging</th><td width="20%" align="right"> <a accesskey="n" href="ch03s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="kgdb8250"></a>Kernel parameter: kgdb8250</h2></div></div></div><p>
    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 <code class="constant">kgdb8250=&lt;args described
    below&gt;</code> 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 "<code class="constant">kgdb8250=</code>" For example:
    </p><div class="itemizedlist"><ul type="disc"><li><p><code class="constant">kgdb8250=ttyS&lt;n&gt;,&lt;baud rate&gt;</code></p></li></ul></div><p>
    </p><p>
    You can also return kgdb back to the unregistered state by using:
    </p><div class="itemizedlist"><ul type="disc"><li><p><code class="constant">echo "" &gt; /sys/module/8250_kgdb/paramaters/kgdb8250</code></p></li></ul></div><p>
    </p><p>
    When loading the 8250_kgdb.ko module or using the kgdb8250 driver as a built in, the configuration takes one of two forms.
    </p><div class="orderedlist"><ol type="1"><li><p>Full serial address specification:
    </p><div class="itemizedlist"><ul type="disc"><li><p><code class="constant">kgdb8250=&lt;io|mmio|mbase&gt;,&lt;address&gt;[/&lt;regshift&gt;],&lt;baud rate&gt;,&lt;irq&gt;</code></p></li><li><p>
    The values <code class="constant">io</code> or <code class="constant">mmio</code>
    refer to if the address being passed next needs to be memory
    mapped (<code class="constant">mmio</code>) 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
    <code class="constant">address</code> must be passed in hex and is the
    hardware address and will be remapped if passed as
    <code class="constant">mmio</code>. An optional
    <code class="constant">regshift</code> value can be given to express
    address spreading of the 8250
    registers. <code class="constant">regshift</code> just as the succeeding
    <code class="constant">baud rate</code> and <code class="constant">irq</code> values
    are base-10. The supported values for <code class="constant">baud
    rate</code> are <code class="constant">9600</code>,
    <code class="constant">19200</code>, <code class="constant">38400</code>,
    <code class="constant">57600</code>, and <code class="constant">115200</code>.
    </p><p>
    To specify the values of the serial port at boot:
    </p><p>
    <code class="constant">kgdb8250=io,3f8,115200,3</code>
    </p><p>
    On certain non x86 archs it might look something like:
    </p><p>
    <code class="constant">kgdb8250=mmio,0xff5e0000,115200,74</code>
    </p></li></ul></div><p>
    </p></li><li><p>Simple configuration:
    </p><div class="itemizedlist"><ul type="disc"><li><p><code class="constant">kgdb8250=&lt;tty_name&gt;,&lt;baud rate&gt;</code></p></li><li><p>
    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:
    </p><p>
    <code class="constant">kgdb8250=ttyS0,115200</code>
    </p></li></ul></div><p>
    </p></li></ol></div><p>
    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.
    </p><p>
    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.
    </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Enable kgdb for debugging </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Kernel parameter: kgdboc</td></tr></table></div></body></html>
