NetBSD Problem Report #46293

From www@NetBSD.org  Thu Apr  5 01:43:22 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 D8AA963BBEC
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  5 Apr 2012 01:43:22 +0000 (UTC)
Message-Id: <20120405014321.ECC4C63B946@www.NetBSD.org>
Date: Thu,  5 Apr 2012 01:43:21 +0000 (UTC)
From: isaki@NetBSD.org
Reply-To: isaki@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: 6.0_BETA/x68k can't boot from HDD
X-Send-Pr-Version: www-1.0

>Number:         46293
>Category:       port-x68k
>Synopsis:       6.0_BETA/x68k can't boot from HDD
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-x68k-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 05 01:45:00 +0000 2012
>Closed-Date:    Tue Apr 10 20:11:55 +0000 2012
>Last-Modified:  Tue Apr 10 20:11:55 +0000 2012
>Originator:     Tetsuya Isaki
>Release:        NetBSD 6.0_BETA/x68k
>Organization:
NetBSD
>Environment:
6.0_BETA/x68k (no uname because it cannot boot)
>Description:
Because mboot which is primary boot loader on HDD is corrupted,
6.0_BETA/x68k can't boot from HDD.

Here is a disassemble source of __asm() of IOCS_S_READEXT()
inline function.  trap#15 with %d0=#245, %d1=#38 is
X68000's SCSI IOCS (service call) _S_READEXT.  For this call
%d4 should contain SCSI ID, but %d4 = %d3 = %d6 = (8>>size)??
in this asm.  Therefore this service call fails and mboot will
exit.

 1ac:   7c08            moveq #8,%d6
 1ae:   e8a6            asrl %d4,%d6          ; %d6 <- (8>>size)
 1b0:   48e7 1c00       moveml %d3-%d5,%sp@-
 1b4:   2400            movel %d0,%d2
 1b6:   2606            movel %d6,%d3
 1b8:   2803            movel %d3,%d4         ; %d4 <- %d3 <- %d6
 1ba:   2a04            movel %d4,%d5
 1bc:   227c 0000 2400  moveal #9216,%a1
 1c2:   7226            moveq #38,%d1
 1c4:   203c 0000 00f5  movel #245,%d0
 1ca:   4e4f            trap #15

The source of the same place of NetBSD 5.1 are as follows:

 13c:   7008            moveq #8,%d0
 13e:   e6a0            asrl %d3,%d0          ; %d0 <- (8>>size)
 140:   48e7 1c00       moveml %d3-%d5,%sp@-
 144:   2404            movel %d4,%d2
 146:   2600            movel %d0,%d3         ; %d3 <- (8>>size)
 148:   2805            movel %d5,%d4         ; %d4 <- %d5
 14a:   2a03            movel %d3,%d5
 14c:   227c 0000 2400  moveal #9216,%a1
 152:   7226            moveq #38,%d1
 154:   203c 0000 00f5  movel #245,%d0
 15a:   4e4f            trap #15

>How-To-Repeat:
Install 6.0_BETA/x68k on 'all zero-cleaned' HDD
and reboot from sysinst.
>Fix:
No, at present.

>Release-Note:

>Audit-Trail:
From: "Tetsuya Isaki" <isaki@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46293 CVS commit: src/sys/arch/x68k/stand/mboot
Date: Thu, 5 Apr 2012 12:01:37 +0000

 Module Name:	src
 Committed By:	isaki
 Date:		Thu Apr  5 12:01:37 UTC 2012

 Modified Files:
 	src/sys/arch/x68k/stand/mboot: Makefile mboot.c

 Log Message:
 Use common library libiocs.a.  suggested by tsutsui@.
 o Originally, mboot had an IOCS_S_READEXT() inline function but
   its expansion corrupted (from somewhere after branching netbsd-5).
   This solves PR#46293 by using the common library.
   This problem was reported by Y.Sugahara at NetBSD booth at
   Open Source Conference (OSC) 2012 Ehime in March.
 o As a side effect, it also correct the different problem that
   IOCS_S_READ() calls _S_READEXT not _S_READ.
 Should be pulled up to netbsd-6.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/stand/mboot/Makefile
 cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x68k/stand/mboot/mboot.c

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

State-Changed-From-To: open->closed
State-Changed-By: isaki@NetBSD.org
State-Changed-When: Sat, 07 Apr 2012 13:10:48 +0000
State-Changed-Why:
Fixed in -current.


State-Changed-From-To: closed->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 09 Apr 2012 06:25:00 +0000
State-Changed-Why:
it is pullup-6 #171


From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46293 CVS commit: [netbsd-6] src/sys/arch/x68k/stand
Date: Mon, 9 Apr 2012 18:08:32 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Apr  9 18:08:32 UTC 2012

 Modified Files:
 	src/sys/arch/x68k/stand [netbsd-6]: Makefile
 	src/sys/arch/x68k/stand/mboot [netbsd-6]: Makefile mboot.c

 Log Message:
 Pull up following revision(s) (requested by isaki in ticket #171):
 	sys/arch/x68k/stand/mboot/mboot.c: revision 1.10
 	sys/arch/x68k/stand/mboot/Makefile: revision 1.16
 	sys/arch/x68k/stand/Makefile: revision 1.9
 Use common library libiocs.a.  suggested by tsutsui@.
 o Originally, mboot had an IOCS_S_READEXT() inline function but
   its expansion corrupted (from somewhere after branching netbsd-5).
   This solves PR#46293 by using the common library.
   This problem was reported by Y.Sugahara at NetBSD booth at
   Open Source Conference (OSC) 2012 Ehime in March.
 o As a side effect, it also correct the different problem that
   IOCS_S_READ() calls _S_READEXT not _S_READ.
 Should be pulled up to netbsd-6.
 mboot now depends on libiocs. noticed by tsutsui@.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.8.162.1 src/sys/arch/x68k/stand/Makefile
 cvs rdiff -u -r1.15 -r1.15.20.1 src/sys/arch/x68k/stand/mboot/Makefile
 cvs rdiff -u -r1.9 -r1.9.8.1 src/sys/arch/x68k/stand/mboot/mboot.c

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

State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 10 Apr 2012 20:11:55 +0000
State-Changed-Why:
Pulled up to -6.


>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.