From jedgar@fxp.org  Fri Aug 24 19:57:47 2001
Return-Path: <jedgar@fxp.org>
Received: from peitho.fxp.org (peitho.fxp.org [209.26.95.40])
	by hub.freebsd.org (Postfix) with ESMTP id 6F99C37B40A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 24 Aug 2001 19:57:46 -0700 (PDT)
	(envelope-from jedgar@fxp.org)
Received: by peitho.fxp.org (Postfix, from userid 1000)
	id E6C0D1361E; Fri, 24 Aug 2001 22:57:45 -0400 (EDT)
Message-Id: <20010825025745.E6C0D1361E@peitho.fxp.org>
Date: Fri, 24 Aug 2001 22:57:45 -0400 (EDT)
From: Chris D.Faulhaber <jedgar@fxp.org>
Reply-To: Chris D.Faulhaber <jedgar@fxp.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pcic detection causes Fatal trap 12 under 4.4-RC
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30065
>Category:       kern
>Synopsis:       [f: 4.4] pcic detection causes Fatal trap 12 under 4.4-RC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 24 20:00:00 PDT 2001
>Closed-Date:    Fri Feb 1 14:37:19 MST 2002
>Last-Modified:  Fri Feb 01 14:37:56 MST 2002
>Originator:     Chris D. Faulhaber
>Release:        FreeBSD 4.4-RC i386
>Organization:
none
>Environment:

FreeBSD 4.4-RC #1: Fri Aug 24 22:23:43 EDT 2001
    jedgar@droopy.wanmine.com:/usr/src/sys/compile/GENERIC

>Description:

Laptop is a CTX-700E with a TI PCI-1131 PCI-CardBus Bridge and
a Linksys EtherFast 10/100 PC Card (PCMPC100).

Under 4.4-RC, pcic detection causes:

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xeb97b
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc00eb87c
stack pointer           = 0x10:0xc049fd78
frame pointer           = 0x10:0xc049fd78
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (swapper)
interrupt mask          = net tty bio cam 
trap number             = 12
panic: page fault

msmith's pir.c produces the following:
$PIR table at 0x2811b840 version 1.0
PCI interrupt router at 0:0.8 vendor 0x8086 device 0x122e
PCI-only interrupts [                                     ]
entry bus slot device
 00:  00   00    01  INTA  63  [      3 4 5 6 7   9 10 11 12         ]
                     INTB  63  [      3 4 5 6 7   9 10 11 12         ]
                     INTC  63  [      3 4 5 6 7   9 10 11 12         ]
                     INTD  63  [      3 4 5 6 7   9 10 11 12         ]
 01:  00   00    10  INTA  60  [                  9                  ]
                     INTB  61  [                  9                  ]
                     INTC  00  [                  9 10               ]
                     INTD  00  [                  9 10               ]
 02:  00   00    17  INTA  60  [      3 4 5 6 7   9 10 11 12         ]
                     INTB  61  [      3 4 5 6 7   9 10 11 12         ]
                     INTC  62  [      3 4 5 6 7   9 10 11 12         ]
                     INTD  63  [      3 4 5 6 7   9 10 11 12         ]

verbose boot:

Copyright (c) 1992-2001 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 4.4-RC #1: Fri Aug 24 22:23:43 EDT 2001
    jedgar@droopy.wanmine.com:/usr/src/sys/compile/GENERIC
Calibrating clock(s) ... TSC clock: 232074271 Hz, i8254 clock: 1193023 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254"  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
CPU: AMD-K6tm w/ multimedia extensions (232.11-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x570  Stepping = 0
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
  AMD Features=0x400<<b10>>
Data TLB: 128 entries, 2-way associative
Instruction TLB: 64 entries, 1-way associative
L1 data cache: 32 kbytes, 32 bytes/line, 2 lines/tag, 2-way associative
L1 instruction cache: 32 kbytes, 32 bytes/line, 2 lines/tag, 2-way associative
Write Allocate Enable Limit: 128M bytes
Write Allocate 15-16M bytes: Disable
Hardware Write Allocate Control: Disable
real memory  = 67108864 (65536K bytes)
Physical memory chunk(s):
0x00001000 - 0x0009efff, 647168 bytes (158 pages)
0x004a4000 - 0x03ff7fff, 62210048 bytes (15188 pages)
avail memory = 60776448 (59352K bytes)
bios32: Found BIOS32 Service Directory header at 0xc00e8050
bios32: Entry = 0xeb320 (c00eb320)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0x3360
pnpbios: Found PnP BIOS data at 0xc00ff020
pnpbios: Entry = ec000:230d  Rev = 1.0
pnpbios: Event flag at ec01e
pnpbios: OEM ID 8224744e
Other BIOS signatures found:
ACPI: 00000000
Preloaded elf kernel "kernel.test" at 0xc047e000.
md0: Malloc disk
Creating DISK md0
Math emulator present
pci_open(1):	mode 1 addr port (0x0cf8) is 0x80000880
pci_open(1a):	mode1res=0x80000000 (0x80000000)
pci_cfgcheck:	device 0 [class=060000] [hdr=00] is there (id=71008086)
Using $PIR table, 3 entries at 0xc00fe840
npx0: <math processor> on motherboard
npx0: INT 16 interface
i586_bzero() bandwidth = 536193029 bytes/sec
bzero() bandwidth = 199680511 bytes/sec
pcib0: <Host to PCI bridge> on motherboard
found->	vendor=0x8086, dev=0x7100, revid=0x01
	class=06-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
found->	vendor=0x8086, dev=0x7110, revid=0x01
	class=06-01-00, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
found->	vendor=0x8086, dev=0x7111, revid=0x01
	class=01-01-80, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	map[20]: type 1, range 32, base 00003000, size  4
found->	vendor=0x8086, dev=0x7112, revid=0x01
	class=0c-03-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=d, irq=0
found->	vendor=0x8086, dev=0x7113, revid=0x01
	class=06-80-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	map[90]: type 1, range 32, base 00001400, size  4
found->	vendor=0x10c8, dev=0x0004, revid=0x01
	class=03-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=255
	map[10]: type 1, range 32, base c0000000, size 24
	map[14]: type 1, range 32, base c1000000, size 21
	map[18]: type 1, range 32, base c1200000, size 20
found->	vendor=0x104c, dev=0xac15, revid=0x01
	class=06-07-00, hdrtype=0x02, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=255
found->	vendor=0x104c, dev=0xac15, revid=0x01
	class=06-07-00, hdrtype=0x02, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=b, irq=255
pci0: <PCI bus> on pcib0
isab0: <Intel 82371AB PCI to ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 ATA33 controller> port 0x3000-0x300f at device 1.1 on pci0
ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0x3000
ata0: mask=03 status0=50 status1=00
ata0: mask=03 ostat0=50 ostat2=00
ata0-master: ATAPI probe a=00 b=00
ata0-slave: ATAPI probe a=00 b=00
ata0: mask=03 status0=50 status1=00
ata0-master: ATA probe a=01 b=a5
ata0: devices=01
ata0: at 0x1f0 irq 14 on atapci0
ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0x3008
ata1: mask=03 status0=51 status1=7f
ata1: mask=03 ostat0=51 ostat2=7f
ata1-master: ATAPI probe a=14 b=eb
ata1-slave: ATAPI probe a=7f b=7f
ata1: mask=03 status0=00 status1=7f
ata1-slave: ATA probe a=7f b=7f
ata1: devices=04
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> irq 0 at device 1.2 on pci0
uhci0: Could not map ports
device_probe_and_attach: uhci0 attach returned 6
chip1: <Intel 82371AB Power management controller> port 0x1400-0x140f at device 1.3 on pci0
pci0: <NeoMagic MagicGraph 128XD SVGA controller> (vendor=0x10c8, dev=0x0004) at 8.0
pci_cfgintr_unique: hard-routed to irq 9


Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0xeb97b
fault code		= supervisor read, page not present
instruction pointer	= 0x8:0xc00eb87c
stack pointer	        = 0x10:0xc049fd78
frame pointer	        = 0x10:0xc049fd78
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 0 (swapper)
interrupt mask		= net tty bio cam 
trap number		= 12
panic: page fault
Uptime: 0s
Automatic reboot in 15 seconds - press a key on the console to abort
--> Press a key on the console to reboot <--


good verbose boot (20010810 kernel) available at
http://www.fxp.org/jedgar/dmesg.1.txt

verbose boot (20010819 kernel) with Warner Losh's no-hang.diff.5 that
booted but fails to attach the pcic is available at
http://www.fxp.org/jedgar/dmesg.2.txt

>How-To-Repeat:

See above

>Fix:

TBD

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Fri Aug 24 20:00:33 PDT 2001 
Responsible-Changed-Why:  
Over to Mr. Laptop 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30065 

From: Chris Faulhaber <jedgar@fxp.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/30065: pcic detection causes Fatal trap 12 under 4.4-RC
Date: Sun, 26 Aug 2001 13:10:30 -0400

 On Fri, Aug 24, 2001 at 10:57:45PM -0400, Chris D.Faulhaber wrote:
 > 
 > >Number:         30065
 > >Category:       kern
 > 
 
 Update: with the updated ISA routing commit(s) and setting
 hw.pcic.intr_path=1 and hw.pcic.irq=0, the system now boots.
 After syncing world everything seems to attach properly
 except that the network card does not seem to function, only
 returns timeouts.  Diff of the 20010810 working dmesg and
 dmesg from this morning (custom kernel) follows:
 
 -FreeBSD 4.3-20010810-STABLE #0: Fri Aug 10 14:22:39 GMT 2001
 -    root@usw3.freebsd.org:/usr/src/sys/compile/GENERIC
 +FreeBSD 4.4-RC #0: Sun Aug 26 08:49:56 EDT 2001
 +    jedgar@droopy.wanmine.com:/usr/src/sys/compile/DROOPY
 ...
 -pcic-pci0: <TI PCI-1131 PCI-CardBus Bridge> at device 10.0 on pci0
 -pcic-pci0: TI113X PCI Config Reg: [clkrun irq 12][speaker enable][CSC serial isa irq]
 -pcic-pci1: <TI PCI-1131 PCI-CardBus Bridge> at device 10.1 on pci0
 -pcic-pci1: TI113X PCI Config Reg: [clkrun irq 12][speaker enable][CSC serial isa irq]
 +pcic0: <TI PCI-1131 PCI-CardBus Bridge> at device 10.0 on pci0
 +pcic0: PCI Memory allocated: 0x44000000
 +pcic0: Polling mode
 +pcic0: TI113X PCI Config Reg: [clkrun irq 12][speaker enable][CSC serial isa irq]
 +pccard0: <PC Card bus (classic)> on pcic0
 +pcic1: <TI PCI-1131 PCI-CardBus Bridge> at device 10.1 on pci0
 +pcic1: PCI Memory allocated: 0x44001000
 +pcic1: Polling mode
 +pcic1: TI113X PCI Config Reg: [clkrun irq 12][speaker enable][CSC serial isa irq]
 +pccard1: <PC Card bus (classic)> on pcic1
 ...
 -pcic0: <Intel i82365SL-DF> at port 0x3e0 iomem 0xd0000 on isa0
 -pcic0: Polling mode
 -pccard0: <PC Card bus (classic)> on pcic0
 -pccard1: <PC Card bus (classic)> on pcic0
 ...
 ed1 at port 0x300-0x31f irq 3 slot 0 on pccard0
 -ed1: address 00:e0:98:04:d5:68, type Linksys (16 bit)
 +ed0 at port 0x300-0x31f irq 11 slot 0 on pccard0
 +ed0: address 00:e0:98:04:d5:68, type Linksys (16 bit)
  lxtphy0: <LXT970 10/100 media interface> on miibus0
  lxtphy0:  100baseFX, 100baseFX-FDX, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 -ed1: device timeout
 +ed0: device timeout
 +ed0: device timeout
 
 Unfortunately the old kernel with a newer pccardd will not
 properly attach the network card:
 
 droopy# pccard: card inserted, slot 0
 Aug 26 12:58:53 droopy /kernel.GENERIC: pccard: card inserted, slot 0
 Aug 26 12:58:53 droopy /kernel.GENERIC: pccard: card inserted, slot 0
 Aug 26 12:58:59 droopy pccardd[219]: Card "Linksys"("EtherFast 10/100 PC Card (PCMPC100)") [] [(null)] matched "Linksys" ("/Ether[Ff]ast 10/100 PC Card \(PCMPC100.*\)/") [(null)] [(null)]
 Aug 26 12:58:59 droopy pccardd[219]: Card "Linksys"("EtherFast 10/100 PC Card (PCMPC100)") [] [(null)] matched "Linksys" ("/Ether[Ff]ast 10/100 PC Card \(PCMPC100.*\)/") [(null)] [(null)]
 Aug 26 12:58:59 droopy pccardd[219]: Card "Linksys"("EtherFast 10/100 PC Card (PCMPC100)") [] [(null)] matched "Linksys" ("/Ether[Ff]ast 10/100 PC Card \(PCMPC100.*\)/") [(null)] [(null)]
 Aug 26 12:58:59 droopy pccardd[219]: Failed to allocate IRQ for Linksys
 Aug 26 12:58:59 droopy pccardd[219]: Failed to allocate IRQ for Linksys
 Aug 26 12:58:59 droopy pccardd[219]: Failed to allocate IRQ for Linksys
 
 So I am stuck with cut'n'pasting this over serial.
 
 ---
 Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
 --------------------------------------------------------
 FreeBSD: The Power To Serve   -   http://www.FreeBSD.org

From: "Geff Hanoian" <boing@boing.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <jedgar@fxp.org>
Cc:  
Subject: Re: kern/30065: [f: 4.4] pcic detection causes Fatal trap 12 under 4.4-RC
Date: Thu, 6 Sep 2001 14:49:28 -0700

 I have the same ata controller and I see the same thing (Fatal trap 12 under
 4.4-RC) on a desktop.  I have many crash dumps, from GENERIC, GENERIC with
 the olicom t/r adapter, and a stripped down version.  I can do any diagnosis
 anyone would like.  The hardware is dell optiplex GX1, 500 mhz.    I'm going
 to look for a bios update now.
 
 Thanks for your time.
 
 Geff
 
 P.S.  Sorry about the Outlook express thing.  I was hope submit follup
 wouldn't make me configure this thing just to send one email. :)
 
 -----
 
 atapci0: <Intel PIIX4 ATA33 controller> port 0xffa0-0xffaf at device 7.1 on
 pci0
 ata0: at 0x1f0 irq 14 on atapci0
 ata1: at 0x170 irq 15 on atapci0
 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Fri Feb 1 14:37:19 MST 2002 
State-Changed-Why:  
jedgar says that I fixed this. 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30065 
>Unformatted:
