NetBSD Problem Report #51990
From www@NetBSD.org Tue Feb 21 19:52:28 2017
Return-Path: <www@NetBSD.org>
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 4237B7A26C
for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Feb 2017 19:52:28 +0000 (UTC)
Message-Id: <20170221195227.2F1E87A295@mollari.NetBSD.org>
Date: Tue, 21 Feb 2017 19:52:27 +0000 (UTC)
From: smesgr@gmail.com
Reply-To: smesgr@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
X-Send-Pr-Version: www-1.0
>Number: 51990
>Category: port-evbarm
>Synopsis: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 21 19:55:00 +0000 2017
>Closed-Date: Wed Apr 05 16:23:55 +0000 2017
>Last-Modified: Wed Apr 05 16:23:55 +0000 2017
>Originator: Stephan Meisinger
>Release: NetBSD 7.0 (and higher)
>Organization:
>Environment:
NetBSD 7.99.60 NetBSD 7.99.60 (GUMSTIX) #47: Tue Feb 21 20:23:40 CET 2017 root@netbsd:/usr/obj/sys/arch/evbarm/compile/GUMSTIX evbarm
>Description:
Booting a recent Gumstix fails with an data_abort_handler
Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5
According to mailing list the issue was also detected on another Xscale board, but afaik not fixed:
https://mail-index.netbsd.org/port-arm/2015/03/13/msg002946.html
After going down the history. The data_aborts starting at 2012-09-22 01:00 UTC
this part of the commit changes the MMU code for all Xscale processors:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/include/arm32/pmap.h.diff?r1=1.111&r2=1.112&f=h&only_with_tag=MAIN
from
#define PMAP_NEEDS_PTE_SYNC 0
to
fallback behaviour
Restoring the behaviour solves the problem with the old build and also with current builds. Even through an additional fix is needed - introduced by this commit:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/arm32/pmap.c.diff?r1=1.261&r2=1.262&only_with_tag=MAIN&f=h
Maybe this could also cause isses for other MMU configurations not supporting ARMV6 or ARMV7.
Please also pull up fix on NetBSD 7 branch.
>How-To-Repeat:
boot Xscale Gumstix board from compact flash and select /sbin/init from SD-card
>Fix:
Index: sys/arch/arm/arm32/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.342
diff -u -r1.342 pmap.c
--- sys/arch/arm/arm32/pmap.c 23 Dec 2016 07:15:27 -0000 1.342
+++ sys/arch/arm/arm32/pmap.c 21 Feb 2017 19:33:40 -0000
@@ -1694,7 +1694,7 @@
/*
* Page tables must have the cache-mode set correctly.
*/
- const pt_entry_t npte = (pte & ~L2_S_CACHE_MASK)
+ const pt_entry_t npte = (opte & ~L2_S_CACHE_MASK)
| pte_l2_s_cache_mode_pt;
l2pte_set(ptep, npte, opte);
PTE_SYNC(ptep);
Index: sys/arch/arm/include/arm32/pmap.h
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/include/arm32/pmap.h,v
retrieving revision 1.144
diff -u -r1.144 pmap.h
--- sys/arch/arm/include/arm32/pmap.h 14 Jul 2016 05:00:51 -0000 1.144
+++ sys/arch/arm/include/arm32/pmap.h 21 Feb 2017 19:33:40 -0000
@@ -491,6 +491,8 @@
#elif (ARM_MMU_SA1 == 0)
#define PMAP_NEEDS_PTE_SYNC 0
#endif
+#elif (ARM_MMU_XSCALE > 0)
+#define PMAP_NEEDS_PTE_SYNC 0
#endif
#endif /* _KERNEL_OPT */
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-evbarm-maintainer->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Wed, 22 Feb 2017 08:48:27 +0000
Responsible-Changed-Why:
Take
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51990 CVS commit: src/sys/arch/arm
Date: Thu, 23 Feb 2017 08:22:20 +0000
Module Name: src
Committed By: skrll
Date: Thu Feb 23 08:22:20 UTC 2017
Modified Files:
src/sys/arch/arm/arm32: pmap.c
src/sys/arch/arm/include/arm32: pmap.h
Log Message:
Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.
Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.
PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
To generate a diff of this commit:
cvs rdiff -u -r1.342 -r1.343 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.144 -r1.145 src/sys/arch/arm/include/arm32/pmap.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Thu, 23 Feb 2017 16:24:52 +0000
State-Changed-Why:
I committed a slightly different change. Can you confirm it works for you.
Thanks, Nick
From: smesgr <smesgr@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-evbarm/51990
Date: Thu, 23 Feb 2017 20:56:49 +0100
thanks your patch works fine for me
State-Changed-From-To: feedback->pending-pullups
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Wed, 01 Mar 2017 16:52:37 +0000
State-Changed-Why:
[pullup-7 #1366]
From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51990 CVS commit: [netbsd-7] src/sys/arch
Date: Sat, 11 Mar 2017 07:40:21 +0000
Module Name: src
Committed By: snj
Date: Sat Mar 11 07:40:21 UTC 2017
Modified Files:
src/sys/arch/arm/arm32 [netbsd-7]: pmap.c
src/sys/arch/arm/include/arm32 [netbsd-7]: pmap.h
src/sys/arch/evbarm/gumstix [netbsd-7]: gumstix_machdep.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #1366):
sys/arch/arm/include/arm32/pmap.h: 1.145
sys/arch/arm/arm32/pmap.c: 1.343, 1.344
sys/arch/evbarm/gumstix/gumstix_machdep.c: 1.58 via patch
Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.
Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.
PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
--
fix unused.
--
Set xscale_cache_clean_addr appropriately and re-arrange default KVA
layout to allow direct map for all boards.
OVERO/DUOVERO/PEPPER aren't tested.
PR/52010: Regression: Gumstix Verdex is hanging in enabling cache + KASSERT ram_size
To generate a diff of this commit:
cvs rdiff -u -r1.295.2.8 -r1.295.2.9 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.135.2.2 -r1.135.2.3 src/sys/arch/arm/include/arm32/pmap.h
cvs rdiff -u -r1.50 -r1.50.2.1 src/sys/arch/evbarm/gumstix/gumstix_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sat, 11 Mar 2017 09:29:15 +0000
State-Changed-Why:
OK to close?
From: smesgr <smesgr@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-evbarm/51990
Date: Tue, 14 Mar 2017 19:24:51 +0100
yes thanks.
From: smesgr <smesgr@gmail.com>
To: gnats-bugs@NetBSD.org, Nick Hudson <skrll@netbsd.org>
Cc:
Subject: Re: port-evbarm/51990
Date: Wed, 5 Apr 2017 18:00:51 +0200
got a reminder today. for me the patch works fine and could be closed
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 05 Apr 2017 16:23:55 +0000
State-Changed-Why:
Pullups completed, submitter happy -- close.
>Unformatted:
(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.