NetBSD Problem Report #46466

From he@smistad.uninett.no  Sat May 19 13:32:16 2012
Return-Path: <he@smistad.uninett.no>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 7BADC63B882
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 19 May 2012 13:32:16 +0000 (UTC)
Message-Id: <20120519133233.1AE663D0B5@smistad.uninett.no>
Date: Sat, 19 May 2012 15:32:33 +0200 (CEST)
From: he@NetBSD.org
Reply-To: he@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: boot -c does not appear to work on sparc64
X-Send-Pr-Version: 3.95

>Number:         46466
>Category:       port-sparc64
>Synopsis:       boot -c does not appear to work on sparc64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 19 13:35:00 +0000 2012
>Closed-Date:    Sat Aug 10 17:59:13 +0000 2013
>Last-Modified:  Sat Aug 10 17:59:13 +0000 2013
>Originator:     Havard Eidnes
>Release:        NetBSD 6.0_BETA
>Organization:
	None.
>Environment:
System: NetBSD torbidinsu.urc.uninett.no 6.0_BETA NetBSD 6.0_BETA (TORBIDINSU) #2: Fri May 18 10:07:11 CEST 2012  he@torbidinsu.urc.uninett.no:/usr/obj/sys/arch/sparc64/compile/TORBIDINSU sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	Neither "boot -c" nor "boot netbsd -c" boot into the userconf
	mode on sparc64.

	The boot code I tested this with was not from 6.0_BETA proper,
	but rather quite a bit older than that, of 5.99.38 vintage:

{0} ok boot netbsd -c
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a  File and args: netbsd -c 
NetBSD IEEE 1275 Multi-FS Bootblock
Version $NetBSD: bootblk.fth,v 1.13 2010/06/24 00:54:12 eeh Exp $
>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.16
=0xc87828
Loading netbsd: 8502920+554984+345616 [608808+396079]=0xdd1c68
prom_get_msgbuf: Cannot recover msgbuf on E250
prom_get_msgbuf: allocated new buf at 00000000
prom_get_msgbuf: claiming new buf at 00000000
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    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 6.0_BETA (TORBIDINSU) #0: Thu May 17 17:55:31 CEST 2012
        he@torbidinsu.urc.uninett.no:/usr/obj/sys/arch/sparc64/compile/TORBIDINSU
...	


	(This is excerpted from PR 46461 and reported separately, as
	requested.)


>How-To-Repeat:
	Do a "boot -c", watch it just continue as if no "-c" had been
	given, even though "options USERCONF" is part of the kernel
	config.

>Fix:
	Sorry, don't know.
	I'll build and install an ofwboot with _DEBUG to see if that
	can reveal some more information.

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sparc64/46466: boot -c does not appear to work on sparc64
Date: Sat, 19 May 2012 17:56:13 +0200

 On Sat, May 19, 2012 at 01:35:01PM +0000, he@NetBSD.org wrote:
 > 	Do a "boot -c", watch it just continue as if no "-c" had been
 > 	given, even though "options USERCONF" is part of the kernel
 > 	config.

 This is because we fetch the flags in get_bootpath_from_prom(), called from
 cpu_configure(), but MI code wants to do the userconf magic right before
 calling that.

 Simple (but slightly hacky) solution would be to check for RB_USERCONF in
 cpu_configure() after fetching the bootpatch and then call userconf_prompt()
 "again" - knowing that we missed it before.

 Martin

Responsible-Changed-From-To: port-sparc64-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Fri, 25 May 2012 10:06:15 +0000
Responsible-Changed-Why:
I have a plan howto fix it...


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46466 CVS commit: src/sys/arch
Date: Mon, 28 May 2012 19:24:31 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon May 28 19:24:30 UTC 2012

 Modified Files:
 	src/sys/arch/sparc/include: bootinfo.h
 	src/sys/arch/sparc/sparc: autoconf.c
 	src/sys/arch/sparc/stand/boot: boot.c
 	src/sys/arch/sparc/stand/ofwboot: boot.c
 	src/sys/arch/sparc64/include: bootinfo.h
 	src/sys/arch/sparc64/sparc64: autoconf.c

 Log Message:
 Pass the "boothowto" from the bootloader to the kernel.
 If (an old) bootloader did not pass the flags, check explicitly if we
 missed RB_USERCONF and invoke userconf_prompt() in MD code, as MI code
 already missed it.
 This fixes PR 46466.


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc/include/bootinfo.h
 cvs rdiff -u -r1.242 -r1.243 src/sys/arch/sparc/sparc/autoconf.c
 cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sparc/stand/boot/boot.c
 cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc/stand/ofwboot/boot.c
 cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc64/include/bootinfo.h
 cvs rdiff -u -r1.185 -r1.186 src/sys/arch/sparc64/sparc64/autoconf.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->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 28 May 2012 19:28:21 +0000
State-Changed-Why:
Waiting for [pullup-6 #289]


From: "Julian Coleman" <jdc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46466 CVS commit: [netbsd-6] src/sys/arch
Date: Tue, 5 Jun 2012 16:22:25 +0000

 Module Name:	src
 Committed By:	jdc
 Date:		Tue Jun  5 16:22:24 UTC 2012

 Modified Files:
 	src/sys/arch/sparc/include [netbsd-6]: bootinfo.h
 	src/sys/arch/sparc/sparc [netbsd-6]: autoconf.c
 	src/sys/arch/sparc/stand/boot [netbsd-6]: boot.c
 	src/sys/arch/sparc/stand/ofwboot [netbsd-6]: boot.c
 	src/sys/arch/sparc64/sparc64 [netbsd-6]: autoconf.c

 Log Message:
 Pull up revisions:
   src/sys/arch/sparc/include/bootinfo.h revision 1.6
   src/sys/arch/sparc/sparc/autoconf.c revision 1.243
   src/sys/arch/sparc/stand/boot/boot.c revision 1.28
   src/sys/arch/sparc/stand/ofwboot/boot.c revision 1.29
   src/sys/arch/sparc64/include/bootinfo.h revision 1.6-1.7
   src/sys/arch/sparc64/sparc64/autoconf.c revision 1.186
 (requested by martin in ticket #289).

 Pass the "boothowto" from the bootloader to the kernel.
 If (an old) bootloader did not pass the flags, check explicitly if we
 missed RB_USERCONF and invoke userconf_prompt() in MD code, as MI code
 already missed it.
 This fixes PR 46466.

 Ooops, remove definitions duplicated in <sparc/bootinfo.h>


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.5.112.1 src/sys/arch/sparc/include/bootinfo.h
 cvs rdiff -u -r1.242 -r1.242.8.1 src/sys/arch/sparc/sparc/autoconf.c
 cvs rdiff -u -r1.27 -r1.27.10.1 src/sys/arch/sparc/stand/boot/boot.c
 cvs rdiff -u -r1.28 -r1.28.10.1 src/sys/arch/sparc/stand/ofwboot/boot.c
 cvs rdiff -u -r1.185 -r1.185.2.1 src/sys/arch/sparc64/sparc64/autoconf.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: snj@NetBSD.org
State-Changed-When: Sat, 10 Aug 2013 17:59:13 +0000
State-Changed-Why:
Pulled up.


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