I am a new user having just installed OpenBSD for the first time. I am
having trouble with my PCMCIA cards. I have 2 cards, both 3COM, and two
PCMCIA slots (TI-PCI1130, see dmesg below).
I am currently having two issues: system hangs in bios after reboot and
kernel panics when pcmcia card is removed.
I am willing to open up 1 or more bug reports if these cannot be easily
resolved, but since my last problem involved using floppyB to boot the
system instead of floppyC, I wanted to make sure this was a real issue
instead of a "new user doesn't know what he is doing issue".
Both problems are easily reproducable, so I can easily gather more
information.
Details:
Issue 1:
My system always boots fine from a powered down state, but hangs in the
bios after a reboot (type reboot at the cmd prompt). The reboot hangs
right after it initalizes the mouse and right before it checks the save to
disk feature. Powering down and back up causes the system to boot
correctly. I know what you are thinking: This is a hardware issue not an
openbsd issue, but hear me out. If I boot the system of a Win95 rescue
disk, the system does not hang. When I had slackware installed on the
system 1 week ago, it did not hang. And here is kicker: it only hangs
when a pcmcia card is in the slot immediately before openbsd syncs disks
to reboot.
Consider the following senerios:
1) Booted to msdos and rebooted: No hang
2) Booted to openbsd and rebooted (card in slot): Hang
3) Booted to openbsd and rebooted (no card in slot): No hang
4) Booted to openbsd and rebooted (no card on boot, inserted after
rc.shutdown is complete, but before kernel syncs disks. Insertion mesg
printed to the screen by the kernel): Hang
5) Booted to openbsd and rebooted (card on boot, removed after rc.shutdown
is complete, but before kernel syncs disks. Detach mesg printed to the
screen by the kernel): No hang
Notice the last two cases prove that it is the state of the card when
openbsd begins the reboot cycle and has nothing to do with the state of
the card during the actual reboot. It seems that openbsd is putting the
hardware into a weird state that prevents the bios from properly booting.
Interrupt related? maybe?
Insert mesg:
ep1 at pcmcia1 function 0 "3Com, 3C574-TX Fast EtherLink PC Card, A" port
0x340/32, irq 5: address 00:10:4b:f4:b5:57
tqphy0 at ep1 phy 0: 78Q2120 10/100 PHY, rev. 10
Detach mesg:
tqphy0 detached
ep1 detached
The diff of the dmesg of the system booted with and without card is as
follows (for quick refence, full dmesgs below):
$ diff ti_extensa660cdt_dmesg_generic
ti_extensa660cdt_dmesg_generic_no_cards
10c10
< bios0 at mainbus0: AT/286+(03) BIOS, date 09/06/97, BIOS32 rev. 0 @
0xf5b16
---
> bios0 at mainbus0: AT/286+(09) BIOS, date 09/06/97, BIOS32 rev. 0 @
0xf5b16
31c31
< pciide0: channel 1 disabled (no drives)
---
> pciide0: channel 1 ignored (disabled)
58,61c58,59
< ep1 at pcmcia1 function 0 "3Com, 3C574-TX Fast EtherLink PC Card, A"
port 0x340/32, irq 9: address 00:10:4b:f4:b5:57
< tqphy0 at ep1 phy 0: 78Q2120 10/100 PHY, rev. 10
< pcic0: irq 5, polling enabled
< biomask ed45 netmask ef45 ttymask ffe7
---
> pcic0: irq 9, polling enabled
> biomask ed65 netmask ed65 ttymask ffe7
Notice that sometimes irq 5 is used and sometimes irq 9 is used. The
system hands on reboot regardless of which irq openbsd selects.
Issue 2:
The top pcmcia slot does not seem to work with openbsd. The lower slot
works with both of the cards with no issues. If a card is in the top slot
upon boot (or inserted after boot), the kernel is not able to configure
the card and ignores it. When the card is removed a kernel page fault
error is printed to the screen and a dds> prompt is given. This is true
for either card.
This issue is repeatable, the same fault occurs every time, with only
slightly different pointer values in the trace.
Here is the detailed info for the fault
(copied by hand, could contain typos):
Upon insert:
ep1 at pcmcia0 function 0 "3Com, 3C574-TX Fast EtherLink PC Card, A" port
0x340/32, irq 5: address 02:01:02:01:02:01
wrote 7ff to TX_AWAIL_THRESH, read back 4057. Interface disabled
Upon removal of card no detach message is printed, instead:
uvm_fault(0xd05e1aa0, 0x0, 0, 1 ) -> e
kernel: page fault trap, code = 0
Stopped at dhooks+0x3c: movl 0(%esi),%ebx
dds> trace
dohooks(0,3,10,d0a6644) at dohooks+0x3c
if_detach(d08c584c,ffffffff,ffffffff,2d,d08c5800) at if_detach+0x53
ep_detach(d08c5800,d08c14,d5528ee4,d08c5800) at ep_detach+0x35
ep_pcmcia_detach(d08c500,1,10,d04a4dac,d0840000) at ep_pcmcia_detach+0x10
config_detch(d08c500,1,d5528f2c,d0603d4) at config_detach+0x200
pcmcia_card_detach(d040000,1,0,d08cdec0,d084c080) at
pcmcia_card_detach+0x47
pcic_even_process(d084c080,d08cdec0,0,d5527000) at pcic_event_process+0xe1
pcic_event_thread(d084c080) at pcic_event_thread+0x8a
Bad frame pointer: 0xd070be98
dds> ps (last several lines only, this is a lot of typing...)
...snip...
6 0 0 0 3 0x100204 pftm pfpurge
5 0 0 0 3 0x100204 pcicev pcic0,0,1
* 4 0 0 0 7 0x100204 pcic0,0,0
3 0 0 0 3 0x100204 apmev apm0
2 0 0 0 3 0x100204 kmalloc kmthread
1 0 0 0 3 0x4084 wait init
0 -1 0 0 3 0x80204 scheduler swapper
dds> show panic
the kernel did not panic
Dmesgs for both issues:
dmesg with card in lower slot only (works, but hangs on reboot)
OpenBSD 3.9 (GENERIC) #617: Thu Mar 2 02:26:48 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium/MMX ("GenuineIntel" 586-class) 166 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,MMX
cpu0: F00F bug workaround installed
real mem = 49913856 (48744K)
avail mem = 37646336 (36764K)
using 634 buffers containing 2596864 bytes (2536K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(03) BIOS, date 09/06/97, BIOS32 rev. 0 @
0xf5b16
apm0 at bios0: Power Management spec V1.2
apm0: AC on, no battery
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf59f0/0x810
pcibios0: PCI BIOS has 4 Interrupt Routing table entries
pcibios0: no compatible PCI ICU found
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc0000/0xa000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "ACC Microelectronics 2051 PCI" rev 0x00
pcib0 at pci0 dev 1 function 0 "ACC Microelectronics 2051 ISA" rev 0x00
vga1 at pci0 dev 2 function 0 "Neomagic Magicgraph 128ZV" rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pciide0 at pci0 dev 3 function 0 "CMD Technology PCI0643" rev 0x00: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide0 channel 0 drive 0: <IBM-DCRA-22160>
wd0: 16-sector PIO, LBA, 2067MB, 4233600 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 1
pciide0: channel 1 disabled (no drives)
cbb0 at pci0 dev 4 function 0 "Texas Instruments PCI1130 CardBus" rev
0x04pci_intr_map: no mapping for pin A
: couldn't map interrupt
cbb1 at pci0 dev 4 function 1 "Texas Instruments PCI1130 CardBus" rev
0x04pci_intr_map: no mapping for pin B
: couldn't map interrupt
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
pcic0 at isa0 port 0x3e0/2 iomem 0xd0000/65536
pcic0 controller 0: <Intel 82365SL rev 2> has sockets A and B
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
ep1 at pcmcia1 function 0 "3Com, 3C574-TX Fast EtherLink PC Card, A" port
0x340/32, irq 9: address 00:10:4b:f4:b5:57
tqphy0 at ep1 phy 0: 78Q2120 10/100 PHY, rev. 10
pcic0: irq 5, polling enabled
biomask ed45 netmask ef45 ttymask ffe7
pctr: 586-class performance counters and user-level cycle counter enabled
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
dmesg for no card in either slot:
OpenBSD 3.9 (GENERIC) #617: Thu Mar 2 02:26:48 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium/MMX ("GenuineIntel" 586-class) 166 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,MMX
cpu0: F00F bug workaround installed
real mem = 49913856 (48744K)
avail mem = 37646336 (36764K)
using 634 buffers containing 2596864 bytes (2536K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(09) BIOS, date 09/06/97, BIOS32 rev. 0 @
0xf5b16
apm0 at bios0: Power Management spec V1.2
apm0: AC on, no battery
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf59f0/0x810
pcibios0: PCI BIOS has 4 Interrupt Routing table entries
pcibios0: no compatible PCI ICU found
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc0000/0xa000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "ACC Microelectronics 2051 PCI" rev 0x00
pcib0 at pci0 dev 1 function 0 "ACC Microelectronics 2051 ISA" rev 0x00
vga1 at pci0 dev 2 function 0 "Neomagic Magicgraph 128ZV" rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pciide0 at pci0 dev 3 function 0 "CMD Technology PCI0643" rev 0x00: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide0 channel 0 drive 0: <IBM-DCRA-22160>
wd0: 16-sector PIO, LBA, 2067MB, 4233600 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 1
pciide0: channel 1 ignored (disabled)
cbb0 at pci0 dev 4 function 0 "Texas Instruments PCI1130 CardBus" rev
0x04pci_intr_map: no mapping for pin A
: couldn't map interrupt
cbb1 at pci0 dev 4 function 1 "Texas Instruments PCI1130 CardBus" rev
0x04pci_intr_map: no mapping for pin B
: couldn't map interrupt
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
pcic0 at isa0 port 0x3e0/2 iomem 0xd0000/65536
pcic0 controller 0: <Intel 82365SL rev 2> has sockets A and B
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
pcic0: irq 9, polling enabled
biomask ed65 netmask ed65 ttymask ffe7
pctr: 586-class performance counters and user-level cycle counter enabled
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302