EHCI Debug Port: Difference between revisions

From coreboot
Jump to navigation Jump to search
m (USB Debug Port updates, fixes.)
Line 5: Line 5:


== Debug Class Device ==
== Debug Class Device ==
While the Debug Class functional spec describes a device communicating over USB also with the debugging host (aka remote) it would be very possible to make a Debug Class device with a regular serial port on the other end. One thing to watch out for is that such a device might not be able to handle the same throughput as the debug port itself and hence may lose data unless it can do some buffering.
While the Debug Class functional spec describes a device communicating over USB also with the debugging host (aka remote) it would be very possible to make a Debug Class device with a regular serial port on the other end. One thing to watch out for is that such a device might not be able to handle the same throughput as the debug port itself and hence may lose data unless it can do some buffering.


== Considerations in coreboot ==
== Considerations in coreboot ==
We'll use Mode 1 since a full USB stack and EHCI driver isn't running when we're using the debug port. We get early two-way communication from PCI memory write accesses. printf() should transmit also to the debug port on any (all?) EHCI controllers sporting the capability. Linux already supports this and we could probably copy code or headers from the kernel.
We'll use Mode 1 since a full USB stack and EHCI driver isn't running when we're using the debug port. We get early two-way communication from PCI memory write accesses. printf() should transmit also to the debug port on any (all?) EHCI controllers sporting the capability. Linux already supports this and we could probably copy code or headers from the kernel.


=== Supported Chipsets ===
=== Supported chipsets ===
 
The following southbridges have USB debug support in coreboot:
The following southbridges have USB debug support in coreboot:


* NVidia MCP55
* NVIDIA MCP55
* SiS 966
* SiS 966
* AMD SB600
* AMD SB600
* ICH7 (untested)
* AMD SB700
* Intel 82801GX/ICH7 (untested)


=== Using EHCI Debug ===
=== Using EHCI Debug ===


To get a USB debug console, enable CONFIG_USBDEBUG_DIRECT in your Options.lb:
To get a USB debug console, enable '''CONFIG_USBDEBUG''' (menu option '''USB 2.0 EHCI debug dongle support''') in kconfig:
uses CONFIG_USBDEBUG_DIRECT
default CONFIG_USBDEBUG_DIRECT=1


== Finding the USB debug port ==
== Finding the USB debug port ==
Generally, each EHCI controller can offer at most one debug port. That port corresponds to a fixed physical USB port. Locating that physical port is rather difficult because you need to look at lots of information.
Generally, each EHCI controller can offer at most one debug port. That port corresponds to a fixed physical USB port. Locating that physical port is rather difficult because you need to look at lots of information.


Carl-Daniel Hailfinger has written a script which can help finding that port: http://coreboot.org/pipermail/coreboot/2008-September/038635.html
Carl-Daniel Hailfinger has written [http://coreboot.org/pipermail/coreboot/2008-September/038635.html a script] which can help finding that port.


== Hardware capability ==
== Hardware capability ==
The Debug Port is optional, please check if EHCI controllers near you support it:
The Debug Port is optional, please check if EHCI controllers near you support it:


  # lspci -vs $(lspci|grep EHCI|cut -f1 -d' ')
  $ '''lspci -vs $(lspci|grep EHCI|cut -f1 -d' ')'''
  00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) (prog-if 20 [EHCI])
  00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) (prog-if 20 [EHCI])
  Subsystem: IBM Unknown device 0566
  Subsystem: IBM Unknown device 0566
Line 38: Line 42:
  Memory at b0000000 (32-bit, non-prefetchable) [size=1K]
  Memory at b0000000 (32-bit, non-prefetchable) [size=1K]
  Capabilities: [50] Power Management version 2
  Capabilities: [50] Power Management version 2
  Capabilities: [58] Debug port
  Capabilities: [58] '''Debug port'''


Look for a line like the last one above.
Look for a line like the last one above.
Line 44: Line 48:
Please include the PCI device id too:
Please include the PCI device id too:


  # lspci -ns $(lspci|grep EHCI|cut -f1 -d' ')
  $ '''lspci -ns $(lspci|grep EHCI|cut -f1 -d' ')'''
  00:1d.7 0c03: 8086:265c (rev 03)
  00:1d.7 0c03: 8086:265c (rev 03)


If your controller isn't already listed below then please add it or send an email to the [[Mailinglist]] if you don't have a wiki account yet and want one, or want us to add your controller to the page.
If your controller isn't already listed below then please add it or send an email to the [[Mailinglist|mailing list]] if you don't have a wiki account yet and want one, or want us to add your controller to the page.


=== Controllers verified to have the Debug port capability ===
=== Controllers verified to have the debug port capability ===


* 10b9:5239 ALi Corporation USB 2.0 (USB PCI card)
* 10b9:5239 ALi Corporation USB 2.0 (USB PCI card)
Line 86: Line 90:
=== NET20DC ===
=== NET20DC ===


* http://www.plxtech.com/products/NET2000/NET20DC/default.asp
* [http://web.archive.org/web/20080219120613/http://www.plxtech.com/products/NET2000/NET20DC/default.asp http://www.plxtech.com/products/NET2000/NET20DC/default.asp] (archive.org)
* http://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=12083
* http://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=12083
* http://www.semiconductorstore.com/pages/asp/supplier.asp?pl=0121
* http://www.semiconductorstore.com/pages/asp/supplier.asp?pl=0121
* http://www.ajaystech.com/resources.htm
* http://www.ajaystech.com/resources.htm


=== AMIDebug RX ===
=== AMIDebug RX ===
 
* http://www.ami.com/amidebugrx/
* http://www.ami.com/amidebugrx/



Revision as of 17:50, 22 September 2010

PLX NET20DC USB Debug Device.

Serial ports have been the primary means of early debugging of new coreboot ports. New hardware doesn't always have a serial port and another method for early debugging is needed.

The EHCI Debug Port is an optional capability of EHCI controllers. All USB2 host controllers are EHCI controllers. The debug port provides a mode of operation that requires neither RAM nor a full USB stack. A handful of registers in the EHCI controller PCI configuration and BAR address space are used for all communication. All three transfer types are supported (OUT/SETUP/IN) but transfers can only be a maximum of 8 bytes and only one specific physical USB port can be used. A Debug Class compliant device is the only supported USB function that can be communicated with.

Debug Class Device

While the Debug Class functional spec describes a device communicating over USB also with the debugging host (aka remote) it would be very possible to make a Debug Class device with a regular serial port on the other end. One thing to watch out for is that such a device might not be able to handle the same throughput as the debug port itself and hence may lose data unless it can do some buffering.

Considerations in coreboot

We'll use Mode 1 since a full USB stack and EHCI driver isn't running when we're using the debug port. We get early two-way communication from PCI memory write accesses. printf() should transmit also to the debug port on any (all?) EHCI controllers sporting the capability. Linux already supports this and we could probably copy code or headers from the kernel.

Supported chipsets

The following southbridges have USB debug support in coreboot:

  • NVIDIA MCP55
  • SiS 966
  • AMD SB600
  • AMD SB700
  • Intel 82801GX/ICH7 (untested)

Using EHCI Debug

To get a USB debug console, enable CONFIG_USBDEBUG (menu option USB 2.0 EHCI debug dongle support) in kconfig:

Finding the USB debug port

Generally, each EHCI controller can offer at most one debug port. That port corresponds to a fixed physical USB port. Locating that physical port is rather difficult because you need to look at lots of information.

Carl-Daniel Hailfinger has written a script which can help finding that port.

Hardware capability

The Debug Port is optional, please check if EHCI controllers near you support it:

$ lspci -vs $(lspci|grep EHCI|cut -f1 -d' ')
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) (prog-if 20 [EHCI])
Subsystem: IBM Unknown device 0566
Flags: bus master, medium devsel, latency 0, IRQ 5
Memory at b0000000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port

Look for a line like the last one above.

Please include the PCI device id too:

$ lspci -ns $(lspci|grep EHCI|cut -f1 -d' ')
00:1d.7 0c03: 8086:265c (rev 03)

If your controller isn't already listed below then please add it or send an email to the mailing list if you don't have a wiki account yet and want one, or want us to add your controller to the page.

Controllers verified to have the debug port capability

  • 10b9:5239 ALi Corporation USB 2.0 (USB PCI card)
  • 8086:24cd Intel ICH4/ICH4-M
  • 8086:24dd Intel ICH5
  • 8086:265c Intel ICH6
  • 8086:268c Intel 631xESB/632xESB/3100 Chipset (rev 09) (in Dell PE 1950)
  • 8086:27cc Intel ICH7
  • 8086:2836 Intel ICH8
  • 8086:283a Intel ICH8
  • 8086:293a Intel ICH9 (rev 2)
  • 8086:3a3a Intel ICH10
  • 8086:3a3c Intel ICH10
  • 10de:0088 NVIDIA MCP2A (rev a2)
  • 10de:005b NVIDIA CK804 (rev a3)
  • 10de:026e NVIDIA MCP51 (rev a3)
  • 10de:036d NVIDIA MCP55 (rev a2)
  • 10de:03f2 NVIDIA MCP61 (rev a3)
  • 1002:4386 ATI/AMD SB600
  • 1002:4396 ATI/AMD SB700
  • 1106:3104 VIA VX800 (rev 90)

Controllers verified to lack the Debug port capability

  • 1033:00e0 NEC Corporation EHCI (rev 02) (Compaq part)
  • 1106:3104 VIA Technologies EHCI (rev 82, rev 63, rev 86)
  • 1002:4373 ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80)
  • 1022:2095 Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02)
  • 8086:24cd Intel Corporation 82801DB/DBM (ICH4/ICH4-M) EHCI (rev 01)
  • 1039:7002 SiS EHCI (rev 00)

Where to buy

Currently there seems to be only two devices which can use the EHCI Debug Port, the NET20DC and the AMIDebug RX.

NET20DC

AMIDebug RX

More information