NetBSD Problem Report #37787

From martin@duskware.de  Thu Jan 17 11:04:23 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 0330063BE3D
	for <gnats-bugs@gnats.netbsd.org>; Thu, 17 Jan 2008 11:04:22 +0000 (UTC)
Message-Id: <20080117070615.E243763BE3D@narn.NetBSD.org>
Date: Thu, 17 Jan 2008 07:06:15 +0000 (UTC)
From: dlagno@rambler.ru
Reply-To: dlagno@rambler.ru
To: netbsd-bugs-owner@NetBSD.org
Subject: diagnostic panic in sys/arch/x86/pci/pci_machdep.c
X-Send-Pr-Version: www-1.0

>Number:         37787
>Category:       port-i386
>Synopsis:       diagnostic panic in sys/arch/x86/pci/pci_machdep.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mrg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 17 11:42:24 +0000 2008
>Closed-Date:    Sat Oct 01 21:52:15 +0000 2016
>Last-Modified:  Sat Oct 01 21:55:00 +0000 2016
>Originator:     Denis Lagno
>Release:        netbsd 4.99.49
>Organization:
>Environment:
NetBSD 4.99.49 (FLAM) #0: Wed Jan 16 22:43:48 MSK 2008

$ ident src/sys/arch/x86/pci/pci_machdep.c
src/sys/arch/x86/pci/pci_machdep.c:
     $NetBSD: pci_machdep.c,v 1.31 2008/01/14 18:44:17 dyoung Exp $
     $NetBSD: pci_machdep.c,v 1.31 2008/01/14 18:44:17 dyoung Exp $

Intel 82443BX Host Bridge/Controller
>Description:
DIAGNOSTIC kernel panics during boot:

booting hd0a:netbsd.gz
9931252+409572+511628 [479472+468091]=0xb42758
kernel text is mapped with 2 large pages and 634 normal pages
Loaded initial symtab at 0xc0b5ae70, strtab at 0xc0bd02dc, # entries 28341
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    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 4.99.49 (FLAM) #0: Wed Jan 16 22:43:48 MSK 2008
        dina@flam.gado:/volatile/worksrc/netbsd-current/obj/sys/arch/i386/compile/FLAM
total memory = 895 MB
avail memory = 865 MB
Generic PC
mainbus0 (root)
mainbus0: scanning 0x9fc00 to 0x9fff0 for MP signature
mainbus0: scanning 0xf0000 to 0xffff0 for MP signature
mainbus0: MP floating pointer found in bios at 0xf6ef0
mainbus0: MP config table at 0xf6ae4, 252 bytes long
cpu0 at mainbus0 apid 1: (boot processor)
cpu0: Intel Pentium III (686-class), 551.27 MHz, id 0x673
cpu1 at mainbus0 apid 0: (application processor)
cpu1: Intel Pentium III (686-class), 551.29 MHz, id 0x673
ioapic0 at mainbus0 apid 2, virtual wire mode
acpi0 at mainbus0: Advanced Configuration and Power Interface
mpacpi: could not get bus number, assuming bus 0
mpacpi: found root PCI bus 0 at level 1
mpacpi: 1 PCI busses
mpacpi: ISA interrupt override 0 -> 2 (0/1)
mpacpi: ISA interrupt override 9 -> 20 (1/3)
mpacpi: configuring PCI bus 0 int routing
ioapic0: pin 2 attached to isa0 irq 0 (type 0<type=0> flags 4<pol=0,trig=1=Edge>)
ioapic0: pin 1 attached to isa0 irq 1 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 3 attached to isa0 irq 3 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 4 attached to isa0 irq 4 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 5 attached to isa0 irq 5 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 6 attached to isa0 irq 6 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 7 attached to isa0 irq 7 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 8 attached to isa0 irq 8 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 20 attached to isa0 irq 9 (type 0<type=0> flags d<pol=1=Act Hi,trig=3=Level>)
ioapic0: pin 10 attached to isa0 irq 10 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 11 attached to isa0 irq 11 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 12 attached to isa0 irq 12 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 13 attached to isa0 irq 13 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 14 attached to isa0 irq 14 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 15 attached to isa0 irq 15 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: pin 16 attached to pci0 device 12 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 12 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 12 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 12 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 11 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 11 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 11 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 16 attached to pci0 device 11 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 10 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 10 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 16 attached to pci0 device 10 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 10 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 9 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 16 attached to pci0 device 9 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 9 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 9 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 6 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 16 attached to pci0 device 6 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 6 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 6 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 16 attached to pci0 device 4 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 4 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 4 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 4 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 16 attached to pci0 device 1 INT_A (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 17 attached to pci0 device 1 INT_B (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 18 attached to pci0 device 1 INT_C (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: pin 19 attached to pci0 device 1 INT_D (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: int20 8050<vector=50,delmode=0,level,dest=0> 1000000<target=1>
ACPI-Safe 24-bit timer
CPU (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
CPU1 (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
MEM (PNP0C01) [System Board] at acpi0 not configured
LNKA (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LNKB (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LNKD (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
PCI0 (PNP0A03) [PCI/PCI-X Host Bridge] at acpi0 not configured
SYSR (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
PIC (PNP0000) [AT Interrupt Controller] at acpi0 not configured
DMA1 (PNP0200) [AT DMA Controller] at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): AT Timer
attimer1: io 0x40-0x43 irq 0
RTC (PNP0B00) [AT Real-Time Clock] at acpi0 not configured
pcppi1 at acpi0 (SPKR, PNP0800)
pcppi1: io 0x61
midi0 at pcppi1: PC speaker (CPU-intensive output)
sysbeep0 at pcppi1
npx1 at acpi0 (COPR, PNP0C04)
npx1: io 0xf0-0xff irq 13
ECP (PNP0401) [ECP printer port] at acpi0 not configured
UAR1 (PNP0501) [16550A-compatible COM port] at acpi0 not configured
UAR2 (PNP0501) [16550A-compatible COM port] at acpi0 not configured
pckbc1 at acpi0 (PS2K, PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
apm0 at acpi0: Power Management spec V1.2
pcppi1: attached to attimer1
pckbdprobe: reset error 5
pmsprobe: reset error 5
pci0 at mainbus0 bus 0: configuration mode 1mainbus0: added to list as bus 0

pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
agp0 at pchb0panic: kernel diagnostic assertion "(reg & 0x3) == 0" failed: file "/volatile/worksrc/netbsd-current/src/sys/arch/x86/pci/pci_machdep.c", line 432
panic: i82489_icr_wait: busy
panic: i82489_icr_wait: busy



Previously before regression kernel booted fine:
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)

>How-To-Repeat:
boot kernel on Intel 82443BX Host Bridge/Controller (rev. 0x03)
>Fix:

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/37787: diagnostic panic in sys/arch/x86/pci/pci_machdep.c
Date: Thu, 17 Jan 2008 12:49:23 +0100

 This is an unaligned pci config space access:

 pchb.c:#define  I82443BX_SDRAMC_REG     0x76
 pchb.c:#define I82424_CPU_BCTL_REG              0x53

 both of those are illegal.

 Martin

Responsible-Changed-From-To: port-i386-maintainer->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Sat, 24 Sep 2016 23:29:58 +0000
Responsible-Changed-Why:
i have a patch that shoudl fix it.


State-Changed-From-To: open->feedback
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sat, 24 Sep 2016 23:29:58 +0000
State-Changed-Why:
potential fix has been provided.


From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/37787: diagnostic panic in sys/arch/x86/pci/pci_machdep.c
Date: Sun, 25 Sep 2016 09:29:14 +1000

 i suspect this patch (against -current) would help.  anyone have
 this hardware still?


 .mrg.


 Index: sys/arch/x86/pci/pchb.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/x86/pci/pchb.c,v
 retrieving revision 1.34
 diff -p -u -r1.34 pchb.c
 --- sys/arch/x86/pci/pchb.c	16 Apr 2012 04:57:42 -0000	1.34
 +++ sys/arch/x86/pci/pchb.c	24 Sep 2016 23:28:39 -0000
 @@ -61,13 +61,13 @@ __KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.3
  #define	I82443BX_SDRAMC_REG	0x74 /* upper 16 bits */

  /* XXX should be in dev/ic/i82424{reg.var}.h */
 -#define I82424_CPU_BCTL_REG		0x53
 +#define I82424_CPU_BCTL_REG		0x50 /* upper 8 bits */
  #define I82424_PCI_BCTL_REG		0x54

 -#define I82424_BCTL_CPUMEM_POSTEN	0x01
 -#define I82424_BCTL_CPUPCI_POSTEN	0x02
 -#define I82424_BCTL_PCIMEM_BURSTEN	0x01
 -#define I82424_BCTL_PCI_BURSTEN		0x02
 +#define I82424_BCTL_CPUMEM_POSTEN	0x01000000
 +#define I82424_BCTL_CPUPCI_POSTEN	0x02000000
 +#define I82424_BCTL_PCIMEM_BURSTEN	0x01000000
 +#define I82424_BCTL_PCI_BURSTEN		0x02000000

  static int	pchbmatch(device_t, cfdata_t, void *);
  static void	pchbattach(device_t, device_t, void *);

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/37787: diagnostic panic in
 sys/arch/x86/pci/pci_machdep.c
Date: Sun, 25 Sep 2016 18:18:24 -0400

 On Sun, 25 Sep 2016, at 09:29:14 +1000, matthew green wrote:
 >i suspect this patch (against -current) would help.  anyone have
 >this hardware still?

 I still have a mothballed machine with a 82443BX (rev. 0x02). If the
 original submitter can't test, I could give it a try.

 Dave

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/37787: diagnostic panic in
 sys/arch/x86/pci/pci_machdep.c
Date: Wed, 28 Sep 2016 10:20:12 +0000

 On Sun, Sep 25, 2016 at 10:20:01PM +0000, David H. Gutteridge wrote:
  >  On Sun, 25 Sep 2016, at 09:29:14 +1000, matthew green wrote:
  >  >i suspect this patch (against -current) would help.  anyone have
  >  >this hardware still?
  >  
  >  I still have a mothballed machine with a 82443BX (rev. 0x02). If the
  >  original submitter can't test, I could give it a try.

 With a PR this old, it's a good bet the original submitter's not
 reachable.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/37787: diagnostic panic in
 sys/arch/x86/pci/pci_machdep.c
Date: Fri, 30 Sep 2016 02:23:48 -0400

 On Sun, 2016-09-25 at 18:18 -0400, David H. Gutteridge wrote:
 > On Sun, 25 Sep 2016, at 09:29:14 +1000, matthew green wrote:
 > > 
 > > i suspect this patch (against -current) would help.  anyone have
 > > this hardware still?
 > 
 > I still have a mothballed machine with a 82443BX (rev. 0x02). If the
 > original submitter can't test, I could give it a try.
 > 

 I tried out a 7.99.39 MONOLITHIC kernel (which I see has DIAGNOSTIC
 enabled), and could not duplicate the panic. It booted fine both with
 the version of pchb.c in the -current tree and with the patch supplied
 by mrg@ in this PR. Either my rev. 0x02 82443BX varies significantly
 from the original submitter's rev. 0x03 in some way, or there's some
 other difference not accounted for.

 Dave

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: mrg@NetBSD.org
Subject: Re: port-i386/37787: diagnostic panic in
 sys/arch/x86/pci/pci_machdep.c
Date: Fri, 30 Sep 2016 14:59:31 +0000

 On Fri, Sep 30, 2016 at 08:55:01AM +0000, David H. Gutteridge wrote:
  >  I tried out a 7.99.39 MONOLITHIC kernel (which I see has DIAGNOSTIC
  >  enabled), and could not duplicate the panic. It booted fine both with
  >  the version of pchb.c in the -current tree and with the patch supplied
  >  by mrg@ in this PR. Either my rev. 0x02 82443BX varies significantly
  >  from the original submitter's rev. 0x03 in some way, or there's some
  >  other difference not accounted for.

 Well, the original report's from 2008; that's probably the critical
 issue.

 sounds like the patch should probably be committed, though.

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: feedback->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sat, 01 Oct 2016 21:52:15 +0000
State-Changed-Why:
i commited what should be a fix.


From: "matthew green" <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37787 CVS commit: src/sys/arch/x86/pci
Date: Sat, 1 Oct 2016 21:51:53 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Sat Oct  1 21:51:53 UTC 2016

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

 Log Message:
 use 4-byte style accesses, should hopefully fix PR#37787.


 To generate a diff of this commit:
 cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/pci/pchb.c

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

>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.