€• KŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ2/translations/zh_CN/driver-api/usb/usb3-debug-port”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/zh_TW/driver-api/usb/usb3-debug-port”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/it_IT/driver-api/usb/usb3-debug-port”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/ja_JP/driver-api/usb/usb3-debug-port”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/ko_KR/driver-api/usb/usb3-debug-port”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/sp_SP/driver-api/usb/usb3-debug-port”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒUSB3 debug port”h]”hŒUSB3 debug port”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒL/var/lib/git/docbuild/linux/Documentation/driver-api/usb/usb3-debug-port.rst”h KubhŒ field_list”“”)”}”(hhh]”(hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hhÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÁhh¾hŸh¶h KubhŒ field_body”“”)”}”(hŒ#Lu Baolu ”h]”hŒ paragraph”“”)”}”(hhÕh]”(hŒ Lu Baolu <”…””}”(hhÙhžhhŸNh NubhŒ reference”“”)”}”(hŒbaolu.lu@linux.intel.com”h]”hŒbaolu.lu@linux.intel.com”…””}”(hhâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:baolu.lu@linux.intel.com”uh1hàhhÙubhŒ>”…””}”(hhÙhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KhhÓubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhh¾ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h Khh¹hžhubh½)”}”(hhh]”(hÂ)”}”(hŒDate”h]”hŒDate”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÁhjhŸh¶h KubhÒ)”}”(hŒ March 2017 ”h]”hØ)”}”(hŒ March 2017”h]”hŒ March 2017”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h Khh¹hžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒGENERAL”h]”hŒGENERAL”…””}”(hj@hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj=hžhhŸh¶h K ubhØ)”}”(hŒ=This is a HOWTO for using the USB3 debug port on x86 systems.”h]”hŒ=This is a HOWTO for using the USB3 debug port on x86 systems.”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K hj=hžhubhØ)”}”(hŒWBefore using any kernel debugging functionality based on USB3 debug port, you need to::”h]”hŒVBefore using any kernel debugging functionality based on USB3 debug port, you need to:”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K hj=hžhubhŒ literal_block”“”)”}”(hŒ®1) check whether any USB3 debug port is available in your system; 2) check which port is used for debugging purposes; 3) have a USB 3.0 super-speed A-to-A debugging cable.”h]”hŒ®1) check whether any USB3 debug port is available in your system; 2) check which port is used for debugging purposes; 3) have a USB 3.0 super-speed A-to-A debugging cable.”…””}”hjlsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jjhŸh¶h Khj=hžhubeh}”(h]”Œgeneral”ah ]”h"]”Œgeneral”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K ubh¢)”}”(hhh]”(h§)”}”(hŒ INTRODUCTION”h]”hŒ INTRODUCTION”…””}”(hj‡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj„hžhhŸh¶h KubhØ)”}”(hŒªThe xHCI debug capability (DbC) is an optional but standalone functionality provided by the xHCI host controller. The xHCI specification describes DbC in the section 7.6.”h]”hŒªThe xHCI debug capability (DbC) is an optional but standalone functionality provided by the xHCI host controller. The xHCI specification describes DbC in the section 7.6.”…””}”(hj•hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khj„hžhubhØ)”}”(hXXWhen DbC is initialized and enabled, it will present a debug device through the debug port (normally the first USB3 super-speed port). The debug device is fully compliant with the USB framework and provides the equivalent of a very high performance full-duplex serial link between the debug target (the system under debugging) and a debug host.”h]”hXXWhen DbC is initialized and enabled, it will present a debug device through the debug port (normally the first USB3 super-speed port). The debug device is fully compliant with the USB framework and provides the equivalent of a very high performance full-duplex serial link between the debug target (the system under debugging) and a debug host.”…””}”(hj£hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khj„hžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ EARLY PRINTK”h]”hŒ EARLY PRINTK”…””}”(hj¼hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj¹hžhhŸh¶h K$ubhØ)”}”(hX*DbC has been designed to log early printk messages. One use for this feature is kernel debugging. For example, when your machine crashes very early before the regular console code is initialized. Other uses include simpler, lockless logging instead of a full- blown printk console driver and klogd.”h]”hX*DbC has been designed to log early printk messages. One use for this feature is kernel debugging. For example, when your machine crashes very early before the regular console code is initialized. Other uses include simpler, lockless logging instead of a full- blown printk console driver and klogd.”…””}”(hjÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K&hj¹hžhubhØ)”}”(hŒ–On the debug target system, you need to customize a debugging kernel with CONFIG_EARLY_PRINTK_USB_XDBC enabled. And, add below kernel boot parameter::”h]”hŒ•On the debug target system, you need to customize a debugging kernel with CONFIG_EARLY_PRINTK_USB_XDBC enabled. And, add below kernel boot parameter:”…””}”(hjØhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K,hj¹hžhubjk)”}”(hŒ"earlyprintk=xdbc"”h]”hŒ"earlyprintk=xdbc"”…””}”hjæsbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h K0hj¹hžhubhØ)”}”(hŒ‘If there are multiple xHCI controllers in your system, you can append a host controller index to this kernel parameter. This index starts from 0.”h]”hŒ‘If there are multiple xHCI controllers in your system, you can append a host controller index to this kernel parameter. This index starts from 0.”…””}”(hjôhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K2hj¹hžhubhØ)”}”(hŒ±Current design doesn't support DbC runtime suspend/resume. As the result, you'd better disable runtime power management for USB subsystem by adding below kernel boot parameter::”h]”hŒ´Current design doesn’t support DbC runtime suspend/resume. As the result, you’d better disable runtime power management for USB subsystem by adding below kernel boot parameter:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K6hj¹hžhubjk)”}”(hŒ"usbcore.autosuspend=-1"”h]”hŒ"usbcore.autosuspend=-1"”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h K:hj¹hžhubhØ)”}”(hŒîBefore starting the debug target, you should connect the debug port to a USB port (root port or port of any external hub) on the debug host. The cable used to connect these two ports should be a USB 3.0 super-speed A-to-A debugging cable.”h]”hŒîBefore starting the debug target, you should connect the debug port to a USB port (root port or port of any external hub) on the debug host. The cable used to connect these two ports should be a USB 3.0 super-speed A-to-A debugging cable.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K dbc”h]”hŒ@root@target:/sys/bus/pci/devices/0000:00:14.0# echo enable > dbc”…””}”hjÈsbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h KvhjhžhubhØ)”}”(hŒ(You can check the DbC state at anytime::”h]”hŒ'You can check the DbC state at anytime:”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Kxhjhžhubjk)”}”(hŒ>root@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc enabled”h]”hŒ>root@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc enabled”…””}”hjäsbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h KzhjhžhubhØ)”}”(hŒ¾Connect the debug target to the debug host with a USB 3.0 super- speed A-to-A debugging cable. You can see /dev/ttyDBC0 created on the debug target. You will see below kernel message lines::”h]”hŒ½Connect the debug target to the debug host with a USB 3.0 super- speed A-to-A debugging cable. You can see /dev/ttyDBC0 created on the debug target. You will see below kernel message lines:”…””}”(hjòhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K}hjhžhubjk)”}”(hŒÖroot@target: tail -f /var/log/kern.log [ 182.730103] xhci_hcd 0000:00:14.0: DbC connected [ 191.169420] xhci_hcd 0000:00:14.0: DbC configured [ 191.169597] xhci_hcd 0000:00:14.0: DbC now attached to /dev/ttyDBC0”h]”hŒÖroot@target: tail -f /var/log/kern.log [ 182.730103] xhci_hcd 0000:00:14.0: DbC connected [ 191.169420] xhci_hcd 0000:00:14.0: DbC configured [ 191.169597] xhci_hcd 0000:00:14.0: DbC now attached to /dev/ttyDBC0”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h KhjhžhubhØ)”}”(hŒ3Accordingly, the DbC state has been brought up to::”h]”hŒ2Accordingly, the DbC state has been brought up to:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K†hjhžhubjk)”}”(hŒAroot@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc configured”h]”hŒAroot@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc configured”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h KˆhjhžhubhØ)”}”(hŒoOn the debug host, you will see the debug device has been enumerated. You will see below kernel message lines::”h]”hŒnOn the debug host, you will see the debug device has been enumerated. You will see below kernel message lines:”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K‹hjhžhubjk)”}”(hXöroot@host: tail -f /var/log/kern.log [ 79.454780] usb 2-2.1: new SuperSpeed USB device number 3 using xhci_hcd [ 79.475003] usb 2-2.1: LPM exit latency is zeroed, disabling LPM. [ 79.475389] usb 2-2.1: New USB device found, idVendor=1d6b, idProduct=0010 [ 79.475390] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 79.475391] usb 2-2.1: Product: Linux USB Debug Target [ 79.475392] usb 2-2.1: Manufacturer: Linux Foundation [ 79.475393] usb 2-2.1: SerialNumber: 0001”h]”hXöroot@host: tail -f /var/log/kern.log [ 79.454780] usb 2-2.1: new SuperSpeed USB device number 3 using xhci_hcd [ 79.475003] usb 2-2.1: LPM exit latency is zeroed, disabling LPM. [ 79.475389] usb 2-2.1: New USB device found, idVendor=1d6b, idProduct=0010 [ 79.475390] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 79.475391] usb 2-2.1: Product: Linux USB Debug Target [ 79.475392] usb 2-2.1: Manufacturer: Linux Foundation [ 79.475393] usb 2-2.1: SerialNumber: 0001”…””}”hj8sbah}”(h]”h ]”h"]”h$]”h&]”jzj{uh1jjhŸh¶h KŽhjhžhubhØ)”}”(hŒwThe debug device works now. You can use any communication or debugging program to talk between the host and the target.”h]”hŒwThe debug device works now. You can use any communication or debugging program to talk between the host and the target.”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K—hjhžhubeh}”(h]”Œ serial-tty”ah ]”h"]”Œ serial tty”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kgubeh}”(h]”Œusb3-debug-port”ah ]”h"]”Œusb3 debug port”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j‡Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jaj^jj~j¶j³j|jyjYjVuŒ nametypes”}”(ja‰j‰j¶‰j|‰jY‰uh}”(j^h£j~j=j³j„jyj¹jVjuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.