From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761252AbYBEXfK (ORCPT ); Tue, 5 Feb 2008 18:35:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763389AbYBEXen (ORCPT ); Tue, 5 Feb 2008 18:34:43 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:43588 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763372AbYBEXek (ORCPT ); Tue, 5 Feb 2008 18:34:40 -0500 Message-ID: <47A8F28E.6000102@web.de> Date: Wed, 06 Feb 2008 00:34:38 +0100 From: Jan Kiszka User-Agent: Thunderbird 2.0.0.9 (X11/20070801) MIME-Version: 1.0 To: Jason Wessel , Ingo Molnar CC: Linux Kernel Mailing List , kgdb-bugreport@lists.sourceforge.net, Thomas Gleixner , "H. Peter Anvin" Subject: [PATCH 3/3] KGDB: Update documentation X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Provags-ID: V01U2FsdGVkX1/sDxrfkyTbxwXz4GvGsUy2/4bFzxHwom7AZuVG To4WVNURvPFepuctgCAvGatg2p/TAHEXgDrzdrxpQb3nZie1tq MMwpVsZHM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Align KGDB's DocBook chapters with all previous changes. To avoid confusion, it removes references to the not-yet-merged KGDBOE driver. Signed-off-by: Jan Kiszka --- Documentation/DocBook/kgdb.tmpl | 132 ++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 77 deletions(-) Index: b/Documentation/DocBook/kgdb.tmpl =================================================================== --- a/Documentation/DocBook/kgdb.tmpl +++ b/Documentation/DocBook/kgdb.tmpl @@ -77,23 +77,16 @@ and then select "KGDB: kernel debugging with remote gdb". - The first choice for I/O is CONFIG_KGDB_ONLY_MODULES. - This means that you will only be able to use KGDB after loading a - kernel module that defines how you want to be able to talk with - KGDB. There are two other choices (more on some architectures) that - can be enabled as modules later, if not picked here. - - The first of these is CONFIG_KGDB_8250_NOMODULE. - This has sub-options such as CONFIG_KGDB_SIMPLE_SERIAL - which toggles choosing the serial port by ttyS number or by specifying - a port and IRQ number. - - - The second of these choices on most systems for I/O is - CONFIG_KGDBOE. This requires that the machine to be - debugged has an ethernet card which supports the netpoll API, such as - the cards supported by CONFIG_E100. There are no - sub-options for this, but a kernel command line option is required. + Next you should choose one of more I/O drivers to interconnect debugging + host and debugged target. If debugging early boot steps is required, + at least one driver has to be built in. I/O driver configuration takes + place via kernel or module parameters, see following chapter. + + + While KGDB is connect with the host, it can dump console messages over + this link. This is specifically useful for collecting critical kernel + messages while only a single serial port is available. Enable + CONFIG_KGDB_CONSOLE to activate this feature. @@ -103,54 +96,60 @@ wait for gdb connection during booting of a kernel. If the CONFIG_KGDB_8250 driver is used (or if applicable, another serial driver) this breakpoint will happen very early on, before - console output. If you wish to change serial port information and you - have enabled both CONFIG_KGDB_8250 and - CONFIG_KGDB_SIMPLE_SERIAL then you must pass the option - kgdb8250=<io or mmio>,<address>,<baud - rate>,<irq> before kgdbwait. - The values io or mmio refer to - if the address being passed next needs to be memory mapped - (mmio) or not. The address must - be passed in hex and is the hardware address and will be remapped if - passed as mmio. The value - baud rate and irq are base-10. - The supported values for baud rate are - 9600, 19200, - 38400, 57600, and - 115200. + console output. - To have KGDB stop the kernel and wait, with the compiled values for the - serial driver, pass in: kgdbwait. + The serial port configuration must be passed via the + option kgdb8250=<io|mmio>,<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 + 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. + + + kgdb8250=io,3f8,115200,3 + + On IA64 this could also be: + + kgdb8250=mmio,0xff5e0000,115200,74 - And to have KGDB also stop the kernel and wait for GDB to connect, pass in - kgdbwait after this arguement. - To configure the CONFIG_KGDBOE driver, pass in - kgdboe=[src-port]@<src-ip>/[dev],[tgt-port]@<tgt-ip>/[tgt-macaddr] - where: - - src-port (optional): source for UDP packets (defaults to 6443) - src-ip: source IP to use (interface address) - dev (optional): network interface (eth0) - tgt-port (optional): port GDB will use (defaults to 6442) - tgt-ip: IP address GDB will be connecting from - tgt-macaddr (optional): ethernet MAC address for logging agent (default is broadcast) - - - - The CONFIG_KGDBOE driver can be reconfigured at run time, - if CONFIG_SYSFS and CONFIG_MODULES - are enabled, by echo'ing a new config string to - /sys/module/kgdboe/parameter/kgdboe. The - driver can be unconfigured with the special string - not_configured. + If the debugger is not needed early, the alternative configuration format + kgdb8250=ttyS<n>,<baud rate> can be used. + The required parameters are then obtained from the standard 8250 driver. + Example: + + + kgdb8250=ttyS0,115200 + + + To configure the CONFIG_KGDBOC driver, just pass in + kgdboc=<tty-device>. It will try to connect + to gdb over the given serial console. Note that KGDBOC does not support + interrupting the target via the gdb remote protocol. Instead you will + need to issue sysrq-g via the console or locally on the target. + + + All drivers can be reconfigured at run time, if + CONFIG_SYSFS and CONFIG_MODULES are + enabled, by echo'ing a new config string to + /sys/module/<driver>/parameter/<option>. + The driver can be unconfigured by passing an empty string. You cannot + change the configuration while the debugger is attached. In that case + issue the required detach command via gdb first. @@ -212,25 +211,4 @@ !Iinclude/linux/kgdb.h - - The common backend (optional) - - These functions are part of the common backend, found in kernel/kgdb.c - and are optionally implemented. Some functions (with _hw_ in the name) - end up being required on arches which use hardware breakpoints. - - - - - Driver-Specific Functions - - Some of the I/O drivers have additional functions that can be - called, that are specific to the driver. Calls from other places - to these functions must be wrapped in #ifdefs for the driver in - question. - -!Idrivers/serial/8250_kgdb.c -