From owner-freebsd-arm@FreeBSD.ORG Sun Jun 17 14:24:53 2007 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F38F016A400 for ; Sun, 17 Jun 2007 14:24:52 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6EDD013C455 for ; Sun, 17 Jun 2007 14:24:52 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l5HEOjOZ013784; Sun, 17 Jun 2007 16:24:46 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l5HEOb9V081997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Jun 2007 16:24:37 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l5HEOag4010965; Sun, 17 Jun 2007 16:24:36 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l5HEOaE8010964; Sun, 17 Jun 2007 16:24:36 +0200 (CEST) (envelope-from ticso) Date: Sun, 17 Jun 2007 16:24:36 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20070617142435.GK5189@cicely12.cicely.de> References: <286AD52D-FCA7-4814-97B7-2870B42488C6@uchicago.edu> <20070616.223540.-1975970124.imp@bsdimp.com> <20070617.013852.387192063.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070617.013852.387192063.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: PPP Bus Error X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 14:24:53 -0000 On Sun, Jun 17, 2007 at 01:38:52AM -0600, M. Warner Losh wrote: > In message: <20070616.223540.-1975970124.imp@bsdimp.com> > "M. Warner Losh" writes: > : In message: <286AD52D-FCA7-4814-97B7-2870B42488C6@uchicago.edu> > : Nathan Whitehorn writes: > : : I'm trying to establish a PPPoE connection and both ppp and mpd exit > : : with bus errors, and weird traces. Reading through the list, I see > : : someone experienced a similar error last year. Because they both > : : fail, I suspect the bug is in the netgraph ppp stuff (an alignment > : : bug, maybe?), but I was interested in knowing whether anyone else has > : : solved this problem already. Thanks, > : > : I'd check all the alignment of structures. I suspect that's what's > : doing you in... Not all the code in the FreeBSD kernel has been > : carefully audited for proper structure alignment. > > P.S. Can you send me a traceback? Since it is ppp, the userland > program, the bus error is what you get when you do an unaligned > access. mpd3 has such errors, but I did not care much because I successfully use mpd4. I have the following in libmap.conf: libpthread.so.2 libthr.so.2 libpthread.so libthr.so It was required, but it might just be because of not compiled in kernel support. At least the mpd4 problem was no bus error. Userland ppp runs as well, but required the following patch to not bus error: ==== //depot/projects/arm/src/usr.sbin/ppp/lcp.c#2 - /data/builder/arm-p4/src/usr.sbin/ppp/lcp.c ==== 939c939,940 < memcpy(&req, opt, sizeof req); --- > //memcpy(&req, opt, sizeof req); > bcopy(opt, &req, sizeof(req)); Not shure if this is still required with gcc4.2, since it was an alignment problem with gcc supplied memcpy. Therefor I did not commit this one. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de