pciide(4): cannot boot -current on 86duino EduCake

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pciide(4): cannot boot -current on 86duino EduCake

SASANO Takayoshi
Hello,

I am trying to boot -current on 86duino EduCake and I found it crashes when
wdcintr() (sys/dev/ic/wdc.c) is called.

Here is the log.
----
>> OpenBSD/i386 BOOT 3.27
boot> boot -c
\|/-\|/booting hd0a:/bsd: -\|/-7692020\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|+2029936/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|+189444/-\|/-\|/-\|+0+1069056 [72+414240/-\|/-\|/-\|/-\|/-\|/-\|/+409222-\|/-\|/-\|/-\|/-\|/-\|/-]=0xb4328c
entry point at 0x2000d4

[ using 823948 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.8-current (GENERIC) #1212: Tue Oct  6 00:55:46 MDT 2015
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
RTC BIOS diagnostic error 39<config_unit,memory_size,fixed_disk>
cpu0: Vortex86 SoC  (686-class) 301 MHz
cpu0: FPU,TSC,CX8,SEP,CMOV,MMX,PERF
real mem  = 133246976 (127MB)
avail mem = 118226944 (112MB)
User Kernel Config
UKC> enable com3
270 com3 enabled
UKC> change com3
270 com3 at isa0 port 0x2e8 size 0 iomem -1 iosiz 0 irq 9 drq -1 drq2 -1 flags 0x0
change (y/n) ?
port [0x2e8] ?
size [0] ?
iomem [-1] ?
iosiz [0] ?
irq [9] ? 12
drq [-1] ?
drq2 [-1] ?
flags [0] ?
270 com3 changed
270 com3 at isa0 port 0x2e8 size 0 iomem -1 iosiz 0 irq 12 drq -1 drq2 -1 flags 0x0
UKC> quit
Continuing...
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 06/23/99, BIOS32 rev. 0 @ 0xff046, SMBIOS rev. 2.7 @ 0x7fe1420 (6 entries)
bios0: vendor coreboot version "4.0-4750-g745041e-dirty" date 03/12/2015
bios0: DMP Vortex86EX
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf4ce0/224 (12 entries)
pcibios0: no compatible PCI ICU found: ICU vendor 0x17f3 product 0x6011
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xef000/0x1000!
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "RDC R6025 Host" rev 0x01
ppb0 at pci0 dev 1 function 0 "RDC R1031 PCIe" rev 0x02: irq 15
pci1 at ppb0 bus 1
pcib0 at pci0 dev 7 function 0 "RDC R6011 SB" rev 0x01
pcib1 at pci0 dev 7 function 1 "RDC R6011 SB" rev 0x01
vte0 at pci0 dev 8 function 0 "RDC R6040 Ethernet" rev 0x00: irq 9, address 00:1b:eb:62:eb:97
ukphy0 at vte0 phy 1: Generic IEEE 802.3u media interface, rev. 0: OUI 0x000bb4, model 0x0005
ohci0 at pci0 dev 10 function 0 "RDC R6060 USB" rev 0x13: irq 14, version 1.0, legacy support
ehci0 at pci0 dev 10 function 1 "RDC R6061 USB2" rev 0x07: irq 10
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "RDC EHCI root hub" rev 2.00/1.00 addr 1
pciide0 at pci0 dev 12 function 0 "RDC R1012 IDE" rev 0x03: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using irq 11 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <00000 D0 RDC SD-IDE HOST CONTROLLER>
wd0: 1-sector PIO, LBA, 3759MB, 7698432 sectors
pciide0: channel 1 ignored (disabled)
azalia0 at pci0 dev 14 function 0 "RDC R3010 HDA" rev 0x02: irq 7
azalia0: codecs: Realtek ALC262
audio0 at azalia0
"RDC R1060 USB Device" rev 0x03 at pci0 dev 15 function 0 not configured
"RDC R1331 MC" rev 0x00 at pci0 dev 16 function 0 not configured
"RDC R1710 SPI" rev 0x01 at pci0 dev 16 function 1 not configured
"RDC R1070 CAN" rev 0x00 at pci0 dev 17 function 0 not configured
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com2 at isa0 port 0x3e8/8 irq 5: ns16550a, 16 byte fifo
com3 at isa0 port 0x2e8/8 irq 12: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
isa at pcib1 not configured
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "RDC OHCI root hub" rev 1.00/1.00 addr 1
nvram: invalid checksum
uvm_fault(0xd0bba0a0, 0x0, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at      wdcintr+0x8e:   call    *0(%edx)
ddb> ps
   TID   PPID   PGRP    UID  S       FLAGS  WAIT          COMMAND
 22767      0      0      0  2     0x14200                crypto
 17851      0      0      0  2     0x14200                pfpurge
*28953      0      0      0  7     0x14200                usbtask
 23364      0      0      0  3     0x14200  usbatsk       usbatsk
  5298      0      0      0  3     0x14200  bored         softnet
  7086      0      0      0  3     0x14200  bored         systqmp
 12774      0      0      0  2     0x14200                systq
 16453      0      0      0  1     0x14200                idle0
 10723      0      0      0  3     0x14200  kmalloc       kmthread
     1      0      0      0  3           0  initexec      swapper
     0     -1      0      0  3     0x10200  cfpend        swapper
ddb> trace
wdcintr(d11055e4,0,1,0,0) at wdcintr+0x8e
pciide_pci_intr(d1105000,d11019c0) at pciide_pci_intr+0x69
Xrecurse_legacy11() at Xrecurse_legacy11+0xb7
--- interrupt ---
Xspllower(d32b6a2c) at Xspllower+0xe
ddb> show register
ds                  0x10
es                  0x10
fs                  0x20
gs                     0
edi           0xd11055e4        end+0x3055e4
esi           0xd11055e4        end+0x3055e4
ebp           0xf1cfced0
ebx           0xd1105508        end+0x305508
edx                    0
ecx                 0x10
eax                    0
eip           0xd020839e        wdcintr+0x8e
cs                   0x8
eflags             0x256
esp           0xf1cfce98
ss                  0x10
wdcintr+0x8e:   call    *0(%edx)
ddb>
----

wdcintr+0x8e is calling bus_space_read_1() in wdcintr(),
and wdcintr() comes from pciide_pci_intr() (sys/dev/pci/pciide.c).

pciide_pci_intr() checks pciide0:channel0 (enabled) and
channel1 (disabled), page fault occurs when checking disabled channel.

Here is the remedy for RDC R1012.

----
Index: pciide.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pciide.c,v
retrieving revision 1.354
diff -u -p -r1.354 pciide.c
--- pciide.c 10 Sep 2015 18:10:34 -0000 1.354
+++ pciide.c 6 Oct 2015 15:29:05 -0000
@@ -9188,6 +9188,7 @@ rdc_chip_map(struct pciide_softc *sc, st
  if ((patr & RDCIDE_PATR_EN(channel)) == 0) {
  printf("%s: %s ignored (disabled)\n",
        sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
+ cp->hw_ok = 0;
  continue;
  }
  pciide_map_compat_intr(pa, cp, channel, interface);
--
SASANO Takayoshi <[hidden email]>