NetBSD Problem Report #50018
From tsutsui@ceres.dti.ne.jp Wed Jul 1 15:22:47 2015
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 0FB01A654B
for <gnats-bugs@gnats.NetBSD.org>; Wed, 1 Jul 2015 15:22:47 +0000 (UTC)
Message-Id: <201507011522.t61FMfAi023366@mirage.localdomain>
Date: Thu, 2 Jul 2015 00:22:41 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: macppc 7.0_RC1 ofwboot fails to load kernel on OF2 machine
X-Send-Pr-Version: 3.95
>Number: 50018
>Category: port-macppc
>Synopsis: macppc 7.0_RC1 ofwboot fails to load kernel
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: port-macppc-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 01 15:25:01 +0000 2015
>Closed-Date: Thu Sep 06 16:20:20 +0000 2018
>Last-Modified: Thu Sep 06 16:20:20 +0000 2018
>Originator: Izumi Tsutsui
>Release: NetBSD 7.0_RC1
>Organization:
>Environment:
System: NetBSD macppc 7.0_RC1
Architecture: powerpc
Machine: macppc
>Description:
ofwboot in NetBSD/macppc 7.0_RC1 fails to load kernel on UMAX Apus2000/200
with OpenFirmware 2.0
Boot from ATA disk:
---
Open Firmware, 2.0
To continue booting the MacOS type:
BYE<return>
To continue booting from the default boot device type:
BOOT<return>
ok
0 > boot
OF_open bootpath=ata/ATA-Disk@0
read stage 2 blocks: 01234. done!
starting stage 2...
>> NetBSD/macppc OpenFirmware Boot, Revision 1.12
Cannot use bootpath
Using boot-device instead
DEFAULT CATCH!, code=FFF00300 at %SRR0: 00E01F2C %SRR1: 00003070
ok
0 >
---
"Using boot-device instead" message is here:
http://nxr.netbsd.org/xref/src/sys/arch/macppc/stand/ofwboot/boot.c?r=1.27#260
so it fails during parsing args or loading a kernel.
Boot 7.0_RC1 ISO from SCSI CD-ROM:
---
Open Firmware, 2.0
To continue booting the MacOS type:
BYE<return>
To continue booting from the default boot device type:
BOOT<return>
ok
0 > boot scsi/sd@3:0
OF_open bootpath=scsi/sd@3
read stage 2 blocks: 0. done!
starting stage 2...
>> NetBSD/macppc OpenFirmware Boot, Revision 1.12
DEFAULT CATCH!, code=FFF00300 at %SRR0: 00E01F34 %SRR1: 00003070
ok
0 >
---
ofwboot taken from NetBSD/macppc 6.1.5 works properly,
even with 7.0_RC1 primary /usr/mdec/bootxx.
>How-To-Repeat:
Install NetBSD/macppc 7.0_RC1 on OF2 machine and boot it.
>Fix:
Not investigated yet. gcc 4.8.x issue?
>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-macppc/50018: macppc 7.0_RC1 ofwboot fails to load kernel
on OF2 machine
Date: Thu, 2 Jul 2015 02:12:32 +0900
> >> NetBSD/macppc OpenFirmware Boot, Revision 1.12
> Cannot use bootpath
> Using boot-device instead
> DEFAULT CATCH!, code=FFF00300 at %SRR0: 00E01F2C %SRR1: 00003070
0xE01F2C is in dealloc():
http://nxr.netbsd.org/xref/src/sys/arch/macppc/stand/ofwboot/alloc.c?r=1.10#207
Reverting Locore.c rev 1.25 (601 support) fixes this problem.
http://mail-index.netbsd.org/source-changes/2014/02/26/msg052077.html
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/stand/ofwboot/Locore.c#rev1.25
Something wrong BAT mapping in 603 case?
---
Izumi Tsutsui
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-macppc/50018: macppc 7.0_RC1 ofwboot fails to load kernelon
OF2 machine
Date: Thu, 2 Jul 2015 02:40:42 +0900
> Reverting Locore.c rev 1.25 (601 support) fixes this problem.
> http://mail-index.netbsd.org/source-changes/2014/02/26/msg052077.html
> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/stand/ofwboot/Locore.c#rev1.25
>
> Something wrong BAT mapping in 603 case?
Looks a careless bug in the rev.
The following diff makes ofwboot work again.
Index: Locore.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/stand/ofwboot/Locore.c,v
retrieving revision 1.25
diff -u -p -d -r1.25 Locore.c
--- Locore.c 26 Feb 2014 21:42:40 -0000 1.25
+++ Locore.c 1 Jul 2015 17:34:46 -0000
@@ -75,6 +75,7 @@ __asm(
" cmpi 0,1,%r0,0x02 \n" /* 601 CPU = 0x0001 */
" blt 1f \n" /* skip over non-601 BAT setup */
/*non PPC 601 BATs*/
+" li %r0,0 \n"
" mtibatu 0,%r0 \n"
" mtibatu 1,%r0 \n"
" mtibatu 2,%r0 \n"
@@ -93,7 +94,8 @@ __asm(
" b 2f \n"
/* PPC 601 BATs*/
-"1: mtibatu 0,%r0 \n"
+"1: li %r0,0 \n"
+" mtibatu 0,%r0 \n"
" mtibatu 1,%r0 \n"
" mtibatu 2,%r0 \n"
" mtibatu 3,%r0 \n"
---
Izumi Tsutsui
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50018 CVS commit: src/sys/arch/macppc/stand/ofwboot
Date: Sun, 26 Jul 2015 14:24:29 +0000
Module Name: src
Committed By: tsutsui
Date: Sun Jul 26 14:24:29 UTC 2015
Modified Files:
src/sys/arch/macppc/stand/ofwboot: Locore.c
Log Message:
Don't set garbages into BAT registers, which was broken in rev 1.25.
Should fix PR port-macppc/50018 (though there is no response for 3 weeks),
and should be pulled up to netbsd-7.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/macppc/stand/ofwboot/Locore.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50018 CVS commit: [netbsd-7] src/sys/arch/macppc/stand/ofwboot
Date: Thu, 30 Jul 2015 10:22:12 +0000
Module Name: src
Committed By: martin
Date: Thu Jul 30 10:22:12 UTC 2015
Modified Files:
src/sys/arch/macppc/stand/ofwboot [netbsd-7]: Locore.c
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #893):
sys/arch/macppc/stand/ofwboot/Locore.c: revision 1.26
Don't set garbages into BAT registers, which was broken in rev 1.25.
Should fix PR port-macppc/50018 (though there is no response for 3 weeks),
and should be pulled up to netbsd-7.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.4.1 src/sys/arch/macppc/stand/ofwboot/Locore.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->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 06 Sep 2015 00:43:04 +0000
State-Changed-Why:
is this fully fixed?
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: dholland@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-macppc/50018 (macppc 7.0_RC1 ofwboot fails to load kernel)
Date: Sun, 6 Sep 2015 14:09:45 +0900
> is this fully fixed?
Fixed confirmed on 603, but waiting feedback from
the author (or persons who knows about the BAT settings)
and other 601/604/750/74xx users.
---
Izumi Tsutsui
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 06 Sep 2015 05:59:00 +0000
State-Changed-Why:
ok, close it when you're satisfied...
From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-macppc/50018 (macppc 7.0_RC1 ofwboot fails to load kernel)
Date: Sun, 6 Sep 2015 10:54:12 -0400
For the 601 this change works, though there still other changes needed
in PR 48600 for the 601 to boot of the disk.
Thanks
State-Changed-From-To: open->closed
State-Changed-By: scole@NetBSD.org
State-Changed-When: Thu, 06 Sep 2018 09:20:20 -0700
State-Changed-Why:
This looks like it can be closed. If there are still issues feel free to re-open or submit another PR. Thanks for finding and fixing!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.