NetBSD Problem Report #58890

From www@netbsd.org  Tue Dec 10 12:49:12 2024
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 662811A923D
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 10 Dec 2024 12:49:12 +0000 (UTC)
Message-Id: <20241210114013.421291A923C@mollari.NetBSD.org>
Date: Tue, 10 Dec 2024 11:40:13 +0000 (UTC)
From: jack@zage.org.uk
Reply-To: jack@zage.org.uk
To: gnats-bugs@NetBSD.org
Subject: ofppc returning NULL for kernel pmap
X-Send-Pr-Version: www-1.0

>Number:         58890
>Category:       port-ofppc
>Synopsis:       ofppc returning NULL for kernel pmap
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 10 12:50:01 +0000 2024
>Last-Modified:  Fri Dec 13 06:43:27 +0000 2024
>Originator:     Jack Dunn
>Release:        current
>Organization:
>Environment:
NetBSD bull 10.99.12 NetBSD 10.99.12 (ESCALA) #3: Tue Dec 10 11:01:11 GMT 2024  jack@eclipse:/home/jack/bull_build/sys/arch/ofppc/compile/ESCALA ofppc
>Description:
I have been working on getting NetBSD to run on my Bull Escala T604e which is an openfirmware based machine with PowerPC 604ev's. I started with 9.4 since that got further in the boot process. With that working I've moved on to 10.0/-current.

Running current with some Bull specific fixes I get the following pmap error:

[   1.0000000] Loaded initial symtab at 0x78f5ac, strtab at 0x7dca6c, # entries 19767
[   1.0000000] panic: pmap_pvo_find_va: returning NULL for kernel pmap, va: 0xa8000000

[   1.0000000] cpu0: Begin traceback...
[   1.0000000] 0x0082ad40: at vpanic+0x154
[   1.0000000] 0x0082ad70: at panic+0x50
[   1.0000000] 0x0082adb0: at pmap_pvo_find_va+0xffffa918
[   1.0000000] 0x0082adc0: at pmap32_extract+0xd8
[   1.0000000] 0x0082ade0: at uvm_km_check_empty+0x94
[   1.0000000] 0x0082ae20: at uvm_map+0xd8
[   1.0000000] 0x0082ae80: at uvm_km_suballoc+0x6c
[   1.0000000] 0x0082aea0: at uvm_pager_init+0x44
[   1.0000000] 0x0082aec0: at uvm_init+0x7c
[   1.0000000] 0x0082aee0: at main+0x54
[   1.0000000] 0x0082af10: at 0x1000e0
[   1.0000000] cpu0: End traceback...

I have narrowed this down to commit 1.121 of pmap.c (powerpc: oea: For OEA64_BRIDGE, 1:1 map up to 3GiB memory As done for OEA.).

A second issue with this commit is that it breaks video output on my machine which I haven't been able to narrow down. With the fixes applied below the machine will boot over serial console but will fault with a machine check exception in pmap_bootstrap2. Any thoughts on this would be appreciated.
>How-To-Repeat:
Build and run ofppc (I believe this will affect all ofppc machines)
>Fix:
ofppc seems to define it's own indexes for USER_SR, KERNEL_SR and KERNEL2_SR in ofppc/include/vmparam.h which appear to be incompatible with these changes.

Removing the definitions from ofppc/include/vmparam.h fixes my build (for serial console at least)

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-ofppc-maintainer->rin
Responsible-Changed-By: rin@NetBSD.org
Responsible-Changed-When: Fri, 13 Dec 2024 06:43:27 +0000
Responsible-Changed-Why:
My bug.


>Unformatted:

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.