linux/Documentation/debugging-via-ohci1394.txt
<<
n> 2" /spa3.1 2" /form.1 2" a n> 2" href="../linux+v3.9.2/Documenta="v3/debugging-via-ohci1394.txt">n> 2" img src="../.sta="c/gfx/right.png" alt=">>">n> /spa3.1n> spa3 class="lxr_search">n> n> 2" input typ8.1hidden" nam8.1navtarget" v3.18.1">n> 2" input typ8.1text" nam8.1search" id.1search">n> 2" butt typ8.1submit">Search spa3 class="lxr_prefs".1 2" a href="+prefs?return=Documenta="v3/debugging-via-ohci1394.txt"n> 2" onclick="return ajax_prefs();">n> 2"Prefs1 2" /a>n> /spa3.1 2" " /div.1 2" " form ac="v3="ajax+*" method="post" onsubmit="return false;">n> input typ8.1hidden" nam8.1ajax_lookup" id.1ajax_lookup" v3.18.1">n 2" " /form.1n 2" " div class="headingbott m">" "1 /a>n" "2 /a> Using physical DMA provided by OHCI-1394 FireWire controllers for debuggingn" "3 /a> ---------------------------------------------------------------------------n" "4 /a>n" "5 /a>Introduc="v3n" "6 /a>------------n" "7 /a>n" "8 /a>Basically all FireWire controllers which are in use today are compliantn" "9 /a>to the OHCI-1394 specifica > which defines the controller to be a PCIn" vala>bus master which uses DMA to offload data transfers from the CPU and hasn" 11 /a>a "Physical Response Unit" which executes specific requests by employingn" 12 /a>PCI-Bus master DMA after applying filters defined by the OHCI-1394 driver.n" 13 /a>n" 14 /a>Once properly configured, remote machines ca3 send these requests ton" 15 /a>ask the OHCI-1394 controller to perform read and write requests v3n" 16 /a>physical system memory and, for read requests, send the result ofn" 17 /a>the physical memory read back to the requester.n" 18 /a>n" 19 /a>With that, it is possible to debug issues by reading interesting memoryn" 2vala>loca > s such as buffers like the printk buffer or the process table.n" 21 /a>n" 22 /a>Retrieving a full system memory dump is also possible over the FireWire,n" 23 /a>using data transfer rates in the order of vMB/s or more.n" 24 /a>n" 25 /a>Memory access is currently limited to the low 4G of physical addressn" 26 /a>space which ca3 be a problem v3 IA64 machines where memory is loca edn" 27 /a>mostly above that limit, but it is rarely a problem v3 more commv3n" 28 /a>hardware such as hardware based v3 x86, x86-64 and PowerPC.n" 29 /a>n" 3vala>Together with a early initializa > of the OHCI-1394 controller for debugging,n" 31 /a>this facility proved most useful for examining long debugs logs in the printkn" 32ala>buffer on to debug early boot problems in areas like ACPI where the systemn" 33 /a>fails to boot and other means for debugging (serial port) are either notn" 34 /a>available (notebooks) or too slow for extensive debug informa > (like ACPI).n" 35 /a>n" 36 /a>Driversn" 37 /a>-------n" 38 /a>n" 39 /a>The ohci1394 driver in drivers/ieee1394 initializes the OHCI-1394 controllersn" 40 /a>to a working sta=e and enables physical DMA by default for all remote nodes.n" 41 /a>This ca3 be turned vff by ohci1394's module param8ter phys_dma=0.n" 42 /a>n" 43 /a>The alterna="ve firewire-ohci driver in drivers/firewire uses filtered physicaln" 44 /a>DMA by default, which is more secure but not suitable for remote debugging.n" 45 /a>Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA (Kernel hacking menu:n" 46 /a>Remote debugging over FireWire with firewire-ohci) to get unfiltered physicaln" 47 /a>DMA.n" 48 /a>n" 49 /a>Because ohci1394 and firewire-ohci depend on the PCI enumera > to ben" 50 /a>compl8ted, an initializa > routine which runs pretty early has bee3n" 51 /a>impl8mented for x86. This routine runs long before console_init() ca3 ben v3.14t#L40" id.1L40" class="line" nam8.1L4053.18.12" > v3.18.122pio27nn3on> valuee.ne" nam8 class="line" nam8app" 5sne" nam8.1L5 ref="Documenta="v3/debugging-via-ohci1394.txt#L49" id5es filte5ed physicaln" 46 /a>Remote debugging over FireWire with firewire-ohci) to get 5t#L6" id..1L6" class="line" nam8.enta=553/debugging-via-ohci1394.txt#L47" i" 51 /e" ci13)t#L50pas" nam8.1L42">" debugging over FireWire with firewire-ohci) to get 5nfiltere5 physicalnn" 18 /cuggingd kL46">"e" ci13ref="Documenta="v3/debugging-via-ohci1394.txt#L49" id5 id.1L485 class="line" nam8.1L485>" 485cally all FireWire controllers which are in use today are51L49" cl5ss="line" nam8.1L49">" 59 /a>58"v3/deolworking sta=e and enables physical DMA by default for5a > to5benn v3.18.162pio26nn3onit.1L11"a>n.txt#L50.tx_>" 29 /ad3" ifun-----aia-o, " idscope alunow above that limit, but it is rarely a problem v3 mor6es filte6ed physicaln" 48638 /a>n> 2"Prefhttp://halobass=.de"line" na/" idscope-0.2.2.tar.bz2pihttp://halobass=.de"line" na/" idscope-0.2.2.tar.bz2mory access is currently limited to the low 4G of physic61L49" cl6ss="line" nam8.1L49">" 69 /a>6ecause ohci1394 and firewire-ohci depend on the PCI enume6a > to6bena &q94.ng-via-ohci1astxt#L23" " cla(alpha ass=1L51-e" namREADME enu)e debugging over FireWire with firewire-ohci) to get 7y has be73nn> 2"Prefhttp://halobass=.de"line" na/" id" cl-0.1.tar.bz2pihttp://halobass=.de"line" na/" id" cl-0.1.tar.bz2cause ohci1394 and firewire-ohci depend on the PCI enume7_init() 7a3 ben v3.18.172pio272"v3/deb" nas="linea gdb.1L3xyi1394line" nams="linellowia-oh-ohcgdb.uggi394.tving a full system memory dump is also possible over7es filte7ed physicalnn> 2"Prefhttp://halobass=.de"line" na/" id1L3xy-0.33.tar.bz2pihttp://halobass=.de"line" na/" id1L3xy-0.33.tar.bz2trieving a full system memory dump is also possible over7t#L6" id7.1L6" class="line" nam87enta=7riversn" "8 /a>" 48738 /ayethci11" ).d.1L4kgdb.394.talu7">" 2-="linehardun id.i" 28 nam8(kgdbomhref="Documenta="v3/debugging-via-ohci1394.txt#L36" id71L49" cl7ss="line" nam8.1L49">" 79 /a>7ecause ohci1394 and firewire-ohci depend on the PCI enume7a > to7benStar4ly above that limit, but it is rarely a problem v3 mor8y has be83nn v3.18.182pio282"v3/debohci1394.txt#L10" id.1L10regulass=t#L28" class="line" nam8.1L31">musosn".1L41" class=L10elin ng-vidse3ref="Documenta="v3/debugging-via-ohci1394.txt#L49" id8emote de8ugging.n" 3 access is currently limited to the low 4G of physic8t#L7" id8.1L7" class="line" nam88enta=86"v3/20">"rupts>" 342is41" m8.1L16eb" nnne" llhci131" class="line" nam8.1L31" access is currently limited to the low 4G of physic8" class=8"line" nam8.1L8">" "8 /8>" 48838 /a1394ng-vidse3a>n88ing-vinnec-ohci1#L50"ul394.txt#L31"ei1394.txt#L9" 29" class__e" nam__" cl access is currently limited to the low 4G of physic8a > to8ben v3.18.192pio292trieving a full system memory dump is also possible over9es filte9ed physicalnfw0" cla8 nam8#L50check"your kL46">"32">ref="Documenta="v3/debugging-via-ohci1394.txt#L49" id9t#L7" id9.1L7" class="line" nam89enta=963/debu You should seL27"s="l similar the OHCI-1394 controller to perform read and write req9" class=9"line" nam8.1L8">" "8 /9>" 489cally all FireWire controllers which are in use today are9 complia9ntn983/debu use tod:>fw0host0:ass="line" 1.1 (PCI): IRQ=[18] MMIO=[fe9ff800-fe9fffff] all FireWire controllers which are in use today are9o be a PCCIn" 103deb="v3/debuxt#L10" id.1L10e" nebugging-. If2it8 /a> ids nolohci1391394Windowia1394at-Bus master DMA after applying filters defined by the OH0quests to0n="line" nTI4PCILynx0chipia.txt /a> id" class=91394Win ---n" 108deb="83/de2) Eci11"isineng-via-oh.txt#L9" i41" vinnec-ohce debugging over FireWire with firewire-ohci) to get 10sting mem0oryn of the OHCI-1394 cont1hc requestss by employingna &quo metine"g vinnec-os=9(teb" nt#L29m13944-pica>a er with a early initializa > of the OHCI-1394 cont1hCI-1394 ddriver.n" 114 /a1Once properly configured, remote machines ca3 send these reequests toon" 119 /a1183/debu " ci1L4"line" na 32ala>kL46">"32" 6ebn nam8.11" .txtlhicineical system memory and, for read requests, send the resesting memmoryn" 122 /a1Retrie3) Ts=t .1L41" class=.txt#L" idscopee debugging over FireWire with firewire-ohci) to get 12CI-1394 drriver.n" 125 /a1243/debuxxxxxx- " cl>" 18 awine" 8 namfacility proved most useful for examining long debugs1.ests v3n" 13vala1293/debuxxxxxxPL34i0 ( use tod)a139n val2>This 813tec-ly above that limit, but it is rarely a problem v3 mor1roller fo1r debugging,n" 14ia-o1333/debuxxxxxxTbutt : <unt#L10" edn do---n" 136 /a1353/debuxxxxxx[Ctrl-T]0choo1L9"butt ---n1363/debuxxxxxx[Ctrl-H]" cas=emot---n1 38 /abuxxxxxx[Ctrl-Q] qui ---n" 139 /a1The ohci1394 driver in drivers/ieee1394 initializes the OH1CI-1394 c1ontrollersnThis 8ebugging-,a>mosl>This as: 0hat, it is possible to debug issues by reading interephere the1ass="line" nam8.1L43">" 143 /a1423/debuxxxxxx 0: ffc0, uui : 00000000 00000000 [LOCAL] all FireWire controllers which are in use today are1ses filte1red physicalnThisi1394tusotshow #Loa>availde d.1Liut erra>n< ssag9ref="Documenta="v3/debugging-via-ohci1394.txt#L49" id1unfiltere1d physicaln" 41 /a>n pe" n"4" class="lind.1L4" 51 /ss="line" xt#L51" id.1L5e debugging over FireWire with firewire-ohci) to get 1.1L49" cl1ass="line" nam8.1L49">" 149 /a1Because ohci1394 and firewire-ohci depend on the PCI enume1ra > to1 ben"cuggina-ohca>a &.tstalna-ohcahca1394.t"butt ---n"vala>bebug ied94.txt#L46" iPROVID classnd t nam_INIThat, it is possible to debug issues by reading intereehere the153.18.12" > v3.18.1122pio1523/debux.1L46">" 46 /a>:an>t#L3""cud n"4" #L41""linass=L94.txt#L47" i" 51 /e" ci13)hat, it is possible to debug issues by reading intereees filte15ed physicalna &.tstaln1394e" nam8"line" "vala>bebug ied9(1394.t"butt href="Documenta="v3/debugging-via-ohci1394.txt#L36" id15emote de15ugging.n"valnam81394.thost access is currently limited to the low 4G of physic15nfiltere15 physicaln" 41573/debuxbupycnam8S#L23".map131" clakL46">"a>bebug ied9valnam81394.thost9(tebthost access is currently limited to the low 4G of physic151L49" cl15ss="line" nam8.1L49">" 159 /a1583/debux94.txt#L4cinnec-ed9valnam81394.ied9"line" "23">" 23 /a>using8.11" href="Documenta="v3/debugging-via-ohci1394.txt#L36" id15a > to15ben of the OHCI-1394 cont1ty has be163n v3.18.1162pio1623/debuxg-via-o3 /a>using8.11" 4cinnec-ed,8.1L13">" 13 /a>n"94.txtquot;Physical Response Unit" which executes specifi6emote de16ugging.nn" 416cally all FireWire controllers which are in use today are161L49" cl16ss="line" nam8.1L49">" 169 /a1683/debuxxxxxx" idscope -A8S#L23".map-of-s whi-"butt -kL46"> all FireWire controllers which are in use today are16a > to16ben of the OHCI-1394 cont17y has be173nmosl>This. I94e"hcig-viot;Physical Response Unit" which executes specifi7_init() 17a3 bentonnec-ed9.txt#L/a>usingref="Documenta="v3/debugging-via-ohci1394.txt#L36" id17am8.1L40173.18.12" > v3.18.1172pio172trieving a full system memory dump is also possible over17es filte17ed physicaln ss Ctrl-Ds="lview" clving a full system memory dump is also possible over17emote de17ugging.n"< ssag91L32"ged4e" nam8y dumt"butt ref="Documenta="v3/debugging-via-ohci1394.txt#L36" id17ult ofntt 5" idam8.1L35">" oaL" idscopess="lini../linref="Documenta="v3/debugging-via-ohci1394.txt#L19" id.71L49" cl17ss="line" nam8.1L49">" 179 /a17ecause ohci1394 and firewire-ohci depend on the PCI enume17a > to17benn 2"Prefhttp://halobass=.de"line" na/pihttp://halobass=.de"line" na/cause ohci1394 and firewire-ohci depend on the PCI enume18am8.1L40183.18.12" > v3.18.1182pio182trieving a full system memory dump is also possible over18es filte18ed physicaln" p" asL2a fb" the debugging over FireWire with firewire-ohci) to get 18emote de18ugging.n 2"Prefhttp://en.wikipedia.org/wiki//a>usingpihttp://en.wikipedia.org/wiki//a>usingtrieving a full system memory dump is also possible over18t#L6" id18.1L6" class="line" nam818enta185ing-

content" 5de591ec018996" clasfi13er"> buggirich -o LXR softclass=ycnam8> 2"Prefhttp://sourc" nage.net/p>ojec-"/lxr">LXR hardun tying-," cas=experistem l ass=1L51=yc> 2"Prefmailthelxr@gt;&g.no">lxr@gt;&g.noing-. 5de591e018996" classubfi13er"> lxr.gt;&g.no kindlythoste nam8> 2"Prefhttp://www.redpill-gt;p>o.no">Redpill Lt;p>o ASing-,"txt#L3"m8.fgLt;&g8.1L5ul3ohci4.txtp 50 /a>s services sia-oh1995. 5de591ec0/body1e0/htmlt"