NetBSD Problem Report #57869

From www@netbsd.org  Mon Jan 22 00:03:19 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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3C68E1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 22 Jan 2024 00:03:19 +0000 (UTC)
Message-Id: <20240122000317.183381A9239@mollari.NetBSD.org>
Date: Mon, 22 Jan 2024 00:03:17 +0000 (UTC)
From: roland.illig@gmx.de
Reply-To: roland.illig@gmx.de
To: gnats-bugs@NetBSD.org
Subject: Typos in bit descriptions SBUS_AFSR_BITS
X-Send-Pr-Version: www-1.0

>Number:         57869
>Category:       port-sparc
>Synopsis:       Typos in bit descriptions SBUS_AFSR_BITS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 22 00:05:00 +0000 2024
>Closed-Date:    Sun Apr 07 17:09:39 +0000 2024
>Last-Modified:  Sun Apr 07 17:10:01 +0000 2024
>Originator:     Roland Illig
>Release:        10.99.x
>Organization:
>Environment:
>Description:
sparc/dev/sbusreg.h says:

#define SBUS_AFSR_BITS	"\177\020"					\
			"f\0\4PAH\0b\10WM\0f\11\3SSIZ\0f\14\5SA\0"	\
			"b\11FAV\0b\12RD\0b\13ME\0f\14\4MID\0b\30S\0"	\
			"f\31\3SIZ\0b\34BERR\0b\35TO\0b\36LE\0b\37ERR\0"

Line 3 should start with "b\21FAV...", that is 2x instead of 1x.

I don't have a SPARC system available and I don't know how to test this typo.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-sparc/57869: Typos in bit descriptions SBUS_AFSR_BITS
Date: Mon, 22 Jan 2024 01:16:50 +0100

 Same topic, different file: sparc/dev/vmereg.h
 > #define VMEBUS_AFSR_BITS "\177\020"	\
 >     "b\27ME\0b\30S\0b\31ERR\0b\32WB\0\33TO\0f\34\3SZ\0"

 '\033TO' seems to be missing the leading 'b'.

 '\033TO' should be '\033BERR', shifting the following bits one place
 further.

From: matthew green <mrg@eterna23.net>
To: gnats-bugs@netbsd.org
Cc: port-sparc-maintainer@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, roland.illig@gmx.de
Subject: re: port-sparc/57869: Typos in bit descriptions SBUS_AFSR_BITS
Date: Mon, 22 Jan 2024 11:28:20 +1100

 these bits are almost never actually used since afsr is rarely
 printed, usually only upon fatal error and in some cases, when
 the hardware is failing... testing these would be hard in the
 kernel, so any userland test would suffice for me.


 .mrg.

From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-sparc/57869: Typos in bit descriptions SBUS_AFSR_BITS
Date: Mon, 22 Jan 2024 01:53:55 +0100

 Same topic, different file: sys/arch/sparc/sparc/memeccreg.h:
 > ECC_AFR_BITS ... "f\0\4VAH\0

 The "VAH" should probably be "PAH", to correspond to the name of the
 constant a few lines above.

From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-sparc/57869: Typos in bit descriptions SBUS_AFSR_BITS
Date: Mon, 22 Jan 2024 02:16:17 +0100

 In sys/arch/sparc/include/psl.h, PSTATE_BITS is missing the text for the
 upper bit of the memory model. Converting the format string to the "new
 format" would help.

 Same for sparc64.

From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-sparc/57869: Typos in bit descriptions SBUS_AFSR_BITS
Date: Mon, 22 Jan 2024 02:00:29 +0100

 Same topic, different file:

 sys/arch/sparc/include/ctlreg.h
 > SFSR_BITS ... b\01FAV\0b\01OW\0

 The \01OW should be replaced with \00OW.

State-Changed-From-To: open->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sun, 07 Apr 2024 17:09:39 +0000
State-Changed-Why:
Fixed it.


From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57869 CVS commit: src/sys/arch
Date: Sun, 7 Apr 2024 17:08:00 +0000

 Module Name:	src
 Committed By:	rillig
 Date:		Sun Apr  7 17:08:00 UTC 2024

 Modified Files:
 	src/sys/arch/sparc/include: psl.h
 	src/sys/arch/sparc/sparc: memeccreg.h
 	src/sys/arch/sparc64/include: psl.h

 Log Message:
 sparc: fix typos and omissions in PSTATE_BITS and ECC_AFR_BITS

 Fixes PR 57869.


 To generate a diff of this commit:
 cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sparc/include/psl.h
 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc/sparc/memeccreg.h
 cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sparc64/include/psl.h

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

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