From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 14 14:58:11 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAA871065678 for ; Sun, 14 Dec 2008 14:58:11 +0000 (UTC) (envelope-from brix@FreeBSD.org) Received: from solow.pil.dk (relay.pil.dk [195.41.47.164]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACCD8FC18 for ; Sun, 14 Dec 2008 14:58:11 +0000 (UTC) (envelope-from brix@FreeBSD.org) Received: from tirith.brixandersen.dk (0x55534f5f.adsl.cybercity.dk [85.83.79.95]) by solow.pil.dk (Postfix) with ESMTPA id ABEDC1CC17E for ; Sun, 14 Dec 2008 15:58:09 +0100 (CET) Received: by tirith.brixandersen.dk (Postfix, from userid 1001) id 787F71141D; Sun, 14 Dec 2008 15:58:08 +0100 (CET) Date: Sun, 14 Dec 2008 15:58:08 +0100 From: Henrik Brix Andersen To: freebsd-embedded@FreeBSD.org Message-ID: <20081214145807.GA18293@tirith.brixandersen.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline X-PGP-Key: http://www.brixandersen.dk/files/HenrikBrixAndersen.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: iicbus(4) speed selection X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 14:58:11 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, One of the parameters to our iicbus_reset method is a speed selection, which can be either IIC_SLOW, IIC_FAST or IIC_FASTEST. Both arm/at91/at91_twi.c and dev/pcf/pcf.c interpret these as 1.5kb/s, 45kb/s and 90kb/s respectively, which has me wondering. Knowing I2C, I would have expected something like 10kb/s, 100kb/s and 400kb/s. Does anybody know why these speeds were selected when implementing the above mentioned drivers? Are new drivers required to match these speeds? Brix --=20 Henrik Brix Andersen --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) Comment: GnuPG signed iEYEARECAAYFAklFHv4ACgkQv+Q4flTiePhnJwCeMnf1C8YQa3q56s6iRnb+AYwo yncAn2buMNAyqgDN5QyFzazJUkT6yyrz =rvMV -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 14 17:15:18 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7E1106564A; Sun, 14 Dec 2008 17:15:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 121CE8FC08; Sun, 14 Dec 2008 17:15:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBEHDjUg014928; Sun, 14 Dec 2008 10:13:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 14 Dec 2008 09:13:57 -0700 (MST) Message-Id: <20081214.091357.1649769204.imp@bsdimp.com> To: brix@freebsd.org From: "M. Warner Losh" In-Reply-To: <20081214145807.GA18293@tirith.brixandersen.dk> References: <20081214145807.GA18293@tirith.brixandersen.dk> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: iicbus(4) speed selection X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 17:15:18 -0000 In message: <20081214145807.GA18293@tirith.brixandersen.dk> Henrik Brix Andersen writes: : Hi, : : One of the parameters to our iicbus_reset method is a speed selection, : which can be either IIC_SLOW, IIC_FAST or IIC_FASTEST. : : Both arm/at91/at91_twi.c and dev/pcf/pcf.c interpret these as 1.5kb/s, : 45kb/s and 90kb/s respectively, which has me wondering. Knowing I2C, I : would have expected something like 10kb/s, 100kb/s and 400kb/s. : : Does anybody know why these speeds were selected when implementing the : above mentioned drivers? Are new drivers required to match these : speeds? These speeds were pulled out of the air. I copied pcf's conventions. I think that really on the at91_twi the speeds were set in the TWI's hardware and the comments are just wrong. Warner From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 15 11:06:50 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A3BC1065675 for ; Mon, 15 Dec 2008 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2C6238FC0C for ; Mon, 15 Dec 2008 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mBFB6oTO004287 for ; Mon, 15 Dec 2008 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mBFB6n2f004283 for freebsd-embedded@FreeBSD.org; Mon, 15 Dec 2008 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Dec 2008 11:06:49 GMT Message-Id: <200812151106.mBFB6n2f004283@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 11:06:50 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 16 18:22:57 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6A411065670 for ; Tue, 16 Dec 2008 18:22:57 +0000 (UTC) (envelope-from mah@jump-ing.de) Received: from mail.ud03.udmedia.de (ud03.udmedia.de [194.117.254.43]) by mx1.freebsd.org (Postfix) with ESMTP id 42EC18FC28 for ; Tue, 16 Dec 2008 18:22:56 +0000 (UTC) (envelope-from mah@jump-ing.de) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=mail.ud03.udmedia.de; h= mime-version:content-transfer-encoding:message-id:content-type: to:from:subject:date; q=dns/txt; s=beta; bh=6aUAfvty/5yi8YQaEZWM RK3ZDXGGUmP9tGilGlZKqIY=; b=Jc0WmlndXWZicEPOS0NIBFX+I3NDN3pxw69g 4Lx1jkX9X1k8nNbIrHGMzNbM04EiJNb6MA8SZ9fJadHCBGAysEDz6eQQBl9zk8yL rNPdfRJvyRRbKKqTfR7YzENHaxOmOhYV1pJWuT7/as6FyPjBrTLWYS9d525a66mQ dMOqAmU= Received: (qmail 12330 invoked from network); 16 Dec 2008 19:22:54 +0100 Received: from unknown (HELO ?10.0.0.50?) (ud03?291p1@82.212.11.84) by mail.ud03.udmedia.de with ESMTPA; 16 Dec 2008 19:22:54 +0100 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: 7bit Message-Id: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-embedded@FreeBSD.org From: Markus Hitter Date: Tue, 16 Dec 2008 19:22:39 +0100 X-Mailer: Apple Mail (2.753.1) Cc: Subject: Wake-on-lan packages don't get through X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 18:22:57 -0000 Hello all, glad to have found a binary[1] wake-on-lan program, I obvserve different behaviour of /usr/bin/wol on my full-size FreeBSD and my TinyBSD. From the full-size BSD (VirtualBox on Linux), i could capture this package after issueing wol: 18:50:30.019039 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 130) piccard.jump-ing.de.37597 > 255.255.255.255.40000: [bad udp cksum b716!] UDP, length 102 This package woke the targeted Macintosh. Doing the same on the embedded Flepo, I get: 01:38:35.500497 IP (tos 0x0, ttl 64, id 40022, offset 0, flags [none], proto UDP (17), length 130, bad cksum 0 (->d401)!) git.jump- ing.de.50582 > 255.255.255.255.40000: [bad udp cksum a1e4!] UDP, length 102 The later doesn't get through the switch, I can capture it on the sending host only. Accordingly, the Mac keeps sleeping. As both "wol" binaries are the very same (copied), I can rule out compilation errors. To be more funny, the Flepo serves web pages just fine. What does go wrong here? Thanks for any enlightenment, Markus [1] Using wakeonlan requires Perl, which in turn would more than double the size of the installation on the embedded box. - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 16 19:29:49 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280641065679 for ; Tue, 16 Dec 2008 19:29:49 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id 985598FC21 for ; Tue, 16 Dec 2008 19:29:48 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id mBGJD5is021266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 16 Dec 2008 20:13:11 +0100 (CET) (envelope-from fb-embedded@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id mBGJD58R021265 for freebsd-embedded@freebsd.org; Tue, 16 Dec 2008 20:13:05 +0100 (CET) (envelope-from fb-embedded@psconsult.nl) Date: Tue, 16 Dec 2008 20:13:05 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Message-ID: <20081216191305.GA19656@psconsult.nl> References: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Wake-on-lan packages don't get through X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 19:29:49 -0000 Hi, On Tue, Dec 16, 2008 at 07:22:39PM +0100, Markus Hitter wrote: > > Hello all, > > glad to have found a binary[1] wake-on-lan program, I obvserve different > behaviour of /usr/bin/wol on my full-size FreeBSD and my TinyBSD. From the > full-size BSD (VirtualBox on Linux), i could capture this package after > issueing wol: > > 18:50:30.019039 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP > (17), length 130) piccard.jump-ing.de.37597 > 255.255.255.255.40000: [bad > udp cksum b716!] UDP, length 102 > > This package woke the targeted Macintosh. Doing the same on the embedded > Flepo, I get: > > 01:38:35.500497 IP (tos 0x0, ttl 64, id 40022, offset 0, flags [none], > proto UDP (17), length 130, bad cksum 0 (->d401)!) git.jump-ing.de.50582 > > 255.255.255.255.40000: [bad udp cksum a1e4!] UDP, length 102 > > The later doesn't get through the switch, I can capture it on the sending > host only. Accordingly, the Mac keeps sleeping. Please show a tcpdump -e output here. The wake-on-lan packet should be sent to the ethernet broadcast address (ff:ff:ff:ff:ff:ff) for the switch to send it to all ports (which is needed since it can't learn mac address from switched off nodes). On some of my machines I need to explicitely send the packet to the IP LAN broadcast address, e.g. 192.168.1.255 (assuming /24 netmask). > As both "wol" binaries are the very same (copied), I can rule out > compilation errors. To be more funny, the Flepo serves web pages just fine. > What does go wrong here? What about the kernels, are they the same version? and does your embedded system have more than one ethernet interface? > Thanks for any enlightenment, > Markus HTH > [1] Using wakeonlan requires Perl, which in turn would more than double the > size of the installation on the embedded box. > > - - - - - - - - - - - - - - - - - - - > Dipl. Ing. Markus Hitter > http://www.jump-ing.de/ Paul Schenkeveld From owner-freebsd-embedded@FreeBSD.ORG Wed Dec 17 15:38:37 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 059E81065673 for ; Wed, 17 Dec 2008 15:38:37 +0000 (UTC) (envelope-from mah@jump-ing.de) Received: from mail.ud03.udmedia.de (ud03.udmedia.de [194.117.254.43]) by mx1.freebsd.org (Postfix) with ESMTP id 609158FC12 for ; Wed, 17 Dec 2008 15:38:35 +0000 (UTC) (envelope-from mah@jump-ing.de) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=mail.ud03.udmedia.de; h= in-reply-to:references:mime-version:content-type:message-id:cc: content-transfer-encoding:from:subject:date:to; q=dns/txt; s= beta; bh=DmlKVPNnqLBPG0WexRwbxtCPpwTYDNdoCdGL+JwdGrg=; b=YaSs+xF ftAHwnbCl28k599S+cCUnkxwEL57ERjWelLwm1AQsWd0UXbFtmAjey1ViWcQxJ5U dlF9EChm5aLhlCJWowzMfGj7J294bnBXZjdCFLcFKovEq/pNc1AUhiOvDDm3JKOR 4j2mJ0O5FGQQBUXqqPn4co9/GCT8F4x0GZUc= Received: (qmail 32703 invoked from network); 17 Dec 2008 16:38:33 +0100 Received: from unknown (HELO ?10.0.0.50?) (ud03?291p1@82.212.11.84) by mail.ud03.udmedia.de with ESMTPA; 17 Dec 2008 16:38:33 +0100 In-Reply-To: <20081216191305.GA19656@psconsult.nl> References: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> <20081216191305.GA19656@psconsult.nl> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5B4E8A71-CD88-4C0F-BD47-74B1DF6B4E0E@jump-ing.de> Content-Transfer-Encoding: 7bit From: Markus Hitter Date: Wed, 17 Dec 2008 16:38:24 +0100 To: Paul Schenkeveld X-Mailer: Apple Mail (2.753.1) Cc: freebsd-embedded@freebsd.org Subject: Re: Wake-on-lan packages don't get through X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2008 15:38:37 -0000 Am 16.12.2008 um 20:13 schrieb Paul Schenkeveld: > On Tue, Dec 16, 2008 at 07:22:39PM +0100, Markus Hitter wrote: >> >> 18:50:30.019039 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], >> proto UDP >> (17), length 130) piccard.jump-ing.de.37597 > >> 255.255.255.255.40000: [bad >> udp cksum b716!] UDP, length 102 >> >> This package woke the targeted Macintosh. Doing the same on the >> embedded >> Flepo, I get: >> >> 01:38:35.500497 IP (tos 0x0, ttl 64, id 40022, offset 0, flags >> [none], >> proto UDP (17), length 130, bad cksum 0 (->d401)!) git.jump-ing.de. >> 50582 > >> 255.255.255.255.40000: [bad udp cksum a1e4!] UDP, length 102 >> >> The later doesn't get through the switch, I can capture it on the >> sending >> host only. Accordingly, the Mac keeps sleeping. > > Please show a tcpdump -e output here. (did that privately) > What about the kernels, are they the same version? and does your > embedded system have more than one ethernet interface? These two machines have different hardware, and the kernel of the embedded box is stripped, so yes, this might be different kernel behaviour. What bugs me is: neither ethernet package contains correct checksums. How is this possible if normal network operations obviously work just fine? Do I really have to debug the kernel driver? It's the "re" driver. MarKus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 18 08:58:54 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F90C1065673 for ; Thu, 18 Dec 2008 08:58:54 +0000 (UTC) (envelope-from mah@jump-ing.de) Received: from mail.ud03.udmedia.de (ud03.udmedia.de [194.117.254.43]) by mx1.freebsd.org (Postfix) with ESMTP id C96B98FC1A for ; Thu, 18 Dec 2008 08:58:53 +0000 (UTC) (envelope-from mah@jump-ing.de) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=mail.ud03.udmedia.de; h= mime-version:in-reply-to:references:content-type:message-id: content-transfer-encoding:from:subject:date:to; q=dns/txt; s= beta; bh=sTbfxHZh7qcB2XgibPPlkg4D5cp5/U00/wqPWGXNqYk=; b=Jt+Gl9W eFtgZ/iWMXwe4sD6pyjX6Dn+kiKKNlu/yfajq0xdAs27h0X1hL685X+dEapTGSyt AN7bLBuC153ACm5JnAzklLaoGSF9qyaa69/kfuvHHJNls/UrYdg+dSX3b5wFTr/v ocee5ouqTbhp3xwCC0H+grVILKbU5A2HYOKo= Received: (qmail 20564 invoked from network); 18 Dec 2008 09:58:51 +0100 Received: from unknown (HELO ?10.0.0.50?) (ud03?291p1@82.212.11.84) by mail.ud03.udmedia.de with ESMTPA; 18 Dec 2008 09:58:51 +0100 Mime-Version: 1.0 (Apple Message framework v753.1) In-Reply-To: <20081216191305.GA19656@psconsult.nl> References: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> <20081216191305.GA19656@psconsult.nl> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Markus Hitter Date: Thu, 18 Dec 2008 09:58:53 +0100 To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.753.1) Subject: Re: Wake-on-lan packages don't get through X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 08:58:54 -0000 Am 16.12.2008 um 20:13 schrieb Paul Schenkeveld: > On some of my machines I need to explicitely send the packet to the > IP LAN broadcast address, e.g. 192.168.1.255 (assuming /24 netmask). This did the trick, finally. Those checksums reported as being bad were obviously a red herring. Thanks for helping, MarKus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 18 09:59:37 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C4A41065765 for ; Thu, 18 Dec 2008 09:59:37 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id C37E18FC14 for ; Thu, 18 Dec 2008 09:59:36 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id mBI9xUxi085528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Dec 2008 10:59:35 +0100 (CET) (envelope-from fb-embedded@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id mBI9xUCB085527 for freebsd-embedded@freebsd.org; Thu, 18 Dec 2008 10:59:30 +0100 (CET) (envelope-from fb-embedded@psconsult.nl) Date: Thu, 18 Dec 2008 10:59:30 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Message-ID: <20081218095930.GA85416@psconsult.nl> References: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> <20081216191305.GA19656@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Wake-on-lan packages don't get through X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 09:59:37 -0000 Hi, On Thu, Dec 18, 2008 at 09:58:53AM +0100, Markus Hitter wrote: > > Am 16.12.2008 um 20:13 schrieb Paul Schenkeveld: > >> On some of my machines I need to explicitely send the packet to the >> IP LAN broadcast address, e.g. 192.168.1.255 (assuming /24 netmask). > > This did the trick, finally. Those checksums reported as being bad were > obviously a red herring. Does your network card support checksum offload (TXCSUM set in ifconfig options)? In that case tcpdump on the output interface will show bad checksums as the checksum gets calculated later on by the card. If you tcpdump on another computer in the same LAN you'll see the wake-on-lan packets with correct checksums. > Thanks for helping, You're welcome. > MarKus Regards, Paul Schenkeveld From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 18 12:53:22 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B9A7106567A for ; Thu, 18 Dec 2008 12:53:22 +0000 (UTC) (envelope-from mah@jump-ing.de) Received: from mail.ud03.udmedia.de (ud03.udmedia.de [194.117.254.43]) by mx1.freebsd.org (Postfix) with ESMTP id 763698FC1A for ; Thu, 18 Dec 2008 12:53:21 +0000 (UTC) (envelope-from mah@jump-ing.de) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=mail.ud03.udmedia.de; h= mime-version:in-reply-to:references:content-type:message-id: content-transfer-encoding:from:subject:date:to; q=dns/txt; s= beta; bh=816TojjnQD4JUflopeE6CXApx+V6eY7OLz1pMlCcMpQ=; b=FH1RatA T7FH991t5ax5UV+0OqxwjSVuXEZs9UlD/QSnHLHFfTwe8gqTLKAWreC5rjhXgA5R 9LrHX7+FTL6hRXwKa0TUC6zAjrj27wRGPf6GGKtI2mezcI17BSDWTQyapbuExvPv WqZYZiy57fc4Jn0WS5LC1hMrt/v6/vioyl18= Received: (qmail 18034 invoked from network); 18 Dec 2008 13:53:19 +0100 Received: from unknown (HELO ?10.0.0.50?) (ud03?291p1@82.212.11.84) by mail.ud03.udmedia.de with ESMTPA; 18 Dec 2008 13:53:19 +0100 Mime-Version: 1.0 (Apple Message framework v753.1) In-Reply-To: <20081218095930.GA85416@psconsult.nl> References: <5CED6A5A-C532-4042-B7F3-264BD0C9791B@jump-ing.de> <20081216191305.GA19656@psconsult.nl> <20081218095930.GA85416@psconsult.nl> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Markus Hitter Date: Thu, 18 Dec 2008 13:53:16 +0100 To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.753.1) Subject: Re: Wake-on-lan packages don't get through X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 12:53:22 -0000 Am 18.12.2008 um 10:59 schrieb Paul Schenkeveld: > Does your network card support checksum offload (TXCSUM set in > ifconfig > options)? In that case tcpdump on the output interface will show bad > checksums as the checksum gets calculated later on by the card. Yes it does and I'm glad to see there's no need to fix the driver :-) MarKus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 19 14:30:09 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E3151065679; Fri, 19 Dec 2008 14:30:09 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id B530B8FC29; Fri, 19 Dec 2008 14:30:08 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id mBJE6qrB003290; Fri, 19 Dec 2008 07:06:53 -0700 Message-ID: <494BAA90.7000801@semihalf.com> Date: Fri, 19 Dec 2008 15:07:12 +0100 From: Grzegorz Bernacki MIME-Version: 1.0 To: arm@freebsd.org, embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 14:30:09 -0000 Hi, I've investigated lately problem with data corruption when copying big files on ARM machine. Below are my findings. 1. High level scenario. Problem occurs during copying of big files (~300MB and more). Calculated MD5 checksums for original and copied files are different. Chunks of data which get corrupted have always 32 bytes in length i.e. cache line length. 2. Root cause. The root cause of the problem is additional virtual mapping of read/write buffers at cluster read/write (sys/kern/vfs_cluster.c, cluster_rbuild(), cluster_wbuild(). Buffers for sequential read/write operation are concatenated and sent to device as one big buffer. Concatenation of buffers uses pmap_qenter(), which puts *additional* mapping in the KVA for physical area already mapped. For each buffer we extract pages it contains and then all the pages from all the buffers are mapped into new virtual address of new buffer. So we end up with at least two virtual addresses for each page. Such scenario on systems with virtual cache (most ARMs) leads to serious problems: we can have unflushed modified data pertaining to the same physical pages cached in separate cache blocks: data written back first (associated with virtual mapping #1) is potentially overwritten by data associated with virtual mapping #2 when its cache content is written back later, or vice versa. 3. Workaround for FFS read/write problems - avoid clustered reading/writing on ARM: # mount -o noclusterr -o noclusterw /dev/da0a /mnt/ 4. More general solution. This is the second time we indentified a problem of the same nature related to multiple virtual mapping on ARM, and are wondering about some more general solution that would prevent us from such problems (very subtle and hard to nail down) in the future. We were thinking at least about an extension to DIAGNOSTIC that would detect such attempts or so. Any other suggestions or comments welcome. From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 19 14:57:00 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F091065673; Fri, 19 Dec 2008 14:57:00 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7098FC1B; Fri, 19 Dec 2008 14:57:00 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id mBJEundq021537; Fri, 19 Dec 2008 07:56:50 -0700 Message-ID: <494BB647.2060807@semihalf.com> Date: Fri, 19 Dec 2008 15:57:11 +0100 From: Grzegorz Bernacki MIME-Version: 1.0 To: Mark Tinguely References: <200812191452.mBJEqnaM040259@casselton.net> In-Reply-To: <200812191452.mBJEqnaM040259@casselton.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arm@freebsd.org, embedded@freebsd.org Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 14:57:00 -0000 Mark Tinguely wrote: > > which version of FreeBSD (7 or -current). > It is -current. pozdrawiam, Grzesiek From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 19 15:03:42 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E857106564A; Fri, 19 Dec 2008 15:03:42 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 38C4D8FC19; Fri, 19 Dec 2008 15:03:42 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id mBJEqnJC040260; Fri, 19 Dec 2008 08:52:49 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1229698369; bh=WOYpNTKxdoShlol/DSYPKiyETDY5u5ldNCtJPF/ WHwg=; h=Date:From:Message-Id:To:Subject:In-Reply-To; b=mbSsQ3CUlu5 sPvqJ9Vmh+iWBXunIfltRypaWrt2arD7pwlERaWNZCd+7wF9oE6yYhyFlmtzsb50kJX ZQmbikv7hdYTslcHUA4IBAYnjXGqXwII4HAR92u/zV3thH/hOvnBhWqzZYQIthxdKyT YuEAUEo10KE8QvY/GJV/6x3Mh4= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id mBJEqnaM040259; Fri, 19 Dec 2008 08:52:49 -0600 (CST) (envelope-from tinguely) Date: Fri, 19 Dec 2008 08:52:49 -0600 (CST) From: Mark Tinguely Message-Id: <200812191452.mBJEqnaM040259@casselton.net> To: arm@freebsd.org, embedded@freebsd.org, gjb@semihalf.com In-Reply-To: <494BAA90.7000801@semihalf.com> Cc: Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 15:03:42 -0000 > I've investigated lately problem with data corruption when copying big files > on ARM machine. Below are my findings. ... which version of FreeBSD (7 or -current). --Mark Tinguely. From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 19 16:11:28 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1E681065674; Fri, 19 Dec 2008 16:11:28 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id B57A28FC2E; Fri, 19 Dec 2008 16:11:28 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id mBJGBRuS044292; Fri, 19 Dec 2008 10:11:27 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1229703087; bh=9qbdqjuoxEdZHeTGe+3ABEz71k8pwh6T8g67Hj2 8+WA=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=KySDFpGT k/H2HRDT4l3YIVPHIaKmUWJnWpl0mBWNg+UFon9tu2yctahjpLBMeCDeAO0keY1lc5s oX6OxDau2g0QmLx4wNuT5P5BKr73xYHR8DhuVlKLfyHztu0rhplGhxtUqIfiDhiBXaq bWPYNOWpcbPyJfHDFK2iJeDQ+U8mY= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id mBJGBRna044291; Fri, 19 Dec 2008 10:11:27 -0600 (CST) (envelope-from tinguely) Date: Fri, 19 Dec 2008 10:11:27 -0600 (CST) From: Mark Tinguely Message-Id: <200812191611.mBJGBRna044291@casselton.net> To: gjb@semihalf.com, tinguely@casselton.net In-Reply-To: <494BB647.2060807@semihalf.com> Cc: arm@freebsd.org, embedded@freebsd.org Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 16:11:29 -0000 Looking at the pmap code real quick, I think the original authors assumed quick kernel entries were not shared. Since they can be, we should have to add pv_entrys and the cache vac/fix process on the pmap_kenter_internal called routines too. I am still thinking the ARM code should revolve to FreeBSD style (recursive page tables, make SMP ready, etc). --Mark. From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 19 16:48:47 2008 Return-Path: Delivered-To: embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CBC91065677; Fri, 19 Dec 2008 16:48:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D71268FC1B; Fri, 19 Dec 2008 16:48:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBJGlSnk031441; Fri, 19 Dec 2008 09:47:28 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 19 Dec 2008 09:47:32 -0700 (MST) Message-Id: <20081219.094732.461359941.imp@bsdimp.com> To: gjb@semihalf.com From: "M. Warner Losh" In-Reply-To: <494BAA90.7000801@semihalf.com> References: <494BAA90.7000801@semihalf.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arm@FreeBSD.org, embedded@FreeBSD.org Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 16:48:47 -0000 In message: <494BAA90.7000801@semihalf.com> Grzegorz Bernacki writes: : 2. Root cause. ... : So we end up with at least two virtual addresses for each page. ... : 4. More general solution. : This is the second time we indentified a problem of the same nature related to : multiple virtual mapping on ARM, and are wondering about some more general : solution that would prevent us from such problems (very subtle and hard to : nail down) in the future. We were thinking at least about an extension to : DIAGNOSTIC that would detect such attempts or so. Any other suggestions or : comments welcome. I think this is an excellent idea. MIPS will need this too, since it too suffers from the virtual aliasing problem. Warner From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 19 18:30:40 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 231AD106564A; Fri, 19 Dec 2008 18:30:40 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout018.mac.com (asmtpout018.mac.com [17.148.16.93]) by mx1.freebsd.org (Postfix) with ESMTP id 118498FC1E; Fri, 19 Dec 2008 18:30:40 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from mdenny-t60.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp018.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KC400I0UWMYEW90@asmtp018.mac.com>; Fri, 19 Dec 2008 09:30:34 -0800 (PST) Message-id: From: Marcel Moolenaar To: Grzegorz Bernacki In-reply-to: <494BAA90.7000801@semihalf.com> Date: Fri, 19 Dec 2008 09:30:33 -0800 References: <494BAA90.7000801@semihalf.com> X-Mailer: Apple Mail (2.930.3) Cc: arm@freebsd.org, embedded@freebsd.org Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 18:30:40 -0000 On Dec 19, 2008, at 6:07 AM, Grzegorz Bernacki wrote: > 2. Root cause. > The root cause of the problem is additional virtual mapping of read/ > write > buffers at cluster read/write (sys/kern/vfs_cluster.c, > cluster_rbuild(), > cluster_wbuild(). Buffers for sequential read/write operation are > concatenated > and sent to device as one big buffer. Concatenation of buffers uses > pmap_qenter(), which puts *additional* mapping in the KVA for > physical area > already mapped. For each buffer we extract pages it contains and > then all the > pages from all the buffers are mapped into new virtual address of > new buffer. > So we end up with at least two virtual addresses for each page. Could this also affect I-cache coherency by virtue of not flushing the D-cache properly before synchronizing the I-cache, as you mention reading? -- Marcel Moolenaar xcllnt@mac.com