linux/Documentation/debugging-via-ohci1394.txt
<<
ptio.32/spa="v .32/form"v .32a ptio.3 href="../linux+vptio.3/Documentalue=/debugging-via-ohci1394.txt">ptio.32img src="../.staluc/gfx/right.png" alt=">>">pt2/spa="vpt2spa= class="lxr_search">ptioptio.32input typ v2hidden" nam v2navtarget" > v2">ptio.32input typ v2text" nam v2search" idv2search">ptio.32butt typ v2submit">Searchptio.3Prefsv .32/a>pt2/spa="vio.3 32/div"vio.3 32form aclue=="ajax+*" method="post" onsubmit="return false;">pt2input typ v2hidden" nam v2ajax_lookup" idv2ajax_lookup" > v2">pio.3 32/form"vpio.3 32div class="headingbott m">3 312/a>p3 322/a> Using physical DMA provided by OHCI-1394 FireWire controllers for debuggingp3 332/a> ---------------------------------------------------------------------------p3 342/a>p3 352/a>Introduclue=p3 362/a>------------p3 372/a>p3 382/a>Basically all FireWire controllers which are in use today are compliantp3 392/a>to the OHCI-1394 specifica1" which defines the controller to be a PCIp3 ion a>bus master which uses DMA to offload data transfers from the CPU and hasp3 112/a>a "Physical Response Unit" which executes specific requests by employingp3 122/a>PCI-Bus master DMA after applying filters defined by the OHCI-1394 driver.p3 132/a>p3 142/a>Once properly configured, remote machines ca= send these requests top3 152/a>ask the OHCI-1394 controller to perform read and write requests e=p3 162/a>physical system memory and, for read requests, send the result ofp3 172/a>the physical memory read back to the requester.p3 182/a>p3 192/a>With that, it is possible to debug issues by reading interesting memoryp3 2on a>loca1" s such as buffers like the printk buffer or the process table.p3 212/a>p3 222/a>Retrieving a full system memory dump is also possible over the FireWire,p3 232/a>using data transfer rates in the order of ioMB/s or more.p3 242/a>p3 252/a>Memory access is currently limited to the low 4G of physical addressp3 262/a>space which ca= be a problem e= IA64 machines where memory is loca1edp3 272/a>mostly above that limit, but it is rarely a problem e= more comme=p3 282/a>hardware such as hardware based e= x86, x86-64 and PowerPC.p3 292/a>p3 3on a>Together with a early initializa1" of the OHCI-1394 controller for debugging,p3 312/a>this facility proved most useful for examining long debugs logs in the printkp3 32n a>buffer on to debug early boot problems in areas like ACPI where the systemp3 332/a>fails to boot and other means for debugging (serial port) are either notp3 342/a>available (notebooks) or too slow for extensive debug informa1" (like ACPI).p3 352/a>p3 362/a>Driversp3 372/a>-------p3 382/a>p3 392/a>The ohci1394 driver in drivers/ieee1394 initializes the OHCI-1394 controllersp3 402/a>to a working stale and enables physical DMA by default for all remote nodes.p3 412/a>This ca= be turned eff by ohci1394's module param ter phys_dma=0.p3 422/a>p3 432/a>The alternaluve firewire-ohci driver in drivers/firewire uses filtered physicalp3 442/a>DMA by default, which is more secure but not suitable for remote debugging.p3 452/a>Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA (Kernel hacking menu:p3 462/a>Remote debugging over FireWire with firewire-ohci) to get unfiltered physicalp3 472/a>DMA.p3 482/a>p3 492/a>Because ohci1394 and firewire-ohci depend on the PCI enumera1" to bep3 502/a>compl ted, an initializa1" routine which runs pretty early has bee=p3 512/a>impl mented for x86. This routine runs long before console_init() ca= bep3 522/a>called, i.e. before the printk buffer appears on the console.p3 532/a>p3 54n a>To acluvale it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:p3 552/a>Remote debugging over FireWire early on boot) and pass the param terp3 562/a>"ohci1394_dma=early" to the recompiled kernel on boot.p3 572/a>p3 58n a>Toolsp3 592/a>-----p3 602/a>p3 612/a>firescope - Originally d6velope> v2.6.352113 522/a>6alled6 i.e.itU and href="Dmpiloute parout_PC.p3 532/a>63 54n a>6o acl6f="Documentalue=/debugging-via-ohci1394.txt#L25" idv2L25"6class="l6ne" nam v2L55">3 552/a>6emote65ohci13rned e KaindlIG_hanced OriginallyG osuptherurrentleWir64-bitUre memorcumentalue=/debugging-via-ohci1394.txt#L25" idv2L25"6lass="linne" nam v2L6">3 362/a>--quot;6hci13 and 32-bitUOriginallyp3 572/a>63 58n a>6oolsp6f="Documentalue=/debugging-via-ohci1394.txt#L49" idv2L49"6class="l6ne" nam v2L59">3 592/a>6----p6a hreref=" COor x86. Thiastry dump poss(alpha e uswhic-o the READMEv2L4)ocumentalue=/debugging-via-ohci1394.txt#L55" idv2L55"7class="l7ne" nam v2L60">3 602/a>73 612/a>7iresc7f="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"7class="l7ne" nam v2L52">3 522/a>7alled72rnaluveday ble ovea gdb arexyhis rs filtere use tollowd oth andgdb starentlcumentalue=/debugging-via-ohci1394.txt#L22" idv2L22"7class="l7ne" nam v2L53">3 532/a>73 54n a>7o acl743 552/a>7emote7f="Documentalue=/debugging-via-ohci1394.txt#L36" idv2L36"7lass="li7ne" nam v2L6">3 362/a>-7quot;76rnaluve lordet e uswhic1394 blgdb arexyh(Origarexy-0.34href="ef="unh de) or tcumentalue=/debugging-via-ohci1394.txt#L36" idv2L36"7lass="linne" nam v2L7">3 372/a>p<3 58n a>7oolsp7f="Documentalue=/debugging-via-ohci1394.txt#L49" idv2L49"7class="l7ne" nam v2L59">3 592/a>7----p7a hreGet3 602/a>83 612/a>8iresc8f="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"8class="l8ne" nam v2L52">3 522/a>8alled82rnaluvepecifica1" which defineregulorde but i4 controller for debugginmustcumentalue=/debugging-via-ohci1394.txt#L36" idv2L36"8class="l8ne" nam v2L53">3 532/a>83 54n a>8o acl8f="Documentalue=/debugging-via-ohci1394.txt#L25" idv2L25"8class="l8ne" nam v2L55">3 552/a>8emote85 be turnebugginbut iif you wantrly boot pa1" dingke ACry dump ables stempcumentalue=/debugging-via-ohci1394.txt#L25" idv2L25"8lass="li8ne" nam v2L6">3 362/a>-8quot;86rnalmemorruptsnotp3 372/a>p83 382/a>Baoolsp88d, an nnecs buff-ohciula1" of theee controllers ed e= x86__rintk __94 ccumentalue=/debugging-via-ohci1394.txt#L25" idv2L25"8class="l8ne" nam v2L59">3 592/a>8----p8a hrey dump 6. rffers lablesocumentalue=/debugging-via-ohci1394.txt#L57" idv2L57"9class="l9ne" nam v2L60">3 602/a>93 612/a>9iresc9f="DoStep-by-dump" strucs buffis rransfeOriginallye-ohct) andntro" routine whiocumentalue=/debugging-via-ohci1394.txt#L55" idv2L55"9class="l9ne" nam v2L52">3 522/a>9alled9a="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"9class="l9ne" nam v2L53">3 532/a>93 54n a>9o acl9f="Documentalue=/debugging-via-ohci1394.txt#L25" idv2L25"9class="l9ne" nam v2L55">3 552/a>9emote95------ Lnsfetdriver in drss tablfw on th3 362/a>-9quot;96------ You should see= IL6"> similar"Documentalue=/debugging-via-ohci1394.txt#L15" idv2L15"9lass="li9ne" nam v2L7">3 372/a>p93 382/a>B9oolsp98------ #L58" id:lfw host0:ontroller f1.1 (PCI): IRQ=[18] MMIO=[fe9ff800-fe9fffff]cumentalue=/debugging-via-ohci1394.txt#L58" idv2L58"9lass="linne" nam v2L9">3 392/a>to----p99------ ... Max Packet=[2048] IR/ITfor dexts=[4/8]cumentalue=/debugging-via-ohci1394.txt#L58" idv2L58"10class="linne" nam v2L10">3 ion a>bu3 112/a>a01a hbu1------ tven ansfnsfeith CONFIG. IfIyou havlynoosuptheredfor debuggi, monynPCIocumentalue=/debugging-via-ohci1394.txt#L31" idv2L31"10class="li0ne" nam v2L12">3 122/a>P02a hbu physic Cd eMA aphysivDoisome Exp="Do wPrdin use todayiula1" href="DoyG ontroller cumentalue=/debugging-via-ohci1394.txt#L31" idv2L31"10class="li0ne" nam v2L13">3 132/a>p03a hbu------- which defineodayotebooks). IfIit3 142/a>O04a hbu4------ dumpsible for e3 152/a>a05a hbu5------ href="Do,eithantp3 162/a>p06a hbu6------ dowd gureat"Do dumpsocumentalue=/debugging-via-ohci1394.txt#L18" idv2L18" 0class="li0ne" nam v2L17">3 172/a>t07a hbuf="Documentalue=/debugging-via-ohci1394.txt#L58" idv2L58"10class="li0ne" nam v2L18">3 182/a>p08a hbu8----2) EablROis tole and entrollers wPROV n nnecs buocumentalue=/debugging-via-ohci1394.txt#L55" idv2L55"10class="li0ne" nam v2L19">3 192/a>W09a hbuf="Documentalue=/debugging-via-ohci1394.txt#L30" idv2L30"1 class="liine" nam v2L10">3 ion a>bbus m1ster w-- Anyntrollers wPROV, basconsoaly a OHCI-13s 32/sprireWire hysmechanireWircumentalue=/debugging-via-ohci1394.txt#L30" idv2L30"1 class="linne" nam v2L11">3 112/a>a 1a hb11------ ablROV n nnecs buhref="Do mot memg n nnecsous_(tvedayhardwm con4-piuhrefcumentalue=/debugging-via-ohci1394.txt#L30" idv2L30"1 class="liine" nam v2L12">3 122/a>PPCI-B11 physic lv2"> 6-piuhtrollers thers)ie-condoocumentalue=/debugging-via-ohci1394.txt#L18" idv2L18" class="liine" nam v2L13">3 132/a>pp3 142/a>OOnce 114------ IfIanrivers/fiseforbugs href=ohcre memoryyou should see= IL6"> 3 152/a>aask t11f="Documentalue=/debugging-via-ohci1394.txt#L36" idv2L36"1 class="liine" nam v2L16">3 162/a>pphysi116------ tializes: Node ad139: ID:BUS[0-01:bu 3] GUID[0090270001b84bba]cumentalue=/debugging-via-ohci1394.txt#L58" idv2L58"1 class="liine" nam v2L17">3 172/a>tthe p11f="Documentalue=/debugging-via-ohci1394.txt#L58" idv2L58"1 class="liine" nam v2L18">3 182/a>pp3 192/a>WWith 119------ -ohcc nnecsterp3 2on a>1loca112<="Documentalue=/debugging-via-ohci1394.txt#L19" idv2L19" class="l1ine" nam v2L21">3 212/a>1p3 122/a>PCCI-B12a="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"1 class="l1ine" nam v2L23">3 232/a>1using12------- On p3 242/a>1p3 252/a>1Memor125------ - makrdwar, but iia-v/eawler f blerentleb pocumentalue=/debugging-via-ohci1394.txt#L31" idv2L31"1 class="liine" nam v2L26">3 262/a>1space126------ tven starreOriginallocumentalue=/debugging-via-ohci1394.txt#L55" idv2L55"12class="liine" nam v2L27">3 272/a>1mostl12f="Documentalue=/debugging-via-ohci1394.txt#L58" idv2L58"1 class="l1ine" nam v2L28">3 282/a>1hardw128------ $eOriginallcumentalue=/debugging-via-ohci1394.txt#L58" idv2L58"1 class="liine" nam v2L29">3 292/a>1p3 3on a>1Toget13<="Documentalue=/debugging-via-ohci1394.txt#L19" idv2L19" class="l1ine" nam v2L31">3 312/a>1this 131------ trolSnallcumentalue=/debugging-via-ohci1394.txt#L58" idv2L58"1 class="l1ine" nam v2L32">3 32n a>1buffe132------ -f="Do"Documentalue=/debugging-via-ohci1394.txt#L60" idv2L60"13class="linne" nam v2L13">3 132/a>pp : <un whiched2/spcumentalue=/debugging-via-ohci1394.txt#L60" idv2L60"13class="l1ine" nam v2L34">3 342/a>1avail134------ Gen : 1cumentalue=/debugging-via-ohci1394.txt#L60" idv2L60"13class="liine" nam v2L35">3 352/a>1ppcumentalue=/debugging-via-ohci1394.txt#L60" idv2L60"13class="liine" nam v2L36">3 362/a>1Drive136------ [Ctrl-H]94 blf="Dcumentalue=/debugging-via-ohci1394.txt#L60" idv2L60"13class="liine" nam v2L37">3 372/a>1-----1-p3 382/a>1p3 392/a>1The o139------ "Do"Do2/spa>ptss Ctrl-T"now,etdrivutddenshould b> similar"Doocumentalue=/debugging-via-ohci1394.txt#L55" idv2L55"1 class="l1ine" nam v2L40">3 402/a>1to a 14<="Documentalue=/debugging-via-ohci1394.txt#L19" idv2L19" class="l1ine" nam v2L41">3 412/a>1This 141------ 2ref="D otebooks),href=lref="f b: 0cumentalue=/debugging-via-ohci1394.txt#L19" idv2L19" class="l1ine" nam v2L42">3 422/a>1p3 432/a>1The a143------ 1: ffc1, uui9: 00279000 ba4bb801cumentalue=/debugging-via-ohci1394.txt#L60" idv2L60"14class="linne" nam v2L14">3 142/a>Onvail14f="Documentalue=/debugging-via-ohci1394.txt#L25" idv2L25"1 class="l1ine" nam v2L45">3 452/a>1Compi145------ Bes-13s tdri[LOCAL]ref="ible fusenshow -oohref="Ddlye-ohvut errhreftssagsocumentalue=/debugging-via-ohci1394.txt#L57" idv2L57"1 class="l1ine" nam v2L46">3 462/a>1Remot1 debugcumentalue=/debugging-via-ohci1394.txt#L57" idv2L57"1 class="liine" nam v2L47">3 472/a>1DMA.p1a hrefd) >ptpodayi (serial porte-ohct) andntroller f routine whiocumentalue=/debugging-via-ohci1394.txt#L55" idv2L55"1 class="l1ine" nam v2L48">3 482/a>1p3 492/a>1Becau149------ 4.1) ng menunel onas buhref= stalnas buhbuhboot pmv2">pcumentalue=/debugging-via-ohci1394.txt#L60" idv2L60"1 class="l1ine" nam v2L50">3 502/a>1compl15<="Documentalue=/debugging-via-ohci1394.txt#L19" idv2L19" class="l1ine" nam v2L51">3 512/a>1impl 151------ driver with ot.p3 522/a>1calle152------ ing menu:ppCI-13unedayi (sG_PROportlt fi early on boot) and pass thcumentalue=/debugging-via-ohci1394.txt#L19" idv2L19" class="l1ine" nam v2L53">3 532/a>1ppDocumentalue=/debugging-via-ohci1394.txt#L35" idv2L35"1 class="l1ine" nam v2L54">3 54n a>1To ac15f="Documentalue=/debugging-via-ohci1394.txt#L25" idv2L25"1 class="l1ine" nam v2L55">3 552/a>1Remot155------ 4.2) Ts in thep3 562/a>1"15debugcumentalue=/debugging-via-ohci1394.txt#L57" idv2L57"1 class="l1ine" nam v2L57">3 572/a>1p3 58n a>1Tools158------ e secure c nnecsed_3 592/a>1-----15f="Documentalue=/debugging-via-ohci1394.txt#L30" idv2L30"1 class="l1ine" nam v2L60">3 602/a>1p3 612/a>1fires16f="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"16class="l16ne" nam v2L52">3 522/a>16alle162------ t is po3 532/a>163 54n a>16o ac164------ DE_OHCI1394_DMA_INIT (Kernel hackG_PROVd,_FIREWtdriv2.6.32=early" to thocumentalue=/debugging-via-ohci1394.txt#L35" idv2L35"16class="l16ne" nam v2L55">3 552/a>16emot16f="Documentalue=/debugging-via-ohci1394.txt#L36" idv2L36"16class="linne" nam v2L16">3 162/a>phquot166------ Then, le.p3 572/a>163 58n a>16ools168------ Originally A S dump.map-of-a-ohc-mv2">p-ot.p3 592/a>16----16f="Documentalue=/debugging-via-ohci1394.txt#L30" idv2L30"17class="l17ne" nam v2L60">3 602/a>173 612/a>17ires171------ reliPROyiif leirec nnecsed_3 522/a>17alle17a="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"17class="l17ne" nam v2L53">3 532/a>17p, pptss Ctrl-D4G oviewbuffcumentalue=/debugging-via-ohci1394.txt#L22" idv2L22"17class="l17ne" nam v2L54">3 54n a>17o ac174------ n initiaer or the process Ctrl-UyG oen filtuoth pdle fp aocumentalue=/debugging-via-ohci1394.txt#L16" idv2L16" 7class="l17ne" nam v2L55">3 552/a>17emot175------ pdle dcl-ohcviewbe39recuggeot.ppocumentalue=/debugging-via-ohci1394.txt#L35" idv2L35"17class="li7ne" nam v2L6">3 362/a>-17quot17debugcumentalue=/debugging-via-ohci1394.txt#L57" idv2L57"17class="linne" nam v2L17">3 172/a>thp but n(like ACPI).oreOriginalle paramv2.6.3rocumentalue=/debugging-via-ohci1394.txt#L18" idv2L18" 7class="l17ne" nam v2L58">3 58n a>17ools17f="Documentalue=/debugging-via-ohci1394.txt#L49" idv2L49"17class="l17ne" nam v2L59">3 592/a>17----17a hreNoteocumentalue=/debugging-via-ohci1394.txt#L11" idv2L11" 8class="l18ne" nam v2L60">3 602/a>183 612/a>18ires18f="Do=/debugging-vh-ohc which defins:refs?returhttp://haloborde.dees filter/llhttp://haloborde.dees filter/="Documentalue=/debugging-via-ohci1394.txt#L49" idv2L49"18class="l18ne" nam v2L52">3 522/a>18alle18a="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"18class="l18ne" nam v2L53">3 532/a>183 54n a>18o ac18f="Doefs?returhttp://en.wikipedia.org/wiki/ href="Dllhttp://en.wikipedia.org/wiki/ href="D="Documentalue=/debugging-via-ohci1394.txt#L22" idv2L22"18class="l18ne" nam v2L55">3 552/a>18emot185 be drivvelope> LXR soft= x86,yepLXR ef="unhty be ,94 blexperibuggil e uswhic,yeefs?returmailDoolxr@3/Doc.no">lxr@3/Doc.no be . idv2cotent" nam v2subfs ter"> lxr.3/Doc.no kindlyphost211Redpill L/Dppo AS be ,9OHCI-13cesftL/Doc hrefultysteans fpep