NetBSD Problem Report #28798

From www@netbsd.org  Tue Dec 28 17:24:54 2004
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id A11BC63B843; Tue, 28 Dec 2004 17:24:54 +0000 (UTC)
Message-Id: <20041228172454.A11BC63B843@narn.netbsd.org>
Date: Tue, 28 Dec 2004 17:24:54 +0000 (UTC)
From: cc@corti-net.de
Reply-To: cc@corti-net.de
To: gnats-bugs@netbsd.org
Subject: Kernel support broken for PMAG-C in 2.0 branch
X-Send-Pr-Version: www-1.0

>Number:         28798
>Category:       port-pmax
>Synopsis:       Kernel support broken for PMAG-C in 2.0 branch
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    mhitch
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 28 17:27:00 +0000 2004
>Closed-Date:    Sun Jan 02 19:43:42 +0000 2005
>Last-Modified:  Wed Mar 16 19:53:01 +0000 2005
>Originator:     Christian Corti
>Release:        2.0 release
>Organization:
>Environment:
NetBSD/pmax 2.0, DECstation 5000/260 with 96MB RAM, kernel from kern-WSCONS.tgz
>Description:
Kernel is not able to initialize with a PMAG-C as primary video interface. A PMAGB-B (alone or with the PMAG-C as additional card) works flawlessly. Here's the output from the PROM monitor trying to boot the kernel:
>>boot 3/rz0/netbsd_temp -a

NetBSD/pmax 1.6.1 FFS Primary Bootstrap

NetBSD/pmax 2.0 Secondary Bootstrap, Revision 1.5
(builds@build, Wed Dec  1 20:26:28 UTC 2004)

Boot: 3/rz0/netbsd_temp
2900224+426136 [108496+95539]=0x35e178
Starting at 0x80030000

segment  0 start 00000000 size 04800000
segment  1 start 06000000 size 00800000
segment  2 start 08000000 size 00800000
segment  3 start 0a000000 size 00800000
panic: px_init: allocation out of bounds
Begin traceback...
pid 256 trap: TLB miss (load or instr. fetch) in kernel mode
status=0x20000002, cause=0x8, epc=0x8019336c, vaddr=0x0
pid=0 cmd= usp=0x0 ksp=0x80390d50
Stopped in pid 0.1 () at        netbsd:p_find+0x4c:     lw      s0,0(v0)
db>

Taking the additional memory modules out doesn't change anything (I currently have 2x32MB and 4x8 MB). The machine ran fine the last time I tried it with the PMAG-C (release 1.5 beta). The PROM diagnostic routines run without errors.
>How-To-Repeat:
Install a PMAG-C as the only video adapter into your DECstation and try booting any 2.0 kernel (no matter if kernel from kern-WSCONS.tgz or built from sources)
>Fix:

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: cc@corti-net.de
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-pmax/28798: Kernel support broken for PMAG-C in 2.0 branch
Date: Tue, 28 Dec 2004 19:21:26 +0100

 On Tue, Dec 28, 2004 at 05:27:00PM +0000, cc@corti-net.de wrote:
 > Stopped in pid 0.1 () at        netbsd:p_find+0x4c:     lw      s0,0(v0)
 > db>

 Could you please tell us the output of the "tr" (trace) command at the db>
 prompt?

 Martin

From: Christian Corti <cc@corti-net.de>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-pmax/28798: Kernel support broken for PMAG-C in 2.0 branch
Date: Wed, 29 Dec 2004 15:23:15 +0100 (CET)

 On Tue, 28 Dec 2004, Martin Husemann wrote:
 >> Stopped in pid 0.1 () at        netbsd:p_find+0x4c:     lw      s0,0(v0)
 >> db>
 > Could you please tell us the output of the "tr" (trace) command at the db>
 > prompt?

 Sure:

 db> tr
 p_find+4c (100,c,a004c70,0) ra 8024c260 sz 32
 8024c24c+14 (100,c,a0004c70,0) ra 0 sz 0
 User-level: pid 0.1
 db> dmesg
 panic: px_init: allocation out of bounds
 Begin traceback...
 pid 256 trap: TLB miss (load or instr. fetch) in kernel mode
 status=0x20010002, cause=0x8, epc=0x8019336c, vaddr=0x0
 pid=0 cmd= usp=0x0 ksp=0x80390d50
 trap: TLB miss (load or instr. fetch) in kernel mode
 status=0x2, cause=0x8, epc=0x8024f88c, vaddr=0x0
 pid=0 cmd= usp=0x0 ksp=0x80390c60
 trap: TLB miss (load or instr. fetch) in kernel mode
 status=0x2, cause=0x8, epc=0x8024f88c, vaddr=0x0
 pid=0 cmd= usp=0x0 ksp=0x80390b70
 panic: px_init: allocation out of bounds
 Begin traceback...
 pid 256 trap: TLB miss (load or instr. fetch) in kernel mode
 status=0x20010002, cause=0x8, epc=0x8019336c, vaddr=0x0
 pid=0 cmd= usp=0x0 ksp=0x80390d50
 db>

 I've tried some more things within the debugger (after a fresh failing 
 reboot):

 db> show registers
 at          0
 v0          0
 v1          0
 a0          0x100
 a1          0xc
 a2          0xa0004c70
 a3          0
 t0          0x80390df8  stic_consinfo+0x35418
 t1          0xc2
 t2          0x1
 t3          0x1
 t4          0
 t5          0
 t6          0x15
 t7          0xbe200000
 s0          0x100
 s1          0xc
 s2          0x100
 s3          0x8034dcf0  proc0
 s4          0x8070ff40  stic_consinfo+0x3b4560
 s5          0x1
 s6          0
 s7          0x80390870  stic_consinfo+0x34e90
 t8          0x4
 t9          0x4
 k0          0
 k1          0
 gp          0x802fc0e0  fpu_id+0x7fe8
 sp          0x80390dd0  stic_consinfo+0x353f0
 fp          0x100
 ra          0x80193350  p_find+0x30
 sr          0x20000002
 mdlo        0x70
 mdhi        0
 bad         0
 cs          0
 pc          0x8019336c  p_find+0x4c
 netbsd:p_find+0x4c:     lw      s0,0(v0)
 db> show map
 trap: TLB miss (load or instr. fetch) in kernel mode
 status=0x2, cause=0x8, epc=0x8023e354, vaddr=0x0
 pid=0 cmd= usp=0x0 ksp=0x80390ab0
 Stopped in pid 0.1 () at        netbsd:uvm_map_printit+0x1c:    lw    a3,80(a0)
 db> tr
 8023deb0+4a4 (0,0,801b5b7c,0) ra 80165478 sz 0
 80165160+318 (0,0,801b5b7c,0) ra 0 sz 0
 User-level: pid 0.1
 db>

 [...] (reboot)

 db> show pool
 POOLtrap: TLB miss (load or instr. fetch) in kernel mode
 status=0x2, cause=0x8, epc=0x802ac9b4, vaddr=0x240
 pid=0 cmd= usp=0x0 ksp=0x80390a00
   Stopped in pid 0.1 () at   netbsd:strlen+0x4:      lb      v0,0(a0)
 db> show map
 [...] (see above)
 db> tr
 [...] (see above)
 db> show pool
 POOL : size 2384658604, align 2384789648, ioff 2384855188, roflags 0x1211003a
          alloc 0x8ca60008
          minitems 2384920728, minpages 1006927917, maxpages 612654484, 
 npages 2946629648
          itemsperpage 37812233, nitems 2384789504, nout 1006927917, 
 hardlimit 612654536
          nget 2382757968, nfail 0, nput 2946891808
          npagealloc 2382495820, npagefree 0, hiwat 2946629668, nidle 
 2382757920
 db>

 Hope this will help a little bit...

 Christian Corti

From: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
To: cc@corti-net.de
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-pmax/28798: Kernel support broken for PMAG-C in 2.0 branch
Date: Sat, 1 Jan 2005 21:32:50 -0700 (MST)

 On Tue, 28 Dec 2004 cc@corti-net.de wrote:

 > panic: px_init: allocation out of bounds

   Can you try the following patch to src/sys/dev/tc/px.c?

 Index: px.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/tc/px.c,v
 retrieving revision 1.21
 diff -u -r1.21 px.c
 --- px.c        27 Oct 2003 07:07:35 -0000      1.21
 +++ px.c        1 Jan 2005 04:52:22 -0000
 @@ -202,7 +202,7 @@
                  * directly from vm_physmem[].
                  */
                 bva = (caddr_t)uvm_pageboot_alloc(PX_BUF_SIZE + PX_BUF_ALIGN);
 -               bpa = (STIC_KSEG_TO_PHYS(kva) + PX_BUF_ALIGN - 1) &
 +               bpa = (STIC_KSEG_TO_PHYS(bva) + PX_BUF_ALIGN - 1) &
                     ~(PX_BUF_ALIGN - 1);
                 if (bpa + PX_BUF_SIZE > 8192*1024)
                         panic("px_init: allocation out of bounds");

 --
 Michael L. Hitch			mhitch@montana.edu
 Computer Consultant
 Information Technology Center
 Montana State University	Bozeman, MT	USA

From: Christian Corti <cc@corti-net.de>
To: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-pmax/28798: Kernel support broken for PMAG-C in 2.0 branch
Date: Sun, 2 Jan 2005 12:56:31 +0100 (CET)

 On Sat, 1 Jan 2005, Michael L. Hitch wrote:
 >  Can you try the following patch to src/sys/dev/tc/px.c?
 [...]

 Thank you, this solved the problem. The PMAG-C is working fine now (except 
 for the very slow speed of the X server).

 Christian Corti

From: "Michael L. Hitch" <mhitch@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28798 CVS commit: src/sys/dev/tc
Date: Sun,  2 Jan 2005 19:25:56 +0000 (UTC)

 Module Name:	src
 Committed By:	mhitch
 Date:		Sun Jan  2 19:25:56 UTC 2005

 Modified Files:
 	src/sys/dev/tc: px.c

 Log Message:
 Fix a 3 year old error which caused px_init() to fail.  Fixes PR 28798.


 To generate a diff of this commit:
 cvs rdiff -r1.21 -r1.22 src/sys/dev/tc/px.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-pmax-maintainer->mhitch
Responsible-Changed-By: mhitch@netbsd.org
Responsible-Changed-When: Sun, 02 Jan 2005 19:43:42 +0000
Responsible-Changed-Why:
I had a fix for this problem.


State-Changed-From-To: open->closed
State-Changed-By: mhitch@netbsd.org
State-Changed-When: Sun, 02 Jan 2005 19:43:42 +0000
State-Changed-Why:
Problem has been fixed.


From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28798 CVS commit: [netbsd-2-0] src/sys/dev/tc
Date: Wed, 16 Mar 2005 19:52:30 +0000 (UTC)

 Module Name:	src
 Committed By:	tron
 Date:		Wed Mar 16 19:52:30 UTC 2005

 Modified Files:
 	src/sys/dev/tc [netbsd-2-0]: px.c

 Log Message:
 Pull up revision 1.22 (requested by mhitch in ticket #1063):
 Fix a 3 year old error which caused px_init() to fail.  Fixes PR 28798.


 To generate a diff of this commit:
 cvs rdiff -r1.21 -r1.21.2.1 src/sys/dev/tc/px.c

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

From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28798 CVS commit: [netbsd-2] src/sys/dev/tc
Date: Wed, 16 Mar 2005 19:52:33 +0000 (UTC)

 Module Name:	src
 Committed By:	tron
 Date:		Wed Mar 16 19:52:33 UTC 2005

 Modified Files:
 	src/sys/dev/tc [netbsd-2]: px.c

 Log Message:
 Pull up revision 1.22 (requested by mhitch in ticket #1063):
 Fix a 3 year old error which caused px_init() to fail.  Fixes PR 28798.


 To generate a diff of this commit:
 cvs rdiff -r1.21 -r1.21.6.1 src/sys/dev/tc/px.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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.