From owner-freebsd-arm@FreeBSD.ORG Mon Dec 10 06:25:09 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA060FFA for ; Mon, 10 Dec 2012 06:25:09 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) by mx1.freebsd.org (Postfix) with ESMTP id 5606F8FC13 for ; Mon, 10 Dec 2012 06:25:08 +0000 (UTC) Received: from [207.6.254.8] (helo=[192.168.1.67]) by id.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ThwnU-000Bvx-4r for arm@freebsd.org; Sun, 09 Dec 2012 22:25:02 -0800 From: Oleksandr Tymoshenko Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Unsolved problem with WB caches on ARMv6 Message-Id: <37F24B3C-4600-4E57-96EB-98C91FCD2B72@bluezbox.com> Date: Sun, 9 Dec 2012 22:24:42 -0800 To: arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Hello, One of the long-time issues with FreeBSD/ARMv6 is that Write-Back cache mode does not work properly. On PandaBoard changing cache mode to WB from WT causesUSB glitches (starting from stalls to network packets corruption) and random memory corruptions that manifest themselves as a userland programs crashes. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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: Mon, 10 Dec 2012 06:25:09 -0000 Hello, One of the long-time issues with FreeBSD/ARMv6 is that Write-Back cache mode does not work properly. On PandaBoard changing cache mode to WB = from WT=20 causesUSB glitches (starting from stalls to network packets corruption) = and random=20 memory corruptions that manifest themselves as a userland programs = crashes. gber@ tracked down one of the bugs several month ago, but it's still = unusable at least on my setup.=20 I spent some time debugging through busdma and USB code but failed to = find anything fishy. PandaBoard's USB host controller is EHCI. QH and QTDs = are=20 flushed properly. Corruption pattern in packets is weird: it's not = cacheline-size it's like chunk of data is just missing from bulk transfer DMA buffer. = L2 cache is disabled.=20 The issue is not reproducible in QEMU.=20 Fix for arm/160431 applied to busdma-v6.c didn't help.=20 I'm out of ideas for now. May be Ian or Alan will have some suggestions = where to look? If you have setup with armv6 devices, I'd appreciate test results for = this patch: http://people.freebsd.org/~gonzo/patches/armv6-wb.diff Just wondering if results differ from platform to platform.=20=