linux/drivers/ieee1394
Bernhard Kaindl f212ec4b7b x86: early boot debugging via FireWire (ohci1394_dma=early)
This patch adds a new configuration option, which adds support for a new
early_param which gets checked in arch/x86/kernel/setup_{32,64}.c:setup_arch()
to decide wether OHCI-1394 FireWire controllers should be initialized and
enabled for physical DMA access to allow remote debugging of early problems
like issues ACPI or other subsystems which are executed very early.

If the config option is not enabled, no code is changed, and if the boot
paramenter is not given, no new code is executed, and independent of that,
all new code is freed after boot, so the config option can be even enabled
in standard, non-debug kernels.

With specialized tools, it is then possible to get debugging information
from machines which have no serial ports (notebooks) such as the printk
buffer contents, or any data which can be referenced from global pointers,
if it is stored below the 4GB limit and even memory dumps of of the physical
RAM region below the 4GB limit can be taken without any cooperation from the
CPU of the host, so the machine can be crashed early, it does not matter.

In the extreme, even kernel debuggers can be accessed in this way. I wrote
a small kgdb module and an accompanying gdb stub for FireWire which allows
to gdb to talk to kgdb using remote remory reads and writes over FireWire.

An version of the gdb stub fore FireWire is able to read all global data
from a system which is running a a normal kernel without any kernel debugger,
without any interruption or support of the system's CPU. That way, e.g. the
task struct and so on can be read and even manipulated when the physical DMA
access is granted.

A HOWTO is included in this patch, in Documentation/debugging-via-ohci1394.txt
and I've put a copy online at
ftp://ftp.suse.de/private/bk/firewire/docs/debugging-via-ohci1394.txt

It also has links to all the tools which are available to make use of it
another copy of it is online at:
ftp://ftp.suse.de/private/bk/firewire/kernel/ohci1394_dma_early-v2.diff

Signed-Off-By: Bernhard Kaindl <bk@suse.de>
Tested-By: Thomas Renninger <trenn@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:34:11 +01:00
..
config_roms.c ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts 2007-04-30 00:00:30 +02:00
config_roms.h ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts 2007-04-30 00:00:30 +02:00
csr1212.c ieee1394: csr1212: proper refcounting 2007-10-16 23:59:59 +02:00
csr1212.h ieee1394: csr1212: proper refcounting 2007-10-16 23:59:59 +02:00
csr.c ieee1394: usecs_to_jiffies takes unsigned int argument 2006-12-07 21:29:08 +01:00
csr.h [PATCH] ieee1394: clean up declarations of hpsb_*_config_rom 2006-07-03 12:02:31 -04:00
dma.c ieee1394: iso and async streams: s/g list fix 2007-11-04 14:31:16 +01:00
dma.h ieee1394: move some comments from declaration to definition 2007-04-30 00:00:28 +02:00
dv1394-private.h [PATCH] ieee1394: dv1394: sem2mutex conversion 2006-07-03 12:02:32 -04:00
dv1394.c ieee1394: convert ieee1394 from "struct class_device" to "struct device" 2007-07-10 00:07:39 +02:00
dv1394.h
eth1394.c ieee1394: eth1394: fix lock imbalance 2007-10-16 23:59:54 +02:00
eth1394.h ieee1394: eth1394: handle tlabel exhaustion 2007-05-27 23:20:59 +02:00
highlevel.c ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
highlevel.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
hosts.c ieee1394: first minimal NUMA awareness 2007-07-10 00:07:40 +02:00
hosts.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
ieee1394_core.c ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition 2007-10-16 23:59:59 +02:00
ieee1394_core.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
ieee1394_hotplug.h [PATCH] ieee1394: remove redundant code from ieee1394_hotplug.h 2006-07-03 12:02:30 -04:00
ieee1394_transactions.c ieee1394: ieee1394_transactions.c: remove dead code 2007-10-31 19:02:19 +01:00
ieee1394_transactions.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
ieee1394_types.h ieee1394: safer definition of empty macros 2006-09-17 19:31:20 +02:00
ieee1394-ioctl.h ieee1394: cycle timer read extension for raw1394 2007-02-17 14:39:33 +01:00
ieee1394.h [PATCH] ieee1394: coding style and comment fixes in midlayer header files 2006-07-03 12:02:28 -04:00
init_ohci1394_dma.c x86: early boot debugging via FireWire (ohci1394_dma=early) 2008-01-30 13:34:11 +01:00
iso.c ieee1394: iso.c needs sched.h 2007-04-30 00:00:29 +02:00
iso.h ieee1394: move some comments from declaration to definition 2007-04-30 00:00:28 +02:00
Kconfig ieee1394: sbp2: more correct Kconfig dependencies 2007-08-02 20:34:16 +02:00
Makefile x86: early boot debugging via FireWire (ohci1394_dma=early) 2008-01-30 13:34:11 +01:00
nodemgr.c ieee1394: use class iteration api 2008-01-24 20:40:44 -08:00
nodemgr.h ieee1394: convert ieee1394 from "struct class_device" to "struct device" 2007-07-10 00:07:39 +02:00
ohci1394.c ieee1394: ohci1394: fix initialization if built non-modular 2007-09-20 21:19:45 +02:00
ohci1394.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
pcilynx.c ieee1394: pcilynx: I2C cleanups 2007-10-16 23:59:57 +02:00
pcilynx.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
raw1394-private.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
raw1394.c raw1394 __user annotation 2007-07-26 11:11:57 -07:00
raw1394.h ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
sbp2.c [SCSI] relax scsi dma alignment 2008-01-11 18:29:22 -06:00
sbp2.h ieee1394: sbp2: change some module parameters from int to bool 2007-07-10 00:07:41 +02:00
video1394.c ieee1394: convert ieee1394 from "struct class_device" to "struct device" 2007-07-10 00:07:39 +02:00
video1394.h