NetBSD Problem Report #57595

From www@netbsd.org  Tue Aug 29 10:50:09 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 1A6B01A9238
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 29 Aug 2023 10:50:09 +0000 (UTC)
Message-Id: <20230829104936.8766D1A9239@mollari.NetBSD.org>
Date: Tue, 29 Aug 2023 10:49:36 +0000 (UTC)
From: iwama@t3.rim.or.jp
Reply-To: iwama@t3.rim.or.jp
To: gnats-bugs@NetBSD.org
Subject: Indigo2 cannot boot
X-Send-Pr-Version: www-1.0

>Number:         57595
>Category:       port-sgimips
>Synopsis:       Indigo2 cannot boot
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-sgimips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 29 10:55:00 +0000 2023
>Last-Modified:  Tue Aug 29 15:25:01 +0000 2023
>Originator:     Yoshihiko Iwama
>Release:        9.3
>Organization:
>Environment:
NetBSD indigo2i.led.t3.rim.or.jp 9.3 NetBSD 9.3 (GENERIC32_IP2x) #4: Mon Aug 28 19:29:26 JST 2023  iwama@netbsd-v.led.t3.rim.or.jp:/home/iwama/NetBSD-9.3-sgimips-indigo2/usr/obj/sys/arch/sgimips/compile/GENERIC32_IP2x sgimips
>Description:
I can't boot Indigo2 using the installation CD.

>> hinv
                   System: IP22
                Processor: 250 Mhz R4400, with FPU
     Primary I-cache size: 16 Kbytes
     Primary D-cache size: 16 Kbytes
     Secondary cache size: 2048 Kbytes
              Memory size: 128 Mbytes
                 Graphics: High-AA Impact
               SCSI CDROM: scsi(0)cdrom(3)
                SCSI Disk: scsi(1)disk(1)
                SCSI Disk: scsi(1)disk(2)
                    Audio: Iris Audio Processor: version A2 revision 1.1.0
>> version
PROM Monitor SGI Version 5.3 Rev E IP22 Sep 21, 1995 (BE)
>> boot -f scsi(0)cdrom(3)partition(8)ip2xboot

NetBSD/sgimips 9.3 Bootstrap, Revision 1.5 (Thu Aug  4 15:30:37 UTC 2022)

devopen: scsi(0)cdrom(3)partition(0) type scsi file ip2x
6845776+112432=0x6a30d8
[   1.0000000] phys segment: 0xe000 @ 0x8002000
[   1.0000000] adding 0xe000 @ 0x8002000 to freelist 0
[   1.0000000] phys segment: 0x730000 @ 0x8010000
[   1.0000000] adding 0x58000 @ 0x8010000 to freelist 0
[   1.0000000] adding 0x3c000 @ 0x8704000 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, 2019, 2020, 2021, 2022
[   1.0000000]     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 9.3 (INSTALL32_IP2x) #0: Thu Aug  4 15:30:37 UTC 2022
[   1.0000000]
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/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-IP22 [SGI, 6909b2c8], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R4400 CPU (0x460) Rev. 6.0 with MIPS
R4010 FPC Rev. 0.0
[   1.0000000] cpu0: 48 TLB entries, 16MB max page size
[   1.0000000] cpu0: 16KB/16B direct-mapped L1 instruction cache
[   1.0000000] cpu0: 16KB/16B direct-mapped write-back L1 data cache
[   1.0000000] cpu0: 2048KB/128B direct-mapped write-back L2 unified cache
[   1.0000000] int0 at mainbus0 addr 0x1fbd9880

The address of device int0 shown in the last line is for Indy, not for Indigo2.
The address of device int0 is determined by the variable "mach_subtype", which is set on device ioc0.
I think the device ioc0 that sets the variable "mach_subtype" should be probed before device int0 and some other devices that reference the variable "mach_subtype".

The variable "mach_subtype" is referenced below for IP22/24.

sys/arch/sgimips/ioc/ioc.c: ioc_attach()
sys/arch/sgimips/dev/int.c: int_attach()
sys/arch/sgimips/dev/imc.c: imc_attach()
sys/arch/sgimips/dev/imc.c: imc_gio64_arb_config()
sys/arch/sgimips/gio/gio.c: gio_intr_establish()
sys/arch/sgimips/hpc/hpc.c: hpc_attach()
>How-To-Repeat:
It always fails to boot when booting from the installation CD.
>Fix:
This is the patch I created.

diff -aurN NetBSD-9.3-original/usr/src/sys/arch/sgimips/conf/files.sgimips NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/conf/files.sgimips
--- NetBSD-9.3-original/usr/src/sys/arch/sgimips/conf/files.sgimips	2019-03-24 02:44:49.000000000 +0900
+++ NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/conf/files.sgimips	2023-08-28 20:16:09.474100759 +0900
@@ -38,8 +38,9 @@
 include	"external/bsd/sljit/conf/files.sljit"

 # Machine-dependent drivers
+include "arch/sgimips/ioc/files.ioc"
 include "arch/sgimips/dev/files.dev"
-include "arch/sgimips/ioc/files.ioc"		# depends on int0 (files.dev)
+include "arch/sgimips/ioc/files.oioc"		# depends on int0 (files.dev)
 defflag opt_sgimace.h MACE_NEEDS_DELAYS
 include "arch/sgimips/mace/files.mace"

diff -aurN NetBSD-9.3-original/usr/src/sys/arch/sgimips/ioc/files.ioc NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/ioc/files.ioc
--- NetBSD-9.3-original/usr/src/sys/arch/sgimips/ioc/files.ioc	2009-02-14 08:55:33.000000000 +0900
+++ NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/ioc/files.ioc	2023-08-28 20:15:21.439071470 +0900
@@ -3,14 +3,3 @@
 device	ioc {[offset = -1], [intr = -1] }
 attach	ioc at mainbus
 file	arch/sgimips/ioc/ioc.c			ioc
-
-device	oioc {[offset = -1], [intr = -1] }
-attach	oioc at mainbus
-file	arch/sgimips/ioc/oioc.c			oioc
-
-attach	le at oioc: le24
-file	arch/sgimips/ioc/if_le_oioc.c		le24
-
-device	oiocsc: wd33c93, scsi
-attach	oiocsc at oioc
-file	arch/sgimips/ioc/oiocsc.c		oiocsc
diff -aurN NetBSD-9.3-original/usr/src/sys/arch/sgimips/ioc/files.oioc NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/ioc/files.oioc
--- NetBSD-9.3-original/usr/src/sys/arch/sgimips/ioc/files.oioc	1970-01-01 09:00:00.000000000 +0900
+++ NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/ioc/files.oioc	2023-08-28 20:15:03.356509589 +0900
@@ -0,0 +1,10 @@
+device	oioc {[offset = -1], [intr = -1] }
+attach	oioc at mainbus
+file	arch/sgimips/ioc/oioc.c			oioc
+
+attach	le at oioc: le24
+file	arch/sgimips/ioc/if_le_oioc.c		le24
+
+device	oiocsc: wd33c93, scsi
+attach	oiocsc at oioc
+file	arch/sgimips/ioc/oiocsc.c		oiocsc

I was able to boot Indigo2 using the installation CD.

>> hinv
                   System: IP22
                Processor: 250 Mhz R4400, with FPU
     Primary I-cache size: 16 Kbytes
     Primary D-cache size: 16 Kbytes
     Secondary cache size: 2048 Kbytes
              Memory size: 128 Mbytes
                 Graphics: High-AA Impact
               SCSI CDROM: scsi(0)cdrom(3)
                SCSI Disk: scsi(1)disk(1)
                SCSI Disk: scsi(1)disk(2)
                    Audio: Iris Audio Processor: version A2 revision 1.1.0
>> version
PROM Monitor SGI Version 5.3 Rev E IP22 Sep 21, 1995 (BE)
>> boot -f scsi(0)cdrom(3)partition(8)ip2xboot

NetBSD/sgimips 9.3 Bootstrap, Revision 1.5 (Mon Aug 28 04:30:32 UTC 2023)

devopen: scsi(0)cdrom(3)partition(0) type scsi file ip2x
6846000+112400=0x6a3198
[   1.0000000] phys segment: 0xe000 @ 0x8002000
[   1.0000000] adding 0xe000 @ 0x8002000 to freelist 0
[   1.0000000] phys segment: 0x730000 @ 0x8010000
[   1.0000000] adding 0x58000 @ 0x8010000 to freelist 0
[   1.0000000] adding 0x3c000 @ 0x8704000 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, 2019, 2020, 2021, 2022
[   1.0000000]     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 9.3 (INSTALL32_IP2x) #2: Mon Aug 28 19:29:31 JST 2023
[   1.0000000] 	iwama@netbsd-v.led.t3.rim.or.jp:/home/iwama/NetBSD-9.3-sgimips-indigo2/usr/obj/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-IP22 [SGI, 6909b2c8], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R4400 CPU (0x460) Rev. 6.0 with MIPS R4010 FPC Rev. 0.0
[   1.0000000] cpu0: 48 TLB entries, 16MB max page size
[   1.0000000] cpu0: 16KB/16B direct-mapped L1 instruction cache
[   1.0000000] cpu0: 16KB/16B direct-mapped write-back L1 data cache
[   1.0000000] cpu0: 2048KB/128B direct-mapped write-back L2 unified cache
[   1.0000000] ioc0 at mainbus0 addr 0x1fbd9800: rev 0, machine Indigo2 (Fullhouse), board rev 0
[   1.0000000] int0 at mainbus0 addr 0x1fbd9000
[   1.0000000] int0: bus 125MHz, CPU 250MHz
[   1.0000000] imc0 at mainbus0 addr 0x1fa00000: revision 3, EISA bus present
[   1.0000000] gio0 at imc0
[   1.0000000] unknown GIO card (product 0x10 revision 0x01) at gio0 slot 0 addr 0x1f000000 not configured
[   1.0000000] Synchronous ISDN (product 0x04 revision 0x00) at gio0 slot 1 addr 0x1f400000 not configured
[   1.0000000] hpc0 at gio0 addr 0x1fb80000: SGI HPC3 (onboard)
[   1.0000000] zsc0 at hpc0 offset 0x59830
[   1.0000000] zstty0 at zsc0 channel 1 (console i/o)
[   1.0000000] zstty1 at zsc0 channel 0
[   1.0000000] pckbc0 at hpc0 offset 0x59840
[   1.0000000] pckbd0 at pckbc0 (kbd slot)
[   1.0000000] wskbd0 at pckbd0 mux 1
[   1.0000000] pms0 at pckbc0 (aux slot)
[   1.0000000] wsmouse0 at pms0 mux 0
[   1.0000000] sq0 at hpc0 offset 0x54000: SGI Seeq 80c03
[   1.0000000] sq0: Ethernet address 08:00:69:09:b2:c8
[   1.0000000] wdsc0 at hpc0 offset 0x44000: WD33C93B (20.0 MHz clock, BURST DMA, SCSI ID 0)
[   1.0000000] wdsc0: microcode revision 0x0d, Fast SCSI
[   1.0000000] scsibus0 at wdsc0: 8 targets, 8 luns per target
[   1.0000000] wdsc1 at hpc0 offset 0x4c000: WD33C93B (20.0 MHz clock, BURST DMA, SCSI ID 0)
[   1.0000000] wdsc1: microcode revision 0x0d, Fast SCSI
[   1.0000000] scsibus1 at wdsc1: 8 targets, 8 luns per target
[   1.0000000] haltwo0 at hpc0 offset 0x58000: HAL2 revision 1.1.0
[   1.0000000] audio0 at haltwo0: playback
[   1.0000000] audio0: slinear_be:16 2ch 48000Hz, blk 4096 bytes (21.3ms) for playback
[   1.0000000] spkr0 at audio0: PC Speaker (synthesized)
[   1.0000000] wsbell at spkr0 not configured
[   1.0000000] pi1ppc0 at hpc0 offset 0x59800
[   1.0000000] pi1ppc0: capabilities=0x8<PS2>
[   1.0000000] pi1ppc0: child devices not configured
[   1.0000000] dsclock0 at mainbus0 addr 0x1fbe0000
[   1.0000030] scsibus0: waiting 2 seconds for devices to settle...
[   1.0688149] scsibus1: waiting 2 seconds for devices to settle...
[   3.6409511] sd0 at scsibus0 target 3 lun 0: <TOSHIBA, CD-ROM XM-3401TA, 2873> disk fixed
[   3.7595313] sd0: drive offline
[   3.7996186] sd0: async, 8-bit transfers
[   4.8644366] sd1 at scsibus1 target 1 lun 0: <I-O DATA, HDVS-UM6.4G, 201F> disk fixed
[   4.9557326] sd1: 6187 MB, 13410 cyl, 15 head, 63 sec, 512 bytes/sect x 12672450 sectors
[   5.0619431] sd1: sync (100.00ns offset 12), 8-bit (10.000MB/s) transfers
[   5.1386432] sd2 at scsibus1 target 2 lun 0: <MELCO, DSC-UGTV, 2.01> disk fixed
[   5.2233441] sd2: 76319 MB, 16383 cyl, 16 head, 596 sec, 512 bytes/sect x 156301488 sectors
[   5.3226836] sd2: sync (100.00ns offset 12), 8-bit (10.000MB/s) transfers
[   6.6653116] boot device: <unknown>
[   6.7096675] root on md0a dumps on md0b
[   6.7514954] root file system type: ffs
[   6.7996026] kern.module.path=/stand/sgimips/9.3/modules
[   6.8623463] WARNING: clock lost 22 days
[   6.9083560] WARNING: using filesystem time
[   6.9575170] WARNING: CHECK AND RESET THE DATE!
Created mfs /dev (282624 byte, 480 inodes)
-sh: tset: not found
erase ^?, werase ^W, kill ^U, intr ^C

mount: exec mount_kernfs for /kern: mount_kernfs: No such file or directory

I was also able to boot Indy using the regular kernel.

>> hinv
                   System: IP22
                Processor: 200 Mhz R4400, with FPU
     Primary I-cache size: 16 Kbytes
     Primary D-cache size: 16 Kbytes
     Secondary cache size: 1024 Kbytes
              Memory size: 256 Mbytes
                 Graphics: Indy 24-bit
                SCSI Disk: scsi(0)disk(1)
                SCSI Disk: scsi(0)disk(2)
                    Audio: Iris Audio Processor: version A2 revision 4.1.0
>> version
PROM Monitor SGI Version 5.3 Rev B7 R4X00 IP24 Feb 16, 1995 (BE)
>> boot -f scsi(0)disk(1)rdisk(0)partition(8)sash scsi(0)disk(1)rdisk(0)partition(0)NetBSD-ioc/netbsd
136336+22752+3248+341792+49344d+4620+6880 entry: 0x97fa5ee0
[   1.0000000] phys segment: 0x73e000 @ 0x8002000
[   1.0000000] adding 0x66000 @ 0x8002000 to freelist 0
[   1.0000000] adding 0x20d000 @ 0x8533000 to freelist 0
[   1.0000000] phys segment: 0xf784000 @ 0x8800000
[   1.0000000] adding 0xf784000 @ 0x8800000 to freelist 0
[   1.0000000] phys segment: 0x7c000 @ 0x17f84000
[   1.0000000] adding 0x7c000 @ 0x17f84000 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, 2019, 2020, 2021, 2022
[   1.0000000]     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 9.3 (GENERIC32_IP2x) #4: Mon Aug 28 19:29:26 JST 2023
[   1.0000000] 	iwama@netbsd-v.led.t3.rim.or.jp:/home/iwama/NetBSD-9.3-sgimips-indigo2/usr/obj/sys/arch/sgimips/compile/GENERIC32_IP2x
[   1.0000000] total memory = 256 MB
[   1.0000000] (768 KB reserved for ARCS)
[   1.0000000] avail memory = 245 MB
[   1.0000000] WARNING: module error: built-in module sequencer can't find builtin dependency `midi'
[   1.0000000] WARNING: module error: built-in module sequencer prerequisite midi failed, error 2
[   1.0000000] mainbus0 (root): SGI-IP22 [SGI, 6909c4ea], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R4400 CPU (0x460) Rev. 6.0 with MIPS R4010 FPC Rev. 0.0
[   1.0000000] cpu0: 48 TLB entries, 16MB max page size
[   1.0000000] cpu0: 16KB/16B direct-mapped L1 instruction cache
[   1.0000000] cpu0: 16KB/16B direct-mapped write-back L1 data cache
[   1.0000000] cpu0: 1024KB/128B direct-mapped write-back L2 unified cache
[   1.0000000] ioc0 at mainbus0 addr 0x1fbd9800: rev 0, machine Indy (Guinness), board rev 0
[   1.0000000] int0 at mainbus0 addr 0x1fbd9880
[   1.0000000] int0: bus 100MHz, CPU 200MHz
[   1.0000000] imc0 at mainbus0 addr 0x1fa00000: revision 3
[   1.0000000] gio0 at imc0
[   1.0000000] newport0 at gio0: SGI NG1 (board revision 1, cmap revision 5, xmap revision 5, vc2 revision 0), depth 24
[   1.0000000] wsdisplay0 at newport0 kbdmux 1
[   1.0000000] hpc0 at gio0: SGI HPC3 (onboard)
[   1.0000000] zsc0 at hpc0 offset 0x59830
[   1.0000000] zstty0 at zsc0 channel 1 (console i/o)
[   1.0000000] zstty1 at zsc0 channel 0
[   1.0000000] pckbc0 at hpc0 offset 0x59840
[   1.0000000] pckbd0 at pckbc0 (kbd slot)
[   1.0000000] wskbd0 at pckbd0 mux 1
[   1.0000000] pms0 at pckbc0 (aux slot)
[   1.0000000] wsmouse0 at pms0 mux 0
[   1.0000000] sq0 at hpc0 offset 0x54000: SGI Seeq 80c03
[   1.0000000] sq0: Ethernet address 08:00:69:09:c4:ea
[   1.0000000] wdsc0 at hpc0 offset 0x44000: WD33C93B (20.0 MHz clock, BURST DMA, SCSI ID 0)
[   1.0000000] wdsc0: microcode revision 0x0d, Fast SCSI
[   1.0000000] scsibus0 at wdsc0: 8 targets, 8 luns per target
[   1.0000000] haltwo0 at hpc0 offset 0x58000: HAL2 revision 4.1.0
[   1.0000000] audio0 at haltwo0: playback
[   1.0000000] audio0: slinear_be:16 2ch 48000Hz, blk 4096 bytes (21.3ms) for playback
[   1.0000000] spkr0 at audio0: PC Speaker (synthesized)
[   1.0000000] wsbell at spkr0 not configured
[   1.0000000] pi1ppc0 at hpc0 offset 0x59800
[   1.0000000] pi1ppc0: capabilities=0x8<PS2>
[   1.0000000] ppbus0 at pi1ppc0
[   1.0000000] ppbus0: No IEEE1284 device found.
[   1.0000000] lpt0 at ppbus0: port mode = 0x1<COMPATIBLE>
[   1.0000000] button0 at hpc0 offset 0x59850
[   1.0000000] dsclock0 at mainbus0 addr 0x1fbe0000
[   1.0000030] scsibus0: waiting 2 seconds for devices to settle...
[   1.2088073] WARNING: module error: built-in module sequencer can't find builtin dependency `midi'
[   1.3102646] WARNING: module error: built-in module sequencer prerequisite midi failed, error 2
[   3.2437926] sd0 at scsibus0 target 1 lun 0: <SEAGATE, ST32151N, 0560> disk fixed
[   3.3264582] sd0: 2047 MB, 4177 cyl, 8 head, 125 sec, 512 bytes/sect x 4193415 sectors
[   3.4322485] sd0: sync (100.00ns offset 12), 8-bit (10.000MB/s) transfers, tagged queueing
[   3.5279878] sd1 at scsibus0 target 2 lun 0: <MELCO, DSC-UE Series, 1.51> disk fixed
[   3.6179094] sd1: 38204 MB, 16383 cyl, 16 head, 298 sec, 512 bytes/sect x 78242976 sectors
[   3.7162098] sd1: sync (100.00ns offset 12), 8-bit (10.000MB/s) transfers
[   5.0588290] boot device: sd0
[   5.1279598] root on sd0a dumps on sd0b
[   5.3065185] Supported file systems: mfs lfs ffs ext2fs nfs umap procfs overlay null kernfs fdesc union tmpfs smbfs puffs ptyfs ntfs msdos efs cd9660 coda
[   5.4677264] no file system for sd0 (dev 0xa00)
[   5.5210534] cannot mount root, error = 79
[   5.5712569] root device (default sd0a): sd1a
[   6.3685868] dump device (default sd1b): 
[   6.3685868] file system (default generic): 
[   6.3685868] root on sd1a dumps on sd1b
[   6.6081249] root file system type: ffs
[   6.6534451] kern.module.path=/stand/sgimips/9.3/modules
[   6.7561864] init path (default /sbin/init): 
[   7.6534631] init: trying /sbin/init
Enter pathname of shell or RETURN for /bin/sh: 
We recommend that you create a non-root account and use su(1) for root access.
# 

I have only two sgimips architecture machines, Indigo2 and Indy, so I haven't checked with other models.

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-sgimips/57595: Indigo2 cannot boot
Date: Wed, 30 Aug 2023 00:20:50 +0900

 > [   1.0000000] int0 at mainbus0 addr 0x1fbd9880
 > 
 > The address of device int0 shown in the last line is for Indy, not for Indigo2.
 > The address of device int0 is determined by the variable "mach_subtype", which is set on device ioc0.
 > I think the device ioc0 that sets the variable "mach_subtype" should be probed before device int0 and some other devices that reference the variable "mach_subtype".
 > 
 > The variable "mach_subtype" is referenced below for IP22/24.

  :

 > --- NetBSD-9.3-original/usr/src/sys/arch/sgimips/conf/files.sgimips	2019-03-24 02:44:49.000000000 +0900
 > +++ NetBSD-9.3-sgimips-indigo2/usr/src/sys/arch/sgimips/conf/files.sgimips	2023-08-28 20:16:09.474100759 +0900
 > @@ -38,8 +38,9 @@
 >  include	"external/bsd/sljit/conf/files.sljit"
 >  
 >  # Machine-dependent drivers
 > +include "arch/sgimips/ioc/files.ioc"
 >  include "arch/sgimips/dev/files.dev"
 > -include "arch/sgimips/ioc/files.ioc"		# depends on int0 (files.dev)
 > +include "arch/sgimips/ioc/files.oioc"		# depends on int0 (files.dev)
 >  defflag opt_sgimace.h MACE_NEEDS_DELAYS
 >  include "arch/sgimips/mace/files.mace"

 Your analysis looks correct, and it looks the Indigo2 support has been
 broken since the following Personal IRIS 4D/20 and 4D/25 support was added:
  https://mail-index.netbsd.org/source-changes/2009/02/12/msg217033.html
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/conf/files.sgimips#rev1.48
  https://github.com/NetBSD/src/commit/85716c44

 I.e. oioc(4) on IP6 and IP10 requires int(4) attached, but
 int(4) on IP22 (especially Indigo2) requires ioc(4) attached.

 In the perfect world[TM], we should reconsider device config tree
 (or handle it via config_defer(9) etc.), but for now it's safer
 and easier to split oioc(4) config definitions from files.ioc to
 independent files.oioc, as your patch does.

 ---
 Izumi Tsutsui

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.