From owner-freebsd-arm@FreeBSD.ORG Mon May 4 06:52:50 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB68E1065673 for ; Mon, 4 May 2009 06:52:50 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 9339D8FC0A for ; Mon, 4 May 2009 06:52:50 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2280623ywe.13 for ; Sun, 03 May 2009 23:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mo7VdURgpXWc6IeHv9+TQpUdDvqO1ohZWrSkNA77jDM=; b=Z9YR0wBYiXKFi+Kpx7H3eBx9kjM8eyb48pDIm0gtYS8J4pnEiGJddl+MhNagbEE/FK FnT5G07kR5pdGL5sRfjPHrjcHodUhK96Mtrabj6zUc/TantfePaIrhwsHOpoLcF+Yn2P ZDLDL7/v8UYf4yItMNL677dMw+w85sulRYoZQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Hh5SptOR6qRR9kxFdWHUbeOh7pH6d5z5diWogEI6zZgMrqiJQi8vCedqMV8pyfld7+ y8RbsCMZNBKcwBkTXRawVWgikTfxTYgP/B1mtDYjhXb8wYZjtk5UuTwrW6e4q9V08kX0 HXS5LocdSZs2fTzuZcuXDdfxYGg3m0wd1RrDA= MIME-Version: 1.0 Received: by 10.100.197.3 with SMTP id u3mr12535061anf.20.1241419969713; Sun, 03 May 2009 23:52:49 -0700 (PDT) In-Reply-To: <200904301705.n3UH5wg2057498@casselton.net> References: <20090430.000846.1484329326.imp@bsdimp.com> <200904301705.n3UH5wg2057498@casselton.net> Date: Mon, 4 May 2009 12:22:49 +0530 Message-ID: <515c64960905032352j25edfbcajb3d146fa769b97bb@mail.gmail.com> From: Channa To: Mark Tinguely , Olivier Houchard Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 04 May 2009 06:52:51 -0000 Hi, Thanks for the fix. I used your code and tested it works fine. But i have one doubt in the code below you have added : - cmpcs r2, #1 + beq 2f + cmp r2, #1 : Instead of the branch instruction above replace the instruction 'cmpcs' with 'cmp' since we are comparing unsigned value in 'r2' with a constant. So the code looks as below : - cmpcs r2, #1 + cmp r2, #1 : I have tested the above fix it works good for me. Please let me know your views. Thanks & Regards, Channa 2009/4/30 Mark Tinguely : > >> =A0Yes. =A0We should get the following results: >> >> =A0 =A0 =A0 strncmp("a", "b", 0); =A0 =A0 0 >> =A0 =A0 =A0 strncmp("a", "b", *); =A0 =A0 < 0 >> >> =A0where * is any other number :) >> >> =A0Warner > > ENTRY(strncmp) > /* if (len =3D=3D 0) return 0 */ > =A0 =A0 =A0 =A0cmp =A0 =A0 r2, #0 > =A0 =A0 =A0 =A0moveq =A0 r0, #0 > =A0 =A0 =A0 =A0RETeq > > /* ip =3D=3D last src address to compare */ > =A0 =A0 =A0 =A0add =A0 =A0 ip, r0, r2 > 1: > =A0 =A0 =A0 =A0ldrb =A0 =A0r2, [r0], #1 > =A0 =A0 =A0 =A0ldrb =A0 =A0r3, [r1], #1 > =A0 =A0 =A0 =A0cmp =A0 =A0 ip, r0 > - =A0 =A0 =A0 cmpcs =A0 r2, #1 > + =A0 =A0 =A0 beq =A0 =A0 2f > + =A0 =A0 =A0 cmp =A0 =A0 r2, #1 > =A0 =A0 =A0 =A0cmpcs =A0 r2, r3 > =A0 =A0 =A0 =A0beq =A0 =A0 1b > +2: > =A0 =A0 =A0 =A0sub =A0 =A0 r0, r2, r3 > =A0 =A0 =A0 =A0RET > > also ip < r0 if r2 =3D (unsigned int) -1 using 32 bit math. so original > loop will terminate and compare the first characters. For example > strncmp("ab", "aa", -1) will result is 0. > > I sent Olivier a couple patches, both wrong. Again, sorry for all the noi= se. > > The above code, though, should work in all cases. > > =A0 =A0 =A0 =A0strncmp("b", "a", 0) =A0result is 0 > =A0 =A0 =A0 =A0strncmp("abcdef", "abcdef", n) =A0result is 0 > =A0 =A0 =A0 =A0strncmp("abcde", "abcdef", n) =A0 0 if 0 <=3D n < 6 =A0neg= if n < 0 or n > 5 > =A0 =A0 =A0 =A0strncmp("abcdef", "abcde", n) =A0 0 if 0 <=3D n < 6 =A0pos= if n < 0 or n > 5 > > > The "beq" will break out of the loop if we give a count <=3D the string > length the first arguement. > > The next cmp looks for the NULL byte, and the last cmp checks the charact= ers > in the strings. > > --Mark. > From owner-freebsd-arm@FreeBSD.ORG Mon May 4 07:27:04 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F1BA106566C for ; Mon, 4 May 2009 07:27:04 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: from mail-gx0-f162.google.com (mail-gx0-f162.google.com [209.85.217.162]) by mx1.freebsd.org (Postfix) with ESMTP id DC4E78FC0C for ; Mon, 4 May 2009 07:27:03 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: by gxk6 with SMTP id 6so763119gxk.19 for ; Mon, 04 May 2009 00:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=EumS6Zh+FqPcMCu9q5/DFbtlZg3Ou6T4fhOYmx6ezG8=; b=c/6nksYnaKGPyL3C0hzSNb27+HHVI38yWlbX/o8qYxu/vcY6toR5p37zn6+I+QpKmJ ISoirij1esn+deaFnolQlIACJxj/2hj2O0lHmf6Gl5wEZqSzpF9BiGzlsetYv0mnYVUY 1ykJFDE2F9y3iBKDZ/Uadn6t0lWR71peS5Kls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=VnGpijkY/81vVSwpQMIb/aKzC13LxLwchYUSXYcixXPrxT9/6zLQu5oiL21MkfHQDC 0mw8uJcaLv2HGs1RNdn7I0F027UD8/TZk0fmr2veGUMmk8pNI8Zco5Uv+1ClEJD0AERW /f11qyTGpW0Z+p2yODIkSzxL/VN51dl+XqXxw= MIME-Version: 1.0 Received: by 10.151.124.6 with SMTP id b6mr11372646ybn.160.1241420625269; Mon, 04 May 2009 00:03:45 -0700 (PDT) Date: Mon, 4 May 2009 12:33:45 +0530 Message-ID: <6d53329e0905040003sf72dddax16512347142ade3c@mail.gmail.com> From: venki kaps To: tinguely@casselton.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-arm@freebsd.org Subject: Regarding strncmp fix X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 04 May 2009 07:27:05 -0000 Hi, This is my idea only. strncmp problem report: ======================== In the following below website: *http://archive.netbsd.se/?ml=freebsd-arm&a=2009-04&m=10547557* Hi, I am using the freebsd implementation of strncmp for ARM which is an assembly implementation. I have a small doubt, when i tested the strncmp by passing the third argument: 'n' as -1 the return values is '0' instead it should '-1'. When the third argument to strncmp is as below: ret = strncmp("a","b",-1) I think the assembly implementation in > src/lib/libc/arm/string/strncmp.S file needs to be modified to take care of the above condition. In the current implementation /* if ((len - 1) subs r2, r2, #1 movmi r0, #0 RETc(mi) This should be changed to check as below /* if ((len ) /* Assembly code here */ FreeBSD source: =============== ENTRY(strncmp) /* if ((len - 1) < 0) return 0 */ subs r2, r2, #1 movmi r0, #0 RETc(mi) /* ip == last src address to compare */ add ip, r0, r2 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 cmpcs r2, #1 cmpcs r2, r3 beq 1b sub r0, r2, r3 RET Tinguely has given one solution for this: ENTRY(strncmp) /* if (len == 0) return 0 */ cmp r2, #0 moveq r0, #0 RETeq /* ip == last src address to compare */ add ip, r0, r2 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 - cmpcs r2, #1 + beq 2f + cmp r2, #1 cmpcs r2, r3 beq 1b +2: sub r0, r2, r3 RET The above fix is nice. But small change in the fix: ENTRY(strncmp) /* if (len == 0) return 0 */ cmp r2, #0 moveq r0, #0 RETeq /* ip == last src address to compare */ add ip, r0, r2 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 - cmpcs r2, #1 + cmp r2, #1 /* to igonre Carry falg set (unsigned higher or same) */ cmpcs r2, r3 beq 1b sub r0, r2, r3 RET Branch to 2f is not required since conditional assemblers automatically calls subroutine when compare fails. And also we can reduce no. of cycles(3 cycles) since 3 cycles required to branch. But I have one smaller query: Will it support the above code in the ARM-thumb mode? NOTE: Thumb mode and traditional mode instruction sets are different. Thumb mode implementation: /* if (len == 0) return 0 */ cmp r2, #0 bne 1f mov r0, #0 RET 1: /* ip == last src address to compare */ add ip, r0, r2 2: cmp ip, r0 beq 3f ldrb r2, [r0] add r0, r0, #1 ldrb r3, [r1] add r1, r1, #1 cmp r2, #0 beq 3f cmp r2, r3 beq 2b 3: sub r0, r2, r3 RET Will need to support both thumb mode as well as traditional mode? Example: #ifdef __thumb__ /* thumb code here */ #else /* traditional code here */ #endif Thanks & Regards, Venkappa From owner-freebsd-arm@FreeBSD.ORG Mon May 4 11:07:42 2009 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E35871065673 for ; Mon, 4 May 2009 11:07:42 +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 B56AE8FC13 for ; Mon, 4 May 2009 11:07:42 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n44B7gj3098447 for ; Mon, 4 May 2009 11:07:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n44B7fJW098409 for freebsd-arm@FreeBSD.org; Mon, 4 May 2009 11:07:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 4 May 2009 11:07:41 GMT Message-Id: <200905041107.n44B7fJW098409@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arm@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 04 May 2009 11:07:43 -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 arm/134092 arm [patch] NSLU.hints contains wrong hints for on board n 1 problem total. From owner-freebsd-arm@FreeBSD.ORG Mon May 4 13:01:16 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6376A106566B for ; Mon, 4 May 2009 13:01:16 +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 1F0928FC21 for ; Mon, 4 May 2009 13:01:15 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n44Cxu0a077932; Mon, 4 May 2009 07:59:56 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1241441996; bh=lo5RMn5J+TCCfdSblCy85xrN03FA7sitSUi5r9hNnX4=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=OUXYFRSzJlKrcTwNOamrZ69dXtCK3NknEzM4Xi+EoP9Wro0yKmWG+UiwqxnNSqJ4D imNfbH6ibWsSFNbqc5aXwVWSKHtzK8wvTL63lz3Oiq8lrg3GBr5aDgmfzaLYyfsCd3 /6oveFzfOPS09wiSb28eL+cy8H9lxNO5x4dOdna0= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n44CxtV2077931; Mon, 4 May 2009 07:59:55 -0500 (CDT) (envelope-from tinguely) Date: Mon, 4 May 2009 07:59:55 -0500 (CDT) From: Mark Tinguely Message-Id: <200905041259.n44CxtV2077931@casselton.net> To: channa.kad@gmail.com, mlfbsd@ci0.org, tinguely@casselton.net, venkiece2005@gmail.com In-Reply-To: <515c64960905032352j25edfbcajb3d146fa769b97bb@mail.gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Mon, 04 May 2009 07:59:56 -0500 (CDT) Cc: freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 04 May 2009 13:01:16 -0000 Hi, the propose code by both of you two: /* if (len == 0) return 0 */ cmp r2, #0 moveq r0, #0 moveq pc, lr /* ip == last src address to compare */ add ip, r0, r2 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 cmp r2, #1 cmpcs r2, r3 beq 1b sub r0, r2, r3 That was one of my failed attempts. I to was hoping to not add the branch to cut down in cycles. A person has to test every possible call to strncmp. This will fail on a positive string length less than strlen length of the input strings: strncmp("abcdefg", "abcdefh", 6) Will return (-1) str1 < str2 at 6 characters which is wrong. /* if (len == 0) return 0 */ cmp r2, #0 moveq r0, #0 moveq pc, lr /* ip == last src address to compare */ add ip, r0, r2 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 beq 2f <- stops in the case where strlen(s1) > len cmp r2, #1 <- stops thea NULL case, we can't just change the comparison because below we loop on an equality and can end up in a big loop cmpcs r2, r3 <- compare characters. beq 1b 2: sub r0, r2, r3 From owner-freebsd-arm@FreeBSD.ORG Tue May 5 00:12:21 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7891A106566B for ; Tue, 5 May 2009 00:12:21 +0000 (UTC) (envelope-from don@donhayford.com) Received: from rehobot.2ip.com (rehobot.2ip.com [75.125.216.154]) by mx1.freebsd.org (Postfix) with ESMTP id 303CD8FC08 for ; Tue, 5 May 2009 00:12:21 +0000 (UTC) (envelope-from don@donhayford.com) Received: from d47-69-178-97.try.wideopenwest.com ([69.47.97.178]:42236 helo=[192.168.1.104]) by rehobot.2ip.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1M18Gd-00020t-VW; Mon, 04 May 2009 17:12:16 -0700 Message-ID: <49FF8461.6020406@donhayford.com> Date: Mon, 04 May 2009 20:12:17 -0400 From: Donald T Hayford User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Rafal Jaworowski References: <49FA5B75.9090008@donhayford.com> <49FADE9B.1080806@donhayford.com> <494D378B-B243-4D97-8554-AC3E74A30B8C@semihalf.com> <49FB8696.8020907@donhayford.com> <72D23F68-EE62-4297-88F4-6CA0132F0293@semihalf.com> In-Reply-To: <72D23F68-EE62-4297-88F4-6CA0132F0293@semihalf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - rehobot.2ip.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - donhayford.com Cc: freebsd-arm@freebsd.org Subject: Re: Help with Marvel kernel for 88F6281 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 05 May 2009 00:12:21 -0000 Rafal Jaworowski wrote: > > On 2009-05-02, at 01:32, Donald T Hayford wrote: > >> Rafal Jaworowski wrote: >>> >>> On 2009-05-01, at 13:35, Donald T Hayford wrote: >>> >>>> Rafal Jaworowski wrote: >>>> >>> >>> [...] >>> >>> I don't see any mismatches WRT internal SOC registers location etc. >>> and need to look a bit closer to the SheevaPlug docs. >>> >>> Just a basic clarification: you are 100% sure the correct DB-88F6XXX >>> kernel image is used, right? >>> >>> Rafal >>> >> I'm as sure as I can be. >> >> [verify the directory on the FreeBSD machine is the 6XXX directory] > > OK, thanks for verfiication. > >> Marvell>> go 0x900000 >> ## Starting application at 0x00900000 ... >> [sheevaplug hangs up] >> >> Note that the file size that was loaded by UBoot was 2863204 bytes >> long, the same as the length of the file in the directory listing >> above. The 5XXX kernel is slightly longer at 2870196 bytes. > > Please do a quick experiment: eliminate (#if 0) contents of the > platform_mpp_init() in sys/arm/mv/kirkwood/db88f6xxx.c and > recompile/rerun. The SP device could have MPP/GPIO layed out > differently (note you're using DB-88F6281 dev board configuration): we > could be overwriting UART lines connection settings and hence lose > console output. > > Rafal > Commented out all of the code in /usr/src/sys/arm/mv/kirkwood/db88f6xxx.c/platform_mpp_init(). New kernel size is 2862968; i.e., 336 bytes shorter. Unfortunately, the same result: Marvell>> go 0x900000 ## Starting application at 0x00900000 ... [sheevaplug hangs up] Regards, Don From owner-freebsd-arm@FreeBSD.ORG Tue May 5 07:04:21 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E985106566B for ; Tue, 5 May 2009 07:04:21 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id E845C8FC08 for ; Tue, 5 May 2009 07:04:20 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2693246ywe.13 for ; Tue, 05 May 2009 00:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=4A2omUMQ3FYJ14ULsEDvkx44+rTDYKpvfr0zPs1zFL0=; b=uczXDVOrI4ZKbTVo9b37DhSDlOhgxbig9XHhbzYFR+VkNagdo3AahUEFTPhzg2K+QI tYbuf8MRCfubA8R5jSBcQQT2xRFGzhqWDGndXIvbyildawUJg/BdCKV/ccq/sC9QIbJm VD0wUQhPcgZno0qtVOaP1lCDnBWTUHG9hgmMM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=GZDPk7uuQfJTjwyZLaExhXbf6L1uGmUIzBEETEXEnjEEhXGThjpeyFxxvA7WQDraWQ glDWDUSlOQ5/PeawZIXKziZwh9yTt1I8ZMhvjNWNaMH/3waL804TZt1vOenseZRKcw7f 8ihfVe5lvus7tvRNRWQ2vZduHh9Ur2DOrWddA= MIME-Version: 1.0 Received: by 10.151.149.6 with SMTP id b6mr13763509ybo.47.1241507060202; Tue, 05 May 2009 00:04:20 -0700 (PDT) In-Reply-To: <200905041259.n44CxtV2077931@casselton.net> References: <515c64960905032352j25edfbcajb3d146fa769b97bb@mail.gmail.com> <200905041259.n44CxtV2077931@casselton.net> Date: Tue, 5 May 2009 12:34:20 +0530 Message-ID: <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> From: venki kaps To: Mark Tinguely Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 05 May 2009 07:04:21 -0000 Hi, I have tested strncmp("abcdefg", "abcdefh", 6) without beq 2f. It returns zero not -1. I have checked with conditional assembler but not normal assembler. The beq 2f is required for normal assembler. Right/Wrong? However also checked with strncmp.c implementation: int strnncmp(const char *s1, const char *s2, size_t n) { if (n == 0) return (0); do { if (*s1 != *s2++) return (*(const unsigned char *)s1 - *(const unsigned char *)--s2); if (*s1++ == 0) break; } while (--n != 0); return (0); } the equivalent assembly code: cmp r2, #0 mov ip, r0 beq 2f 1: ldrb r0, [ip, #0] ldrb r3, [r1], #1 add ip, ip, #1 cmp r0, r3 bne 3f cmp r0, #0 beq 2f subs r2, r2, #1 bne 1b 2: mov r0, #0 mov pc, lr 3: ldrb r3, [r1, #-1] rsb r0, r3, r0 /* operand2 - operand1 */ mov pc, lr The results are same. what could you suggest? Thanks & Regards, Venkappa On Mon, May 4, 2009 at 6:29 PM, Mark Tinguely wrote: > > Hi, the propose code by both of you two: > > /* if (len == 0) return 0 */ > cmp r2, #0 > moveq r0, #0 > moveq pc, lr > > /* ip == last src address to compare */ > add ip, r0, r2 > 1: > ldrb r2, [r0], #1 > ldrb r3, [r1], #1 > cmp ip, r0 > cmp r2, #1 > cmpcs r2, r3 > beq 1b > sub r0, r2, r3 > > That was one of my failed attempts. I to was hoping to not add the branch > to cut down in cycles. A person has to test every possible call to strncmp. > This will fail on a positive string length less than strlen length of the > input strings: > > strncmp("abcdefg", "abcdefh", 6) > > Will return (-1) str1 < str2 at 6 characters which is wrong. > > > /* if (len == 0) return 0 */ > cmp r2, #0 > moveq r0, #0 > moveq pc, lr > > /* ip == last src address to compare */ > add ip, r0, r2 > 1: > ldrb r2, [r0], #1 > ldrb r3, [r1], #1 > cmp ip, r0 > beq 2f <- stops in the case where strlen(s1) > len > cmp r2, #1 <- stops thea NULL case, we can't just > change > the comparison because below we loop on > an equality and can end up in a big loop > > cmpcs r2, r3 <- compare characters. > beq 1b > 2: > sub r0, r2, r3 > > From owner-freebsd-arm@FreeBSD.ORG Tue May 5 10:20:35 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3EB91065677 for ; Tue, 5 May 2009 10:20:34 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id A24158FC0A for ; Tue, 5 May 2009 10:20:34 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2737538ywe.13 for ; Tue, 05 May 2009 03:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=jLmX1Ut4P9DY8eheuYxwCxuUuNfciehRI1F7NXR8P/4=; b=x+GPa8HE81AzQ/SqCcOJ99PKZ+00MY9c5Vr1a5Wze3sCjF9m/x9qqh0UGJyrT+oKHf xAO8UjpLni7T4Q0S4R6HdRAAiEVoxpoF+qu+9aKk92pnBDUkkCx4YBWKilDDNg0nadK2 VTq0GpyjoPEWvEPQGWVgaz2u0G6cSvokzmZg4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=VIZOAbgHxMjTlR83y37a0fJTQZZpZosfFUAKeLaRGQOpH5a4rrcrFnXFsiqVSwScWK S1EBdXkadAwjOGo/R2Yl71IQJ0XGa9rqs1jNhL+mJzUnYWvJW9yRf8X+A+EcQof/Z/XM ykIx6ZsOKZpUzeSJ9DqHHWvUNuIJPUohsgTkU= MIME-Version: 1.0 Received: by 10.150.139.15 with SMTP id m15mr14051576ybd.22.1241518833887; Tue, 05 May 2009 03:20:33 -0700 (PDT) In-Reply-To: <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> References: <515c64960905032352j25edfbcajb3d146fa769b97bb@mail.gmail.com> <200905041259.n44CxtV2077931@casselton.net> <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> Date: Tue, 5 May 2009 15:50:33 +0530 Message-ID: <6d53329e0905050320q5c7480e9h4bcb629222fce16@mail.gmail.com> From: venki kaps To: Mark Tinguely Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 05 May 2009 10:20:35 -0000 Conditional compares are difficult but compilers are very good at: if (len == 0) return 0; cmp r2, 0 moveq r0, #0 moveq pc, lr while (r0 = *s1++, r1 = *s2++, ip = r0 + len; ip == r0 && r0 >= 1 && r0 == r1); add ip, r0, r2 loop ldrb r0, [s1],#1 ldrb r1, [s2],#1 cmp ip, r0 cmp r0,#1 cmpcs r0,r1 beq loop subroutine here Regards, Venkappa On Tue, May 5, 2009 at 12:34 PM, venki kaps wrote: > Hi, > > I have tested strncmp("abcdefg", "abcdefh", 6) without beq 2f. > It returns zero not -1. > > I have checked with conditional assembler but not normal assembler. > The beq 2f is required for normal assembler. > Right/Wrong? > > However also checked with strncmp.c implementation: > > int strnncmp(const char *s1, const char *s2, size_t n) { > if (n == 0) > return (0); > do { > if (*s1 != *s2++) > return (*(const unsigned char *)s1 - > *(const unsigned char *)--s2); > if (*s1++ == 0) > break; > } while (--n != 0); > return (0); > } > the equivalent assembly code: > > cmp r2, #0 > mov ip, r0 > beq 2f > 1: > ldrb r0, [ip, #0] > ldrb r3, [r1], #1 > add ip, ip, #1 > cmp r0, r3 > bne 3f > cmp r0, #0 > beq 2f > subs r2, r2, #1 > bne 1b > 2: > mov r0, #0 > mov pc, lr > 3: > ldrb r3, [r1, #-1] > rsb r0, r3, r0 /* operand2 - operand1 */ > mov pc, lr > > The results are same. > > what could you suggest? > > Thanks & Regards, > Venkappa > > On Mon, May 4, 2009 at 6:29 PM, Mark Tinguely wrote: > >> >> Hi, the propose code by both of you two: >> >> /* if (len == 0) return 0 */ >> cmp r2, #0 >> moveq r0, #0 >> moveq pc, lr >> >> /* ip == last src address to compare */ >> add ip, r0, r2 >> 1: >> ldrb r2, [r0], #1 >> ldrb r3, [r1], #1 >> cmp ip, r0 >> cmp r2, #1 >> cmpcs r2, r3 >> beq 1b >> sub r0, r2, r3 >> >> That was one of my failed attempts. I to was hoping to not add the branch >> to cut down in cycles. A person has to test every possible call to >> strncmp. >> This will fail on a positive string length less than strlen length of the >> input strings: >> >> strncmp("abcdefg", "abcdefh", 6) >> >> Will return (-1) str1 < str2 at 6 characters which is wrong. >> >> >> /* if (len == 0) return 0 */ >> cmp r2, #0 >> moveq r0, #0 >> moveq pc, lr >> >> /* ip == last src address to compare */ >> add ip, r0, r2 >> 1: >> ldrb r2, [r0], #1 >> ldrb r3, [r1], #1 >> cmp ip, r0 >> beq 2f <- stops in the case where strlen(s1) > len >> cmp r2, #1 <- stops thea NULL case, we can't just >> change >> the comparison because below we loop on >> an equality and can end up in a big loop >> >> cmpcs r2, r3 <- compare characters. >> beq 1b >> 2: >> sub r0, r2, r3 >> >> > From owner-freebsd-arm@FreeBSD.ORG Tue May 5 13:17:56 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BBB910656A4 for ; Tue, 5 May 2009 13:17:56 +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 442628FC16 for ; Tue, 5 May 2009 13:17:56 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n45DHtd9044429; Tue, 5 May 2009 08:17:55 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1241529475; bh=DOeP6K9I5V39kn13X2x+pVklZi65vSKDYZNr2qL3f8E=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=arNWe719ZjP1UGwYci1/xzng3S5ERlVDU7brTfMjHwe8WlY23nYECBjXXqpvUZSAp 1u2D02PE0Xpg8G3+m6dxtocadlOT7E5M0OOz12RrALARSvHjD54pPyYZIE7MrwiPit 62cGp2h4RhuW81USu6D2M7ks84H3s4ctyKP0sXe0= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n45DHtKW044428; Tue, 5 May 2009 08:17:55 -0500 (CDT) (envelope-from tinguely) Date: Tue, 5 May 2009 08:17:55 -0500 (CDT) From: Mark Tinguely Message-Id: <200905051317.n45DHtKW044428@casselton.net> To: tinguely@casselton.net, venkiece2005@gmail.com In-Reply-To: <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Tue, 05 May 2009 08:17:55 -0500 (CDT) Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 05 May 2009 13:17:57 -0000 > I have tested strncmp("abcdefg", "abcdefh", 6) without beq 2f. > It returns zero not -1. > > I have checked with conditional assembler but not normal assembler. > The beq 2f is required for normal assembler. > Right/Wrong? Yes, the compiler with FreeBSD-current needs the "beq 2f". Can can one do 2 unconditional "cmp" in sequence without losing the condition codes of the first "cmp"? I am sure this is becoming a 'bikeshed' topic. I built way more than my share of the shed. So, as long as it works, I will be happy. --Mark. From owner-freebsd-arm@FreeBSD.ORG Tue May 5 14:19:13 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA6E8106564A for ; Tue, 5 May 2009 14:19:13 +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 827458FC13 for ; Tue, 5 May 2009 14:19:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n45EH013037665; Tue, 5 May 2009 08:17:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 05 May 2009 08:17:01 -0600 (MDT) Message-Id: <20090505.081701.569396874.imp@bsdimp.com> To: tinguely@casselton.net From: "M. Warner Losh" In-Reply-To: <200905051317.n45DHtKW044428@casselton.net> References: <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> <200905051317.n45DHtKW044428@casselton.net> 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: channa.kad@gmail.com, freebsd-arm@freebsd.org, venkiece2005@gmail.com Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 05 May 2009 14:19:14 -0000 In message: <200905051317.n45DHtKW044428@casselton.net> Mark Tinguely writes: : : > I have tested strncmp("abcdefg", "abcdefh", 6) without beq 2f. : > It returns zero not -1. : > : > I have checked with conditional assembler but not normal assembler. : > The beq 2f is required for normal assembler. : > Right/Wrong? : : Yes, the compiler with FreeBSD-current needs the "beq 2f". : : Can can one do 2 unconditional "cmp" in sequence without losing the condition : codes of the first "cmp"? : : I am sure this is becoming a 'bikeshed' topic. I built way more than my : share of the shed. So, as long as it works, I will be happy. Is the hand rolled assembler still better than what gcc can produce? Warner From owner-freebsd-arm@FreeBSD.ORG Tue May 5 16:37:20 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AC63106566B for ; Tue, 5 May 2009 16:37:20 +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 15A658FC1A for ; Tue, 5 May 2009 16:37:19 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n45GbFOG057470; Tue, 5 May 2009 11:37:15 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1241541435; bh=VBJlytDzc1PqKw62UtsXhEX0OYL39nuJyV2N1/WSO6s=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=Plx9FQhjFBSi+TY03fGqd3IdC4dUgcPEzxbIZ3w4qidkS9IZNzcXmug8enKDGwy3w pT0iM1abYBZMga1pbybu00v3Aaj5HScxFmz7C7tYktEBMLiqIgI9UDJ1+9s/CNpdYs EpvfAodwCte3+57ZT7xiz1JcS4Ft8C6oC80HQGP4= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n45GbE7Q057469; Tue, 5 May 2009 11:37:14 -0500 (CDT) (envelope-from tinguely) Date: Tue, 5 May 2009 11:37:14 -0500 (CDT) From: Mark Tinguely Message-Id: <200905051637.n45GbE7Q057469@casselton.net> To: imp@bsdimp.com, tinguely@casselton.net In-Reply-To: <20090505.081701.569396874.imp@bsdimp.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Tue, 05 May 2009 11:37:15 -0500 (CDT) Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org, venkiece2005@gmail.com Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 05 May 2009 16:37:20 -0000 > Is the hand rolled assembler still better than what gcc can produce? > > Warner Assuming my additional conditional branch, we can save at least an add and a branch in the comparison loop with the hard rolled assembler over the "cc -O2 head/lib/libc/string/strncmp.c" code. If the conditional branch can be deleted, then even better. --Mark. From owner-freebsd-arm@FreeBSD.ORG Wed May 6 17:22:40 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E571065676 for ; Wed, 6 May 2009 17:22:40 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 748AB8FC13 for ; Wed, 6 May 2009 17:22:39 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by fg-out-1718.google.com with SMTP id e12so1027667fga.12 for ; Wed, 06 May 2009 10:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-pgp-agent:x-mailer; bh=U7jttVXnniKd+/cMNl/kv194IWHGAhPmrXYC1Ucd7l0=; b=pGj12TMmUJM72NI2eFSPK0N5pezcDCsrIjsKEuk6qKSvvgXWdupJJcKI1nD+BUv/SP KU6AJrE/wOYKcQNChe4/iv1YMUiUmmL8hvaM/SIvXiIhtKxM4vV6hWvDSrST1b0k2fl6 f9liAmbGlBzrPM8kZgcjsCID93+Sj8u0fjS24= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-pgp-agent:x-mailer; b=QpU/9izfU1cOkCgH/FhL97BJY2vHRH9CWBoFmQkdywPBu8OZiv9JN4KOMWONW9KRjH QAGA+jjrqgG4kAjz3dC4ysqJQ9k1pciR6JFGKbNHtfBX5AKwbxVUp5wvwoLKieADas1x gWxwWM3lxIDHCwq9/bVhEmQ12YAyLDUn/U7z0= Received: by 10.86.49.16 with SMTP id w16mr1504653fgw.33.1241628839891; Wed, 06 May 2009 09:53:59 -0700 (PDT) Received: from epsilon.lan (bl5-225-213.dsl.telepac.pt [82.154.225.213]) by mx.google.com with ESMTPS id e20sm10943710fga.5.2009.05.06.09.53.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 May 2009 09:53:59 -0700 (PDT) Message-Id: <1D99BB94-12E9-4425-AA1D-0CC3FAFF016C@gmail.com> From: Rui Paulo To: freebsd-arm@freebsd.org Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3--818864198" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 6 May 2009 17:53:44 +0100 X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Subject: Can't build ports and/or system on HEAD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 17:22:40 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3--818864198 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, I can't build ports on an arm embedded system. After the recent strncmp() problem, I'm suspecting this is a fallout of something than a misconfiguration of my part. My sys.mk MD5 is: $ md5 /usr/share/mk/sys.mk MD5 (/usr/share/mk/sys.mk) = 5f02492bd3dc89d976067eeaa75d4d76 Which I think is correct. Any ideas? # make -d A Global:.MAKEFLAGS = -d Global:.MAKEFLAGS = -d A Global:MFLAGS = -d Global:MFLAGS = -d A Caching ....done Global:.ST_EXPORTVAR = YES Global:.CURDIR = /usr/ports/editors/elvis Global:.OBJDIR = /usr/ports/editors/elvis Global:.TARGETS = Caching /usr/share/mk...done expanding "sys.mk".../usr/share/mk/sys.mk Global:MAKEFILE = /usr/share/mk/sys.mk Global:.MAKEFILE_LIST = /usr/share/mk/sys.mk Global:unix = We run FreeBSD, not UNIX. Global:.FreeBSD = true "/usr/share/mk/sys.mk", line 16: Missing dependency operator "/usr/share/mk/sys.mk", line 18: if-less else "/usr/share/mk/sys.mk", line 20: if-less endif Global:AR = ar "/usr/share/mk/sys.mk", line 23: Missing dependency operator Global:ARFLAGS = -rv "/usr/share/mk/sys.mk", line 25: if-less else "/usr/share/mk/sys.mk", line 27: if-less endif Global:RANLIB = ranlib Global:AS = as Global:AFLAGS = "/usr/share/mk/sys.mk", line 33: Missing dependency operator Global:CC = c89 Global:CFLAGS = -O "/usr/share/mk/sys.mk", line 36: if-less else "/usr/share/mk/sys.mk", line 38: Need an operator "/usr/share/mk/sys.mk", line 40: if-less else "/usr/share/mk/sys.mk", line 42: if-less endif "/usr/share/mk/sys.mk", line 43: Missing dependency operator Global:CFLAGS = -O -fno-strict-aliasing "/usr/share/mk/sys.mk", line 45: if-less endif "/usr/share/mk/sys.mk", line 46: if-less endif Global:NO_CTF = 1 "/usr/share/mk/sys.mk", line 52: if-less endif Global:CTFFLAGS = -L VERSION Global:CTFCONVERT = ctfconvert Global:CTFMERGE = ctfmerge Applying :M to "-O -fno-strict-aliasing" Result is "" "/usr/share/mk/sys.mk", line 60: Missing dependency operator Global:CTFFLAGS = -L VERSION -g "/usr/share/mk/sys.mk", line 62: if-less else Global:CFLAGS = -O -fno-strict-aliasing -g "/usr/share/mk/sys.mk", line 64: if-less endif "/usr/share/mk/sys.mk", line 65: if-less endif Global:CXX = c++ Global:CXXFLAGS = ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N- Wno-pointer-sign} Global:CPP = cpp "/usr/share/mk/sys.mk", line 72: Missing dependency operator Global:ECHO = echo Global:ECHODIR = echo "/usr/share/mk/sys.mk", line 75: if-less else Applying :M to " -d A" Result is "" "/usr/share/mk/sys.mk", line 77: Need an operator "/usr/share/mk/sys.mk", line 79: if-less else "/usr/share/mk/sys.mk", line 81: if-less endif "/usr/share/mk/sys.mk", line 82: if-less endif Applying :M to " -d A" Result is "" Global:_+_ = "/usr/share/mk/sys.mk", line 86: if-less else "/usr/share/mk/sys.mk", line 88: if-less endif "/usr/share/mk/sys.mk", line 90: Missing dependency operator Global:FC = fort77 Global:FFLAGS = -O 1 "/usr/share/mk/sys.mk", line 93: if-less else "/usr/share/mk/sys.mk", line 96: if-less endif Global:EFLAGS = Global:INSTALL = install Global:LEX = lex Global:LFLAGS = Global:LD = ld Global:LDFLAGS = Global:LINT = lint Global:LINTFLAGS = -cghapbx Global:LINTKERNFLAGS = ${LINTFLAGS} Global:LINTOBJFLAGS = -cghapbxu -i Global:LINTOBJKERNFLAGS = ${LINTOBJFLAGS} Global:LINTLIBFLAGS = -cghapbxu -C ${LIB} Global:OBJC = cc Global:OBJCFLAGS = ${OBJCINCLUDES} ${CFLAGS} -Wno-import Global:PC = pc Global:PFLAGS = Global:RC = f77 Global:RFLAGS = Global:YACC = yacc "/usr/share/mk/sys.mk", line 128: Missing dependency operator Global:YFLAGS = "/usr/share/mk/sys.mk", line 130: if-less else "/usr/share/mk/sys.mk", line 132: if-less endif "/usr/share/mk/sys.mk", line 134: Missing dependency operator defining transformation from `.c' to `' inserting an empty list?...inserting .c(2)...at end of list inserting an empty list?...inserting (0)...at end of list transformation .c complete "/usr/share/mk/sys.mk", line 145: Missing dependency operator "/usr/share/mk/sys.mk", line 147: if-less endif defining transformation from `.f' to `' inserting .f(7)...at end of list inserting an empty list?...inserting (0)...at end of list transformation .f complete "/usr/share/mk/sys.mk", line 151: Missing dependency operator "/usr/share/mk/sys.mk", line 152: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 152: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 153: if-less endif defining transformation from `.sh' to `' inserting .sh(6)...before .f(7) inserting an empty list?...inserting (0)...at end of list transformation .sh complete "/usr/share/mk/sys.mk", line 163: Missing dependency operator "/usr/share/mk/sys.mk", line 164: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 164: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 165: if-less endif "/usr/share/mk/sys.mk", line 169: Missing dependency operator "/usr/share/mk/sys.mk", line 170: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 170: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 171: if-less endif "/usr/share/mk/sys.mk", line 178: Missing dependency operator "/usr/share/mk/sys.mk", line 179: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 179: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 180: if-less endif "/usr/share/mk/sys.mk", line 187: Missing dependency operator "/usr/share/mk/sys.mk", line 188: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 188: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 189: if-less endif "/usr/share/mk/sys.mk", line 209: if-less else defining transformation from `.sh' to `' inserting .sh(6)...already there inserting (0)...already there transformation .sh complete defining transformation from `.c' to `' inserting .c(2)...already there inserting (0)...already there transformation .c complete "/usr/share/mk/sys.mk", line 227: Missing dependency operator "/usr/share/mk/sys.mk", line 228: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 228: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 229: if-less endif "/usr/share/mk/sys.mk", line 232: warning: duplicate script for target ".c.o" ignored "/usr/share/mk/sys.mk", line 233: Missing dependency operator "/usr/share/mk/sys.mk", line 234: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 234: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 235: if-less endif defining transformation from `.cc' to `' inserting .cc(10)...at end of list inserting an empty list?...inserting (0)...at end of list defining transformation from `.cpp' to `' inserting .cpp(11)...at end of list inserting an empty list?...inserting (0)...at end of list defining transformation from `.cxx' to `' inserting .cxx(12)...at end of list inserting an empty list?...inserting (0)...at end of list defining transformation from `.C' to `' inserting .C(13)...at end of list inserting an empty list?...inserting (0)...at end of list transformation .cc complete transformation .cpp complete transformation .cxx complete transformation .C complete "/usr/share/mk/sys.mk", line 245: Missing dependency operator "/usr/share/mk/sys.mk", line 246: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 246: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 247: if-less endif "/usr/share/mk/sys.mk", line 251: Missing dependency operator "/usr/share/mk/sys.mk", line 252: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 252: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 253: if-less endif defining transformation from `.e' to `' inserting .e(16)...at end of list inserting an empty list?...inserting (0)...at end of list defining transformation from `.r' to `' inserting .r(17)...at end of list inserting an empty list?...inserting (0)...at end of list defining transformation from `.F' to `' inserting .F(15)...before .e(16) inserting an empty list?...inserting (0)...at end of list defining transformation from `.f' to `' inserting .f(7)...already there inserting (0)...already there transformation .e complete transformation .r complete transformation .F complete transformation .f complete "/usr/share/mk/sys.mk", line 260: warning: duplicate script for target ".f.o" ignored "/usr/share/mk/sys.mk", line 264: Missing dependency operator "/usr/share/mk/sys.mk", line 265: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 265: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 266: if-less endif "/usr/share/mk/sys.mk", line 270: Missing dependency operator "/usr/share/mk/sys.mk", line 271: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 271: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 272: if-less endif "/usr/share/mk/sys.mk", line 276: Missing dependency operator "/usr/share/mk/sys.mk", line 277: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 277: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 278: if-less endif "/usr/share/mk/sys.mk", line 282: warning: duplicate script for target ".y.o" ignored "/usr/share/mk/sys.mk", line 283: warning: duplicate script for target ".y.o" ignored "/usr/share/mk/sys.mk", line 284: warning: duplicate script for target ".y.o" ignored "/usr/share/mk/sys.mk", line 285: Missing dependency operator "/usr/share/mk/sys.mk", line 286: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 286: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 287: if-less endif "/usr/share/mk/sys.mk", line 290: warning: duplicate script for target ".l.o" ignored "/usr/share/mk/sys.mk", line 291: warning: duplicate script for target ".l.o" ignored "/usr/share/mk/sys.mk", line 292: warning: duplicate script for target ".l.o" ignored "/usr/share/mk/sys.mk", line 293: Missing dependency operator "/usr/share/mk/sys.mk", line 294: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 294: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 295: if-less endif "/usr/share/mk/sys.mk", line 299: warning: duplicate script for target ".y.c" ignored "/usr/share/mk/sys.mk", line 300: warning: duplicate script for target ".y.c" ignored "/usr/share/mk/sys.mk", line 303: warning: duplicate script for target ".l.c" ignored "/usr/share/mk/sys.mk", line 307: Missing dependency operator "/usr/share/mk/sys.mk", line 308: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 308: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 309: if-less endif "/usr/share/mk/sys.mk", line 315: Missing dependency operator "/usr/share/mk/sys.mk", line 316: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 316: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 317: if-less endif "/usr/share/mk/sys.mk", line 324: Missing dependency operator "/usr/share/mk/sys.mk", line 325: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 325: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 326: if-less endif "/usr/share/mk/sys.mk", line 332: Missing dependency operator "/usr/share/mk/sys.mk", line 333: warning: duplicate script for target ".if" ignored "/usr/share/mk/sys.mk", line 333: warning: duplicate script for target "defined(CTFCONVERT)" ignored "/usr/share/mk/sys.mk", line 334: if-less endif Global:__MAKE_CONF = /etc/make.conf "/usr/share/mk/sys.mk", line 338: Missing dependency operator "/usr/share/mk/sys.mk", line 339: Need an operator "/usr/share/mk/sys.mk", line 340: if-less endif Global:SHELL = ${__MAKE_SHELL} "/usr/share/mk/sys.mk", line 344: : no matching shell "/usr/share/mk/sys.mk", line 344: improper shell specification "/usr/share/mk/sys.mk", line 345: if-less endif Global:OBJFORMAT = elf "/usr/share/mk/sys.mk", line 354: if-less endif "/usr/share/mk/sys.mk", line 356: Need an operator "/usr/share/mk/sys.mk", line 357: Need an operator Global:.MAKEFILE_LIST = /usr/share/mk/sys.mk .. make: fatal errors encountered -- cannot continue -- Rui Paulo --Apple-Mail-3--818864198 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkoBwJgACgkQfD8M/ASTygJrhgCeIL1OBiwMwlIFEeK+aveiXKj1 iUAAniucMLXJ8K1ncSpMnzRYJt02gTyj =vq2g -----END PGP SIGNATURE----- --Apple-Mail-3--818864198-- From owner-freebsd-arm@FreeBSD.ORG Wed May 6 18:08:30 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81143106564A for ; Wed, 6 May 2009 18:08:30 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id A1FE78FC0A for ; Wed, 6 May 2009 18:08:29 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 4AAFF8FC1D for ; Wed, 6 May 2009 22:08:27 +0400 (MSD) Received: from orion.SpringDaemons.com (unknown [77.232.3.143]) by mx0.deglitch.com (Postfix) with ESMTPA id 55B078FC18; Wed, 6 May 2009 22:08:23 +0400 (MSD) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id B71A239827; Wed, 6 May 2009 22:08:42 +0400 (MSD) Date: Wed, 6 May 2009 22:08:42 +0400 From: Stanislav Sedov To: Rui Paulo Message-Id: <20090506220842.23137b20.stas@FreeBSD.org> In-Reply-To: <1D99BB94-12E9-4425-AA1D-0CC3FAFF016C@gmail.com> References: <1D99BB94-12E9-4425-AA1D-0CC3FAFF016C@gmail.com> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed May 6 22:08:26 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4a01d21a994291890464748 Cc: freebsd-arm@freebsd.org Subject: Re: Can't build ports and/or system on HEAD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 18:08:30 -0000 On Wed, 6 May 2009 17:53:44 +0100 Rui Paulo mentioned: > Hi, > I can't build ports on an arm embedded system. After the recent > strncmp() problem, I'm suspecting this is a fallout of something than > a misconfiguration of my part. > > My sys.mk MD5 is: > $ md5 /usr/share/mk/sys.mk > MD5 (/usr/share/mk/sys.mk) = 5f02492bd3dc89d976067eeaa75d4d76 > > Which I think is correct. Any ideas? > > # make -d A > Global:.MAKEFLAGS = -d > Global:.MAKEFLAGS = -d A > Global:MFLAGS = -d > Global:MFLAGS = -d A > Caching ....done > Global:.ST_EXPORTVAR = YES > Global:.CURDIR = /usr/ports/editors/elvis > Global:.OBJDIR = /usr/ports/editors/elvis > Global:.TARGETS = > Caching /usr/share/mk...done > expanding "sys.mk".../usr/share/mk/sys.mk > Global:MAKEFILE = /usr/share/mk/sys.mk > Global:.MAKEFILE_LIST = /usr/share/mk/sys.mk > Global:unix = We run FreeBSD, not UNIX. > Global:.FreeBSD = true > "/usr/share/mk/sys.mk", line 16: Missing dependency operator > "/usr/share/mk/sys.mk", line 18: if-less else > "/usr/share/mk/sys.mk", line 20: if-less endif > Global:AR = ar > "/usr/share/mk/sys.mk", line 23: Missing dependency operator > Global:ARFLAGS = -rv > "/usr/share/mk/sys.mk", line 25: if-less else > "/usr/share/mk/sys.mk", line 27: if-less endif > Global:RANLIB = ranlib > Global:AS = as > Global:AFLAGS = > "/usr/share/mk/sys.mk", line 33: Missing dependency operator > Global:CC = c89 > Global:CFLAGS = -O > "/usr/share/mk/sys.mk", line 36: if-less else > "/usr/share/mk/sys.mk", line 38: Need an operator > "/usr/share/mk/sys.mk", line 40: if-less else > "/usr/share/mk/sys.mk", line 42: if-less endif > "/usr/share/mk/sys.mk", line 43: Missing dependency operator > Global:CFLAGS = -O -fno-strict-aliasing > "/usr/share/mk/sys.mk", line 45: if-less endif > "/usr/share/mk/sys.mk", line 46: if-less endif > Global:NO_CTF = 1 > "/usr/share/mk/sys.mk", line 52: if-less endif > Global:CTFFLAGS = -L VERSION > Global:CTFCONVERT = ctfconvert > Global:CTFMERGE = ctfmerge > Applying :M to "-O -fno-strict-aliasing" > Result is "" > "/usr/share/mk/sys.mk", line 60: Missing dependency operator > Global:CTFFLAGS = -L VERSION -g > "/usr/share/mk/sys.mk", line 62: if-less else > Global:CFLAGS = -O -fno-strict-aliasing -g > "/usr/share/mk/sys.mk", line 64: if-less endif > "/usr/share/mk/sys.mk", line 65: if-less endif > Global:CXX = c++ > Global:CXXFLAGS = ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N- > Wno-pointer-sign} > Global:CPP = cpp > "/usr/share/mk/sys.mk", line 72: Missing dependency operator > Global:ECHO = echo > Global:ECHODIR = echo > "/usr/share/mk/sys.mk", line 75: if-less else > Applying :M to " -d A" > Result is "" > "/usr/share/mk/sys.mk", line 77: Need an operator > "/usr/share/mk/sys.mk", line 79: if-less else > "/usr/share/mk/sys.mk", line 81: if-less endif > "/usr/share/mk/sys.mk", line 82: if-less endif > Applying :M to " -d A" > Result is "" > Global:_+_ = > "/usr/share/mk/sys.mk", line 86: if-less else > "/usr/share/mk/sys.mk", line 88: if-less endif > "/usr/share/mk/sys.mk", line 90: Missing dependency operator > Global:FC = fort77 > Global:FFLAGS = -O 1 > "/usr/share/mk/sys.mk", line 93: if-less else > "/usr/share/mk/sys.mk", line 96: if-less endif > Global:EFLAGS = > Global:INSTALL = install > Global:LEX = lex > Global:LFLAGS = > Global:LD = ld > Global:LDFLAGS = > Global:LINT = lint > Global:LINTFLAGS = -cghapbx > Global:LINTKERNFLAGS = ${LINTFLAGS} > Global:LINTOBJFLAGS = -cghapbxu -i > Global:LINTOBJKERNFLAGS = ${LINTOBJFLAGS} > Global:LINTLIBFLAGS = -cghapbxu -C ${LIB} > Global:OBJC = cc > Global:OBJCFLAGS = ${OBJCINCLUDES} ${CFLAGS} -Wno-import > Global:PC = pc > Global:PFLAGS = > Global:RC = f77 > Global:RFLAGS = > Global:YACC = yacc > "/usr/share/mk/sys.mk", line 128: Missing dependency operator > Global:YFLAGS = > "/usr/share/mk/sys.mk", line 130: if-less else > "/usr/share/mk/sys.mk", line 132: if-less endif > "/usr/share/mk/sys.mk", line 134: Missing dependency operator > defining transformation from `.c' to `' > inserting an empty list?...inserting .c(2)...at end of list > inserting an empty list?...inserting (0)...at end of list > transformation .c complete > "/usr/share/mk/sys.mk", line 145: Missing dependency operator > "/usr/share/mk/sys.mk", line 147: if-less endif > defining transformation from `.f' to `' > inserting .f(7)...at end of list > inserting an empty list?...inserting (0)...at end of list > transformation .f complete > "/usr/share/mk/sys.mk", line 151: Missing dependency operator > "/usr/share/mk/sys.mk", line 152: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 152: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 153: if-less endif > defining transformation from `.sh' to `' > inserting .sh(6)...before .f(7) > inserting an empty list?...inserting (0)...at end of list > transformation .sh complete > "/usr/share/mk/sys.mk", line 163: Missing dependency operator > "/usr/share/mk/sys.mk", line 164: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 164: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 165: if-less endif > "/usr/share/mk/sys.mk", line 169: Missing dependency operator > "/usr/share/mk/sys.mk", line 170: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 170: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 171: if-less endif > "/usr/share/mk/sys.mk", line 178: Missing dependency operator > "/usr/share/mk/sys.mk", line 179: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 179: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 180: if-less endif > "/usr/share/mk/sys.mk", line 187: Missing dependency operator > "/usr/share/mk/sys.mk", line 188: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 188: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 189: if-less endif > "/usr/share/mk/sys.mk", line 209: if-less else > defining transformation from `.sh' to `' > inserting .sh(6)...already there > inserting (0)...already there > transformation .sh complete > defining transformation from `.c' to `' > inserting .c(2)...already there > inserting (0)...already there > transformation .c complete > "/usr/share/mk/sys.mk", line 227: Missing dependency operator > "/usr/share/mk/sys.mk", line 228: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 228: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 229: if-less endif > "/usr/share/mk/sys.mk", line 232: warning: duplicate script for target > ".c.o" ignored > "/usr/share/mk/sys.mk", line 233: Missing dependency operator > "/usr/share/mk/sys.mk", line 234: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 234: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 235: if-less endif > defining transformation from `.cc' to `' > inserting .cc(10)...at end of list > inserting an empty list?...inserting (0)...at end of list > defining transformation from `.cpp' to `' > inserting .cpp(11)...at end of list > inserting an empty list?...inserting (0)...at end of list > defining transformation from `.cxx' to `' > inserting .cxx(12)...at end of list > inserting an empty list?...inserting (0)...at end of list > defining transformation from `.C' to `' > inserting .C(13)...at end of list > inserting an empty list?...inserting (0)...at end of list > transformation .cc complete > transformation .cpp complete > transformation .cxx complete > transformation .C complete > "/usr/share/mk/sys.mk", line 245: Missing dependency operator > "/usr/share/mk/sys.mk", line 246: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 246: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 247: if-less endif > "/usr/share/mk/sys.mk", line 251: Missing dependency operator > "/usr/share/mk/sys.mk", line 252: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 252: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 253: if-less endif > defining transformation from `.e' to `' > inserting .e(16)...at end of list > inserting an empty list?...inserting (0)...at end of list > defining transformation from `.r' to `' > inserting .r(17)...at end of list > inserting an empty list?...inserting (0)...at end of list > defining transformation from `.F' to `' > inserting .F(15)...before .e(16) > inserting an empty list?...inserting (0)...at end of list > defining transformation from `.f' to `' > inserting .f(7)...already there > inserting (0)...already there > transformation .e complete > transformation .r complete > transformation .F complete > transformation .f complete > "/usr/share/mk/sys.mk", line 260: warning: duplicate script for target > ".f.o" ignored > "/usr/share/mk/sys.mk", line 264: Missing dependency operator > "/usr/share/mk/sys.mk", line 265: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 265: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 266: if-less endif > "/usr/share/mk/sys.mk", line 270: Missing dependency operator > "/usr/share/mk/sys.mk", line 271: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 271: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 272: if-less endif > "/usr/share/mk/sys.mk", line 276: Missing dependency operator > "/usr/share/mk/sys.mk", line 277: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 277: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 278: if-less endif > "/usr/share/mk/sys.mk", line 282: warning: duplicate script for target > ".y.o" ignored > "/usr/share/mk/sys.mk", line 283: warning: duplicate script for target > ".y.o" ignored > "/usr/share/mk/sys.mk", line 284: warning: duplicate script for target > ".y.o" ignored > "/usr/share/mk/sys.mk", line 285: Missing dependency operator > "/usr/share/mk/sys.mk", line 286: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 286: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 287: if-less endif > "/usr/share/mk/sys.mk", line 290: warning: duplicate script for target > ".l.o" ignored > "/usr/share/mk/sys.mk", line 291: warning: duplicate script for target > ".l.o" ignored > "/usr/share/mk/sys.mk", line 292: warning: duplicate script for target > ".l.o" ignored > "/usr/share/mk/sys.mk", line 293: Missing dependency operator > "/usr/share/mk/sys.mk", line 294: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 294: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 295: if-less endif > "/usr/share/mk/sys.mk", line 299: warning: duplicate script for target > ".y.c" ignored > "/usr/share/mk/sys.mk", line 300: warning: duplicate script for target > ".y.c" ignored > "/usr/share/mk/sys.mk", line 303: warning: duplicate script for target > ".l.c" ignored > "/usr/share/mk/sys.mk", line 307: Missing dependency operator > "/usr/share/mk/sys.mk", line 308: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 308: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 309: if-less endif > "/usr/share/mk/sys.mk", line 315: Missing dependency operator > "/usr/share/mk/sys.mk", line 316: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 316: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 317: if-less endif > "/usr/share/mk/sys.mk", line 324: Missing dependency operator > "/usr/share/mk/sys.mk", line 325: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 325: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 326: if-less endif > "/usr/share/mk/sys.mk", line 332: Missing dependency operator > "/usr/share/mk/sys.mk", line 333: warning: duplicate script for target > ".if" ignored > "/usr/share/mk/sys.mk", line 333: warning: duplicate script for target > "defined(CTFCONVERT)" ignored > "/usr/share/mk/sys.mk", line 334: if-less endif > Global:__MAKE_CONF = /etc/make.conf > "/usr/share/mk/sys.mk", line 338: Missing dependency operator > "/usr/share/mk/sys.mk", line 339: Need an operator > "/usr/share/mk/sys.mk", line 340: if-less endif > Global:SHELL = ${__MAKE_SHELL} > "/usr/share/mk/sys.mk", line 344: : no matching shell > "/usr/share/mk/sys.mk", line 344: improper shell specification > "/usr/share/mk/sys.mk", line 345: if-less endif > Global:OBJFORMAT = elf > "/usr/share/mk/sys.mk", line 354: if-less endif > "/usr/share/mk/sys.mk", line 356: Need an operator > "/usr/share/mk/sys.mk", line 357: Need an operator > Global:.MAKEFILE_LIST = /usr/share/mk/sys.mk .. > make: fatal errors encountered -- cannot continue > Are your sure you have the proper libc with strncmp fix applied? Looks like either the makefile or make itself is broken. -- Stanislav Sedov ST4096-RIPE !DSPAM:4a01d21a994291890464748! From owner-freebsd-arm@FreeBSD.ORG Wed May 6 18:12:22 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29B5106567E; Wed, 6 May 2009 18:12:22 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f168.google.com (mail-fx0-f168.google.com [209.85.220.168]) by mx1.freebsd.org (Postfix) with ESMTP id 21EAF8FC1C; Wed, 6 May 2009 18:12:21 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by fxm12 with SMTP id 12so307955fxm.43 for ; Wed, 06 May 2009 11:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=ifK0nCWuz6+9pdG1RVodNbv63GRptE91lw/VgENirrU=; b=ol7Mbya8cFLyA+Z2f2mFYxsrWkZoB/pYhzGKV3BSod1KK59YjmfiSahpUav5xjZqAF RzVSyuUrYl3ZwnbCvz36YvkGPbYG+UCYmAHbM3iD/FMFD0RHY0nO586h5R+1JRdl0ANU xngNxNELeiEp1r+r10OFbXcduuGF/6CFDnY1Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=FAvbgQ65rQ46HHY0BSQbPQlxUcHgAWl6kGnaJwlppaT4gv/jP+Vp1iUHsBNT/epuQb cmOsYfW77r+29C8/bQS6kGZ365JFNtI1NKGr/92e7DOL0lwbE+oVbvpUuBdH89bySj8+ UxhOFw0/G5pZxEanZhorwreDZ3jiR3v/8vAfY= Received: by 10.86.86.2 with SMTP id j2mr1586198fgb.50.1241633541197; Wed, 06 May 2009 11:12:21 -0700 (PDT) Received: from epsilon.lan (bl5-225-213.dsl.telepac.pt [82.154.225.213]) by mx.google.com with ESMTPS id l19sm11080192fgb.12.2009.05.06.11.12.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 May 2009 11:12:20 -0700 (PDT) Message-Id: <26D2DB35-7397-4C7B-8141-8E295F134F4A@gmail.com> From: Rui Paulo To: Stanislav Sedov In-Reply-To: <20090506220842.23137b20.stas@FreeBSD.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-4--814149573" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 6 May 2009 19:12:18 +0100 References: <1D99BB94-12E9-4425-AA1D-0CC3FAFF016C@gmail.com> <20090506220842.23137b20.stas@FreeBSD.org> X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: freebsd-arm@freebsd.org Subject: Re: Can't build ports and/or system on HEAD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 18:12:23 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-4--814149573 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Sorry, false alarm, pilot error... -- Rui Paulo --Apple-Mail-4--814149573 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkoB0wMACgkQfD8M/ASTygKbNwCeIVvjTf/TSh/4SqwoQSzJf5oc rT0AoLqWGWkBl5IBe1XneewBZtYibw0i =n7nv -----END PGP SIGNATURE----- --Apple-Mail-4--814149573-- From owner-freebsd-arm@FreeBSD.ORG Wed May 6 20:30:03 2009 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1430106566C for ; Wed, 6 May 2009 20:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BF3D98FC18 for ; Wed, 6 May 2009 20:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n46KU3g5013578 for ; Wed, 6 May 2009 20:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n46KU37G013575; Wed, 6 May 2009 20:30:03 GMT (envelope-from gnats) Date: Wed, 6 May 2009 20:30:03 GMT Message-Id: <200905062030.n46KU37G013575@freefall.freebsd.org> To: freebsd-arm@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: arm/134092: commit references a PR X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 20:30:04 -0000 The following reply was made to PR arm/134092; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: arm/134092: commit references a PR Date: Wed, 6 May 2009 20:24:27 +0000 (UTC) Author: cognet Date: Wed May 6 20:24:17 2009 New Revision: 191858 URL: http://svn.freebsd.org/changeset/base/191858 Log: Use the good hints for the NSLU, it should fix the network adapter. PR: arm/134092 Submitted by: gavin Modified: head/sys/arm/conf/NSLU.hints Modified: head/sys/arm/conf/NSLU.hints ============================================================================== --- head/sys/arm/conf/NSLU.hints Wed May 6 20:07:28 2009 (r191857) +++ head/sys/arm/conf/NSLU.hints Wed May 6 20:24:17 2009 (r191858) @@ -17,17 +17,17 @@ hint.uart.1.irq=13 # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" -# NPE wireless NIC's, requires ixpqmgr +# NPE wired NICs, requires ixpqmgr hint.npe.0.at="ixp0" -hint.npe.0.mac="A" -hint.npe.0.mii="A" +hint.npe.0.mac="B" +hint.npe.0.mii="B" hint.npe.0.phy=1 # The second MAC isn't used on the NSLU, but it needs to be configured or # we timeout on dhcp packets hint.npe.1.at="ixp0" -hint.npe.1.mac="B" -hint.npe.1.mii="A" -hint.npe.1.phy=0 +#hint.npe.1.mac="B" +#hint.npe.1.mii="A" +#hint.npe.1.phy=0 #not yet # RTC _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-arm@FreeBSD.ORG Thu May 7 04:44:15 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CBC9106566B for ; Thu, 7 May 2009 04:44:15 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: from mail-gx0-f211.google.com (mail-gx0-f211.google.com [209.85.217.211]) by mx1.freebsd.org (Postfix) with ESMTP id 71E718FC12 for ; Thu, 7 May 2009 04:44:10 +0000 (UTC) (envelope-from venkiece2005@gmail.com) Received: by gxk7 with SMTP id 7so864458gxk.19 for ; Wed, 06 May 2009 21:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=/8LDrft9/lMqPrREAMaUeNwfraXG8igcThrSq2GZveo=; b=jlh+0Ovyij/RBGwHIM8APc8gAFA5J33iVzmWBkpH0eqcCg+zqwkpnyCgrtPbP2CbFs PIlxxo/RSmjy9MYDSMZbxaxwJToj+0jGuZWAfnyAJcfoJj66BZTJ9/EJV4PsZvHzZCSU jBgufZd7GR1oPnhxOwJYuWQS0vftrK3U3Na70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=SSoDotX5J2HlNZD6qOvYwRPHwxPY9t+HrYrCTilcGE6dYwCyMkPfJ7TSlQITP6sn2g Oy9YMog5zp8viEQkfemHCTeX4WLARQVJkIUkNZpyoneIP1lf8hoQOE3aqRYT4mqqVCup WpyH2clBDF/5xqjx1LQKihomuSo8ZjTa/XR4o= MIME-Version: 1.0 Received: by 10.151.134.13 with SMTP id l13mr3688112ybn.217.1241671002845; Wed, 06 May 2009 21:36:42 -0700 (PDT) In-Reply-To: <200905051637.n45GbE7Q057469@casselton.net> References: <20090505.081701.569396874.imp@bsdimp.com> <200905051637.n45GbE7Q057469@casselton.net> Date: Thu, 7 May 2009 10:06:42 +0530 Message-ID: <6d53329e0905062136x58b4ca4eh9ebd9f45c34e565@mail.gmail.com> From: venki kaps To: Mark Tinguely Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 04:44:15 -0000 Hi Tinguely, Thanks for the fix. i am also agreeing with you. A small doubt: ENTRY(strncmp) /* if (len == 0) return 0 */ cmp r2, #0 moveq r0, #0 RETc(eq) /* ip == last src address to compare */ add ip, r0, r2 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 beq 2f <---- if (strlen(str1) > len) break; cmp r2, #0 beq 2f <----- if (*str1++ == 0) break; cmpcs r2, r3 <----- if (*str1 == *str2) return s1-s2; beq 1b 2: sub r0, r2, r3 RET END(strncmp) Expecting beq 2f after cmp r2, #0 to break the loop. Is it good to use? OR Is cmp r2, #1 enough? Regards, Venkappa On Tue, May 5, 2009 at 10:07 PM, Mark Tinguely wrote: > > > Is the hand rolled assembler still better than what gcc can produce? > > > > Warner > > Assuming my additional conditional branch, we can save at least an add and > a branch in the comparison loop with the hard rolled assembler over the > "cc -O2 head/lib/libc/string/strncmp.c" code. > > If the conditional branch can be deleted, then even better. > > --Mark. > From owner-freebsd-arm@FreeBSD.ORG Thu May 7 13:58:44 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A8A5106567B for ; Thu, 7 May 2009 13:58:44 +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 A9ADF8FC1B for ; Thu, 7 May 2009 13:58:43 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n47DwdGp085421; Thu, 7 May 2009 08:58:39 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1241704720; bh=iy7c5eOq7EjX6l2ztJeb3kvrO/kgOye7tC33fdbLxcs=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=hCsE0LvEcBEHPeBpHoqEQRjYUgBTqfwdq0tL3hJ2lF69Ke0f1UraEVNxfko9Y7jzW f7W5IAU3g5/dH48qGZ3y62TJO1W34hyiLjjqzZS4vbi75Qxl1c5HeKaKBwmtlQEb7t dwjcbJ0VFEJO9pdVYyLNCgUnZ7XXJkM8G5BkKApE= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n47DwZLG085417; Thu, 7 May 2009 08:58:35 -0500 (CDT) (envelope-from tinguely) Date: Thu, 7 May 2009 08:58:35 -0500 (CDT) From: Mark Tinguely Message-Id: <200905071358.n47DwZLG085417@casselton.net> To: tinguely@casselton.net, venkiece2005@gmail.com In-Reply-To: <6d53329e0905062136x58b4ca4eh9ebd9f45c34e565@mail.gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Thu, 07 May 2009 08:58:39 -0500 (CDT) Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 13:58:44 -0000 I assumed that sam@ commit to head/lib/libc/arm/string/strncmp.S on yesterday that just returns 0 on strncmp(s1, s2, -n) where n is positive int put the issue to rest. --Mark. From owner-freebsd-arm@FreeBSD.ORG Thu May 7 16:40:01 2009 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC3B01065670 for ; Thu, 7 May 2009 16:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AD3EF8FC17 for ; Thu, 7 May 2009 16:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n47Ge1cN087814 for ; Thu, 7 May 2009 16:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n47Ge1xQ087813; Thu, 7 May 2009 16:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 7 May 2009 16:40:01 GMT Resent-Message-Id: <200905071640.n47Ge1xQ087813@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-arm@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Gavin Atkinson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAF901065670 for ; Thu, 7 May 2009 16:32:41 +0000 (UTC) (envelope-from ga9@buffy.york.ac.uk) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA968FC16 for ; Thu, 7 May 2009 16:32:41 +0000 (UTC) (envelope-from ga9@buffy.york.ac.uk) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id n47GWZW6004658 for ; Thu, 7 May 2009 17:32:35 +0100 (BST) Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1M26WQ-0001uS-UV for FreeBSD-gnats-submit@freebsd.org; Thu, 07 May 2009 17:32:35 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id n47GWY3t083348 for ; Thu, 7 May 2009 17:32:34 +0100 (BST) (envelope-from ga9@buffy.york.ac.uk) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id n47GWYKf083347; Thu, 7 May 2009 17:32:34 +0100 (BST) (envelope-from ga9) Message-Id: <200905071632.n47GWYKf083347@buffy.york.ac.uk> Date: Thu, 7 May 2009 17:32:34 +0100 (BST) From: Gavin Atkinson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: arm/134338: [patch] Lock GPIO accesses on ixp425 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gavin Atkinson List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 16:40:02 -0000 >Number: 134338 >Category: arm >Synopsis: [patch] Lock GPIO accesses on ixp425 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-arm >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 07 16:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Gavin Atkinson >Release: FreeBSD 7.1-STABLE amd64 >Organization: >Environment: System: FreeBSD buffy.york.ac.uk 7.1-STABLE FreeBSD 7.1-STABLE #5: Fri Feb 13 11:25:58 GMT 2009 root@buffy.york.ac.uk:/usr/obj/usr/src/sys/GENERIC amd64 >Description: There are several points in the code where GPIO registers are read, various operations are performed with the result, then GPIO registers are written back to. The problem here is that there is nothing preventing other access occuring between the read and the write. Some parts of the code (IIC) go one step further and use Giant as a lock around these accesses, but as it is not done globally, this makes little difference. I stumbled on this while writing a driver for the NSLU LEDs, while hammering the driver I saw interrupts being missed. Whilst I have no absolute proof that this is the cause, I've not been able to recreate it with this patch in place. I've gone for a seperate spin lock for the GPIO pins as it is used in various contexts where a spin lock seems to be the correct choice. It's also implemented as a global lock rather than being stored in a softc or similar - until there is a GPIO driver, I can't see any better solution. Something like this is probably also needed for the other arm platforms, however I do not have the hardware required to test these. >How-To-Repeat: (ab)use code paths that toggle GPIO lines (e.g. use IIC heavily while USB generates interrupts) >Fix: --- ixp425-gpio-locking.diff begins here --- Index: src-head/sys/arm/xscale/ixp425/avila_ata.c =================================================================== RCS file: /home/ncvs/src/sys/arm/xscale/ixp425/avila_ata.c,v retrieving revision 1.6 diff -u -r1.6 avila_ata.c --- src-head/sys/arm/xscale/ixp425/avila_ata.c 20 Dec 2008 03:26:09 -0000 1.6 +++ src-head/sys/arm/xscale/ixp425/avila_ata.c 7 May 2009 16:16:12 -0000 @@ -44,7 +44,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -151,6 +153,7 @@ u_int16_t *, bus_size_t); static void ata_bs_wm_2_s(void *, bus_space_handle_t, bus_size_t, const u_int16_t *, bus_size_t); +extern struct mtx ixp425_gpio_mtx; static int ata_avila_probe(device_t dev) @@ -218,6 +221,8 @@ rman_set_bustag(&sc->sc_alt_ata, &sc->sc_expbus_tag); rman_set_bushandle(&sc->sc_alt_ata, sc->sc_alt_ioh); + mtx_lock(&ixp425_gpio_mtx); + GPIO_CONF_WRITE_4(sa, IXP425_GPIO_GPOER, GPIO_CONF_READ_4(sa, IXP425_GPIO_GPOER) | (1<gpin)); /* set interrupt type */ @@ -229,6 +234,8 @@ /* clear ISR */ GPIO_CONF_WRITE_4(sa, IXP425_GPIO_GPISR, (1<gpin)); + mtx_unlock(&ixp425_gpio_mtx); + /* configure CS1/3 window, leaving timing unchanged */ EXP_BUS_WRITE_4(sc, sc->sc_16bit_off, EXP_BUS_READ_4(sc, sc->sc_16bit_off) | Index: src-head/sys/arm/xscale/ixp425/avila_led.c =================================================================== RCS file: /home/ncvs/src/sys/arm/xscale/ixp425/avila_led.c,v retrieving revision 1.2 diff -u -r1.2 avila_led.c --- src-head/sys/arm/xscale/ixp425/avila_led.c 20 Dec 2008 03:26:09 -0000 1.2 +++ src-head/sys/arm/xscale/ixp425/avila_led.c 7 May 2009 16:16:28 -0000 @@ -28,7 +28,9 @@ #include #include #include +#include #include +#include #include #include @@ -46,18 +48,22 @@ struct cdev *sc_led; }; +extern struct mtx ixp425_gpio_mtx; + static void led_func(void *arg, int onoff) { struct led_avila_softc *sc = arg; uint32_t reg; + mtx_lock(&ixp425_gpio_mtx); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); if (onoff) reg &= ~GPIO_LED_STATUS_BIT; else reg |= GPIO_LED_STATUS_BIT; GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); + mtx_unlock(&ixp425_gpio_mtx); } static int @@ -78,8 +84,10 @@ sc->sc_gpio_ioh = sa->sc_gpio_ioh; /* Configure LED GPIO pin as output */ + mtx_lock(&ixp425_gpio_mtx); GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) &~ GPIO_LED_STATUS_BIT); + mtx_unlock(&ixp425_gpio_mtx); sc->sc_led = led_create(led_func, sc, "gpioled"); Index: src-head/sys/arm/xscale/ixp425/ixdp425_pci.c =================================================================== RCS file: /home/ncvs/src/sys/arm/xscale/ixp425/ixdp425_pci.c,v retrieving revision 1.2 diff -u -r1.2 ixdp425_pci.c --- src-head/sys/arm/xscale/ixp425/ixdp425_pci.c 20 Mar 2008 15:54:19 -0000 1.2 +++ src-head/sys/arm/xscale/ixp425/ixdp425_pci.c 7 May 2009 16:16:43 -0000 @@ -40,7 +40,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -51,6 +53,8 @@ #include #include +extern struct mtx ixp425_gpio_mtx; + void ixp425_md_attach(device_t dev) { @@ -58,7 +62,7 @@ struct ixppcib_softc *pci_sc = device_get_softc(dev); uint32_t reg; - + mtx_lock(&ixp425_gpio_mtx); /* PCI Reset Assert */ reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); reg &= ~(1U << GPIO_PCI_RESET); @@ -130,6 +134,7 @@ reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); reg |= 1U << GPIO_PCI_RESET; GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg | (1U << GPIO_PCI_RESET)); + mtx_unlock(&ixp425_gpio_mtx); pci_sc->sc_irq_rman.rm_type = RMAN_ARRAY; pci_sc->sc_irq_rman.rm_descr = "IXP425 PCI IRQs"; CTASSERT(PCI_INT_D < PCI_INT_A); Index: src-head/sys/arm/xscale/ixp425/ixp425.c =================================================================== RCS file: /home/ncvs/src/sys/arm/xscale/ixp425/ixp425.c,v retrieving revision 1.17 diff -u -r1.17 ixp425.c --- src-head/sys/arm/xscale/ixp425/ixp425.c 10 Mar 2009 19:15:35 -0000 1.17 +++ src-head/sys/arm/xscale/ixp425/ixp425.c 7 May 2009 16:17:00 -0000 @@ -43,7 +43,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -65,6 +67,7 @@ uint32_t intr_steer2 = 0; struct ixp425_softc *ixp425_softc = NULL; +struct mtx ixp425_gpio_mtx; static int ixp425_probe(device_t); static void ixp425_identify(driver_t *, device_t); @@ -253,6 +256,7 @@ KASSERT(ixp425_softc == NULL, ("%s called twice?", __func__)); ixp425_softc = sc; + mtx_init(&ixp425_gpio_mtx, "GPIO register mutex", NULL, MTX_SPIN); intr_enabled = 0; ixp425_set_intrmask(); ixp425_set_intrsteer(); Index: src-head/sys/arm/xscale/ixp425/ixp425_iic.c =================================================================== RCS file: /home/ncvs/src/sys/arm/xscale/ixp425/ixp425_iic.c,v retrieving revision 1.4 diff -u -r1.4 ixp425_iic.c --- src-head/sys/arm/xscale/ixp425/ixp425_iic.c 20 Dec 2008 03:26:09 -0000 1.4 +++ src-head/sys/arm/xscale/ixp425/ixp425_iic.c 7 May 2009 16:17:16 -0000 @@ -29,7 +29,9 @@ #include #include #include +#include #include +#include #include #include @@ -60,6 +62,8 @@ static struct ixpiic_softc *ixpiic_sc = NULL; +extern struct mtx ixp425_gpio_mtx; + static int ixpiic_probe(device_t dev) { @@ -79,10 +83,12 @@ sc->sc_iot = sa->sc_iot; sc->sc_gpio_ioh = sa->sc_gpio_ioh; + mtx_lock(&ixp425_gpio_mtx); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT | GPIO_I2C_SDA_BIT); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT | GPIO_I2C_SDA_BIT); + mtx_unlock(&ixp425_gpio_mtx); /* add generic bit-banging code */ if ((sc->iicbb = device_add_child(dev, "iicbb", -1)) == NULL) @@ -106,11 +112,11 @@ struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + mtx_lock(&ixp425_gpio_mtx); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + mtx_unlock(&ixp425_gpio_mtx); return (reg & GPIO_I2C_SCL_BIT); } @@ -120,11 +126,11 @@ struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + mtx_lock(&ixp425_gpio_mtx); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + mtx_unlock(&ixp425_gpio_mtx); return (reg & GPIO_I2C_SDA_BIT); } @@ -133,13 +139,13 @@ { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + mtx_lock(&ixp425_gpio_mtx); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + mtx_unlock(&ixp425_gpio_mtx); DELAY(I2C_DELAY); } @@ -148,13 +154,13 @@ { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + mtx_lock(&ixp425_gpio_mtx); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + mtx_unlock(&ixp425_gpio_mtx); DELAY(I2C_DELAY); } --- ixp425-gpio-locking.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-arm@FreeBSD.ORG Thu May 7 23:03:34 2009 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75C7C106571F; Thu, 7 May 2009 23:03:34 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [205.211.164.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4C62E8FC1B; Thu, 7 May 2009 23:03:34 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by smarthost2.sentex.ca (8.14.3/8.14.3) with ESMTP id n47N3V6Q077935; Thu, 7 May 2009 19:03:31 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by smtp1.sentex.ca (8.14.3/8.14.3) with ESMTP id n47N3VIe046119; Thu, 7 May 2009 19:03:31 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: by freebsd-current.sentex.ca (Postfix, from userid 666) id 1C16E7302F; Thu, 7 May 2009 19:03:31 -0400 (EDT) Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Message-Id: <20090507230331.1C16E7302F@freebsd-current.sentex.ca> Date: Thu, 7 May 2009 19:03:31 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at smtp1.sentex.ca X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 205.211.164.50 Cc: Subject: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 23:03:35 -0000 TB --- 2009-05-07 22:20:00 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2009-05-07 22:20:00 - starting HEAD tinderbox run for arm/arm TB --- 2009-05-07 22:20:00 - cleaning the object tree TB --- 2009-05-07 22:20:48 - cvsupping the source tree TB --- 2009-05-07 22:20:48 - /usr/bin/csup -z -r 3 -g -L 1 -h localhost -s /tinderbox/HEAD/arm/arm/supfile TB --- 2009-05-07 22:20:58 - building world TB --- 2009-05-07 22:20:58 - MAKEOBJDIRPREFIX=/obj TB --- 2009-05-07 22:20:58 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2009-05-07 22:20:58 - TARGET=arm TB --- 2009-05-07 22:20:58 - TARGET_ARCH=arm TB --- 2009-05-07 22:20:58 - TZ=UTC TB --- 2009-05-07 22:20:58 - __MAKE_CONF=/dev/null TB --- 2009-05-07 22:20:58 - cd /src TB --- 2009-05-07 22:20:58 - /usr/bin/make -B buildworld >>> World build started on Thu May 7 22:21:00 UTC 2009 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] cc -O -pipe -DNEED_SOLARIS_BOOLEAN -I/src/cddl/usr.bin/sgsmsg/../../../sys/cddl/compat/opensolaris -I/src/cddl/usr.bin/sgsmsg/../../../cddl/compat/opensolaris/include -I/src/cddl/usr.bin/sgsmsg/../../../cddl/contrib/opensolaris/cmd/sgs/include -I/src/cddl/usr.bin/sgsmsg/../../../sys/cddl/contrib/opensolaris/uts/common -DNEED_SOLARIS_BOOLEAN -std=gnu89 -Wno-unknown-pragmas -o sgsmsg avl.o sgsmsg.o string_table.o findprime.o ===> cddl/usr.bin/zinject (all) cc -O -pipe -I/src/cddl/usr.bin/zinject/../../../sys/cddl/compat/opensolaris -I/src/cddl/usr.bin/zinject/../../compat/opensolaris/include -I/src/cddl/usr.bin/zinject/../../compat/opensolaris/lib/libumem -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libzfs/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libzpool/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libnvpair -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common/sys -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/head -I/src/cddl/usr.bin/zinject/../../lib/libumem -DNEED_SOLARIS_BOOLEAN -std=gnu89 -Wno-unknown-pragmas -c /src/cddl/usr.bin/zinject/../../contrib/opensolaris/cmd/zinject/zinject.c cc -O -pipe -I/src/cddl/usr.bin/zinject/../../../sys/cddl/compat/opensolaris -I/src/cddl/usr.bin/zinject/../../compat/opensolaris/include -I/src/cddl/usr.bin/zinject/../../compat/opensolaris/lib/libumem -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libzfs/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libzpool/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libnvpair -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common/sys -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/head -I/src/cddl/usr.bin/zinject/../../lib/libumem -DNEED_SOLARIS_BOOLEAN -std=gnu89 -Wno-unknown-pragmas -c /src/cddl/usr.bin/zinject/../../contrib/opensolaris/cmd/zinject/translate.c /src/cddl/usr.bin/zinject/../../contrib/opensolaris/cmd/zinject/translate.c: In function 'translate_record': /src/cddl/usr.bin/zinject/../../contrib/opensolaris/cmd/zinject/translate.c:373: warning: passing argument 4 of 'calculate_range' discards qualifiers from pointer target type cc -O -pipe -I/src/cddl/usr.bin/zinject/../../../sys/cddl/compat/opensolaris -I/src/cddl/usr.bin/zinject/../../compat/opensolaris/include -I/src/cddl/usr.bin/zinject/../../compat/opensolaris/lib/libumem -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libzfs/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libzpool/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/lib/libnvpair -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common/sys -I/src/cddl/usr.bin/zinject/../../../sys/cddl/contrib/opensolaris/uts/common -I/src/cddl/usr.bin/zinject/../../contrib/opensolaris/head -I/src/cddl/usr.bin/zinject/../../lib/libumem -DNEED_SOLARIS_BOOLEAN -std=gnu89 -Wno-unknown-pragmas -o zinject zinject.o translate.o -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool /obj/arm/src/tmp/usr/lib/libzpool.so: undefined reference to `vn_rele_async_fini' *** Error code 1 Stop in /src/cddl/usr.bin/zinject. *** Error code 1 Stop in /src/cddl/usr.bin. *** Error code 1 Stop in /src/cddl. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2009-05-07 23:03:30 - WARNING: /usr/bin/make returned exit code 1 TB --- 2009-05-07 23:03:30 - ERROR: failed to build world TB --- 2009-05-07 23:03:30 - 1926.59 user 271.18 system 2610.58 real http://tinderbox.des.no/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Fri May 8 14:30:02 2009 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCFD31065673 for ; Fri, 8 May 2009 14:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9DCCC8FC1D for ; Fri, 8 May 2009 14:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n48EU2sV066155 for ; Fri, 8 May 2009 14:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n48EU2rD066149; Fri, 8 May 2009 14:30:02 GMT (envelope-from gnats) Resent-Date: Fri, 8 May 2009 14:30:02 GMT Resent-Message-Id: <200905081430.n48EU2rD066149@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-arm@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Gavin Atkinson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40F42106564A for ; Fri, 8 May 2009 14:22:15 +0000 (UTC) (envelope-from ga9@buffy.york.ac.uk) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id E59EC8FC15 for ; Fri, 8 May 2009 14:22:14 +0000 (UTC) (envelope-from ga9@buffy.york.ac.uk) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id n48EMBet004457 for ; Fri, 8 May 2009 15:22:11 +0100 (BST) Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1M2Qxm-0005X7-U1 for FreeBSD-gnats-submit@freebsd.org; Fri, 08 May 2009 15:22:10 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id n48EMANA073409 for ; Fri, 8 May 2009 15:22:10 +0100 (BST) (envelope-from ga9@buffy.york.ac.uk) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id n48EMArP073408; Fri, 8 May 2009 15:22:10 +0100 (BST) (envelope-from ga9) Message-Id: <200905081422.n48EMArP073408@buffy.york.ac.uk> Date: Fri, 8 May 2009 15:22:10 +0100 (BST) From: Gavin Atkinson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: arm/134368: [patch] nslu2_led driver for the LEDs on the NSLU2 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gavin Atkinson List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2009 14:30:03 -0000 >Number: 134368 >Category: arm >Synopsis: [patch] nslu2_led driver for the LEDs on the NSLU2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-arm >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 08 14:30:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Gavin Atkinson >Release: FreeBSD 7.1-STABLE amd64 >Organization: >Environment: System: FreeBSD buffy.york.ac.uk 7.1-STABLE FreeBSD 7.1-STABLE #5: Fri Feb 13 11:25:58 GMT 2009 root@buffy.york.ac.uk:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Simple driver for the LEDs on the NSLU2. This uses the led(4) API and provides devices under /dev/led/ to set the state of the four LEDs. It also switches the power LED to green on boot and to amber on shutdown, like the original NSLU2 does. Note that this requires the GPIO locking changes submitted in PR arm/134338. I've also created a new "files.nslu2" and "std.nslu2" file, as I have drivers for the buttons and RTC to be submitted soon, so it makes sense to factor NSLU out from the avila config now. Written by myself, under the 2-clause BSD license. >How-To-Repeat: N/A >Fix: --- nslu2_led.diff begins here --- Index: sys/arm/conf/NSLU =================================================================== RCS file: /home/ncvs/src/sys/arm/conf/NSLU,v retrieving revision 1.6 diff -u -r1.6 NSLU --- sys/arm/conf/NSLU 23 Feb 2009 18:34:56 -0000 1.6 +++ sys/arm/conf/NSLU 8 May 2009 14:12:48 -0000 @@ -30,6 +30,7 @@ include "../xscale/ixp425/std.ixp425" # NB: memory mapping is defined in std.avila (see also comment above) include "../xscale/ixp425/std.avila" +include "../xscale/ixp425/std.nslu2" options XSCALE_CACHE_READ_WRITE_ALLOCATE #To statically compile in device wiring instead of /boot/device.hints hints "NSLU.hints" #Default places to look for devices. @@ -91,6 +92,8 @@ device ixpiic # I2C bus glue device ixpwdog # watchdog timer +device nslu2_led # NSLU2 LEDs + device npe # Network Processing Engine device npe_fw device firmware Index: sys/arm/conf/NSLU.hints =================================================================== RCS file: /home/ncvs/src/sys/arm/conf/NSLU.hints,v retrieving revision 1.2 diff -u -r1.2 NSLU.hints --- sys/arm/conf/NSLU.hints 6 May 2009 20:24:17 -0000 1.2 +++ sys/arm/conf/NSLU.hints 8 May 2009 13:14:07 -0000 @@ -34,5 +34,6 @@ #hint.xrtc.0.at="iicbus0" #hint.xrtc.0.addr=0xde # Slug LED +hint.nslu2_led.0.at="ixp0" # Slug button # Slug Buzzer --- /dev/null 2009-05-08 15:11:01.000000000 +0100 +++ sys/arm/xscale/ixp425/nslu2_led.c 2009-05-08 15:14:11.000000000 +0100 @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 2009, Gavin Atkinson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define GPIO_LED_STATUS_RED 0 +#define GPIO_LED_STATUS_GREEN 1 +#define GPIO_LED_DISK2 2 +#define GPIO_LED_DISK1 3 + +#define GPIO_LED_STATUS_RED_BIT (1U << GPIO_LED_STATUS_RED) +#define GPIO_LED_STATUS_GREEN_BIT (1U << GPIO_LED_STATUS_GREEN) +#define GPIO_LED_DISK2_BIT (1U << GPIO_LED_DISK2) +#define GPIO_LED_DISK1_BIT (1U << GPIO_LED_DISK1) + +/* Amber is produced by switching both red and green LEDs on */ +#define GPIO_LED_STATUS_AMBER_BITS (GPIO_LED_STATUS_RED_BIT | \ + GPIO_LED_STATUS_GREEN_BIT) + +#define GPIO_ALL_LED_BITS (GPIO_LED_STATUS_RED_BIT | \ + GPIO_LED_STATUS_GREEN_BIT | \ + GPIO_LED_DISK2_BIT | \ + GPIO_LED_DISK1_BIT) + +struct nslu2_led_softc { + device_t sc_dev; + bus_space_tag_t sc_iot; + bus_space_handle_t sc_gpio_ioh; + eventhandler_tag sc_shutdown_eh; + struct cdev *sc_srled; + struct cdev *sc_saled; + struct cdev *sc_sgled; + struct cdev *sc_d1led; + struct cdev *sc_d2led; +}; + +extern struct mtx ixp425_gpio_mtx; + +static void +nslu2_led_set(struct nslu2_led_softc *sc, int leds, int mask) +{ + uint32_t reg; + + /* On the NSLU2 hardware, a "1" written to the status LED outputs + * will switch the LEDs on, but for the disk LEDs a "1" switches + * them off. Handle that here, so the rest of the code doesn't + * have to deal with this detail. + */ + leds ^= (GPIO_LED_DISK1_BIT | GPIO_LED_DISK2_BIT); + + mtx_lock(&ixp425_gpio_mtx); + reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); + reg &= ~mask; + reg |= (leds & mask); + GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); + mtx_unlock(&ixp425_gpio_mtx); +} + +static void +nslu2_led_status_red_func(void *arg, int onoff) +{ + struct nslu2_led_softc *sc = arg; + + nslu2_led_set(sc, (onoff ? GPIO_LED_STATUS_RED_BIT : 0), + GPIO_LED_STATUS_RED_BIT); +} + +static void +nslu2_led_status_amber_func(void *arg, int onoff) +{ + struct nslu2_led_softc *sc = arg; + + /* XXX: Ideally this should be done through the led(4) interface, + * but there isn't currently a published interface to change + * state from the kernel, so we go behind led(4)'s back. + */ + nslu2_led_set(sc, (onoff ? GPIO_LED_STATUS_AMBER_BITS : 0), + GPIO_LED_STATUS_AMBER_BITS); +} + +static void +nslu2_led_status_green_func(void *arg, int onoff) +{ + struct nslu2_led_softc *sc = arg; + + nslu2_led_set(sc, (onoff ? GPIO_LED_STATUS_GREEN_BIT : 0), + GPIO_LED_STATUS_GREEN_BIT); +} + +static void +nslu2_led_status_disk1_func(void *arg, int onoff) +{ + struct nslu2_led_softc *sc = arg; + + nslu2_led_set(sc, (onoff ? GPIO_LED_DISK1_BIT : 0), + GPIO_LED_DISK1_BIT); +} + +static void +nslu2_led_status_disk2_func(void *arg, int onoff) +{ + struct nslu2_led_softc *sc = arg; + + nslu2_led_set(sc, (onoff ? GPIO_LED_DISK2_BIT : 0), + GPIO_LED_DISK2_BIT); +} + +static void +nslu2_led_shutdown(void *arg) +{ + struct nslu2_led_softc *sc = arg; + + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->sc_shutdown_eh); + + /* Shutting down... Set status to amber */ + nslu2_led_set(sc, GPIO_LED_STATUS_AMBER_BITS, + GPIO_LED_STATUS_AMBER_BITS); +} + +static int +nslu2_led_probe(device_t dev) +{ + device_set_desc(dev, "NSLU2 LEDs"); + return (BUS_PROBE_DEFAULT); +} + +static int +nslu2_led_attach(device_t dev) +{ + struct nslu2_led_softc *sc = device_get_softc(dev); + struct ixp425_softc *sa = device_get_softc(device_get_parent(dev)); + + sc->sc_dev = dev; + sc->sc_iot = sa->sc_iot; + sc->sc_gpio_ioh = sa->sc_gpio_ioh; + + /* Configure LED GPIO pins as output */ + mtx_lock(&ixp425_gpio_mtx); + GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, + GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) &~ GPIO_ALL_LED_BITS); + mtx_unlock(&ixp425_gpio_mtx); + + /* Start with status LED green and disk LEDs off */ + sc->sc_srled = led_create_state(nslu2_led_status_red_func, + sc, "status-red", 0); + sc->sc_saled = led_create_state(nslu2_led_status_amber_func, + sc, "status-amber", 0); + sc->sc_sgled = led_create_state(nslu2_led_status_green_func, + sc, "status-green", 1); + sc->sc_d1led = led_create_state(nslu2_led_status_disk1_func, + sc, "disk1", 0); + sc->sc_d2led = led_create_state(nslu2_led_status_disk2_func, + sc, "disk2", 0); + + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, + nslu2_led_shutdown, sc, SHUTDOWN_PRI_FIRST); + return (0); +} + +static void +nslu2_led_detach(device_t dev) +{ + struct nslu2_led_softc *sc = device_get_softc(dev); + + if (sc->sc_shutdown_eh) + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->sc_shutdown_eh); + if (sc->sc_srled != NULL) + led_destroy(sc->sc_srled); + if (sc->sc_saled != NULL) + led_destroy(sc->sc_saled); + if (sc->sc_sgled != NULL) + led_destroy(sc->sc_sgled); + if (sc->sc_d1led != NULL) + led_destroy(sc->sc_d1led); + if (sc->sc_d2led != NULL) + led_destroy(sc->sc_d2led); +} + +static device_method_t nslu2_led_methods[] = { + DEVMETHOD(device_probe, nslu2_led_probe), + DEVMETHOD(device_attach, nslu2_led_attach), + DEVMETHOD(device_detach, nslu2_led_detach), + + {0, 0}, +}; + +static driver_t nslu2_led_driver = { + "nslu2_led", + nslu2_led_methods, + sizeof(struct nslu2_led_softc), +}; +static devclass_t nslu2_led_devclass; + +DRIVER_MODULE(nslu2_led, ixp, nslu2_led_driver, nslu2_led_devclass, 0, 0); --- /dev/null 2009-05-08 15:11:01.000000000 +0100 +++ sys/arm/xscale/ixp425/std.nslu2 2009-05-08 14:14:50.000000000 +0100 @@ -0,0 +1,7 @@ +#$FreeBSD$ + +# +# Linksys NSLU2 board configuration +# +files "../xscale/ixp425/files.nslu2" +# --- /dev/null 2009-05-08 15:11:01.000000000 +0100 +++ sys/arm/xscale/ixp425/files.nslu2 2009-05-08 14:14:55.000000000 +0100 @@ -0,0 +1,2 @@ +#$FreeBSD$ +arm/xscale/ixp425/nslu2_led.c optional nslu2_led --- nslu2_led.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-arm@FreeBSD.ORG Sat May 9 05:11:22 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D81EC106566C; Sat, 9 May 2009 05:11:22 +0000 (UTC) (envelope-from yohanes@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 664948FC15; Sat, 9 May 2009 05:11:22 +0000 (UTC) (envelope-from yohanes@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1085356yxb.13 for ; Fri, 08 May 2009 22:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=tyg0+9H/MFgQIhVTRqOKQMpQKpagZA4bnWNIIZ5bIUo=; b=E7DS/aKxlbKfrpoH643KD8kMzmLMc6MCbXZGq7FkO0LSw8tH9YkIPXLnKgiDldWivL AoBcKr4ZLgEuw23zOjxuvRUmuCt2b282fZ7BCxCubb7a+v3Tl8qTslJZ4YeRL4u8aWdi gY5Jc3qwAsnt8mATC1tO8faLnb/k3NorhqHow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=Ns1Oen7eyrK5V7QwbTywg/wMlEe2qLu1A7Q958Uqhe4oPEeQvKGU8sfHrSq8MvakjJ 8f8MU9+4/CIUqW2N++uqcBZnOpKLdbKqcrPvQt0GP8ya6I3f5D2JMXgz5B3ibCPUu2vh f+x5OGFJaHE+ZqOyw/+90HRURQKC9HRTKa5e4= MIME-Version: 1.0 Received: by 10.90.75.13 with SMTP id x13mr2457406aga.3.1241842530155; Fri, 08 May 2009 21:15:30 -0700 (PDT) From: Yohanes Nugroho Date: Sat, 9 May 2009 11:15:10 +0700 Message-ID: <260bb65e0905082115l4f017fb8g85ec88b81c191dc6@mail.gmail.com> To: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: EHCI Problem on FreeBSD arm port X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 05:11:23 -0000 Hi all, Bruce M Simpson has donated me an Emprex NSD 100 for porting FreeBSD to it, and currently I am working to port FreeBSD to this machine, which is ARM SoC Cavium Econa CNS11XX (formerly Star 91XX). But now I am stuck in implementing the USB EHCI controller. Before getting into the question, I would like to give some background. This SoC uses Faraday FA526 Arm CPU (arm4), and I have worked on Linux port of this SoC. The current progress is as follows: - FA526 CPU support is working (taken from NetBSD with minor adjustment) - Interrupt controller, timer, and serial console is working There are several more things that i need to implement: EHCI controller driver, OHCI controller driver, and network driver. I am starting with EHCI because then I would be able to use USB disk for booting, and I will be able to use my USB-Ethernet adapter (supported by FreeBSD) to test the networking stuff. This is where I got stuck. The EHCI controller is detected, most of the time the hub is detected (2 ports), and some of the time the USB mass controller is loaded. From my observation, it seems that even though the USB transaction is completed successfully, it sometimes doesn't return correct data. By "completing successfully", The result is (error=0): ehci_device_done:2149: xfer=0xc19360b0, pipe=0xc192b878, error=0 It is obvious that the data is sometimes invalid, because the display name of the device is sometimes corrupted. For example, this is when it is ok (see: "Kingston DataTraveler"): pass0: Removable Direct Access SCSI-2 device and when it is error ("Kingston DataTravele2F921"): umass0: on usbus0 (and sometimes even weirder string is shown) This invalid data happens randomly, and causes the error to move around (USB_ERR_NO_PIPE, CAM_REQ_CMP_ERR, etc). I have checked these parts: - I have verified that the device itself is working fine in Linux (always fine) - the Linux implementation doesn't have any quirks for this SoC's EHCI controller - Timer: the timer is working OK, so this should not be a timing problem - Interrupt controller: interrupt controller is also working OK, EHCI interrupt handler is called as it should - Caching/sync problem. I don't have deep understanding about ARM cache mechanism, but I have tried adding a code to flush the all of Dcache at the end of ehci_device_done, and it doesn't help. My current code is quite messy (many debugging printf). I am currently cleaning the source code so that everyone can have a look. But while I am cleaning, maybe anyone can point out things that I need to check. Here is the boot log of the most successful boot. KDB: debugger backends: ddb KDB: current backend: ddb kernel stack c12eb000 Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #153: Sat May 9 10:19:30 WIT 2009 yohanes@cameron:/usr/home/yohanes/freebsd/freebsd/src/sys/arm/compile/CNS11XXNAS WARNING: DIAGNOSTIC option enabled, expect reduced performance. Preloaded elf kernel "elf kernel" at 0xc12d6f4c. unknown CPU (ID = 0x66015261) WB enabled LABT 16KB/16B 2-way Instruction cache 16KB/16B 2-way write-back-locking-B Data cache real memory = 67108864 (64 MB) Physical memory chunk(s): 00000000 - 0xffffff, 16777216 bytes (4096 pages) 0x133b000 - 0x3eaefff, 45563904 bytes (11124 pages) avail memory = 61702144 (58 MB) ULE: setup cpu 0 nfslock: pseudo-device null: random: mem: econa identify econa probe econaarm0: on motherboard econa attach econa add children econa add child econa_ic addr 7d000000 econa add child uart addr 78000000 econa add child timer addr 79000000 econa add child ehci addr f8000000 timer0: mem 0x79000000-0x79ffffff irq 0,1 on econaarm0 econa_alloc_resource start 00000000 end ffffffff, count = 00000001 econa_alloc_resource start 79000000 end 79ffffff, count = 01000000 sys_res_memory Alloc OK econa_alloc_resource start 00000000 end ffffffff, count = 00000001 econa_alloc_resource start 00000000 end 00000000, count = 00000001 sys_res_irq Alloc OK STR9100 CPU Clock: 200 MHz HZ = 100 reload value = 500000 IRQ Timer1 at int #0x0 clock 100000000(Hz) econa_setup_intr done econa_setup_intr 0 timer0: [FILTER] DONE timer done00000000 ehci probe ehci probe ehci0: mem 0xf8000000-0xffffffff irq 24 on econaarm0 econa_alloc_resource start 00000000 end ffffffff, count = 00000001 econa_alloc_resource start f8000000 end ffffffff, count = 08000000 sys_res_memory Alloc OK econa_alloc_resource start 00000000 end ffffffff, count = 00000001 econa_alloc_resource start 00000018 end 00000018, count = 00000001 sys_res_irq Alloc OK add USB device setup intr econa_setup_intr done econa_setup_intr 24 ehci0: [MPSAFE] ehci0: [ITHREAD] init ehci ehci_init:222: start cmd=0x01000020 EHCI_CMD_ASE sts=0x00101202 EHCI_STS_HCH EHCI_STS_ERRINT ien=0x00007070 frindex=0x00000000 ctrdsegm=0x00000000 periodic=0x00000000 async=0x00000000 usbus0: EHCI version 1.0 ehci_init:240: sparams=0x101202 ehci_init:244: cparams=0x7070 ehci_init:255: usbus0: resetting QH(0xcd001800) at 0x03e3b800: link=0x03e3b802 endp=0x0000a000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=1 mpl=0x0 ctl=0 nrl=0 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00000000<> Overlay qTD: next=0x00000001 altnext=0x00000001 status=0x00000040: toggle=0 bytes=0x0 ioc=0 c_page=0x0 cerr=0 pid=0 stat=NOT_ACTIVE-HALTED buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 buffer_hi[0]=0x00000000 buffer_hi[1]=0x00000000 buffer_hi[2]=0x00000000 buffer_hi[3]=0x00000000 buffer_hi[4]=0x00000000 probe and attach usbus0: on ehci0 done initcloks enabling timer Timecounter "CPU Timer" frequency 50000000 Hz quality 1000 Timecounters tick every 10.000 msec ehci_root_intr:2001: port 2 changed usbus0: 480Mbps High Speed USB v2.0 ehci_set_hw_power:3793: ehci_set_hw_power:3805: Async is active ehci_set_hw_power:3810: Periodic is active ehci_pipe_init:3663: pipe=0xc1928078, addr=0, endpt=0, mode=0 (0) ehci_roothub_exec:3032: type=0x00 request=0x05 wLen=0x0000 wValue=0x0001 wIndex=0x0000 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0008 wValue=0x0100 wIndex=0x0000 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0012 wValue=0x0100 wIndex=0x0000 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0002 wValue=0x0300 wIndex=0x0080 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0004 wValue=0x0300 wIndex=0x0080 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0002 wValue=0x0301 wIndex=0x0001 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x000e wValue=0x0301 wIndex=0x0001 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0002 wValue=0x0302 wIndex=0x0001 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x001c wValue=0x0302 wIndex=0x0001 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0009 wValue=0x0200 wIndex=0x0000 ehci_roothub_exec:3032: type=0x80 request=0x06 wLen=0x0019 wValue=0x0200 wIndex=0x0000 ehci_roothub_exec:3032: type=0x00 request=0x09 wLen=0x0000 wValue=0x0001 wIndex=0x0000 ehci_pipe_init:3663: pipe=0xc18a1900, addr=1, endpt=129, mode=0 (1) ugen0.1: at usbus0 uhub0: on usbus0 ehci_roothub_exec:3032: type=0xa0 request=0x06 wLen=0x0009 wValue=0x2900 wIndex=0x0000 WARNING: DIAGNOSTIC option enabled, expect reduced performance. ehci_roothub_exec:3032: type=0x23 request=0x03 wLen=0x0000 wValue=0x0008 wIndex=0x0001 ehci_roothub_exec:3364: set port power 1 ehci_root_intr:2001: port 2 changed ehci_roothub_exec:3032: type=0x23 request=0x03 wLen=0x0000 wValue=0x0008 wIndex=0x0002 ehci_roothub_exec:3364: set port power 2 uhub0: 2 ports with 2 removable, self powered ehci_set_hw_power:3793: ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 port 68 (idx=1) status=0x1000 ehci_roothub_exec:3032: type=0x23 request=0x01 wLen=0x0000 wValue=0x0010 wIndex=0x0001 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 port 68 (idx=1) status=0x1000 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0002 port 72 (idx=2) status=0x1803 ehci_roothub_exec:3032: type=0x23 request=0x01 wLen=0x0000 wValue=0x0010 wIndex=0x0002 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0002 port 72 (idx=2) status=0x1801 ehci_roothub_exec:3032: type=0x23 request=0x03 wLen=0x0000 wValue=0x0004 wIndex=0x0002 ehci_roothub_exec:3345: ehci after reset, status=0x00001005 ehci_roothub_exec:3360: ehci port 2 reset, status = 0x00001005 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0002 port 72 (idx=2) status=0x1005 ehci_roothub_exec:3032: type=0x23 request=0x01 wLen=0x0000 wValue=0x0014 wIndex=0x0002 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0002 port 72 (idx=2) status=0x1005 ehci_pipe_init:3663: pipe=0xc1927878, addr=0, endpt=0, mode=0 (1) usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_set_hw_power:3793: ehci_set_hw_power:3805: Async is active ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19340b0, pipe=0xc1927878, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19340b0, pipe=0xc1927878, error=0 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19340b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19330b0, pipe=0xc1927878, error=0 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19330b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19320b0, pipe=0xc1927878, error=0 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19320b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19310b0, pipe=0xc1927878, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19310b0, pipe=0xc1927878, error=0 ehci_roothub_exec:3032: type=0x23 request=0x03 wLen=0x0000 wValue=0x0004 wIndex=0x0002 ehci_roothub_exec:3345: ehci after reset, status=0x00001005 ehci_roothub_exec:3360: ehci port 2 reset, status = 0x00001005 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0002 port 72 (idx=2) status=0x1005 ehci_roothub_exec:3032: type=0x23 request=0x01 wLen=0x0000 wValue=0x0014 wIndex=0x0002 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19310b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19300b0, pipe=0xc1927878, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19300b0, pipe=0xc1927878, error=0 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19300b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19300b0, pipe=0xc1927878, error=0 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19300b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19310b0, pipe=0xc1927878, error=0 ehci_device_ctrl_close ../../../dev/usb/controller/ehci.c:2236 ehci_device_done:2134: xfer=0xc19310b0, pipe=0xc1927878, error=5 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19320b0, pipe=0xc1927878, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19320b0, pipe=0xc1927878, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19320b0, pipe=0xc1927878, error=0 ehci_pipe_init:3663: pipe=0xc1871a80, addr=2, endpt=129, mode=0 (1) ehci_pipe_init:3663: pipe=0xc1871aa4, addr=2, endpt=2, mode=0 (1) usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_set_hw_power:3793: ehci_set_hw_power:3805: Async is active ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19390b0, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1939180, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1939850, pipe=0xc1871a80, error=0 ehci_device_bulk_close ../../../dev/usb/controller/ehci.c:2185 ehci_device_done:2134: xfer=0xc1939850, pipe=0xc1871a80, error=5 ehci_device_bulk_close ../../../dev/usb/controller/ehci.c:2185 ehci_device_done:2134: xfer=0xc1939180, pipe=0xc1871a80, error=5 ehci_device_bulk_close ../../../dev/usb/controller/ehci.c:2185 ehci_device_done:2134: xfer=0xc19390b0, pipe=0xc1871aa4, error=5 ugen0.2: at usbus0 umass_probe_proto ../../../dev/usb/storage/umass.c:1297 retrieving interface descriptors done ../../../dev/usb/storage/umass.c:1405 umass_probe_proto ../../../dev/usb/storage/umass.c:1297 retrieving interface descriptors done ../../../dev/usb/storage/umass.c:1405 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass_attach ../../../dev/usb/storage/umass.c:1526 usb2_transfer_setup ../../../dev/usb/usb_transfer.c:743 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19320b0, pipe=0xc1927878, error=0 register sim 0 scanning the sim umass0:0:0:-1: Attached to scbus0 probestart ../../../cam/cam_xpt.c:5768 scsi_inquiry ../../../cam/scsi/scsi_all.c:3608 probestart ../../../cam/cam_xpt.c:5779 probestart ../../../cam/cam_xpt.c:5887 ehci_set_hw_power:3793: ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 port 68 (idx=1) status=0x1000 ehci_roothub_exec:3032: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0002 port 72 (idx=2) status=0x1005 ehci_set_hw_power:3793: ehci_set_hw_power:3805: Async is active ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19413a8, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 probestart ../../../cam/cam_xpt.c:5823 scsi_inquiry ../../../cam/scsi/scsi_all.c:3608 probestart ../../../cam/cam_xpt.c:5887 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19413a8, pipe=0xc1871a80, error=22 ehci_set_hw_power:3793: ehci_set_hw_power:3805: Async is active ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941458, pipe=0xc1927878, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 cam_periph_error ../../../cam/cam_periph.c:1563 probestart ../../../cam/cam_xpt.c:5696 probestart ../../../cam/cam_xpt.c:5887 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19413a8, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 cam_periph_error ../../../cam/cam_periph.c:1563 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed Retrying Command (per Sense Data) (probe0:umass-sim0:0:0:0): Retrying Command probedone ../../../cam/cam_xpt.c:6326 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 pass0 at umass-sim0 bus 0 target 0 lun 0 pass0: Removable Direct Access SCSI-2 device pass0: 40.000MB/s transfers ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19413a8, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 1906MB (3903578 512 byte sectors: 255H 63S/T 242C) GEOM: new disk da0 dagetcapacity ../../../cam/scsi/scsi_da.c:1894 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19413a8, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19412d8, pipe=0xc1871aa4, error=0 Expensive timeout(9) function: 0xc10ee6bc(0xc1885000) -1.990236639 s ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc19413a8, pipe=0xc1871a80, error=0 ehci_non_isoc_done ../../../dev/usb/controller/ehci.c:1276 ehci_device_done:2134: xfer=0xc1941678, pipe=0xc1871a80, error=0 name = da0 geom da0 sector size = 1886417008 name = da0 geom da0 sector size = 1886417008 Offset = 0 length = 1886417008 panic: g_read_data(): invalid length 1886417008 KDB: enter: panic [thread pid 2 tid 100006 ] Stopped at kdb_enter+0x44: ldrb r15, [r15, r15, ror r15]! -- Regards Yohanes http://yohan.es -- Regards Yohanes http://yohan.es/ From owner-freebsd-arm@FreeBSD.ORG Sat May 9 09:06:37 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD4E5106564A for ; Sat, 9 May 2009 09:06:37 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 61AA08FC14 for ; Sat, 9 May 2009 09:06:37 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=SK9XPEhRChQA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=QSX11yxy2x8J1Xq3pGUA:9 a=MYcD9l6sn4b7HO0Y_XEzVO4dj5IA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 848715676; Sat, 09 May 2009 10:06:32 +0200 From: Hans Petter Selasky To: freebsd-arm@freebsd.org Date: Sat, 9 May 2009 10:09:05 +0200 User-Agent: KMail/1.9.7 References: <260bb65e0905082115l4f017fb8g85ec88b81c191dc6@mail.gmail.com> In-Reply-To: <260bb65e0905082115l4f017fb8g85ec88b81c191dc6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905091009.06658.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: EHCI Problem on FreeBSD arm port X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 09:06:38 -0000 On Saturday 09 May 2009, Yohanes Nugroho wrote: > Hi all, > > This is where I got stuck. The EHCI controller is detected, most of > the time the hub is detected (2 ports), and some of the time the USB > mass controller is loaded. From my observation, it seems that even > though the USB transaction is completed successfully, it sometimes > doesn't return correct data. By "completing successfully", The result > is (error=0): Hi, If the strings are corrupt I would guess at a busdma issue. Flusing in device done is too late. Put your flush all / invalidate all code into: #if USB_HAVE_BUSDMA && defined(__FreeBSD__) ... usb2_pc_cpu_flush() usb2_pc_cpu_invalidate() ... #endif In "src/sys/dev/usb/usb_busdma.c". Are you running stock 8-current ? --HPS From owner-freebsd-arm@FreeBSD.ORG Sat May 9 18:03:05 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1C911065672; Sat, 9 May 2009 18:03:05 +0000 (UTC) (envelope-from yohanes@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 98B5F8FC1A; Sat, 9 May 2009 18:03:05 +0000 (UTC) (envelope-from yohanes@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1211772yxb.13 for ; Sat, 09 May 2009 11:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=4E374dSEKBMm9ik0go+MLuV74g5hIW2ZVqKzuZ/7Bzw=; b=pf2qhqdBWxrDk9CyaVMovsaeMZPU8mwK15WmkjpCgz/77+e+SxA5ARJO4kQrn7fw4A nDRF/fJ+Ab26Afp/H05y8e9lV4yUf8I2NDCnBaa/kVe7og3JWwiqRh3x7ZWotiyzaHX9 v46opz7jmGUjEV0uz4A99JefbncrY+QjRu4Mc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=VfbKAc+0TWhH5JErLrCoh6EbloXhCG2CkTbTjYr1MPBY/DmLMCgxChUUklUU3L9Gr3 rr78No9vestU6LiG+q39roDKuV97JZZIhJZEtcleNzcQ+CWRyGYtjMf5LGmRI/lWOnA5 olbOSeTdznBOq827Zu427j49yJ1rjjyj6AdHA= MIME-Version: 1.0 Received: by 10.90.25.11 with SMTP id 11mr1103226agy.2.1241892185158; Sat, 09 May 2009 11:03:05 -0700 (PDT) In-Reply-To: <200905091009.06658.hselasky@c2i.net> References: <260bb65e0905082115l4f017fb8g85ec88b81c191dc6@mail.gmail.com> <200905091009.06658.hselasky@c2i.net> From: Yohanes Nugroho Date: Sun, 10 May 2009 01:02:45 +0700 Message-ID: <260bb65e0905091102y272de752r750a3a79940486f@mail.gmail.com> To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: EHCI Problem on FreeBSD arm port X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 18:03:06 -0000 On Sat, May 9, 2009 at 3:09 PM, Hans Petter Selasky wrote: > Hi, > > If the strings are corrupt I would guess at a busdma issue. thank you, adding a "flush all" instruction makes the USB controller works properly. Now i should check the implementation of the FA526 invalidate/flush instruction, because I shouldn't need the extra flush instruction if bus_dmamap_sync works properly, right?. > Are you running stock 8-current ? yes -- Regards Yohanes http://yohan.es/ From owner-freebsd-arm@FreeBSD.ORG Sat May 9 18:16:36 2009 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21A02106566B; Sat, 9 May 2009 18:16:36 +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 D22738FC08; Sat, 9 May 2009 18:16:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n49IDObd007747; Sat, 9 May 2009 12:13:25 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 09 May 2009 12:13:27 -0600 (MDT) Message-Id: <20090509.121327.-1592325297.imp@bsdimp.com> To: yohanes@gmail.com From: "M. Warner Losh" In-Reply-To: <260bb65e0905091102y272de752r750a3a79940486f@mail.gmail.com> References: <260bb65e0905082115l4f017fb8g85ec88b81c191dc6@mail.gmail.com> <200905091009.06658.hselasky@c2i.net> <260bb65e0905091102y272de752r750a3a79940486f@mail.gmail.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: freebsd-arm@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: EHCI Problem on FreeBSD arm port X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 18:16:36 -0000 In message: <260bb65e0905091102y272de752r750a3a79940486f@mail.gmail.com> Yohanes Nugroho writes: : On Sat, May 9, 2009 at 3:09 PM, Hans Petter Selasky wrote: : : > Hi, : > : > If the strings are corrupt I would guess at a busdma issue. : : thank you, adding a "flush all" instruction makes the USB controller : works properly. : : Now i should check the implementation of the FA526 invalidate/flush : instruction, because I shouldn't need the extra flush instruction if : bus_dmamap_sync works properly, right?. I believe so. Warner From owner-freebsd-arm@FreeBSD.ORG Sat May 9 19:06:40 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05DBE1065674 for ; Sat, 9 May 2009 19:06:40 +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 B63CA8FC1C for ; Sat, 9 May 2009 19:06:39 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n49J6avV025538; Sat, 9 May 2009 14:06:36 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1241895996; bh=yn8LnG7ae/8rZHiFmxKQwoSKgm6h0bWaehYK1PLSvTk=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=AnowDOyc8jMDhH0+kPxOYRPjA1lAoztaUVhaltneSySW4nnnncNLaK4xURjMby4B1 SXcw/FsV4IPyhJXzzutuwOZwf7AShMYNduIiEC2ICPJuaaTYp8M5Fx6GAzLDe/nx/7 S45qYhrOvIqIlJYWmTWbesB1ZNER0lYsK8KJ444w= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n49J6ahs025537; Sat, 9 May 2009 14:06:36 -0500 (CDT) (envelope-from tinguely) Date: Sat, 9 May 2009 14:06:36 -0500 (CDT) From: Mark Tinguely Message-Id: <200905091906.n49J6ahs025537@casselton.net> To: hselasky@c2i.net, yohanes@gmail.com In-Reply-To: <260bb65e0905091102y272de752r750a3a79940486f@mail.gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Sat, 09 May 2009 14:06:36 -0500 (CDT) Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: EHCI Problem on FreeBSD arm port X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 19:06:40 -0000 > > On Sat, May 9, 2009 at 3:09 PM, Hans Petter Selasky wrote: > > > Hi, > > > > If the strings are corrupt I would guess at a busdma issue. > > thank you, adding a "flush all" instruction makes the USB controller > works properly. > > Now i should check the implementation of the FA526 invalidate/flush > instruction, because I shouldn't need the extra flush instruction if > bus_dmamap_sync works properly, right?. > > > Are you running stock 8-current ? > > yes Sounds like the multiple kernel mapping problem in ARM. It was mentioned when the new USB stack was comitted. Muliple kernel mappings can also occur in other situations. There is a patch that has been around for a month and is about to be committed. I just put three counters in the patch to determine if PG_UNMANAGED pages could also be shared. --Mark Tinguely