From owner-freebsd-arm@FreeBSD.ORG Tue Apr 16 22:43:46 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 149EE66C for ; Tue, 16 Apr 2013 22:43:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-gg0-x22f.google.com (mail-gg0-x22f.google.com [IPv6:2607:f8b0:4002:c02::22f]) by mx1.freebsd.org (Postfix) with ESMTP id CC1B11CAA for ; Tue, 16 Apr 2013 22:43:45 +0000 (UTC) Received: by mail-gg0-f175.google.com with SMTP id l1so160134ggn.6 for ; Tue, 16 Apr 2013 15:43:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=fRSIwGUGDB8P2jcvG5loGhAcFWIsevb/+obXDJOr1lM=; b=DzSQMsFXtluquGY4jZzTk/rRq28OWkZhAvEDFAMVAVdgviAWb7MszRDu7o5FEyUCBL 2CUPDlrZqPSqsRTzg7TcSCIHYJOp+3Ag5JizeoVggao/05IaLqey5a5aef8R/SJH8J28 PNdTvuIbqjGz5sKJ2kwztt8+a9WQccxDyYq+2q3hU6jkLr2EVTviLrc6ocHQhW5vpm4+ t7IxuwuEI1BuQq96NpfSBvlMAU+h/DSeIzWzvQHqtBPpEi8EaTtNEgFpycW73XfZ7x5M o3HfZDvxIqdHyJ2q9LJAa0pVjsX1KFcq+vSqZCuNZexEIEK8EcwbOynsM6NmR+TtUH7C Ej+A== X-Received: by 10.236.210.49 with SMTP id t37mr2138465yho.24.1366152225241; Tue, 16 Apr 2013 15:43:45 -0700 (PDT) Received: from fusionlt2834a.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPS id v57sm4857926yhn.19.2013.04.16.15.43.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Apr 2013 15:43:44 -0700 (PDT) Sender: Warner Losh Subject: Re: __rw_wlock_hard panic on 1st malloc Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Tue, 16 Apr 2013 16:43:41 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8DE83B01-4508-41C5-B2BD-95A72D0AD963@bsdimp.com> To: Damjan Marion X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQkQK2pbMmtdSSnFX3Gpuud8RvGO+0BdUrHvzEZoqYs3OTFZ7x9plFW6szsud2sxRIai72CA Cc: "freebsd-arm@FreeBSD.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 22:43:46 -0000 The problem here is a double fault. The first fault is in = init_dynamic_kenv when we try to read the kernel environment. The second = fault happens because we don't wind up in the debugger (I think due to = reading the stack goes awry). I've fixed the first problem in r249570. Not sure what's going on beyond that, since after fixing that I hit a = similar issue in stack_copy() but without a traceback, it is kinda hard. This is on my MarsBoard with an allwinner tech's A10 CPU. Warner On Apr 14, 2013, at 12:51 PM, Damjan Marion wrote: >=20 > I doubt. init_dynamic_kenv() is called by sysinit as part of standard = sysinit sequence and=20 > it is called after kmeminit(). >=20 > There is no my custom code except standard parts of initarm = initialisation. >=20 > Damjan >=20 > On Apr 14, 2013, at 7:19 PM, Warner Losh wrote: >=20 >> Maybe you are calling malloc before these locks are initialized? >>=20 >> Warner >>=20 >> On Apr 14, 2013, at 5:03 AM, Damjan Marion wrote: >>=20 >>>=20 >>> Hi, >>>=20 >>> I'm playing a bit with i.MX6 based board (wandboard) and I have = serial console working but >>> now it panics in init_dynamic_kenv() with the following error: >>>=20 >>> panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv = global @ /usr/src/sys/arm/arm/pmap-v6.c:1187 >>>=20 >>> It looks like this is the 1st place where malloc() is called, an = malloc returns valid VA >>> but 1st attempt to access that address produces panic above. >>>=20 >>> Any idea what can be the reason for this or any other hint? >>>=20 >>> Thanks, >>>=20 >>> Damjan >>> _______________________________________________ >>> freebsd-arm@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >>> To unsubscribe, send any mail to = "freebsd-arm-unsubscribe@freebsd.org" >>=20 >=20