NetBSD Problem Report #53518

From www@NetBSD.org  Mon Aug 13 18:35:30 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id DF68A7A16B
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Aug 2018 18:35:30 +0000 (UTC)
Message-Id: <20180813183529.077787A218@mollari.NetBSD.org>
Date: Mon, 13 Aug 2018 18:35:29 +0000 (UTC)
From: nullnilaki@gmail.com
Reply-To: nullnilaki@gmail.com
To: gnats-bugs@NetBSD.org
Subject: netbsd-INSTALL32_IP2x.ecoff is broken since NetBSD-4.0.1.
X-Send-Pr-Version: www-1.0

>Number:         53518
>Category:       port-sgimips
>Synopsis:       netbsd-INSTALL32_IP2x.ecoff is broken since NetBSD-4.0.1.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 13 18:40:00 +0000 2018
>Closed-Date:    Fri Nov 16 15:29:15 +0000 2018
>Last-Modified:  Fri Nov 16 15:29:15 +0000 2018
>Originator:     Naruaki Etomi
>Release:        NetBSD/sgimips 8.99.21
>Organization:
Japan
>Environment:
NetBSD  8.99.21 NetBSD 8.99.21 (GENERIC32_IP12) #1: Sun Aug 12 14:48:19 UTC 2018  naruaki@xserve:/usr/obj.sgimips/sys/arch/sgimips/compile/GENERIC32_IP2x sgimips

>Description:
Old Sgi machine (Indigo or Indy) don't understand ELF, so we may need an ECOFF binary.
However, "objcopy -O ecoff-bigmips" is broken.
As a result, netbsd-INSTALL32_IP2x.ecoff is broken.

# file netbsd-INSTALL32_IP2x.ecoff
netbsd-INSTALL32_IP2x.ecoff: MIPSEB ECOFF executable (impure) stripped - version 0.0

>> hinv
                   System: IP20
                Processor: R4000 50 Mhz, with FPU
     Primary I-cache size: 8 Kbytes
     Primary D-cache size: 8 Kbytes
     Secondary cache size: 1024 Kbytes
              Memory size: 144 Mbytes
                 Graphics: LG1
                SCSI Disk: scsi(0)disk(4)


>> bootp()netbsd-INSTALL32_IP2x.ecoff
Obtaining netbsd-INSTALL32_IP2x.ecoff from server xserve
3520504+3743632Exception: <vector=UTLB Miss>
Status register: 0x20004003<CU1,IM7,IPL=???,MODE=KERNEL,EXL,IE>
Cause register: 0x800c<CE=0,IP8,EXC=WMISS>
Exception PC: 0xbfc394ec
Bad address: 0x0
Local I/O interrupt register 0: 0x8 <ENET>
Registers (in hex):
  arg: a8767e8c 10 f8 f8
  tmp: 6d61696e 28292072 a8767d84 f8 a87412e0 a87412e0 0 a8744a88
  sve: 108 a8744a88 391f90 a874931c 0 a87ff760 10000000 bfc45f44
  t8 0 t9 1ade at 0 v0 0 v1 0 k1 80000018
  gp e75c66ad fp bfc4636c sp a87ff368 ra bfc25b40

PANIC: Unexpected exception

[Press reset or RETURN to restart.]

>How-To-Repeat:

>Fix:
---------------------------------------------------------------------------------------------

diff -Naru src.orig/distrib/sgimips/instkernel/Makefile src/distrib/sgimips/instkernel/Makefile
--- src.orig/distrib/sgimips/instkernel/Makefile	2016-03-24 03:00:29.000000000 +0000
+++ src/distrib/sgimips/instkernel/Makefile	2018-08-12 15:34:03.358281894 +0000
@@ -30,9 +30,7 @@
 MDSET_RELEASEDIR=	binary/kernel

 MDSET_SUFFIXES.netbsd-INSTALL${NX}_IP2x=ecoff create-ecoff
-create-ecoff=	${OBJCOPY} --impure -O ecoff-bigmips \
-		-R .pdr -R .mdebug.abi32 -R .comment -R .ident \
-		${.TARGET:R} ${.TARGET}
+create-ecoff=	${ELF2ECOFF} ${.TARGET:R} ${.TARGET}

 IMAGE_RELEASEDIR=	installation/diskimage

---------------------------------------------------------------------------------------------

1.Please apply this patch.
http://mail-index.netbsd.org/netbsd-bugs/2018/06/23/msg057975.html

>> bootp()netbsd-INSTALL32_IP2x.ecoff
Obtaining netbsd-INSTALL32_IP2x.ecoff from server xserve
6514320+0+109904 entry: 0x88069000
[   1.0000000] phys segment: 0x5e000 @ 0x8002000
[   1.0000000] adding 0x5e000 @ 0x8002000 to freelist 0
[   1.0000000] phys segment: 0x652000 @ 0x8060000
[   1.0000000] adding 0x8000 @ 0x8060000 to freelist 0
[   1.0000000] skipping 0x64a000 @ 0x8068000 (kernel)
[   1.0000000] phys segment: 0x8e000 @ 0x86b2000
[   1.0000000] adding 0x8e000 @ 0x86b2000 to freelist 0
[   1.0000000] phys segment: 0x7800000 @ 0x8800000
[   1.0000000] adding 0x7800000 @ 0x8800000 to freelist 0
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 8.99.21 (INSTALL32_IP2x) #1: Sun Aug 12 15:18:35 UTC 2018
[   1.0000000] 	naruaki@xserve:/usr/obj.sgimips/sys/arch/sgimips/compile/INSTALL32_IP2x
[   1.0000000] total memory = 128 MB
[   1.0000000] (768 KB reserved for ARCS)
[   1.0000000] avail memory = 118 MB
[   1.0000000] mainbus0 (root): SGI-IP20 [SGI, 69063ecf], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R4000 CPU (0x422) Rev. 2.2 with MIPS R4010 FPC Rev. 0.0
[   1.0000000] cpu0: 48 TLB entries, 16MB max page size
[   1.0000000] cpu0: 8KB/16B direct-mapped L1 instruction cache
[   1.0000000] cpu0: 8KB/16B direct-mapped write-back L1 data cache
[   1.0000000] cpu0: 1024KB/128B direct-mapped write-back L2 unified cache
[   1.0000000] int0 at mainbus0 addr 0x1fb801c0
[   1.0000000] int0: bus 50MHz, CPU 100MHz
[   1.0000000] imc0 at mainbus0 addr 0x1fa00000: revision 3
[   1.0000000] gio0 at imc0
[   1.0000000] light0 at gio0: SGI LG2 (board revision 3)
[   1.0000000] wsdisplay0 at light0 kbdmux 1
[   1.0000000] hpc0 at gio0: SGI HPC1.5 (onboard)
[   1.0000000] zsc0 at hpc0 offset 0xd10
[   1.0000000] zstty0 at zsc0 channel 1 (console i/o)
[   1.0000000] zstty1 at zsc0 channel 0
[   1.0000000] zsc1 at hpc0 offset 0xd00
[   1.0000000] zsms0 at zsc1 channel 1: baud rate 4800
[   1.0000000] wsmouse0 at zsms0 mux 0
[   1.0000000] zskbd0 at zsc1 channel 0: baud rate 600
[   1.0000000] wskbd0 at zskbd0 mux 1
[   1.0000000] sq0 at hpc0 offset 0x100: SGI Seeq 80c03
[   1.0000000] sq0: Ethernet address 08:00:69:06:3e:cf
[   1.0000000] wdsc0 at hpc0 offset 0x11f: WD33C93B (20.0 MHz clock, BURST DMA, SCSI ID 0)

 NetBSD/sgimips 8.99.21

 This menu-driven tool is designed to help you install NetBSD to a hard disk,
 or upgrade an existing NetBSD system, with a minimum of work.
 In the following menus type the reference letter (a, b, c, ...) to select an
 item, or type CTRL+N/CTRL+P to select the next/previous item.
 The arrow keys and Page-up/Page-down may also work.
 Activate the current selection from the menu by typing the enter key.



                &#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
                &#9474;>a: Installation messages in English         &#9474;
                &#9474; b: Messages d'installation en fran?ais      &#9474;
                &#9474; c: Installation auf Deutsch                 &#9474;
                &#9474; d: Komunikaty instalacyjne w jezyku polskim &#9474;
                &#9474; e: Mensajes de instalacion en castellano    &#9474;
                &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;

Tested on Indy and Indigo R4000.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-sgimips-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 02 Sep 2018 16:36:54 +0000
Responsible-Changed-Why:
I'll also handle this one.


State-Changed-From-To: open->analyzed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 02 Sep 2018 16:36:54 +0000
State-Changed-Why:
The same problem as PR/53519 for aoutboot.


From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53518 CVS commit: src/distrib/sgimips/instkernel
Date: Sun, 2 Sep 2018 16:41:42 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sun Sep  2 16:41:42 UTC 2018

 Modified Files:
 	src/distrib/sgimips/instkernel: Makefile

 Log Message:
 Use elf2ecoff(1) rather than objcopy(1) to generate ecoff kernel.

 Reported by Naruaki Etomi in PR port-sgimips/53518.
 Should be pulled up to netbsd-7 and netbsd-8.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 src/distrib/sgimips/instkernel/Makefile

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

State-Changed-From-To: analyzed->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 09 Sep 2018 04:53:52 +0000
State-Changed-Why:
[pullup-8 #1017] [pullup-7 #1637]


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53518 CVS commit: [netbsd-7] src
Date: Tue, 30 Oct 2018 19:02:51 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Oct 30 19:02:51 UTC 2018

 Modified Files:
 	src/distrib/sgimips/instkernel [netbsd-7]: Makefile
 	src/sys/arch/sgimips/conf [netbsd-7]: INSTALL32_IP2x
 	src/sys/arch/sgimips/stand/boot [netbsd-7]: Makefile

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1637):

 	sys/arch/sgimips/conf/INSTALL32_IP2x: revision 1.10
 	sys/arch/sgimips/stand/boot/Makefile: revision 1.20
 	distrib/sgimips/instkernel/Makefile: revision 1.13

 Disable misc options to shrink an INSTALL kernel for IP2x.

 The ARC BIOS on Indy seems to have ~8MB limit.

 Fixes PR port-sgimips/53378 from Naruaki Etomi.
 Should be pulled up to netbsd-7 and netbsd-8.

  -

 Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old machines.
 objcopy(1) was used instead of elf2ecoff(1) since Makefile rev 1.9:

  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/stand/boot/Makefile#rev1.9

 but it looks ELF binaries generated by recent binutils are too complicated
 to convert them to ecoff for old machines by objcopy(1).

 Reported by Naruaki Etomi in PR port-sgimips/53519.

 Should be pulled up to at least netbsd-8.

  -

 Use elf2ecoff(1) rather than objcopy(1) to generate ecoff kernel.

 Reported by Naruaki Etomi in PR port-sgimips/53518.
 Should be pulled up to netbsd-7 and netbsd-8.


 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.11.4.1 src/distrib/sgimips/instkernel/Makefile
 cvs rdiff -u -r1.9 -r1.9.22.1 src/sys/arch/sgimips/conf/INSTALL32_IP2x
 cvs rdiff -u -r1.19 -r1.19.30.1 src/sys/arch/sgimips/stand/boot/Makefile

 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: tsutsui@NetBSD.org
State-Changed-When: Fri, 16 Nov 2018 15:29:15 +0000
State-Changed-Why:
Pullups complete.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

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