Re: PUC rewrite

From: Mike Tancsa <mike_at_sentex.net>
Date: Fri, 25 Jul 2008 17:30:01 -0400
At 12:02 PM 6/6/2008, Marcel Moolenaar wrote:
>On Jun 6, 2008, at 5:59 AM, Mike Tancsa wrote:
>
>>I have been starting to take a look at moving some of our embedded
>>platforms to RELENG_7 and noticed that support for the 3Com PCI
>>cards are broken.  Previously, in pucdata.c, they were defined as
>>
>>       /* US Robotics (3Com) PCI Modems */
>>        {   "US Robotics (3Com) 3CP5609 PCI 16550 Modem",
>>            {   0x12b9, 0x1008, 0,      0       },
>>            {   0xffff, 0xffff, 0,      0       },
>>            {
>>                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
>>            },
>>        },
>>
>>
>>However, in the newer version they are not there, and uart is not
>>picking up the device.
>
>Since this is a single-port UART, puc(4) is not supposed to have
>support for it. The uart(4) can handle it without needing puc(4).
>However, that implies that uart(4) needs to have the support for
>it and I guess that's not present.


Hi,
         I am finally getting back to this project again and am now 
looking at a more recent version of RELENG_7 post the UART 
re-write.  It now shows a bit of a different problem.  I have a 5501 
Soekris and if I boot with uart just in the kernel, all seems to work 
well. I updated the /boot/device.hints to reflect uart instead of sio 
and I can see the system console.  However, if I have the 3com PCI 
modem installed, cuau0 becomes the modem and I am not able to login 
via the console

1   FreeBSD
2   FreeBSD

Default: 1

/boot.config:  -h

FreeBSD/i386 boot
Default: 0:ad(0,a)/boot/loader
boot: Consoles: serial port
BIOS drive C: is disk0
BIOS 639kB/261120kB available memory


FreeBSD/i386 bootstrap loader, Revision 1.1
(mdtancsa_at_releng7.sentex.ca, Wed Jul 23 12:29:59 EDT 2008)
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x36ab14 data=0x325e0+0x2182c 
syms=[0x4+0x41890+0x4+0x544d6]
|
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-STABLE #0: Wed Jul 23 12:49:33 EDT 2008
     mdtancsa_at_releng7.sentex.ca:/usr/obj/nanobsd.soekris5501/usr/src/sys/nano5501
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Geode(TM) Integrated Processor by AMD PCS (433.25-MHz 586-class CPU)
   Origin = "AuthenticAMD"  Id = 0x5a2  Stepping = 2
   Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
   AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 268435456 (256 MB)
avail memory = 253218816 (241 MB)
K6-family MTRR support enabled (2 registers)
cryptosoft0: <software crypto> on motherboard
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
Geode LX: Soekris net5501 comBIOS ver. 1.33 20070103 Copyright (C) 2000-2007
MFGPT bar: f00100006200
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no 
driver attached)
vr0: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe100-0xe1ff mem 
0xa0004000-0xa00040ff irq 11 at device 6.0 on pci0
vr0: Quirks: 0x6
vr0: Revision: 0x96
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:00:24:ca:41:dc
vr0: [ITHREAD]
vr1: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe200-0xe2ff mem 
0xa0004100-0xa00041ff irq 5 at device 7.0 on pci0
vr1: Quirks: 0x6
vr1: Revision: 0x96
miibus1: <MII bus> on vr1
ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr1: Ethernet address: 00:00:24:ca:41:dd
vr1: [ITHREAD]
vr2: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe300-0xe3ff mem 
0xa0004200-0xa00042ff irq 9 at device 8.0 on pci0
vr2: Quirks: 0x6
vr2: Revision: 0x96
miibus2: <MII bus> on vr2
ukphy2: <Generic IEEE 802.3u media interface> PHY 1 on miibus2
ukphy2:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr2: Ethernet address: 00:00:24:ca:41:de
vr2: [ITHREAD]
vr3: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe400-0xe4ff mem 
0xa0004300-0xa00043ff irq 12 at device 9.0 on pci0
vr3: Quirks: 0x6
vr3: Revision: 0x96
miibus3: <MII bus> on vr3
ukphy3: <Generic IEEE 802.3u media interface> PHY 1 on miibus3
ukphy3:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr3: Ethernet address: 00:00:24:ca:41:df
vr3: [ITHREAD]
uart0: <Non-standard ns8250 class UART with FIFOs> port 0xe500-0xe507 
irq 10 at device 14.0 on pci0
uart0: [FILTER]
isab0: <PCI-ISA bridge> at device 20.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe000-0xe00f at device 20.2 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
ohci0: <OHCI (generic) USB controller> mem 0xa0005000-0xa0005fff irq 
15 at device 21.0 on pci0
ohci0: [GIANT-LOCKED]
ohci0: [ITHREAD]
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 4 ports with 4 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xa0006000-0xa0006fff 
irq 15 at device 21.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 4 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <AMD EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 4 ports with 4 removable, self powered
cpu0 on motherboard
orm0: <ISA Option ROM> at iomem 0xc8000-0xd27ff pnpid ORM0000 on isa0
uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 on isa0
uart1: [FILTER]
Timecounter "TSC" frequency 433251618 Hz quality 800
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
ad0: 1953MB <SanDisk SDCFH2-002G HDX 4.32> at ata0-master PIO4
Trying to mount root from ufs:/dev/ad0s1a
pid 106 (fsck_ufs), uid 0: exited on signal 8
vr0: link state changed to UP
vr1: link state changed to DOWN
pflog0: promiscuous mode enabled

<it stops output at this point>


the device.hints looks like

hint.uart.0.at="isa"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"
hint.uart.1.at="isa"
hint.uart.1.port="0x2F8"
hint.uart.1.irq="3"
hint.uart.2.at="isa"
#hint.uart.2.disabled="1"
hint.uart.2.port="0x3E8"
hint.uart.2.irq="5"
hint.uart.3.at="isa"
#hint.uart.3.disabled="1"
hint.uart.3.port="0x2E8"
hint.uart.3.irq="11"


uart0_at_pci0:0:14:0:      class=0x070002 card=0x00d312b9 
chip=0x100812b9 rev=0x01 hdr=0x00
     vendor     = '3COM Corp, Modem Division (Formerly US Robotics)'
     device     = 'USR5610B USR5610B (0005610-02) 56K Performance Pro 
Modem (PCI Internal)'
     class      = simple comms
     subclass   = UART


How can I force the PCI modem *not* to be uart0 so that the onboard 
com ports show up?


# cu -l /dev/cuau0
Connected
ati3
U.S. Robotics 56K FAX INT V5.22.91

OK
~
[EOT]

Without the modem installed, the bootup looks like this


ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
ohci0: <OHCI (generic) USB controller> mem 0xa0005000-0xa0005fff irq 
15 at device 21.0 on pci0
ohci0: [GIANT-LOCKED]
ohci0: [ITHREAD]
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 4 ports with 4 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xa0006000-0xa0006fff 
irq 15 at device 21.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 4 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <AMD EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 4 ports with 4 removable, self powered
cpu0 on motherboard
orm0: <ISA Option ROM> at iomem 0xc8000-0xd27ff pnpid ORM0000 on isa0
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
uart0: [FILTER]
uart0: console (9600,n,8,1)
uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 on isa0
uart1: [FILTER]
RTC BIOS diagnostic error c0<clock_battery,ROM_cksum>
Timecounter "TSC" frequency 499903954 Hz quality 800
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
ad0: 1953MB <SanDisk SDCFH2-002G HDX 4.32> at ata0-master PIO4




         ---Mike


>>In the new re-write, what is the proper way to add support for
>>devices no longer recognized ?
>
>Add the PCI Ids to uart_bus_pci.c. Keep the list of Ids sorted,
>because it's assumed by uart_pci_match().
>
>If you can send me a patch, I'll commit to head and stable.
>
>FYI,
>
>--
>Marcel Moolenaar
>xcllnt_at_mac.com
>
>
Received on Fri Jul 25 2008 - 20:08:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:33 UTC