android_kernel_xiaomi_sdm845/drivers
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
..
acorn/char
acpi x86: don't disable TSC in any C states on AMD Fam10h 2008-01-30 13:32:41 +01:00
amba
ata libata: Change "write_data" to "rw" for some function documentations 2008-01-29 08:48:17 +11:00
atm [ATM]: [he] fixing compilation when you define USE_RBPS_POOL/USE_RBPL_POOL 2008-01-28 15:00:15 -08:00
auxdisplay
base convert drivers/base/power/Makefile to ccflags 2008-01-28 23:14:35 +01:00
block cciss: fix bug in overriding ->data_len before completion 2008-01-29 21:55:18 +01:00
bluetooth [BLUETOOTH]: Always send explicit hci_ll wake-up acks. 2008-01-10 22:24:43 -08:00
cdrom Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2008-01-29 08:52:50 +11:00
char x86: remove flush_agp_mappings() 2008-01-30 13:34:07 +01:00
clocksource
connector [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
cpufreq cpufreq: fix obvious condition statement error 2008-01-30 13:33:34 +01:00
cpuidle Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
crypto [S390] crypto: move s390 Kconfig options. 2008-01-26 14:11:17 +01:00
dca
dio
dma DMA: Convert from class_device to device for DMA engine 2008-01-24 20:40:05 -08:00
edac Driver core: change sysdev classes to use dynamic kobject names 2008-01-24 20:40:40 -08:00
eisa
firewire [SCSI] relax scsi dma alignment 2008-01-11 18:29:22 -06:00
firmware x86: left over fix for leak of early_ioremp in dmi_scan 2008-01-30 13:33:32 +01:00
hid HID: ADS/Tech Radio si470x needs blacklist entry 2008-01-28 14:51:23 +01:00
hwmon hwmon: (it87) request only Environment Controller ports 2008-01-22 07:21:38 -05:00
i2c Merge branch 'orion' into devel 2008-01-28 13:21:30 +00:00
ide blk_end_request: changing ide-cd (take 4) 2008-01-28 10:37:06 +01:00
ieee1394 x86: early boot debugging via FireWire (ohci1394_dma=early) 2008-01-30 13:34:11 +01:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25 2008-01-29 22:54:01 +11:00
input x86: replace outb_p() with udelay(2) in drivers/input/mouse/pc110pad.c 2008-01-30 13:31:24 +01:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2008-01-25 08:35:13 -08:00
kvm x86: get rid of _MASK flags 2008-01-30 13:31:27 +01:00
leds leds: Fix locomo LED driver oops 2007-12-31 23:11:11 +00:00
lguest x86: use generic register name in the thread and tss structures 2008-01-30 13:31:02 +01:00
macintosh i2c: Kill rogue driver IDs 2008-01-27 18:14:47 +01:00
mca
md Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
media i2c: Drivers stop using the redundant client list 2008-01-27 18:14:51 +01:00
message blk_end_request: changing i2o_block (take 4) 2008-01-28 10:36:50 +01:00
mfd [ARM] Fix class_device damage caused by 0c55445f20 2008-01-28 10:59:09 +00:00
misc kobject: convert ibmasm to use kref, not kobject 2008-01-24 20:40:08 -08:00
mmc Merge branch 'blk-end-request' of git://git.kernel.dk/linux-2.6-block 2008-01-29 08:51:32 +11:00
mtd mtd: Convert from class_device to device for MTD/mtdchar 2008-01-24 20:40:06 -08:00
net Mostly revert "e1000/e1000e: Move PCI-Express device IDs over to e1000e" 2008-01-30 09:54:54 +11:00
nubus
of
oprofile oProfile: oops when profile_pc() returns ~0LU 2007-11-14 18:45:37 -08:00
parisc [PARISC]: Fix build after ipv4_is_*() changes. 2008-01-28 14:58:20 -08:00
parport parport: "dev->timeslice" is an unsigned long, not an int 2007-12-17 19:28:15 -08:00
pci Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
pcmcia [ARM] pxa: move memory controller registers into pxa2xx-regs.h 2008-01-26 15:07:54 +00:00
pnp git-x86: drivers/pnp/pnpbios/bioscalls.c build fix 2008-01-30 13:32:31 +01:00
power power supply : use class iteration api 2008-01-24 20:40:44 -08:00
ps3 ps3: vuart: fix error path locking 2007-12-23 12:54:37 -08:00
rapidio remove __attribute_used__ 2008-01-28 23:21:18 +01:00
rtc Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2008-01-29 08:52:50 +11:00
s390 [VLAN]: Turn VLAN_DEV_INFO into inline function 2008-01-28 15:08:32 -08:00
sbus [WATCHDOG] Sbus: cpwatchdog, remove SPIN_LOCK_UNLOCKED 2007-11-19 21:09:52 +00:00
scsi [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
serial Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2008-01-29 08:52:50 +11:00
sh superhyway: Handle device_register() retval properly. 2007-11-07 11:13:55 +09:00
sn
spi [ARM] pxa: make pxa2xx_spi driver use ssp_request()/ssp_free() 2008-01-26 15:07:52 +00:00
ssb ssb: Add boardflags_hi field to the sprom data structure 2008-01-28 15:09:52 -08:00
tc
telephony telephony: phonedev panics if unregistering device not registered [Bug 9266] 2007-11-05 15:12:33 -08:00
uio UIO: constify function pointer tables 2008-01-24 20:40:43 -08:00
usb Merge branch 'pxa-plat' into devel 2008-01-28 13:21:38 +00:00
video x86: cpa: move flush to cpa 2008-01-30 13:34:07 +01:00
virtio virtio: fix module/device unloading 2007-11-19 11:20:42 +11:00
w1 i2c: normal_i2c can be made const (remaining drivers) 2008-01-27 18:14:47 +01:00
watchdog [WATCHDOG] constify function pointer tables 2008-01-25 20:41:30 +00:00
xen
zorro Amiga zorro bus: Add missing zorro_device_remove() 2007-11-26 19:15:31 -08:00
Kconfig
Makefile x86: early boot debugging via FireWire (ohci1394_dma=early) 2008-01-30 13:34:11 +01:00