NetBSD Problem Report #42958
From martin@aprisoft.de Thu Mar 11 15:07:44 2010
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 9DB0763B8DE
for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Mar 2010 15:07:44 +0000 (UTC)
Message-Id: <20100311150737.1318CAF581B@emmas.aprisoft.de>
Date: Thu, 11 Mar 2010 16:07:37 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: booting from CD does not work with current boot blocks
X-Send-Pr-Version: 3.95
>Number: 42958
>Category: port-sparc64
>Synopsis: booting from CD does not work with current boot blocks
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: eeh
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 11 15:10:00 +0000 2010
>Closed-Date: Fri Mar 12 23:11:16 +0000 2010
>Last-Modified: Fri Mar 12 23:11:16 +0000 2010
>Originator: Martin Husemann
>Release: NetBSD 5.99.24
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 5.99.24 NetBSD 5.99.24 (NELLY.MP) #121: Sun Mar 7 23:20:20 CET 2010 martin@emmas.aprisoft.de:/nelly/usr/src/sys/arch/sparc64/compile/NELLY.MP sparc64
Architecture: sparc64
Machine: sparc64
>Description:
The current bootblock is unable to boot the standard CD setup (f partition
with ffs file system containing /ofwboot and /netbsd), it complains about
a residual trying to read an inode.
>How-To-Repeat:
Download a NetBSD-daily CD image and try to boot it.
>Fix:
Looks like d<< doesn't like to shift by zero:
{0} ok 1 0 0 d<<
: d<< ( 1 0 0 )
tuck ( 1 0 0 0 )
lshift ( 1 0 0 )
-rot ( 0 1 0 )
2dup ( 0 1 0 1 0 )
lshift ( 0 1 0 1 )
-rot ( 0 1 1 0 )
20 ( 0 1 1 0 20 )
swap ( 0 1 1 20 0 )
- ( 0 1 1 20 )
lrshift ( 0 1 1 )
rot ( 1 1 0 )
+ ( 1 1 )
exit
{0} ok
So handle that explicitly:
RCS file: /cvsroot/src/sys/arch/sparc/stand/bootblk/bootblk.fth,v
retrieving revision 1.11
diff -c -p -u -r1.11 bootblk.fth
cvs diff: conflicting specifications of output style
--- bootblk.fth 17 Feb 2010 15:49:19 -0000 1.11
+++ bootblk.fth 11 Mar 2010 19:22:27 -0000
@@ -85,15 +85,19 @@ here h# ffff over l! <w@ constant little
: d-and ( d1 d2 -- d1-and-d2 ) rot and -rot and swap ;
: d*u ( d1 u -- d2 ) tuck um* drop -rot um* rot + ;
: d<< ( d1 n -- d1<<n ) \ Hope this works
- tuck << ( d.lo n d.hi' )
- -rot 2dup << ( d.hi' d.lo n d.lo' )
- -rot d# 32 swap - >> ( d.hi' d.lo' lo.hi )
- rot +
+ ?dup if \ Shifting by 0 doesn't appear to work properly.
+ tuck << ( d.lo n d.hi' )
+ -rot 2dup << ( d.hi' d.lo n d.lo' )
+ -rot d# 32 swap - >> ( d.hi' d.lo' lo.hi )
+ rot +
+ then
;
: d>> ( d1 n -- d1>>n ) \ Hope this works
- rot over >> -rot ( d.lo' d.hi n )
- 2dup >> -rot ( d.lo' d.hi' d.hi n )
- d# 32 swap - << rot + swap
+ ?dup if \ Shifting by 0 doesn't appear to work properly.
+ rot over >> -rot ( d.lo' d.hi n )
+ 2dup >> -rot ( d.lo' d.hi' d.hi n )
+ d# 32 swap - << rot + swap
+ then
;
: d> ( d1 d2 -- d1>d2? )
rot swap 2dup = if
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-sparc64-maintainer->eeh
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Thu, 11 Mar 2010 15:13:39 +0000
Responsible-Changed-Why:
Eduardo, could you please have a look?
If you don't have time right now, please assig the PR back to me.
Thanks!
State-Changed-From-To: open->feedback
State-Changed-By: eeh@NetBSD.org
State-Changed-When: Thu, 11 Mar 2010 19:29:37 +0000
State-Changed-Why:
Problem fixed.
State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Fri, 12 Mar 2010 23:11:16 +0000
State-Changed-Why:
yep, works for me too
>Unformatted:
(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.