NetBSD Problem Report #46018

From www@NetBSD.org  Mon Feb 13 17:09:49 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 13B7463E077
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Feb 2012 17:09:49 +0000 (UTC)
Message-Id: <20120213170948.4D7DB63B86B@www.NetBSD.org>
Date: Mon, 13 Feb 2012 17:09:48 +0000 (UTC)
From: tokuda@tokuda.net
Reply-To: tokuda@tokuda.net
To: gnats-bugs@NetBSD.org
Subject: GENERIC kernel does not work with VIA VX900 chipset
X-Send-Pr-Version: www-1.0

>Number:         46018
>Category:       port-i386
>Synopsis:       GENERIC kernel does not work with VIA VX900 chipset
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 13 17:10:00 +0000 2012
>Closed-Date:    Sun Feb 26 17:07:50 +0000 2012
>Last-Modified:  Sun Feb 26 17:07:50 +0000 2012
>Originator:     Hiroshi Tokuda
>Release:        NetBSD 5.99.59
>Organization:
tokuda.net
>Environment:
$ uname -a
NetBSD zbox 5.99.59 NetBSD 5.99.59 (ZBOX) #5: Wed Feb  8 01:15:48 UTC 2012  tokuda@zbox:/root/src/usr/src/sys/arch/i386/compile/obj/ZBOX i386
>Description:
I have been trying to use NetBSD on ZOTAC ZBOX nano VD01.
It has been used VX900 chipset.

The system crashes with kernel panic.

NetBSD 5.99.59 (GENERIC) #0 Sat Dec 24 11:37:01 UTC 2011
	builds@b8.netbsd.org:/home/builds/ab/HEAD/i386/201112290510Z-obj/home/builds/ab/HEAD/src/arch/amd64/compile/GENERIC
total memory = 3327 MB
avail memory = 3259 MB
mainbus0 (root)
cpu0 at mainbus0 apid 0: VIA NANO X2 U4025 @ 1.2 GHz, id 0x6fc
cpu1 at mainbus0 apid 0: VIA NANO X2 U4025 @ 1.2 GHz, id 0x6fc
ioapic0 at mainbus0 apid 3
ioapic0 at mainbus0 apid 4
acpi at mainbus0: Intel ACPICA 20110623
panic: pci_make_tag: bad request
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c0269b64 cs 8 eflags 286 cr2 0 ilevel 8
Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x4: popl    %ebp
db{0}>
>How-To-Repeat:

>Fix:
In pci_mode_detect(), PCI_MODE1_ADDRESS_REG is returned zero.
As a result, pci_mode are treated as 2. 
Finally, it will panic in pci_make_tag.

The VX900 is set to 1 to force the pci_mode, it worked well.

--- ./sys/arch/x86/pci/pci_machdep.c.orig	2012-01-30 20:37:00.000000000 +0000
+++ ./sys/arch/x86/pci/pci_machdep.c	2012-01-30 20:34:23.000000000 +0000
@@ -197,6 +197,8 @@
 	_qe(0, 0, 0, PCI_VENDOR_SIS, PCI_PRODUCT_SIS_740),
 	/* SIS 741 */
 	_qe(0, 0, 0, PCI_VENDOR_SIS, PCI_PRODUCT_SIS_741),
+	/* VIA technology VX900 */
+	_qe(0, 0, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VX900),
 	{0, 0xffffffff} /* patchable */
 };
 #undef _m1tag
--- sys/dev/pci/pcidevs.orig	2012-01-30 20:42:18.000000000 +0000
+++ sys/dev/pci/pcidevs	2012-01-21 08:57:33.000000000 +0000
@@ -4589,6 +4589,7 @@
 product VIATECH VT8363_HB	0x0305	VT8363 (Apollo KT133) Host Bridge
 product VIATECH VT3351_HB_0351	0x0351	VT3351 Host Bridge
 product VIATECH	VT8371_HB	0x0391	VT8371 (Apollo KX133) Host Bridge
+product VIATECH	VX900		0x0410	VX900
 product VIATECH VT8501_MVP4	0x0501	VT8501 (Apollo MVP4) Host Bridge
 product VIATECH VT82C505	0x0505	VT82C505 (Pluto)
 product VIATECH VT82C561	0x0561	VT82C561

>Release-Note:

>Audit-Trail:
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46018 CVS commit: src/sys/dev/pci
Date: Wed, 15 Feb 2012 16:26:00 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Wed Feb 15 16:26:00 UTC 2012

 Modified Files:
 	src/sys/dev/pci: pcidevs

 Log Message:
 Add VIA VX900 Host Bridge, to handle its quirk. PR/46018
 Ok releng@


 To generate a diff of this commit:
 cvs rdiff -u -r1.1101 -r1.1102 src/sys/dev/pci/pcidevs

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46018 CVS commit: src/sys/dev/pci
Date: Wed, 15 Feb 2012 16:27:26 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Wed Feb 15 16:27:26 UTC 2012

 Modified Files:
 	src/sys/dev/pci: pcidevs.h pcidevs_data.h

 Log Message:
 Regen from pcidevs rev 1.1102:
 > Add VIA VX900 Host Bridge, to handle its quirk. PR/46018
 > Ok releng@


 To generate a diff of this commit:
 cvs rdiff -u -r1.1096 -r1.1097 src/sys/dev/pci/pcidevs.h
 cvs rdiff -u -r1.1095 -r1.1096 src/sys/dev/pci/pcidevs_data.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46018 CVS commit: src/sys/arch/x86/pci
Date: Wed, 15 Feb 2012 16:30:29 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Wed Feb 15 16:30:29 UTC 2012

 Modified Files:
 	src/sys/arch/x86/pci: pci_machdep.c

 Log Message:
 Add VIA VX900 host bridge to a buggy PCI mode 1 quirk table.  PR/46018
 Ok releng@


 To generate a diff of this commit:
 cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/pci/pci_machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-i386-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Thu, 16 Feb 2012 01:36:50 +0900
Responsible-Changed-Why:
I committed fixes


State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Thu, 16 Feb 2012 01:36:50 +0900
State-Changed-Why:
Can you confirm?


From: Hiroshi Tokuda <tokuda@tokuda.net>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: port-i386/46018 (GENERIC kernel does not work with VIA VX900
 chipset)
Date: Mon, 27 Feb 2012 00:43:11 +0900

 I confirmed working.

 Thanks to tsutsui-san.

 > Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 >     2006, 2007, 2008, 2009, 2010, 2011, 2012
 >     The NetBSD Foundation, Inc.  All rights reserved.
 > Copyright (c) 1982, 1986, 1989, 1991, 1993
 >     The Regents of the University of California.  All rights reserved.
 > 
 > NetBSD 5.99.65 (GENERIC) #0: Thu Feb 16 18:35:49 UTC 2012
 > 	builds@b8.netbsd.org:/home/builds/ab/HEAD/i386/201202152210Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC
 > total memory = 3327 MB
 > avail memory = 3259 MB
 > timecounter: Timecounters tick every 10.000 msec
 > timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
 > To Be Filled By O.E.M. To Be Filled By O.E.M. (To Be Filled By O.E.M.)
 > mainbus0 (root)
 > cpu0 at mainbus0 apid 0: VIA Nano X2 U4025 @ 1.2 GHz, id 0x6fc
 > cpu1 at mainbus0 apid 2: VIA Nano X2 U4025 @ 1.2 GHz, id 0x6fc
 > ioapic0 at mainbus0 apid 3: pa 0xfec00000, version 3, 24 pins
 > ioapic1 at mainbus0 apid 4: pa 0xfecc0000, version 3, 24 pins
 > acpi0 at mainbus0: Intel ACPICA 20110623
 > acpi0: X/RSDT: OemId <083011,XSDT0920,20110830>, AslId <MSFT,00000097>
 > acpi0: SCI interrupting at int 9
 > timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
 > hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
 > timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
 > NBPE (PNP0C01) at acpi0 not configured
 > acpivga0 at acpi0 (VUMA): ACPI Display Adapter
 > acpiout0 at acpivga0 (CRT, 0x0100): ACPI Display Output Device
 > acpiout1 at acpivga0 (LCD, 0x0110): ACPI Display Output Device
 > acpiout1: brightness levels: 20 30 40 50 60 80 90 100
 > acpiout2 at acpivga0 (TV, 0x0200): ACPI Display Output Device
 > acpiout3 at acpivga0 (DVI, 0x0120): ACPI Display Output Device
 > acpivga0: connected output devices:
 > acpivga0:   0x0100 (acpiout0): Ext. Monitor, head 0, bios detect
 > acpivga0:   0x0110 (acpiout1): LCD Panel, head 0, bios detect
 > acpivga0:   0x0120 (acpiout3): Unknown Output Device, head 0, bios detect
 > acpivga0:   0x0200 (acpiout2): TV, head 0, bios detect
 > acpiacad0 at acpi0 (ACDP, ACPI0003): ACPI AC Adapter
 > attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43
 > pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
 > midi0 at pcppi1: PC speaker
 > sysbeep0 at pcppi1
 > npx1 at acpi0 (COPR, PNP0C04): io 0xf0-0xff irq 13
 > npx1: reported by CPUID; using exception 16
 > CIR (ITE8704) at acpi0 not configured
 > SIOR (PNP0C02) at acpi0 not configured
 > RMSC (PNP0C02) at acpi0 not configured
 > OMSC (PNP0C02) at acpi0 not configured
 > PCIE (PNP0C02) at acpi0 not configured
 > acpibut0 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
 > RMEM (PNP0C01) at acpi0 not configured
 > acpibut1 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
 > apm0 at acpi0: Power Management spec V1.2
 > attimer1: attached to pcppi1
 > pci0 at mainbus0 bus 0: configuration mode 1
 > pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
 > pchb0 at pci0 dev 0 function 0: vendor 0x1106 product 0x0410 (rev. 0x80)
 > pchb1 at pci0 dev 0 function 1: vendor 0x1106 product 0x1410 (rev. 0x00)
 > pchb2 at pci0 dev 0 function 2: vendor 0x1106 product 0x2410 (rev. 0x00)
 > pchb3 at pci0 dev 0 function 3: vendor 0x1106 product 0x3410 (rev. 0x00)
 > pchb4 at pci0 dev 0 function 4: vendor 0x1106 product 0x4410 (rev. 0x00)
 > pchb5 at pci0 dev 0 function 5: vendor 0x1106 product 0x5410 (rev. 0x00)
 > pchb6 at pci0 dev 0 function 6: vendor 0x1106 product 0x6410 (rev. 0x00)
 > pchb7 at pci0 dev 0 function 7: vendor 0x1106 product 0x7410 (rev. 0x00)
 > vga1 at pci0 dev 1 function 0: vendor 0x1106 product 0x7122 (rev. 0x00)
 > wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
 > wsmux1: connecting to wsdisplay0
 > drm at vga1 not configured
 > hdaudio0 at pci0 dev 1 function 1: HD Audio Controller
 > hdaudio0: interrupting at ioapic1 pin 17
 > hdafg0 at hdaudio0: VIA product 9f80
 > hdafg0: HDMI00 2ch: Digital Out [Jack]
 > hdafg0: 2ch/0ch 32000Hz 44100Hz 48000Hz PCM16 PCM24 AC3
 > ppb0 at pci0 dev 3 function 0: vendor 0x1106 product 0xa410 (rev. 0x00)
 > ppb0: PCI Express 2.0 <Root Port of PCI-E Root Complex>
 > pci1 at ppb0 bus 1
 > pci1: i/o space, memory space enabled, rd/line, wr/inv ok
 > ppb1 at pci0 dev 3 function 1: vendor 0x1106 product 0xb410 (rev. 0x00)
 > ppb1: PCI Express 2.0 <Root Port of PCI-E Root Complex>
 > pci2 at ppb1 bus 2
 > pci2: i/o space, memory space enabled, rd/line, wr/inv ok
 > ath0 at pci2 dev 0 function 0: Atheros 9285
 > ath0: interrupting at ioapic1 pin 4
 > ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 > ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 > ath0: mac 192.2 phy 14.0 radio 12.0
 > ppb2 at pci0 dev 3 function 2: vendor 0x1106 product 0xc410 (rev. 0x00)
 > ppb2: PCI Express 2.0 <Root Port of PCI-E Root Complex>
 > pci3 at ppb2 bus 3
 > pci3: i/o space, memory space enabled, rd/line, wr/inv ok
 > vge0 at pci3 dev 0 function 0: VIA VT612X Gigabit Ethernet (rev. 0x82)
 > vge0: interrupting at ioapic1 pin 8
 > vge0: Ethernet address: XX:XX:XX:XX:XX:XX
 > ukphy0 at vge0 phy 22: OUI 0x0009c3, model 0x0019, rev. 0
 > ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
 > ppb3 at pci0 dev 3 function 3: vendor 0x1106 product 0xd410 (rev. 0x00)
 > ppb3: PCI Express 2.0 <Root Port of PCI-E Root Complex>
 > pci4 at ppb3 bus 4
 > pci4: i/o space, memory space enabled, rd/line, wr/inv ok
 > vendor 0x1106 product 0x3432 (USB serial bus, interface 0x30, revision 0x02) at pci4 dev 0 function 0 not configured
 > pchb8 at pci0 dev 3 function 4: vendor 0x1106 product 0xe410 (rev. 0x00)
 > pciide0 at pci0 dev 15 function 0: vendor 0x1106 product 0x9001 (rev. 0x00)
 > pciide0: bus-master DMA support present, but unused (no driver support)
 > pciide0: primary channel configured to native-PCI mode
 > pciide0: using ioapic0 pin 21 for native-PCI interrupt
 > atabus0 at pciide0 channel 0
 > pciide0: secondary channel configured to native-PCI mode
 > atabus1 at pciide0 channel 1
 > uhci0 at pci0 dev 16 function 0: vendor 0x1106 product 0x3038 (rev. 0xa0)
 > uhci0: interrupting at ioapic0 pin 20
 > usb0 at uhci0: USB revision 1.0
 > uhci1 at pci0 dev 16 function 1: vendor 0x1106 product 0x3038 (rev. 0xa0)
 > uhci1: interrupting at ioapic0 pin 22
 > usb1 at uhci1: USB revision 1.0
 > uhci2 at pci0 dev 16 function 2: vendor 0x1106 product 0x3038 (rev. 0xa0)
 > uhci2: interrupting at ioapic0 pin 21
 > usb2 at uhci2: USB revision 1.0
 > uhci3 at pci0 dev 16 function 3: vendor 0x1106 product 0x3038 (rev. 0xa0)
 > uhci3: interrupting at ioapic0 pin 23
 > usb3 at uhci3: USB revision 1.0
 > ehci0 at pci0 dev 16 function 4: vendor 0x1106 product 0x3104 (rev. 0x90)
 > ehci0: interrupting at ioapic0 pin 23
 > ehci0: dropped intr workaround enabled
 > ehci0: EHCI version 1.0
 > ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
 > usb4 at ehci0: USB revision 2.0
 > pcib0 at pci0 dev 17 function 0: vendor 0x1106 product 0x8410 (rev. 0x00)
 > pchb9 at pci0 dev 17 function 7: vendor 0x1106 product 0xa353 (rev. 0x00)
 > ppb4 at pci0 dev 19 function 0: vendor 0x1106 product 0xb353 (rev. 0x00)
 > pci5 at ppb4 bus 5
 > pci5: i/o space, memory space enabled
 > hdaudio1 at pci0 dev 20 function 0: HD Audio Controller
 > hdaudio1: interrupting at ioapic0 pin 17
 > hdafg1 at hdaudio1: VIA VT1708S
 > hdafg1: DAC00 2ch: Speaker [Jack], HP Out [Jack]
 > hdafg1: ADC01 2ch: Mic In [Jack]
 > hdafg1: 2ch/2ch 48000Hz PCM16*
 > audio0 at hdafg1: full duplex, playback, capture, independent
 > isa0 at pcib0
 > pckbc0 at isa0 port 0x60-0x64
 > acpicpu0 at cpu0: ACPI CPU
 > acpicpu0: C1: FFH, lat   1 us, pow  1000 mW
 > acpicpu0: P0: FFH, lat  20 us, pow     0 mW, 1200 MHz
 > acpicpu0: P1: FFH, lat  20 us, pow     0 mW, 1067 MHz
 > viac7temp0 at cpu0: VIA C7 temperature sensor
 > acpicpu1 at cpu1: ACPI CPU
 > viac7temp1 at cpu1: VIA C7 temperature sensor
 > timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 > acpiacad0: AC adapter online.
 > wd0 at atabus0 drive 0
 > wd0: <WDC WD1600BEVT-24A23T0>
 > wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 > wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
 > uhub0 at usb0: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 > uhub0: 2 ports with 2 removable, self powered
 > uhub1 at usb1: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 > uhub1: 2 ports with 2 removable, self powered
 > uhub2 at usb2: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 > uhub2: 2 ports with 2 removable, self powered
 > uhub3 at usb3: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 > uhub3: 2 ports with 2 removable, self powered
 > uhub4 at usb4: vendor 0x1106 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 > uhub4: 8 ports with 8 removable, self powered
 > wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
 > ehci0: handing over full speed device on port 7 to uhci3
 > Kernelized RAIDframe activated
 > boot device: wd0
 > root on wd0a dumps on wd0b
 > root file system type: ffs
 > aubtfwl0 at uhub3 port 1
 > aubtfwl0: ath3k-1.fw open fail 2
 > wsdisplay0: screen 1 added (80x25, vt100 emulation)
 > wsdisplay0: screen 2 added (80x25, vt100 emulation)
 > wsdisplay0: screen 3 added (80x25, vt100 emulation)
 > wsdisplay0: screen 4 added (80x25, vt100 emulation)

State-Changed-From-To: feedback->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Mon, 27 Feb 2012 02:07:50 +0900
State-Changed-Why:
Confirmed by submitter. Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.