NetBSD Problem Report #45719

From www@NetBSD.org  Sat Dec 17 08:19:44 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id C0C5E63C29B
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Dec 2011 08:19:44 +0000 (UTC)
Message-Id: <20111217081944.2CE6063BF13@www.NetBSD.org>
Date: Sat, 17 Dec 2011 08:19:44 +0000 (UTC)
From: jaimef@linbsd.org
Reply-To: jaimef@linbsd.org
To: gnats-bugs@NetBSD.org
Subject: src/sys/next68k/next68k/nextrom.c 1.22 change causes panic on boot
X-Send-Pr-Version: www-1.0

>Number:         45719
>Category:       port-next68k
>Synopsis:       src/sys/next68k/next68k/nextrom.c 1.22 change causes panic on boot
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 17 08:20:01 +0000 2011
>Closed-Date:    Sun Dec 18 03:55:06 +0000 2011
>Last-Modified:  Sun Dec 18 03:55:06 +0000 2011
>Originator:     Jaime Fournier
>Release:        HEAD
>Organization:
Me
>Environment:
HEAD
>Description:
When reverting nextrom.c 1.22 change kernels boot.
Once this change is added it causes panic on boot on next68k 25mhz slab.

>How-To-Repeat:

>Fix:
Revert 1.22 

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-next68k/45719: src/sys/next68k/next68k/nextrom.c 1.22 change
	 causes panic on boot
Date: Sat, 17 Dec 2011 18:48:30 +0900

 > >Synopsis:       src/sys/next68k/next68k/nextrom.c 1.22 change causes panic on boot
  :
 > >Fix:
 > Revert 1.22 

 How about this instead?

 Index: nextrom.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/next68k/next68k/nextrom.c,v
 retrieving revision 1.22
 diff -u -p -r1.22 nextrom.c
 --- nextrom.c	1 Oct 2011 15:59:01 -0000	1.22
 +++ nextrom.c	17 Dec 2011 09:46:11 -0000
 @@ -93,9 +93,9 @@ static char romprint_hextable[] = "01234
  #define ROM_PUTX(v) \
    do { \
      (*MONRELOC(putcptr,MG_putc)) \
 -	(RELOC(romprint_hextable, const char *)[((v)>>4)&0xf]); \
 +	(RELOC(romprint_hextable[0], const char *)[((v)>>4)&0xf]); \
      (*MONRELOC(putcptr,MG_putc)) \
 -	(RELOC(romprint_hextable, const char *)[(v)&0xf]); \
 +	(RELOC(romprint_hextable[0], const char *)[(v)&0xf]); \
  	} while(0);
  #else
  #define lookup_hex(v)  ((v)>9?('a'+(v)-0xa):('0'+(v)))

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: jaimef@mauthesis.com, jaimef@linbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-next68k/45719: src/sys/next68k/next68k/nextrom.c 1.22 changecauses
	 panic on boot
Date: Sun, 18 Dec 2011 02:47:28 +0900

 > > How about this instead?
  :
 > With this patch it still gets an
 > "Exception #3 (0xc) at 0x1000374"

 Ah, ok, please try this one:

 Index: nextrom.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/next68k/next68k/nextrom.c,v
 retrieving revision 1.22
 diff -u -p -r1.22 nextrom.c
 --- nextrom.c	1 Oct 2011 15:59:01 -0000	1.22
 +++ nextrom.c	17 Dec 2011 17:44:02 -0000
 @@ -93,9 +93,9 @@ static char romprint_hextable[] = "01234
  #define ROM_PUTX(v) \
    do { \
      (*MONRELOC(putcptr,MG_putc)) \
 -	(RELOC(romprint_hextable, const char *)[((v)>>4)&0xf]); \
 +      (RELOC(romprint_hextable[((v)>>4)&0xf], char)); \
      (*MONRELOC(putcptr,MG_putc)) \
 -	(RELOC(romprint_hextable, const char *)[(v)&0xf]); \
 +      (RELOC(romprint_hextable[(v)&0xf], char)); \
  	} while(0);
  #else
  #define lookup_hex(v)  ((v)>9?('a'+(v)-0xa):('0'+(v)))

 ---
 Izumi Tsutsui

From: Me Me <jaimef@linbsd.org>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@netbsd.org,
 jaimef@mauthesis.com
Subject: Re: port-next68k/45719: src/sys/next68k/next68k/nextrom.c 1.22 changecauses panic on boot
Date: Sat, 17 Dec 2011 13:11:14 -0800

 It works!
 I tested this on latest HEAD and it works.
 Thanks for the quick fix.

 On Dec 17, 2011, at 9:47 AM, Izumi Tsutsui wrote:

 >>> How about this instead?
 > :
 >> With this patch it still gets an
 >> "Exception #3 (0xc) at 0x1000374"
 >
 > Ah, ok, please try this one:
 >
 > Index: nextrom.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/arch/next68k/next68k/nextrom.c,v
 > retrieving revision 1.22
 > diff -u -p -r1.22 nextrom.c
 > --- nextrom.c	1 Oct 2011 15:59:01 -0000	1.22
 > +++ nextrom.c	17 Dec 2011 17:44:02 -0000
 > @@ -93,9 +93,9 @@ static char romprint_hextable[] = "01234
 > #define ROM_PUTX(v) \
 >   do { \
 >     (*MONRELOC(putcptr,MG_putc)) \
 > -	(RELOC(romprint_hextable, const char *)[((v)>>4)&0xf]); \
 > +      (RELOC(romprint_hextable[((v)>>4)&0xf], char)); \
 >     (*MONRELOC(putcptr,MG_putc)) \
 > -	(RELOC(romprint_hextable, const char *)[(v)&0xf]); \
 > +      (RELOC(romprint_hextable[(v)&0xf], char)); \
 > 	} while(0);
 > #else
 > #define lookup_hex(v)  ((v)>9?('a'+(v)-0xa):('0'+(v)))
 >
 > ---
 > Izumi Tsutsui

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45719 CVS commit: src/sys/arch/next68k/next68k
Date: Sun, 18 Dec 2011 03:46:02 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sun Dec 18 03:46:02 UTC 2011

 Modified Files:
 	src/sys/arch/next68k/next68k: nextrom.c

 Log Message:
 PR port-next68k/45719 from Jaime Fournier:
  Fix RELOC() (awful VA -> PA conversion) usage introduced to appease gcc45
  in rev 1.22.


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 src/sys/arch/next68k/next68k/nextrom.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-next68k-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 18 Dec 2011 12:55:06 +0900
Responsible-Changed-Why:
as committer


State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 18 Dec 2011 12:55:06 +0900
State-Changed-Why:
Fixed, 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.