NetBSD Problem Report #52162

From tsutsui@ceres.dti.ne.jp  Sat Apr 15 07:04:14 2017
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 018817A1BC
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 15 Apr 2017 07:04:13 +0000 (UTC)
Message-Id: <201704150704.v3F748aM015702@ceres.dti.ne.jp>
Date: Sat, 15 Apr 2017 16:04:08 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: 712/60 hangs during sti(4) probe
X-Send-Pr-Version: 3.95

>Number:         52162
>Category:       port-hppa
>Synopsis:       712/60 hangs during sti(4) probe
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-hppa-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 15 07:05:00 +0000 2017
>Last-Modified:  Sun Aug 13 17:45:00 +0000 2017
>Originator:     Izumi Tsutsui
>Release:        NetBSD 7.1
>Organization:
>Environment:
System: NetBSD 7.1 GENERIC with [pullup-7 #1396]
Architecture: hppa
Machine: hppa
>Description:
As noted in PR port-hppa/52129, NetBSD/hppa 7.1 GENERIC kernel (with patch)
hangs during sti(4) probe.

---
syncing disks... done
unmounting file systems...
unmounting done
rebooting...

----------------------------------------------------------------------------
BootRom Version    2.3  
Memory Size:  128 MB
----------------------------------------------------------------------------




(c) Copyright 1990-1993, Hewlett-Packard Company.
All rights reserved

Press <ESCAPE> to stop boot sequence.
Selecting a system to boot.

Booting


NetBSD/hppa FFS/LFS Primary Bootstrap

32bit firmware

booting from partition a
filesystem: FFS
looking up boot.hp700
looking up boot
loading boot at 0x22800...done



>> NetBSD/hppa LIF/FFS/LFS Boot, Revision 1.4 (Sun Apr  2 17:49:42 JST 2017)
>> Enter "reset" to reset system.
Boot: [[[dk6a:]netbsd][-a][-c][-d][-s][-v][-q]] :- 
9745940+275264+359616 [357216+347597]=0xb47740
Start @ 0x200000 [1=0xc9b000-0xd47740]...
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
    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 7.1 (GENERIC) #0: Sun Apr  2 18:01:45 JST 2017
	tsutsui@mirage:/s/src/sys/arch/hppa/compile/obj.hppa/GENERIC
HP9000/712/60 (Gecko)
real mem = 128 MB (73728 reserved for PROM, 116 MB used by NetBSD)
avail mem = 114 MB
kern.module.path=/stand/hppa/7.1/modules
mainbus0 (root) [flex fff80000]
pdc0 at mainbus0
power0 at mainbus0: DR25
cpu0 at mainbus0 hpa 0xfffbe000 path 8 irq 31: PA7100LC (Hummingbird) rev 6
cpu0: PCXL, PA-RISC 1.1c, lev 1, cat A, 60 MHz clk
cpu0: shadows, 32K/32K D/I caches, 64 shared TLB, 8 shared BTLB
cpu0: PCXL (CMOS-26B) floating point, rev 1
mem0 at mainbus0 hpa 0xfffbf000 path 9: viper rev 0, ctrl 0x0 size 128MB

[hangs here]

---

Disabling sti(4) by userconf(4) makes it boot, at least with serial console.
---

>> NetBSD/hppa LIF/FFS/LFS Boot, Revision 1.4 (Sun Apr  2 17:49:42 JST 2017)
>> Enter "reset" to reset system.
Boot: [[[dk6a:]netbsd][-a][-c][-d][-s][-v][-q]] :- -cs
9745940+275264+359616 [357216+347597]=0xb47740
Start @ 0x200000 [1=0xc9b000-0xd47740]...
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
    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 7.1 (GENERIC) #0: Sun Apr  2 18:01:45 JST 2017
	tsutsui@mirage:/s/src/sys/arch/hppa/compile/obj.hppa/GENERIC
HP9000/712/60 (Gecko)
real mem = 128 MB (73728 reserved for PROM, 116 MB used by NetBSD)
avail mem = 114 MB
kern.module.path=/stand/hppa/7.1/modules
userconf: configure system autoconfiguration:
uc> disable sti
[ 89] sti* disabled
[ 90] sti* disabled
[ 91] sti* disabled
[ 92] sti* disabled
uc> quit
Continuing...
mainbus0 (root) [flex fff80000]
pdc0 at mainbus0
power0 at mainbus0: DR25
cpu0 at mainbus0 hpa 0xfffbe000 path 8 irq 31: PA7100LC (Hummingbird) rev 6
cpu0: PCXL, PA-RISC 1.1c, lev 1, cat A, 60 MHz clk
cpu0: shadows, 32K/32K D/I caches, 64 shared TLB, 8 shared BTLB
cpu0: PCXL (CMOS-26B) floating point, rev 1
mem0 at mainbus0 hpa 0xfffbf000 path 9: viper rev 0, ctrl 0x0 size 128MB
"GIO Graphics" at mainbus0 (type 0xa, sv 0x85) hpa 0xf8000000 path 1 not configured
lasi0 at mainbus0 hpa 0xf0000000 path 2 irq 27: rev 3.0
gsc0 at lasi0
osiop0 at gsc0 hpa 0xf0106000 path 2/0/1 irq 9: NCR53C710 rev 2, 40MHz, SCSI ID 7
scsibus0 at osiop0: 8 targets, 8 luns per target
iee0 at gsc0 hpa 0xf0107000 path 2/0/2 irq 8: Intel 82596CA address 08:00:09:d1:2b:5a
com2 at gsc0 hpa 0xf0105000 path 2/0/4 irq 5: ns16550a, working fifo
com2: console
lpt1 at gsc0 hpa 0xf0102000 path 2/0/6 irq 7
harmony0 at gsc0 hpa 0xf0104000 path 2/0/8 irq 13: rev 23
audio0 at harmony0: full duplex, playback, capture
"floppy controller" at gsc0 (type 0xa, sv 0x83) hpa 0xf010a000 path 2/0/10 not configured
gsckbc0 at gsc0 hpa 0xf0108000 path 2/0/11 irq 26: keyboard
pckbd0 at gsckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
gsckbc1 at gsc0 hpa 0xf0108100 path 2/0/12: mouse
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 6 lun 0: <IBM, DORS-32160, HP02> disk fixed
sd0: 2048 MB, 6703 cyl, 5 head, 125 sec, 512 bytes/sect x 4194685 sectors
sd0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
Enter pathname of shell or RETURN for /bin/sh: 
Terminal type is vt100.
We recommend creating a non-root account and using su(1) for root access.
# 
---

GENERIC + DIAGNOSTIC + STIDEBUG kernel shows:
---

>> NetBSD/hppa LIF/FFS/LFS Boot, Revision 1.4 (Sun Apr  2 17:49:42 JST 2017)
>> Enter "reset" to reset system.
Boot: [[[dk6a:]netbsd][-a][-c][-d][-s][-v][-q]] :- netbsd.stidebug
10429732+275264+363712 [359808+350027]=0xb49adc
Start @ 0x200000 [1=0xc9c000-0xd49adc]...
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
    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 7.1 (STIDEBUG) #0: Sat Apr 15 14:47:46 JST 2017
	tsutsui@mirage:/s/src/sys/arch/hppa/compile/obj.hppa/STIDEBUG
HP9000/712/60 (Gecko)
real mem = 128 MB (73728 reserved for PROM, 115 MB used by NetBSD)
avail mem = 113 MB
kern.module.path=/stand/hppa/7.1/modules
mainbus0 (root) [flex fff80000]
pdc0 at mainbus0
power0 at mainbus0: DR25
cpu0 at mainbus0 hpa 0xfffbe000 path 8 irq 31: PA7100LC (Hummingbird) rev 6
cpu0: PCXL, PA-RISC 1.1c, lev 1, cat A, 60 MHz clk
cpu0: shadows, 32K/32K D/I caches, 64 shared TLB, 8 shared BTLB
cpu0: PCXL (CMOS-26B) floating point, rev 1
mem0 at mainbus0 hpa 0xfffbf000 path 9: viper rev 0, ctrl 0x0 size 128MB
sti_sgc_probe: hpa=f8000000, rom=f8000000

[hang here]
---

so it hangs at bus_space_map(9) or bus_space_read_1(9)?

https://nxr.netbsd.org/xref/src/sys/arch/hppa/dev/sti_sgc.c?r=1.1#167
---
	rom = sti_sgc_getrom(ca);
	DPRINTF(("%s: hpa=%x, rom=%x\n", __func__, (uint)ca->ca_hpa,
	    (uint)rom));

	/* if it does not map, probably part of the lasi space */
	if ((rv = bus_space_map(ca->ca_iot, rom, STI_ROMSIZE, 0, &romh))) {
		DPRINTF(("%s: can't map rom space (%d)\n", __func__, rv));

		if ((rom & HPPA_IOBEGIN) == HPPA_IOBEGIN) {
			romh = rom;
			romunmapped++;
		} else {
			/* in this case nobody has no freaking idea */
			return 0;
		}
	}

	devtype = bus_space_read_1(ca->ca_iot, romh, 3);

	DPRINTF(("%s: devtype=%d\n", __func__, devtype));
	rv = 1;

---

>How-To-Repeat:
Boot patched GENERIC kernel on 712/60.

>Fix:
No idea.
Something special on serial console settings?

>Audit-Trail:
From: Felix Deichmann <m4j0rd0m0@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-hppa/52162
Date: Sun, 13 Aug 2017 19:44:05 +0200

 I see the same problem also on my 712/60 with NetBSD-8 (8.0_BETA) and HEAD.

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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.