Opened 12 years ago

Last modified 11 years ago

#1504 new enhancement

Enable USB -> RS-232 Serial port adapter on startup to allow for serial debugging

Reported by: scottmc Owned by: mmlr
Priority: normal Milestone: Unscheduled
Component: Drivers/USB Version: R1/pre-alpha1
Keywords: Cc: siarzhuk
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

I'm not even sure if this would be possible, but it would be nice if a USB to Serial port adapter driver were enabled early enough in the boot process so as to be useful for serial debugging on computers that don't have normal RS-232 serial ports such as most newer laptops.

Change History (9)

comment:1 in reply to:  description Changed 12 years ago by jackburton

Replying to scottmc:

I'm not even sure if this would be possible, but it would be nice if a USB to Serial port adapter driver were enabled early enough in the boot process so as to be useful for serial debugging on computers that don't have normal RS-232 serial ports such as most newer laptops.

For now the usb2serial driver doesn't even work in haiku. Our tty layer isn't complete, and its api isn't even compatible with the beos api (which the driver uses). See bug #35.

comment:2 Changed 12 years ago by siarzhuk

Cc: siarzhuk added

comment:3 Changed 12 years ago by euan

There is a serial debug feature in EHCI chipsets, that works using a small set of PCI registers, bypassing the USB stack, and device hierarchy. How ever it requires a special adapter (don't know where you get them).

http://linuxbios.org/index.php/EHCI_Debug_Port

Alternatively the parallel port could be used (again if there is one). Quite why laptops often drop serial, yet keep parallel I don't know.

comment:4 Changed 12 years ago by marcusoverhagen

The commercial devices available that support USB debug port specification are rather limited, there seems to be only one company that offers a product:

http://www.ajaystech.com/net20dc.htm http://www.ajaystech.com/ http://developer.intel.com/technology/usb/download/DebugDeviceSpec_R090.pdf http://www.intel.com/technology/magazine/computing/it09021.pdf

Quite a number of laptops offer serial ports on a docking station, this can be used, too.

It's also possible to build parallel-printer-port or ps2-port to RS232 debugging cables, and use those for debugging. If such a thing is required, I can offer helping with that.

Early support of standard USB-RS232 cables isn't feasible.

comment:5 Changed 12 years ago by scottmc

Another option might be to remove the pci-mini wireless card and put in a pci-mini serial card, at least for debugging stages. http://www.globalamericaninc.com/new_spec/spec2.php?id=605 http://www.bwi.com/prod/14975 http://www.gateworks.com/avila_gw2201.htm To bad they are a bit pricey. Anyone know if these would work? Seems like they'd look just like a normal PCI device to the system. Normal rs232 is done over PCI-ISA bridge these days isn't it?

comment:6 in reply to:  5 Changed 11 years ago by aldeck

Couldn't the BIOS be used to write the log on a USB keychain/drive ? Not as handy as a cable but usefull nonetheless.

comment:7 Changed 11 years ago by scottmc

Another possibility here might be to add support for mini-pci serial cards. An example would be from Oxford Semiconductor. I found this in freebsd code. I have a couple of these mini-pci boards that I can experiment with, one is the GPS version which is seen as three serial ports, the other is a 4 port serial card.

The original need for the USB -> RS-232 on startup was to have an alternate form of serial debugging, but with the new pause on each screen using the boot up on-screen debugger this isn't a high priority anymore, and might not even be considered a need for R1 even as an enhancement?

From: http://opengrok.creo.hu/openbsd/xref/src/sys/dev/pci/pucdata.c

833 /* 834 * Boards with an Oxford Semiconductor chip. 835 * 836 * Oxford Semiconductor provides documentation for their chip at: 837 * <URL:http://www.oxsemi.com/products/uarts/index.html> 838 * 839 * As sold by Kouwell <URL:http://www.kouwell.com/>. 840 * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports. 841 */ 842 843 /* Oxford Semiconductor OX16PCI952 PCI `950 UARTs - 128 byte FIFOs */ 844 { /* "Oxford Semiconductor OX16PCI952 UARTs", */ 845 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCI952, 0, 0 }, 846 { 0xffff, 0xffff, 0, 0 }, 847 { 848 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, 849 { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ }, 850 }, 851 }, 852 853 /* Oxford Semiconductor OX16PCI952 PCI Parallel port */ 854 { /* "Oxford Semiconductor OX16PCI952 Parallel port", */ 855 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCI952P, 0, 0 }, 856 { 0xffff, 0xffff, 0, 0 }, 857 { 858 { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 }, 859 }, 860 }, 861 862 /* SIIG 2050 (uses Oxford 16PCI954 and a 10x clock) */ 863 { /* "Oxford Semiconductor OX16PCI954 UARTs", */ 864 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCI954, 865 PCI_VENDOR_SIIG, PCI_PRODUCT_SIIG_2050 }, 866 { 0xffff, 0xffff, 0xffff, 0xffff }, 867 { 868 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 10 }, 869 { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ * 10 }, 870 { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ * 10 }, 871 { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ * 10 }, 872 }, 873 }, 874 875 /* Oxford Semiconductor OX16PCI954 PCI UARTs */ 876 { /* "Oxford Semiconductor OX16PCI954 UARTs", */ 877 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCI954, 0, 0 }, 878 { 0xffff, 0xffff, 0, 0 }, 879 { 880 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, 881 { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ }, 882 { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ }, 883 { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ }, 884 }, 885 }, 886 887 /* Commell MP-954GPS, GPS and 2 COM */ 888 { /* "Oxford Semiconductor OX16mPCI954 UARTs", */ 889 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OXMPCI954, 0, 0 }, 890 { 0xffff, 0xffff, 0, 0 }, 891 { 892 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ*4 }, 893 { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ*4 }, 894 { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ*4 }, 895 }, 896 }, 897 898 /* Oxford Semiconductor OX16PCI954K PCI UARTs */ 899 { /* "Oxford Semiconductor OX16PCI954K UARTs", */ 900 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCI954K, 0, 0 }, 901 { 0xffff, 0xffff, 0, 0 }, 902 { 903 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, 904 { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ }, 905 { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ }, 906 { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ }, 907 }, 908 }, 909 910 /* Oxford Semiconductor OX16PCI954 PCI Parallel port */ 911 { /* "Oxford Semiconductor OX16PCI954 Parallel port", */ 912 { PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCI954P, 0, 0 }, 913 { 0xffff, 0xffff, 0, 0 }, 914 { 915 { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 }, 916 }, 917 }, 918

From: http://opengrok.creo.hu/openbsd/xref/src/sys/dev/pci/pcidevs.h#PCI_PRODUCT_OXFORD2_OX16PCI954K

242 #define PCI_VENDOR_OXFORD2 0x1415 /* Oxford */

3407 /* Oxford/ VScom */ 3408 #define PCI_PRODUCT_OXFORD_VSCOM_PCI010L 0x8001 /* 010L */ 3409 #define PCI_PRODUCT_OXFORD_VSCOM_PCI100L 0x8010 /* 100L */ 3410 #define PCI_PRODUCT_OXFORD_VSCOM_PCI110L 0x8011 /* 110L */ 3411 #define PCI_PRODUCT_OXFORD_VSCOM_PCI200L 0x8020 /* 200L */ 3412 #define PCI_PRODUCT_OXFORD_VSCOM_PCI210L 0x8021 /* 210L */ 3413 #define PCI_PRODUCT_MOLEX_VSCOM_PCI400L 0x8040 /* 400L */ 3414 #define PCI_PRODUCT_OXFORD_VSCOM_PCI800L 0x8080 /* 800L */ 3415 #define PCI_PRODUCT_OXFORD_VSCOM_PCIx10H 0xa000 /* x10H */ 3416 #define PCI_PRODUCT_OXFORD_VSCOM_PCI100H 0xa001 /* 100H */ 3417 #define PCI_PRODUCT_OXFORD_VSCOM_PCI200H 0xa005 /* 200H */ 3418 #define PCI_PRODUCT_OXFORD_VSCOM_PCI800H_0 0xa003 /* 400H/800H */ 3419 #define PCI_PRODUCT_OXFORD_VSCOM_PCI800H_1 0xa004 /* 800H */ 3420 #define PCI_PRODUCT_OXFORD_VSCOM_PCI200HV2 0xe020 /* 200HV2 */ 3421 #define PCI_PRODUCT_OXFORD2_VSCOM_PCI011H 0x8403 /* 011H */ 3422 #define PCI_PRODUCT_OXFORD2_OX16PCI954 0x9501 /* OX16PCI954 */ 3423 #define PCI_PRODUCT_OXFORD2_OX16PCI954K 0x9504 /* OX16PCI954K */ 3424 #define PCI_PRODUCT_OXFORD2_EXSYS_EX41092 0x950a /* Exsys EX-41092 */ 3425 #define PCI_PRODUCT_OXFORD2_OXCB950 0x950b /* OXCB950 */ 3426 #define PCI_PRODUCT_OXFORD2_OXMPCI954 0x950c /* OXmPCI954 */ 3427 #define PCI_PRODUCT_OXFORD2_OXMPCI954D 0x9510 /* OXmPCI954 Disabled */ 3428 #define PCI_PRODUCT_OXFORD2_EXSYS_EX41098 0x9511 /* Exsys EX-41098 */ 3429 #define PCI_PRODUCT_OXFORD2_OX16PCI954P 0x9513 /* OX16PCI954 Parallel */ 3430 #define PCI_PRODUCT_OXFORD2_OX16PCI952 0x9521 /* OX16PCI952 */ 3431 #define PCI_PRODUCT_OXFORD2_OX16PCI952P 0x9523 /* OX16PCI952 Parallel */

comment:8 Changed 11 years ago by scottmc

This can be moved to low priority and dropped from R1 milestone as it's not a requirement, just a "would be nice to have".

comment:9 Changed 11 years ago by stippi

Milestone: R1Unscheduled
Note: See TracTickets for help on using tickets.