NetBSD Problem Report #58320

From tsutsui@ceres.dti.ne.jp  Sat Jun  8 15:19:12 2024
Return-Path: <tsutsui@ceres.dti.ne.jp>
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7B26E1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  8 Jun 2024 15:19:12 +0000 (UTC)
Message-Id: <202406081519.458FJ6ME013124@ceres.dti.ne.jp>
Date: Sun, 9 Jun 2024 00:19:06 +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: NetBSD/macppc 10.0 INSTALL kernel stalls on Power Mac G4
X-Send-Pr-Version: 3.95

>Number:         58320
>Category:       port-macppc
>Synopsis:       NetBSD/macppc 10.0 INSTALL kernel stalls on Power Mac G4
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 08 15:20:00 +0000 2024
>Last-Modified:  Wed Jun 12 19:45:01 +0000 2024
>Originator:     Izumi Tsutsui
>Release:        NetBSD 10.0
>Organization:
>Environment:
System: NetBSD 10.0 (INSTALL) #0: Thu Mar 28 08:33:33 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/macppc/compile/INSTALL macppc
Architecture: powerpc
Machine: macppc
>Description:
NetBSD/macppc 10.0 INSTALL kernel booted from an official
NetBSD-10.0-macppc.iso stalls just after genfb(4) is attached.

See the following video for details:
 https://www.youtube.com/watch?v=C2HhzWNuR0A

Note GENERIC kernel that uses r128fb(4) instead of genfb(4)
works fine.

---
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
    2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
    2024
    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 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024
	mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/macppc/compile/GENERIC
total memory = 1024 MB
oea_startup: failed to allocate DEAD ZONE: error=12
avail memory = 977 MB
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
found openpic PIC at 80040000
OpenPIC Version 1.2: Supports 4 CPUs and 64 interrupt sources.
bootpath: /pci@f2000000/@d/mac-io@7/ata-4@1f000/disk@1:0/netbsd
mainbus0 (root)
cpu0 at mainbus0: 7400 (Revision 2.9), ID 0 (primary)
cpu0: HID0 0x8094c0a4<EMCP,DOZE,DPM,EIEC,ICE,DCE,SGE,BTIC,BHT>, powersave: 1
cpu0: 400.00 MHz, no-parity 1MB WB L2 cache (PB SRAM) at 2:1 ratio
memory0 at mainbus0: len=512
spdmem0 at memory0
spdmem0: SDRAM, no parity or ECC, 256MB, 133MHz (PC-133)
spdmem0: 12 rows, 10 cols, 2 banks, 4 banks/chip, 7.5ns cycle time
spdmem0: tAA-tRCD-tRP-tRAS: 3-20-20-45
spdmem0: voltage LvTTL (not 5V tolerant), refresh time 15.625us (self-refreshing)
spdmem1 at memory0
spdmem1: SDRAM, no parity or ECC, 256MB, 133MHz (PC-133)
spdmem1: 12 rows, 10 cols, 2 banks, 4 banks/chip, 7.5ns cycle time
spdmem1: tAA-tRCD-tRP-tRAS: 3-20-20-45
spdmem1: voltage LvTTL (not 5V tolerant), refresh time 15.625us (self-refreshing)
spdmem2 at memory0
spdmem2: SDRAM, no parity or ECC, 256MB, 133MHz (PC-133)
spdmem2: 12 rows, 10 cols, 2 banks, 4 banks/chip, 7.5ns cycle time
spdmem2: tAA-tRCD-tRP-tRAS: 3-20-20-45
spdmem2: voltage LvTTL (not 5V tolerant), refresh time 15.625us (self-refreshing)
spdmem3 at memory0
spdmem3: SDRAM, no parity or ECC, 256MB, 133MHz (PC-133)
spdmem3: 12 rows, 10 cols, 2 banks, 4 banks/chip, 7.5ns cycle time
spdmem3: tAA-tRCD-tRP-tRAS: 3-20-20-45
spdmem3: voltage LvTTL (not 5V tolerant), refresh time 15.625us (self-refreshing)
uni_n0 at mainbus0 address 0xf8000000
ki2c0 at uni_n0 address 0xf8001000
iic0 at ki2c0: I2C bus
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Interface (rev. 0x00)
r128fb0 at pci0 dev 16 function 0: ATI Technologies Rage Fury MAXX AGP 4x (TMDS) (rev. 0x00)
r128fb0: 64 MB aperture at 0x94000000
wsdisplay0 at r128fb0 kbdmux 1: console (default, vt100 emulation)
wsmux1: connecting to wsdisplay0
uninorth1 at mainbus0
pci1 at uninorth1 bus 0
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
ppb0 at pci1 dev 13 function 0: Digital Equipment DC21154 PCI-PCI Bridge (rev. 0x05)
pci2 at ppb0 bus 1
pci2: i/o space, memory space enabled
obio0 at pci2 dev 7 function 0: addr 0x80000000
obio0: enabling KeyLargo internal modem
zsc0 at obio0 irq 22,50
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
awacs0 at obio0 offset 0x14000 Screamer: irq 24,9,10
awacs0: speaker
audio0 at awacs0: playback, capture, full duplex
audio0: slinear_be:16 2ch 44100Hz, blk 4096 bytes (23.2ms) for playback
audio0: slinear_be:16 2ch 44100Hz, blk 4096 bytes (23.2ms) for recording
spkr0 at audio0: PC Speaker (synthesized)
wsbell at spkr0 not configured
pmu0 at obio0 offset 0x16000 irq 47:  rev. 12
pmu0: initializing RTC
pmu0: power-mgt not configured
ki2c1 at obio0
iic1 at ki2c1: I2C bus
wdc0 at obio0 offset 0x1f000 irq 19, level triggered: DMA transfer
atabus0 at wdc0 channel 0
wdc1 at obio0 offset 0x20000 irq 20, level triggered: DMA transfer
atabus1 at wdc1 channel 0
wdc2 at obio0 offset 0x21000 irq 21, level triggered: DMA transfer
atabus2 at wdc2 channel 0
ohci0 at pci2 dev 8 function 0: Apple Computer KeyLargo USB Controller (rev. 0x00)
ohci0: interrupting at irq 27
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
ohci1 at pci2 dev 9 function 0: Apple Computer KeyLargo USB Controller (rev. 0x00)
ohci1: interrupting at irq 28
ohci1: OHCI version 1.0
usb1 at ohci1: USB revision 1.0
fwohci0 at pci2 dev 10 function 0: Texas Instruments TSB12LV26 IEEE 1394 Host Controller (rev. 0x00)
fwohci0: interrupting at irq 63
fwohci0: OHCI version 1.0 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:30:65:ff:fe:c4:d2:90
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
uninorth2 at mainbus0
pci3 at uninorth2 bus 0
pci3: i/o space, memory space enabled
pchb2 at pci3 dev 11 function 0
pchb2: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
gem0 at pci3 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01)
gem0: interrupting at irq 41
brgphy0 at gem0 phy 0: BCM5400 1000BASE-T media interface, rev. 7
brgphy0: 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
gem0: Ethernet address 00:30:65:c4:d2:90, 10KB RX fifo, 4KB TX fifo
vmmask 73fc0000 schedmask 7ffc0000 highmask 7ffc0000
timecounter: Timecounter "mftb" frequency 24907667 Hz quality 100
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0 cable IRM irm(0) (me)
ieee1394if0: bus manager 0
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
WARNING: system needs entropy for security; see entropy(7)
IPsec: Initialized Security Association Processing.
uhub0 at usb0: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
wd0 at atabus0 drive 0
wd0: <IBM-DTLA-305020>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 19623 MB, 39870 cyl, 16 head, 63 sec, 512 bytes/sect x 40188960 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1 at atabus0 drive 1
wd1: <WDC WD200BB-75CAA0>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 19073 MB, 38752 cyl, 16 head, 63 sec, 512 bytes/sect x 39062500 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66) (using DMA)
wd1(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66) (using DMA)
uhub2 at uhub1 port 1: Chicony (0x04fe) Generic USB Hub (0x0008), class 9/0, rev 1.10/1.02, addr 2
uhub2: 3 ports with 2 removable, bus powered
uhidev0 at uhub2 port 1 configuration 1 interface 0
uhidev0: Chicony (0x04fe) PFU-68 USB Keyboard (0x0007), rev 1.10/1.02, addr 3, iclass 3/1
ukbd0 at uhidev0: 8 Variable keys, 6 Array codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <HITACHI DVD-ROM GD-7000, , 016J> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(wdc1:0:0): using PIO mode 4, DMA mode 2 (using DMA)
swwdog0: software watchdog initialized
boot device: wd1
root on wd1a dumps on wd1b
root file system type: ffs
kern.module.path=/stand/macppc/10.0/modules
entropy: best effort
---

NetBSD/macppc 9.4 INSTALL kernel works and genfb(4) is attached
without visible problems. 8.3 INSTALL also works.

>How-To-Repeat:
Boot an official NetBSD-10.0-macppc.iso on Power Mac G4 with ATI Rage128,
as noted above.

>Fix:
No idea.
Bisect netbsd-9 and netbsd-10?

---
Izumi Tsutsui

>Audit-Trail:
From: Michael <macallan1888@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-macppc/58320: NetBSD/macppc 10.0 INSTALL kernel stalls on
 Power Mac G4
Date: Sun, 9 Jun 2024 18:40:22 -0400

 > NetBSD/macppc 10.0 INSTALL kernel booted from an official
 > NetBSD-10.0-macppc.iso stalls just after genfb(4) is attached.

 I'll check if I can reproduce this on the Pismo. If not, I have an AGP
 R128 somewhere that I could stick in the Quicksilver.
 IIRC the only code I added to genfb between 9 and 10 was a glyph
 caching scheme, but that isn't enabled by default and doesn't use video
 memory.

 have fun
 Michael

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-macppc/58320: NetBSD/macppc 10.0 INSTALL kernel stalls onPower
	 Mac G4
Date: Mon, 10 Jun 2024 22:07:42 +0900

 >  IIRC the only code I added to genfb between 9 and 10 was a glyph
 >  caching scheme, but that isn't enabled by default and doesn't use video
 >  memory.

 There were more other changes (for x86 and arm? etc.):

 https://github.com/NetBSD/src/commit/56b9a4e51561e9ad4e14e38e8a06b43b8bede03a
 >  wsfb: Prefer wide fonts when EDID data is available. 

 https://github.com/NetBSD/src/commit/e69e27c5ad55100572023af4b1ecc2e003c8ec82
 >  Add 10-bit pixel format support. 

 https://github.com/NetBSD/src/commit/71baff76aa4ee3604639f7e7212eb328df46381b
 >  PR kern/57035 
 >  genfb(4): Fix blank screen after switching to WSDISPLAYIO_MODE_EMUL for
 >  some GPU models like Ice Lake integrated GPU:

 I'll check if reverting these changes helps.

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: tsutsui@ceres.dti.ne.jp
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-macppc/58320: NetBSD/macppc 10.0 INSTALL kernel stalls onPowerMac
	 G4
Date: Tue, 11 Jun 2024 01:53:51 +0900

 > There were more other changes (for x86 and arm? etc.):
 > 
 > https://github.com/NetBSD/src/commit/56b9a4e51561e9ad4e14e38e8a06b43b8bede03a
 > >  wsfb: Prefer wide fonts when EDID data is available. 
 > 
 > https://github.com/NetBSD/src/commit/e69e27c5ad55100572023af4b1ecc2e003c8ec82
 > >  Add 10-bit pixel format support. 

 These doesn't help, and even sources reverted to genfb.c rev 1.64
 (and necessary changes) except thorpej-cfargs also fail (black screen).

 > https://github.com/NetBSD/src/commit/71baff76aa4ee3604639f7e7212eb328df46381b
 > >  PR kern/57035 
 > >  genfb(4): Fix blank screen after switching to WSDISPLAYIO_MODE_EMUL for
 > >  some GPU models like Ice Lake integrated GPU:

 Neither this one.

 Maybe we have to check macppc VM changes?
 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: thorpej@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-macppc/58320: NetBSD/macppc 10.0 INSTALL kernel stalls on
	 Power Mac G4
Date: Thu, 13 Jun 2024 04:39:48 +0900

 > Maybe we have to check macppc VM changes?

 git bisect shows:

 ---
 7d632b8ba47400f8dd90e2764265a9747c581aca is the first bad commit
 commit 7d632b8ba47400f8dd90e2764265a9747c581aca
 Author: thorpej <thorpej@NetBSD.org>
 Date:   Wed Feb 24 16:42:38 2021 +0000

     Add a provision for a per-cpu battable.  Each CPU starts with the global
     one, but this allows CPUs to temporarily switch to an alternate battable
     if needed.

  sys/arch/powerpc/include/cpu.h       |  6 +++++-
  sys/arch/powerpc/oea/cpu_subr.c      | 12 ++++++++----
  sys/arch/powerpc/oea/genassym.cf     |  3 ++-
  sys/arch/powerpc/powerpc/trap_subr.S | 26 +++++++++++++++++++-------
  4 files changed, 34 insertions(+), 13 deletions(-)
 ---

 I.e. the following commit causes this ATI Rage128 genfb(4) problem:
  https://github.com/NetBSD/src/commit/7d632b8ba47400f8dd90e2764265a9747c581aca
  https://mail-index.netbsd.org/source-changes/2021/02/24/msg127234.html
  http://www.execsw.org/netbsd/changeset.cgi?id=20210224T164238Z.40f74c2f3ab23c266a2191d7d79f3c29dcf90b7d

 Jason, could you take a look at this?

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