From owner-freebsd-arm@FreeBSD.ORG Sun Mar 22 01:16:54 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 E6984106564A; Sun, 22 Mar 2009 01:16:54 +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 926918FC12; Sun, 22 Mar 2009 01:16:54 +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 n2M1Gq2i050643; Sat, 21 Mar 2009 21:16:52 -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 n2M1Gq7d089658; Sat, 21 Mar 2009 21:16:52 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: by freebsd-current.sentex.ca (Postfix, from userid 666) id 4D3877302F; Sat, 21 Mar 2009 20:16:52 -0500 (EST) Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Message-Id: <20090322011652.4D3877302F@freebsd-current.sentex.ca> Date: Sat, 21 Mar 2009 20:16:52 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.1/8983/Thu Feb 12 07:48:01 2009 clamav-milter version 0.94.2 on clamscanner3 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: Sun, 22 Mar 2009 01:16:55 -0000 TB --- 2009-03-22 00:40:00 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2009-03-22 00:40:00 - starting HEAD tinderbox run for arm/arm TB --- 2009-03-22 00:40:00 - cleaning the object tree TB --- 2009-03-22 00:40:39 - cvsupping the source tree TB --- 2009-03-22 00:40:39 - /usr/bin/csup -z -r 3 -g -L 1 -h localhost -s /tinderbox/HEAD/arm/arm/supfile TB --- 2009-03-22 00:40:58 - building world TB --- 2009-03-22 00:40:58 - MAKEOBJDIRPREFIX=/obj TB --- 2009-03-22 00:40:58 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2009-03-22 00:40:58 - TARGET=arm TB --- 2009-03-22 00:40:58 - TARGET_ARCH=arm TB --- 2009-03-22 00:40:58 - TZ=UTC TB --- 2009-03-22 00:40:58 - __MAKE_CONF=/dev/null TB --- 2009-03-22 00:40:58 - cd /src TB --- 2009-03-22 00:40:58 - /usr/bin/make -B buildworld >>> World build started on Sun Mar 22 00:41:01 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 [...] sed -e 's/yy/ipf_yy/g' -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' y.tab.c > ipf_y.c sed -e 's/yy/ipf_yy/g' y.tab.h > ipf_y.h sed -e 's/yy/ipf_yy/g' -e 's/y.tab.h/ipf_y.h/' -e 's/lexer.h/ipf_l.h/' /src/sbin/ipf/ipf/../../../contrib/ipfilter/tools/lexer.c > ipf_l.c rm -f .depend mkdep -f .depend -a -I. -DIPFILTER_BPF -I/src/sbin/ipf/ipf/../../../contrib/ipfilter -I/src/sbin/ipf/ipf/../../../contrib/ipfilter/tools -I/src/sbin/ipf/ipf/../../../sys -I/src/sbin/ipf/ipf/../../../sys/contrib/ipfilter -DSTATETOP -D__UIO_EXPOSE /src/sbin/ipf/ipf/../../../contrib/ipfilter/tools/ipf.c /src/sbin/ipf/ipf/../../../contrib/ipfilter/tools/ipfcomp.c ipf_y.c ipf_l.c /src/sbin/ipf/ipf/../../../contrib/ipfilter/bpf_filter.c In file included from /src/sbin/ipf/ipf/../../../contrib/ipfilter/tools/ipf_y.y:15: /obj/arm/src/tmp/usr/include/pcap.h:74:23: error: pcap/pcap.h: No such file or directory mkdep: compile failed *** Error code 1 Stop in /src/sbin/ipf/ipf. *** Error code 1 Stop in /src/sbin/ipf. *** Error code 1 Stop in /src/sbin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2009-03-22 01:16:52 - WARNING: /usr/bin/make returned exit code 1 TB --- 2009-03-22 01:16:52 - ERROR: failed to build world TB --- 2009-03-22 01:16:52 - 1623.99 user 219.03 system 2211.60 real http://tinderbox.des.no/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Mon Mar 23 20:24:46 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 D6DC41065672 for ; Mon, 23 Mar 2009 20:24:46 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFBA8FC16 for ; Mon, 23 Mar 2009 20:24:46 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1370668yxm.13 for ; Mon, 23 Mar 2009 13:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:received:message-id:subject :from:to:content-type:content-transfer-encoding; bh=zgrH+NSIo0hxJjkbuN/DFE24giovGmCIm7dNct6AZxo=; b=qSOeE6pLkoNe64jT3H09/3CdLvCvn68wSC4I4x/ExzO2ATQrCia7my+QwA0y1ujpMA ejUgVwquJFZM43UbWGjt6to2blCKAXiDc761WucAEQj/5nAHeQ6uQ1x5rBQb739dE18W HeUgqiyOrNLKlHFEyDa1UGI4TXc4inzCUB6Ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=XBXXRmGNjiq6D5kP/8ecSND7/Vf5CeG29+gm2ln77o3eAIGHqagojJ7JNYizD3QNfk /9ccPZD9Vu+SytUenRz26fFu41DOfBUh4f3AuodxtbNdRaq88yeXa1Jx1KBuh8ZHmjMI 3bEQHOEb5MPu7fa77/nRD7vDqzAcPgZ9UM1dA= MIME-Version: 1.0 Date: Mon, 23 Mar 2009 21:01:50 +0100 Received: by 10.231.10.140 with SMTP id p12mr1643325ibp.38.1237838525411; Mon, 23 Mar 2009 13:02:05 -0700 (PDT) Message-ID: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> From: Sylvestre Gallon To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Atmel at91sam9261-ek support. 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, 23 Mar 2009 20:24:47 -0000 Hi freebsd-arm@ I've got an access to an at91sam9261-ek. This board have a at91sam9261 soc that is near the at91rm9200, so I start a little port of it into FreeBSD. So I work 3 days on it and that results in a Big patch that allow the board to boot. As you can see in the dmesg, for the moment the system hangs, but it is normal (I haven't yet finish the implementation of the dm9000 ethernet driver so NFS don't find any ethernet interface and panic). This big diff contains : - an AT91SAM9261EK conf file. - an std.at91sam9261ek file. - a begin of dme driver (dm9000 ethernet chip driver). I will work this week on it to send you another diff that complete this driver :) - a board_at91sam9261ek.c file. - an include for at91sam9261 registers. - a new watchdog driver (at91_wdt) - a new smc driver (static memory controller) - a new pit driver (periodic interval timer) There is a lot of little modification on the at91 existing sources. As you can see in the diff I work for the moment on a define way to separate the two soc code that differ. But I think that in the future a .c for each soc should appear. You can find the dmesg here : http://rathaxes.org/~syl/FreeBSD/dmesg-at91sam9261ek.png and the patch here : http://rathaxes.org/~syl/FreeBSD/at91sam9261ek-FreeBSD-patch If you had any questions on this diff or on the at91sam9261-ek board you're welcome :) Thanks for your time. Cheers, -- Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) From owner-freebsd-arm@FreeBSD.ORG Mon Mar 23 21:07: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 CFB10106567C for ; Mon, 23 Mar 2009 21:07:30 +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 8EE0A8FC1E for ; Mon, 23 Mar 2009 21:07:30 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2NL5g9K072590; Mon, 23 Mar 2009 15:05:43 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Mar 2009 15:06:17 -0600 (MDT) Message-Id: <20090323.150617.-1956306606.imp@bsdimp.com> To: ccna.syl@gmail.com From: "M. Warner Losh" In-Reply-To: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@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 Subject: Re: Atmel at91sam9261-ek support. 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, 23 Mar 2009 21:07:31 -0000 In message: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> Sylvestre Gallon writes: : I've got an access to an at91sam9261-ek. This board have a : at91sam9261 soc that is near the at91rm9200, so I start a : little port of it into FreeBSD. So I work 3 days on it and that : results in a Big patch that allow the board to boot. Cool! : This big diff contains : : - an AT91SAM9261EK conf file. : - an std.at91sam9261ek file. : - a begin of dme driver (dm9000 ethernet chip driver). I : will work this week on it to send you another diff that : complete this driver :) : - a board_at91sam9261ek.c file. : - an include for at91sam9261 registers. : - a new watchdog driver (at91_wdt) : - a new smc driver (static memory controller) : - a new pit driver (periodic interval timer) : : There is a lot of little modification on the at91 existing : sources. Noticed.. : As you can see in the diff I work for the moment on a : define way to separate the two soc code that differ. But I : think that in the future a .c for each soc should appear. We definitely need a much better way to cope with all this. The board, SoC, and core are all smushed together right now and we need to properly layer them out... : You can find the dmesg here : : : http://rathaxes.org/~syl/FreeBSD/dmesg-at91sam9261ek.png : : and the patch here : : : http://rathaxes.org/~syl/FreeBSD/at91sam9261ek-FreeBSD-patch : : If you had any questions on this diff or on the at91sam9261-ek board : you're welcome :) Way cool. I've been wanting to do something similar, but haven't had the time :( Warner From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 03:03:01 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 E34EA106566B for ; Tue, 24 Mar 2009 03:03:01 +0000 (UTC) (envelope-from antab@FreeBSD.org) Received: from smtp-vbr19.xs4all.nl (smtp-vbr19.xs4all.nl [194.109.24.39]) by mx1.freebsd.org (Postfix) with ESMTP id 63CCB8FC08 for ; Tue, 24 Mar 2009 03:03:01 +0000 (UTC) (envelope-from antab@FreeBSD.org) Received: from dumb.farm.antab.is (farm.antab.is [80.101.60.195]) by smtp-vbr19.xs4all.nl (8.13.8/8.13.8) with ESMTP id n2O2jW3X067806; Tue, 24 Mar 2009 03:45:33 +0100 (CET) (envelope-from antab@FreeBSD.org) Message-Id: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> From: Arnar Mar Sig To: Sylvestre Gallon In-Reply-To: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 24 Mar 2009 03:45:32 +0100 References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-arm@FreeBSD.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 03:03:02 -0000 On Mar 23, 2009, at 9:01 PM, Sylvestre Gallon wrote: > Hi freebsd-arm@ > > I've got an access to an at91sam9261-ek. This board have a > at91sam9261 soc that is near the at91rm9200, so I start a > little port of it into FreeBSD. So I work 3 days on it and that > results in a Big patch that allow the board to boot. Nice work > > As you can see in the dmesg, for the moment the system > hangs, but it is normal (I haven't yet finish the implementation > of the dm9000 ethernet driver so NFS don't find any ethernet > interface and panic). > > > This big diff contains : > - an AT91SAM9261EK conf file. > - an std.at91sam9261ek file. > - a begin of dme driver (dm9000 ethernet chip driver). I > will work this week on it to send you another diff that > complete this driver :) > - a board_at91sam9261ek.c file. > - an include for at91sam9261 registers. > - a new watchdog driver (at91_wdt) > - a new smc driver (static memory controller) Looks like the at91sam9261 uses the same SMC core as at32ap700x, we should look into using the same driver for both archs. I already have at32_smc in p4 to do bus managment and attach childs but no setup code (already done in uboot for what i need). > - a new pit driver (periodic interval timer) > > There is a lot of little modification on the at91 existing > sources. > > As you can see in the diff I work for the moment on a > define way to separate the two soc code that differ. But I > think that in the future a .c for each soc should appear. What about using hints more for device wiring instead of .c code like i did for avr32? > You can find the dmesg here : > > http://rathaxes.org/~syl/FreeBSD/dmesg-at91sam9261ek.png > > and the patch here : > > http://rathaxes.org/~syl/FreeBSD/at91sam9261ek-FreeBSD-patch > > If you had any questions on this diff or on the at91sam9261-ek board > you're welcome :) > > Thanks for your time. > > Cheers, > > -- > Sylvestre Gallon (http://devsyl.blogspot.com) > Fifth Grade Student @ Epitech & Researcher @ LSE > R&D @ Rathaxes (http://www.rathaxes.org) > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" Arnar Mar Sig From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 03:40: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 884C7106566B; Tue, 24 Mar 2009 03:40:22 +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 2FDF98FC1A; Tue, 24 Mar 2009 03:40:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2O3dnQr076972; Mon, 23 Mar 2009 21:39:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Mar 2009 21:40:24 -0600 (MDT) Message-Id: <20090323.214024.-2077496443.imp@bsdimp.com> To: antab@freebsd.org From: "M. Warner Losh" In-Reply-To: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> 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 Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 03:40:22 -0000 In message: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> Arnar Mar Sig writes: : > - a new smc driver (static memory controller) : Looks like the at91sam9261 uses the same SMC core as at32ap700x, we : should look into using the same driver for both archs. I already have : at32_smc in p4 to do bus managment and attach childs but no setup code Part of the problem here is going to be each SoC is going to have a different set of errata for the silicon.... Warner From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 03:40:25 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 065B51065672; Tue, 24 Mar 2009 03:40:25 +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 9ACA48FC14; Tue, 24 Mar 2009 03:40:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2O3c6xp076967; Mon, 23 Mar 2009 21:38:06 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Mar 2009 21:38:40 -0600 (MDT) Message-Id: <20090323.213840.1631944207.imp@bsdimp.com> To: antab@freebsd.org From: "M. Warner Losh" In-Reply-To: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> 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 Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 03:40:25 -0000 In message: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> Arnar Mar Sig writes: : : On Mar 23, 2009, at 9:01 PM, Sylvestre Gallon wrote: : > Hi freebsd-arm@ : > : > I've got an access to an at91sam9261-ek. This board have a : > at91sam9261 soc that is near the at91rm9200, so I start a : > little port of it into FreeBSD. So I work 3 days on it and that : > results in a Big patch that allow the board to boot. : Nice work : : > : > As you can see in the dmesg, for the moment the system : > hangs, but it is normal (I haven't yet finish the implementation : > of the dm9000 ethernet driver so NFS don't find any ethernet : > interface and panic). : > : > : > This big diff contains : : > - an AT91SAM9261EK conf file. : > - an std.at91sam9261ek file. : > - a begin of dme driver (dm9000 ethernet chip driver). I : > will work this week on it to send you another diff that : > complete this driver :) : > - a board_at91sam9261ek.c file. : > - an include for at91sam9261 registers. : > - a new watchdog driver (at91_wdt) : > - a new smc driver (static memory controller) : Looks like the at91sam9261 uses the same SMC core as at32ap700x, we : should look into using the same driver for both archs. I already have : at32_smc in p4 to do bus managment and attach childs but no setup code : (already done in uboot for what i need). : : > - a new pit driver (periodic interval timer) : > : > There is a lot of little modification on the at91 existing : > sources. : > : > As you can see in the diff I work for the moment on a : > define way to separate the two soc code that differ. But I : > think that in the future a .c for each soc should appear. : What about using hints more for device wiring instead of .c code like : i did for avr32? The trouble is that we'd need varadic hints. That is, hints that vary based on which SoC you're running on. We don't have those yet. Wouldn't be terribly hard to implement though... Also, we need a generic base-class for all busses in the system that dole out resources so that each new system is more like 20-30 lines of code rather than the few hundred of cut and paste they are today. Warner From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 09:10:17 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 78BDC1065677 for ; Tue, 24 Mar 2009 09:10:17 +0000 (UTC) (envelope-from ccna.syl@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 1C3AF8FC1B for ; Tue, 24 Mar 2009 09:10:16 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1508655yxm.13 for ; Tue, 24 Mar 2009 02:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/tbz7j6c5A6g0fEbGlS6IwQTDv0nvN1QgxGN227UuhY=; b=Kasrwm0xD9BdmRgQqmnoChWaf7+6LVDVa/hM75Ql0uE096HobUJFbhoLMPnDssKHAd TBiNICeOwMl73qFkYJd4V6RH9MdiH3UrBVnj91SbLJX3oCF8WaDAez9Kj7UX44O/rdxA k1KdnUKLBOZ7c1xzVSZCGRE+k0LrrkaavgAAo= 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=fi9y3je97Yr4rcEQU4VeQqbba7PDe7rQCZ0oLl37YRFUNdkN1Ze/R08jaxthJSRiG6 PPFbliXnKTV+Ij9/72FVx95iXXPH/q2pJwsle2V0sGaZWSLokpujk/epgGPh01qATFFG VocefK51P5QbVZp06GeKIbP9KMw7MNR4EkH/4= MIME-Version: 1.0 In-Reply-To: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> Date: Tue, 24 Mar 2009 10:10:00 +0100 Received: by 10.231.31.130 with SMTP id y2mr1530889ibc.52.1237885815173; Tue, 24 Mar 2009 02:10:15 -0700 (PDT) Message-ID: <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> From: Sylvestre Gallon To: Arnar Mar Sig Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 09:10:18 -0000 On Tue, Mar 24, 2009 at 3:45 AM, Arnar Mar Sig wrote: > > On Mar 23, 2009, at 9:01 PM, Sylvestre Gallon wrote: >> >> Hi freebsd-arm@ >> >> I've got an access to an at91sam9261-ek. This board have a >> at91sam9261 soc that is near the at91rm9200, so I start a >> little port of it into FreeBSD. So I work 3 days on it and that >> results in a Big patch that allow the board to boot. > > Nice work Thanks :) > >> >> As you can see in the dmesg, for the moment the system >> hangs, but it is normal (I haven't yet finish the implementation >> of the dm9000 ethernet driver so NFS don't find any ethernet >> interface and panic). >> >> >> This big diff contains : >> =A0- an AT91SAM9261EK conf file. >> =A0- an std.at91sam9261ek file. >> =A0- a begin of dme driver (dm9000 ethernet chip driver). I >> =A0 will work this week on it to send you another diff that >> =A0 complete this driver :) >> =A0- a board_at91sam9261ek.c file. >> =A0- an include for at91sam9261 registers. >> =A0- a new watchdog driver (at91_wdt) >> =A0- a new smc driver (static memory controller) > > Looks like the at91sam9261 uses the same SMC core as at32ap700x, we shoul= d > look into using the same driver for both archs. I already have at32_smc i= n > p4 to do bus managment and attach childs but no setup code (already done = in > uboot for what i need). I don't found it in the source tree. Where it is located ? If you wan't the smc register description you can take a look at this datasheet in chapter 22: http://www.atmel.org/dyn/resources/prod_documents/doc6242.pdf The smc is not used in the patch yet but I will need to use it for the implement the dm9000 driver (because this chip is attach on the 2nd channel of the smc) > >> =A0- a new pit driver (periodic interval timer) >> >> There is a lot of little modification on the at91 existing >> sources. >> >> As you can see in the diff I work for the moment on a >> define way to separate the two soc code that differ. But I >> think that in the future a .c for each soc should appear. > > What about using hints more for device wiring instead of .c code like i d= id > for avr32? > Yes here we can use hints to factorise a lot of code like a big part of the code where the #ifdef AT91SAM9261 are. But like M. Warner Losh said I think that one needs a .c by SoC to put the cpu_devs structure, the pmap_devmap structure and the errata code. We need to put this in a specific files because these code are dependant of the SoC. Cheers, --=20 Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 11:59: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 BC76A106566C for ; Tue, 24 Mar 2009 11:59:13 +0000 (UTC) (envelope-from antab@freebsd.org) Received: from smtp-vbr19.xs4all.nl (smtp-vbr19.xs4all.nl [194.109.24.39]) by mx1.freebsd.org (Postfix) with ESMTP id 4EBBB8FC0A for ; Tue, 24 Mar 2009 11:59:12 +0000 (UTC) (envelope-from antab@freebsd.org) Received: from dumb.farm.antab.is (farm.antab.is [80.101.60.195]) by smtp-vbr19.xs4all.nl (8.13.8/8.13.8) with ESMTP id n2OBxBvG036004 for ; Tue, 24 Mar 2009 12:59:11 +0100 (CET) (envelope-from antab@freebsd.org) Resent-Message-Id: <200903241159.n2OBxBvG036004@smtp-vbr19.xs4all.nl> Resent-To: freebsd-arm@freebsd.org From: Arnar Mar Sig To: "M. Warner Losh" In-Reply-To: <20090323.213840.1631944207.imp@bsdimp.com> Resent-From: Arnar Mar Sig References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <20090323.213840.1631944207.imp@bsdimp.com> Message-Id: <43AF275A-D9D1-4A50-B28E-8DFD43679434@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Resent-Date: Tue, 24 Mar 2009 12:59:11 +0100 Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 24 Mar 2009 12:39:08 +0100 X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 11:59:14 -0000 On Mar 24, 2009, at 4:38 AM, M. Warner Losh wrote: > In message: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> > Arnar Mar Sig writes: > : > : On Mar 23, 2009, at 9:01 PM, Sylvestre Gallon wrote: > : > Hi freebsd-arm@ > : > > : > I've got an access to an at91sam9261-ek. This board have a > : > at91sam9261 soc that is near the at91rm9200, so I start a > : > little port of it into FreeBSD. So I work 3 days on it and that > : > results in a Big patch that allow the board to boot. > : Nice work > : > : > > : > As you can see in the dmesg, for the moment the system > : > hangs, but it is normal (I haven't yet finish the implementation > : > of the dm9000 ethernet driver so NFS don't find any ethernet > : > interface and panic). > : > > : > > : > This big diff contains : > : > - an AT91SAM9261EK conf file. > : > - an std.at91sam9261ek file. > : > - a begin of dme driver (dm9000 ethernet chip driver). I > : > will work this week on it to send you another diff that > : > complete this driver :) > : > - a board_at91sam9261ek.c file. > : > - an include for at91sam9261 registers. > : > - a new watchdog driver (at91_wdt) > : > - a new smc driver (static memory controller) > : Looks like the at91sam9261 uses the same SMC core as at32ap700x, we > : should look into using the same driver for both archs. I already > have > : at32_smc in p4 to do bus managment and attach childs but no setup > code > : (already done in uboot for what i need). > : > : > - a new pit driver (periodic interval timer) > : > > : > There is a lot of little modification on the at91 existing > : > sources. > : > > : > As you can see in the diff I work for the moment on a > : > define way to separate the two soc code that differ. But I > : > think that in the future a .c for each soc should appear. > : What about using hints more for device wiring instead of .c code > like > : i did for avr32? > > The trouble is that we'd need varadic hints. That is, hints that vary > based on which SoC you're running on. We don't have those yet. > Wouldn't be terribly hard to implement though... Well, building kernel for different SoC dosen't look to be supported at the moment anyway. On i386/amd64 dosen't the loader load /boot/devices.hints for additional hints not found in the kernel? Would it not make more sense to have loader on arm/avr32 (or patch uboot) to store and load SoC hints for that given chip+board instead of storing everything in the kernel? The code for cpu_devs in atmelarm does the same with the same info as i do with hints for at32bus. I got conf/cpu/.hints for a given SoC thats included in the kernel config, plus board level hints file for onboard flash and geom slicing of the flash thru hints. > > Also, we need a generic base-class for all busses in the system that > dole out resources so that each new system is more like 20-30 lines of > code rather than the few hundred of cut and paste they are today. Ohh yeah. copying the same code over and over is not that nice:) Arnar Mar Sig From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 12:00: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 AE9CC1065701 for ; Tue, 24 Mar 2009 12:00:13 +0000 (UTC) (envelope-from antab@freebsd.org) Received: from smtp-vbr19.xs4all.nl (smtp-vbr19.xs4all.nl [194.109.24.39]) by mx1.freebsd.org (Postfix) with ESMTP id 400648FC18 for ; Tue, 24 Mar 2009 12:00:13 +0000 (UTC) (envelope-from antab@freebsd.org) Received: from dumb.farm.antab.is (farm.antab.is [80.101.60.195]) by smtp-vbr19.xs4all.nl (8.13.8/8.13.8) with ESMTP id n2OC0CMM036710 for ; Tue, 24 Mar 2009 13:00:12 +0100 (CET) (envelope-from antab@freebsd.org) Resent-Message-Id: <200903241200.n2OC0CMM036710@smtp-vbr19.xs4all.nl> Resent-To: freebsd-arm@freebsd.org From: Arnar Mar Sig To: "M. Warner Losh" In-Reply-To: <20090323.214024.-2077496443.imp@bsdimp.com> Resent-From: Arnar Mar Sig References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <20090323.214024.-2077496443.imp@bsdimp.com> Message-Id: <9C3FADC8-1707-46FA-8BD9-EF7731916B61@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Resent-Date: Tue, 24 Mar 2009 13:00:11 +0100 Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 24 Mar 2009 12:57:53 +0100 X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 12:00:15 -0000 On Mar 24, 2009, at 4:40 AM, M. Warner Losh wrote: > In message: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> > Arnar Mar Sig writes: > : > - a new smc driver (static memory controller) > : Looks like the at91sam9261 uses the same SMC core as at32ap700x, we > : should look into using the same driver for both archs. I already > have > : at32_smc in p4 to do bus managment and attach childs but no setup > code > > Part of the problem here is going to be each SoC is going to have a > different set of errata for the silicon.... Yes i know. Dosen't look like they are having problems with it in linux land, and aren't there driver in the tree that deal with bugs in some chip revisions? After a quick look over at32ap700x and at91sam9261ek errata it dosen't look like there are any show stopper bugs for not using the same smc driver on both archs. Difference between them are: at32ap700x has 6 chips selects while at91sam9261ek has 8 "Special" functions (CompactFlash, SmartMedia, NAND..) are set in different registers not belonging to SMC (same for both archs but different registers) Arnar Mar Sig From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 12:16:09 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 36B6C106564A for ; Tue, 24 Mar 2009 12:16:09 +0000 (UTC) (envelope-from antab@freebsd.org) Received: from smtp-vbr19.xs4all.nl (smtp-vbr19.xs4all.nl [194.109.24.39]) by mx1.freebsd.org (Postfix) with ESMTP id BD9D28FC1A for ; Tue, 24 Mar 2009 12:16:08 +0000 (UTC) (envelope-from antab@freebsd.org) Received: from dumb.farm.antab.is (farm.antab.is [80.101.60.195]) by smtp-vbr19.xs4all.nl (8.13.8/8.13.8) with ESMTP id n2OCG7xq044427; Tue, 24 Mar 2009 13:16:07 +0100 (CET) (envelope-from antab@freebsd.org) Message-Id: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> From: Arnar Mar Sig To: Sylvestre Gallon In-Reply-To: <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 24 Mar 2009 13:16:07 +0100 References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-arm@freebsd.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 12:16:09 -0000 On Mar 24, 2009, at 10:10 AM, Sylvestre Gallon wrote: > On Tue, Mar 24, 2009 at 3:45 AM, Arnar Mar Sig > wrote: >> >> On Mar 23, 2009, at 9:01 PM, Sylvestre Gallon wrote: >>> >>> Hi freebsd-arm@ >>> >>> I've got an access to an at91sam9261-ek. This board have a >>> at91sam9261 soc that is near the at91rm9200, so I start a >>> little port of it into FreeBSD. So I work 3 days on it and that >>> results in a Big patch that allow the board to boot. >> >> Nice work > > Thanks :) > >> >>> >>> As you can see in the dmesg, for the moment the system >>> hangs, but it is normal (I haven't yet finish the implementation >>> of the dm9000 ethernet driver so NFS don't find any ethernet >>> interface and panic). >>> >>> >>> This big diff contains : >>> - an AT91SAM9261EK conf file. >>> - an std.at91sam9261ek file. >>> - a begin of dme driver (dm9000 ethernet chip driver). I >>> will work this week on it to send you another diff that >>> complete this driver :) >>> - a board_at91sam9261ek.c file. >>> - an include for at91sam9261 registers. >>> - a new watchdog driver (at91_wdt) >>> - a new smc driver (static memory controller) >> >> Looks like the at91sam9261 uses the same SMC core as at32ap700x, we >> should >> look into using the same driver for both archs. I already have >> at32_smc in >> p4 to do bus managment and attach childs but no setup code (already >> done in >> uboot for what i need). > > I don't found it in the source tree. Where it is located ? If you > wan't the > smc register description you can take a look at this datasheet in > chapter 22: > > http://www.atmel.org/dyn/resources/prod_documents/doc6242.pdf > > The smc is not used in the patch yet but I will need to use it for the > implement the dm9000 driver (because this chip is attach on the 2nd > channel of the smc) Code is in p4: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/avr32/src/sys/avr32/avr32&HIDEDEL=NO Note the driver dose not use KVA, instead it uses unmapped memory segment in avr32, but that only works for 5 of the 6 chips select so it will be needed later on. > >> >>> - a new pit driver (periodic interval timer) >>> >>> There is a lot of little modification on the at91 existing >>> sources. >>> >>> As you can see in the diff I work for the moment on a >>> define way to separate the two soc code that differ. But I >>> think that in the future a .c for each soc should appear. >> >> What about using hints more for device wiring instead of .c code >> like i did >> for avr32? >> > > Yes here we can use hints to factorise a lot of code like > a big part of the code where the #ifdef AT91SAM9261 are. > But like M. Warner Losh said I think that one needs a .c > by SoC to put the cpu_devs structure, the pmap_devmap > structure and the errata code. We need to put this in a specific > files because these code are dependant of the SoC. cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32 all devices registers can be addressed without mmu lookups. > > Cheers, > > -- > Sylvestre Gallon (http://devsyl.blogspot.com) > Fifth Grade Student @ Epitech & Researcher @ LSE > R&D @ Rathaxes (http://www.rathaxes.org) > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 12:47: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 7B49A1065672; Tue, 24 Mar 2009 12:47:42 +0000 (UTC) (envelope-from ccna.syl@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 1AF4C8FC18; Tue, 24 Mar 2009 12:47:41 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so1542701ywh.13 for ; Tue, 24 Mar 2009 05:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=N/Zfh9kizyf+2+blcB/9WM4a1JzxXEHeAblX5Ro3Y7M=; b=SPcVvLxEP5ZShMPkXc45/HJZSBfmiYH5oVGAZqLYTD0kOeXoESQMsULzCl+Dsl7Anw 33atw0eoE9RK5uzI1Njoqyo0lQHfW4NqLVIgOAIJYFtaniDVWRxIIDpi1cren5ZxSb/s tTqb2gb3OoclNEiRjhFRyNzfPYvetG/y2Jq/w= 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=I7qGyH9SzvMVqppUWH84o31beCPGdFg4ATQiVKvm59MlGFs/8ZSSpYhux2FHt+A/cO 6msrU2PFDelHKmNrlY391Oq/wn3UVd8owUTLzv04YS1SdG8yZQdQQJdbW38UvpB2DqTE ZMbqRE9509Pt0UN+dsYsTvnms1/L3UWgrhOm0= MIME-Version: 1.0 In-Reply-To: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> Date: Tue, 24 Mar 2009 13:47:26 +0100 Received: by 10.231.16.74 with SMTP id n10mr2108585iba.44.1237898861313; Tue, 24 Mar 2009 05:47:41 -0700 (PDT) Message-ID: <164b4c9c0903240547k4d05cb09id6e5d919ffd1f9ff@mail.gmail.com> From: Sylvestre Gallon To: Arnar Mar Sig Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 12:47:43 -0000 On Tue, Mar 24, 2009 at 1:16 PM, Arnar Mar Sig wrote: > > On Mar 24, 2009, at 10:10 AM, Sylvestre Gallon wrote: > > > Code is in p4: > http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/avr32/src/sys/avr32/avr32&HIDEDEL=NO > > Note the driver dose not use KVA, instead it uses unmapped memory segment in > avr32, but that only works for 5 of the 6 chips select so it will be needed > later on. Thanks I will take a look on it :) > > > cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32 all > devices registers can be addressed without mmu lookups. > It is not a problem for the pmap_devmap because all at91 have the same memory mapping : |----------------------------------------| 0x0000 0000 | Internal Memory Mapping | |----------------------------------------| 0x1000 0000 | EBI 0 | |----------------------------------------| 0x2000 0000 | EBI 1 | |----------------------------------------| 0x3000 0000 | EBI ... | |----------------------------------------| 0xX000 0000 | Undifined (Abort) | |----------------------------------------| 0xF000 0000 | Internal peripherals | |----------------------------------------| 0xFFFF FFFF So we can have the same devmap for all at91 : static const struct pmap_devmap at91_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. */ { AT91_REGS_VA, AT91_REGS_PA, AT91_REGS_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { AT91_MEMS_VA, AT91_MEMS_PA, AT91_MEMS_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, { 0, 0, 0, 0, 0, } }; -- Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 14:43:52 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 8EB4B1065672; Tue, 24 Mar 2009 14:43:52 +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 4B9A08FC08; Tue, 24 Mar 2009 14:43:52 +0000 (UTC) (envelope-from imp@BSDIMP.COM) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2OEfvSB092786; Tue, 24 Mar 2009 08:41:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 24 Mar 2009 08:42:33 -0600 (MDT) Message-Id: <20090324.084233.1626286031.imp@bsdimp.com> To: antab@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> References: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> 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 Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 14:43:52 -0000 In message: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> Arnar Mar Sig writes: : >>> As you can see in the diff I work for the moment on a : >>> define way to separate the two soc code that differ. But I : >>> think that in the future a .c for each soc should appear. : >> : >> What about using hints more for device wiring instead of .c code : >> like i did : >> for avr32? : >> : > : > Yes here we can use hints to factorise a lot of code like : > a big part of the code where the #ifdef AT91SAM9261 are. : > But like M. Warner Losh said I think that one needs a .c : > by SoC to put the cpu_devs structure, the pmap_devmap : > structure and the errata code. We need to put this in a specific : > files because these code are dependant of the SoC. : cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32 : all devices registers can be addressed without mmu lookups. All of this hand wringing is because we've boguslly collapsed the core support, the SoC support and the board support into one file. We have to move away from that model and properly layer things to move forward. The means by which we load this or that thing isn't going to matter so much until we adopt this better structure. Warner From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 19:52: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 E37CB10656C8; Tue, 24 Mar 2009 19:52:22 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from mail-qy0-f134.google.com (mail-qy0-f134.google.com [209.85.221.134]) by mx1.freebsd.org (Postfix) with ESMTP id 873E88FC16; Tue, 24 Mar 2009 19:52:22 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by qyk40 with SMTP id 40so3930282qyk.3 for ; Tue, 24 Mar 2009 12:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=CQc6JpVMcmdYEPLGixYl5NoXgaTDuvlMOGLUG1c864Y=; b=uu7SjhXeeLrZWTObexxV4ap/TA3yDaSbz/SE27c8cA7vnNrRpcqx5HqYZ+v2QuQs4J wsLs2hrrrODj9HxcOEQpFJOAf8YgvmSEzneicZ8BGpOd4Kj7y1a98M4kzvntIKrLPnRW yfSBkJR1o/EXQeDWQirSZM3sU5YSLOcfBj1nc= 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=ATzwhFpgamIbkVe3lPCdm/OJgQISlb2ln22yQqf8r4RZaf9igrBrH/xHMKaZWcjkiR ae5zMepqi1rNINlomEEQBtwfTDdwhn86U4VIFBpI4PCTd1izJtiCEtfJBSHkh5x/HV28 7cX8BgANMIMSmxFL3whPWpcjE+LJx/AScDO4s= MIME-Version: 1.0 In-Reply-To: <20090324.084233.1626286031.imp@bsdimp.com> References: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> <20090324.084233.1626286031.imp@bsdimp.com> Date: Tue, 24 Mar 2009 20:52:06 +0100 Received: by 10.231.15.130 with SMTP id k2mr2561129iba.3.1237924341658; Tue, 24 Mar 2009 12:52:21 -0700 (PDT) Message-ID: <164b4c9c0903241252y3f0f8958y88be873ae6c9664a@mail.gmail.com> From: Sylvestre Gallon To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: antab@freebsd.org, freebsd-arm@freebsd.org, cognet@freebsd.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 19:52:23 -0000 On Tue, Mar 24, 2009 at 3:42 PM, M. Warner Losh wrote: > In message: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> > =A0 =A0 =A0 =A0 =A0 =A0Arnar Mar Sig writes: > > All of this hand wringing is because we've boguslly collapsed the core > support, the SoC support and the board support into one file. =A0We have > to move away from that model and properly layer things to move > forward. =A0The means by which we load this or that thing isn't going to > matter so much until we adopt this better structure. > > Warner > Do you think that I can try to update the diff to separate the SoC code, the board code and the at91 generic code and re-submit it before the end of the week? Also I'm currently looking for google summer of code possible proposals and have access to a big range of different Atmel boards. Do you think that the improvement of the at91 architecture, and the adding of support for another SoC could be a potential subject ? And if so, is someone ready to be my mentor for this project ? Cheers --=20 Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 20:05:25 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 A64C810656D7; Tue, 24 Mar 2009 20:05:25 +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 B73E88FC18; Tue, 24 Mar 2009 20:05:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2OK1er5098328; Tue, 24 Mar 2009 14:01:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 24 Mar 2009 14:02:14 -0600 (MDT) Message-Id: <20090324.140214.-233673136.imp@bsdimp.com> To: ccna.syl@gmail.com From: "M. Warner Losh" In-Reply-To: <164b4c9c0903241252y3f0f8958y88be873ae6c9664a@mail.gmail.com> References: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> <20090324.084233.1626286031.imp@bsdimp.com> <164b4c9c0903241252y3f0f8958y88be873ae6c9664a@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=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: antab@FreeBSD.org, freebsd-arm@FreeBSD.org, cognet@FreeBSD.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 20:05:28 -0000 In message: <164b4c9c0903241252y3f0f8958y88be873ae6c9664a@mail.gmail.co= m> Sylvestre Gallon writes: : On Tue, Mar 24, 2009 at 3:42 PM, M. Warner Losh wrot= e: : > In message: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> : > =A0 =A0 =A0 =A0 =A0 =A0Arnar Mar Sig writes: : > : > All of this hand wringing is because we've boguslly collapsed the c= ore : > support, the SoC support and the board support into one file. =A0We= have : > to move away from that model and properly layer things to move : > forward. =A0The means by which we load this or that thing isn't goi= ng to : > matter so much until we adopt this better structure. : > : > Warner : > : = : Do you think that I can try to update the diff to separate the : SoC code, the board code and the at91 generic code and : re-submit it before the end of the week? Sure. I was going to try some of it, but my time is limited... I also have a AT91SAM926x board of some ilk that I'd love to get going... : Also I'm currently looking for google summer of code possible : proposals and have access to a big range of different Atmel boards. : Do you think that the improvement of the at91 architecture, and the : adding of support for another SoC could be a potential subject ? And : if so, is someone ready to be my mentor for this project ? I think something like this could be useful, so long as there's a well-defined set of tasks/goals for the project. Even more so if there are design patterns or areas for code-reuse that could be identified. I guess I'd be able to mentor as well, but I'd want to see more details on the plan before pushing for its inclusion. Warner From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 20:40:49 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 8FE201065675; Tue, 24 Mar 2009 20:40:49 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id 1DB288FC25; Tue, 24 Mar 2009 20:40:48 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by gxk24 with SMTP id 24so9314148gxk.19 for ; Tue, 24 Mar 2009 13:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oB7y/+hUiRsCMoKMQuJLXDzEArBYo/piYYPKxnzDHUo=; b=k2DljYcvvH2PTDLm9SroHwvrn6aGEhLAHM8h2FBzHhpEpp7qygAcIN15zCIoH5HNm7 M1BYwITdUz4MqyyIldbESPkW+h66EORgMrV+ONgQJXpak5FkhYIlEvuQscbTHwY0Hr1R wEYyp4E6JM3C5dJAJ+EvykmhZ3rOaiWbeAJY4= 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=AnSeMS3/cCr3s1SnpOltueysFM65183CyP9PdJyj8QeAfBUCMZI+7HXv0rMsB5Nip4 DtVREzPzoWyyu6v/fbBpgANmMnt8ix/M8eYZ8gil4Jx4rLsm98gmzD9zBu+uVnCw4J1v rWIfayUtPS5du8a4Amd1I77N45YCj9zeGzRD8= MIME-Version: 1.0 In-Reply-To: <20090324.140214.-233673136.imp@bsdimp.com> References: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> <20090324.084233.1626286031.imp@bsdimp.com> <164b4c9c0903241252y3f0f8958y88be873ae6c9664a@mail.gmail.com> <20090324.140214.-233673136.imp@bsdimp.com> Date: Tue, 24 Mar 2009 21:40:33 +0100 Received: by 10.231.13.136 with SMTP id c8mr2565736iba.45.1237927248257; Tue, 24 Mar 2009 13:40:48 -0700 (PDT) Message-ID: <164b4c9c0903241340o2f4c0bd5ucc8037fe6da80b66@mail.gmail.com> From: Sylvestre Gallon To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: antab@freebsd.org, freebsd-arm@freebsd.org, cognet@freebsd.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 20:40:50 -0000 > Sure. =A0I was going to try some of it, but my time is limited... =A0I > also have a AT91SAM926x board of some ilk that I'd love to get > going... Thanks a lot for your time and your help :) > > I think something like this could be useful, so long as there's a > well-defined set of tasks/goals for the project. =A0Even more so if > there are design patterns or areas for code-reuse that could be > identified. =A0I guess I'd be able to mentor as well, but I'd want to > see more details on the plan before pushing for its inclusion. > I will try to think on the differents tasks/goals that should be interesting for this project and submit it to this mailing list :) --=20 Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 21:05:52 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 E71A81065688 for ; Tue, 24 Mar 2009 21:05:52 +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 A1A0E8FC0A for ; Tue, 24 Mar 2009 21:05:52 +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 n2OL5pTW074751 for ; Tue, 24 Mar 2009 16:05:51 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1237928751; bh=W5KGy1dXTAUvyyfEbj6UgUFdPnl9TpW8tuVvTbJcfgs=; h=Date:From:Message-Id:To:Subject; b=CzF3lJJaR5B098yXHeD7YQxg+uPvqbKcSXVBhbvFSXOz0dG2P+5YyC0qTTML3Ze1W zfVw6bVredyC4W5g4s26D+LCfffdDeWFrpMzsFBNDtDJiNEfgrqDG+AjDS9bmvSayP jjbFWLSpedOqNWiaVzXjeyodgn93JZBY+dQexJCs= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n2OL5phe074750 for freebsd-arm@freebsd.org; Tue, 24 Mar 2009 16:05:51 -0500 (CDT) (envelope-from tinguely) Date: Tue, 24 Mar 2009 16:05:51 -0500 (CDT) From: Mark Tinguely Message-Id: <200903242105.n2OL5phe074750@casselton.net> To: freebsd-arm@freebsd.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Tue, 24 Mar 2009 16:05:51 -0500 (CDT) Subject: ARM atomic question 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, 24 Mar 2009 21:05:54 -0000 I am rewriting the existing ARM atomic instruction for the new ldrex/strex in the ARMv6 architecture. I have 3 questions for atomic_fetchadd_32(): #ifdef KERNEL static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) { uint32_t value; __with_interrupts_disabled( { value = *p; *p += v; }); return (value); } #else /* !_KERNEL */ static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) { uint32_t start, ras_start = ARM_RAS_START; __asm __volatile("1:\n" "adr %1, 1b\n" "str %1, [%0]\n" "adr %1, 2f\n" "str %1, [%0, #4]\n" "ldr %1, [%2]\n" 1) how does this make it atomic? no one reads ras_start or ras_end to verify that it has not changed since I set it. This applies to all non-kernel atomic commands. "add %1, %1, %3\n" ^^ 2) start is now (*p + v) not *p. It will return the wrong value compared to the kernel version. "str %0, [%2]\n" ^^ 3) *p is assigned the ras_start address. "2:\n" "mov %3, #0\n" "str %3, [%0]\n" "mov %3, #0xffffffff\n" "str %3, [%0, #4]\n" : "+r" (ras_start), "=r" (start), "+r" (p), "+r" (v) : : "memory"); return (start); #endif 4) Is there a list of atomic commands that should be implemented? --Mark Tinguely From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 21:26:17 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 8B7631065754 for ; Tue, 24 Mar 2009 21:26:16 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B0B698FC13 for ; Tue, 24 Mar 2009 21:26:14 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.14.1/8.13.8) with ESMTP id n2P0Gpmd084771; Wed, 25 Mar 2009 01:16:51 +0100 (CET) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id n2P0GoqD084770; Wed, 25 Mar 2009 01:16:50 +0100 (CET) (envelope-from mlfbsd) Date: Wed, 25 Mar 2009 01:16:49 +0100 From: Olivier Houchard To: Mark Tinguely Message-ID: <20090325001649.GA84198@ci0.org> References: <200903242105.n2OL5phe074750@casselton.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903242105.n2OL5phe074750@casselton.net> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: Re: ARM atomic question 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, 24 Mar 2009 21:26:18 -0000 Hi Mark, On Tue, Mar 24, 2009 at 04:05:51PM -0500, Mark Tinguely wrote: > > I am rewriting the existing ARM atomic instruction for the new ldrex/strex > in the ARMv6 architecture. > That's great. I really want to get armv6 support. > I have 3 questions for atomic_fetchadd_32(): > > #ifdef KERNEL > static __inline uint32_t > atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) > { > uint32_t value; > > __with_interrupts_disabled( > { > value = *p; > *p += v; > }); > return (value); > } > > #else /* !_KERNEL */ > > static __inline uint32_t > atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) > { > uint32_t start, ras_start = ARM_RAS_START; > > __asm __volatile("1:\n" > "adr %1, 1b\n" > "str %1, [%0]\n" > "adr %1, 2f\n" > "str %1, [%0, #4]\n" > "ldr %1, [%2]\n" > > 1) how does this make it atomic? no one reads ras_start or ras_end > to verify that it has not changed since I set it. This applies > to all non-kernel atomic commands. > It is done by the kernel, when a trap occurs. They are issues with that code, though, which should be worked on. > "add %1, %1, %3\n" > ^^ > 2) start is now (*p + v) not *p. It will return the wrong value > compared to the kernel version. > True, that's a bug. > "str %0, [%2]\n" > ^^ > 3) *p is assigned the ras_start address. > Another bug. Guess we've been lucky not to run into it. Thanks ! > "2:\n" > "mov %3, #0\n" > "str %3, [%0]\n" > "mov %3, #0xffffffff\n" > "str %3, [%0, #4]\n" > : "+r" (ras_start), "=r" (start), "+r" (p), "+r" (v) > : : "memory"); > return (start); > #endif > > 4) Is there a list of atomic commands that should be implemented? > All those described in atomic(9) (except 64bits operations). Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 21:50:03 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 B54A3106564A for ; Tue, 24 Mar 2009 21:50:03 +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 6FB1C8FC22 for ; Tue, 24 Mar 2009 21:50:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2OLkFLt099943; Tue, 24 Mar 2009 15:46:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 24 Mar 2009 15:46:50 -0600 (MDT) Message-Id: <20090324.154650.-679995243.imp@bsdimp.com> To: tinguely@casselton.net From: "M. Warner Losh" In-Reply-To: <200903242105.n2OL5phe074750@casselton.net> References: <200903242105.n2OL5phe074750@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: freebsd-arm@FreeBSD.org Subject: Re: ARM atomic question 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, 24 Mar 2009 21:50:04 -0000 In message: <200903242105.n2OL5phe074750@casselton.net> Mark Tinguely writes: : : I am rewriting the existing ARM atomic instruction for the new ldrex/strex : in the ARMv6 architecture. : : I have 3 questions for atomic_fetchadd_32(): : : #ifdef KERNEL : static __inline uint32_t : atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) : { : uint32_t value; : : __with_interrupts_disabled( : { : value = *p; : *p += v; : }); : return (value); : } : : #else /* !_KERNEL */ : : static __inline uint32_t : atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) : { : uint32_t start, ras_start = ARM_RAS_START; : : __asm __volatile("1:\n" : "adr %1, 1b\n" : "str %1, [%0]\n" : "adr %1, 2f\n" : "str %1, [%0, #4]\n" : "ldr %1, [%2]\n" : : 1) how does this make it atomic? no one reads ras_start or ras_end : to verify that it has not changed since I set it. This applies : to all non-kernel atomic commands. The kernel looks at these addresses when it does a context switch. Since there are no atomic ops, and you can't disable interrupts in userland, we settle for the next worse thing: set critical sections that are restarted if the kernel interrupts them. : "add %1, %1, %3\n" : ^^ : 2) start is now (*p + v) not *p. It will return the wrong value : compared to the kernel version. : : "str %0, [%2]\n" : ^^ : 3) *p is assigned the ras_start address. That I'm not sure of... : "2:\n" : "mov %3, #0\n" : "str %3, [%0]\n" : "mov %3, #0xffffffff\n" : "str %3, [%0, #4]\n" : : "+r" (ras_start), "=r" (start), "+r" (p), "+r" (v) : : : "memory"); : return (start); : #endif : : 4) Is there a list of atomic commands that should be implemented? Someone else will have to answer this. Warner From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 21:55:24 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 B326810656C5; Tue, 24 Mar 2009 21:55:24 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 71FC28FC14; Tue, 24 Mar 2009 21:55:24 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from smtp2.sentex.ca (smtp2c.sentex.ca [64.7.153.30]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id n2OLtLLQ048481; Tue, 24 Mar 2009 17:55:21 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by smtp2.sentex.ca (8.14.3/8.14.3) with ESMTP id n2OLtAcI023085; Tue, 24 Mar 2009 17:55:10 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: by freebsd-current.sentex.ca (Postfix, from userid 666) id 751B07302F; Tue, 24 Mar 2009 16:55:10 -0500 (EST) Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Message-Id: <20090324215510.751B07302F@freebsd-current.sentex.ca> Date: Tue, 24 Mar 2009 16:55:10 -0500 (EST) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on clamscanner3 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 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: Tue, 24 Mar 2009 21:55:26 -0000 TB --- 2009-03-24 21:00:00 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2009-03-24 21:00:00 - starting HEAD tinderbox run for arm/arm TB --- 2009-03-24 21:00:00 - cleaning the object tree TB --- 2009-03-24 21:00:43 - cvsupping the source tree TB --- 2009-03-24 21:00:43 - /usr/bin/csup -z -r 3 -g -L 1 -h localhost -s /tinderbox/HEAD/arm/arm/supfile TB --- 2009-03-24 21:00:53 - building world TB --- 2009-03-24 21:00:53 - MAKEOBJDIRPREFIX=/obj TB --- 2009-03-24 21:00:53 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2009-03-24 21:00:53 - TARGET=arm TB --- 2009-03-24 21:00:53 - TARGET_ARCH=arm TB --- 2009-03-24 21:00:53 - TZ=UTC TB --- 2009-03-24 21:00:53 - __MAKE_CONF=/dev/null TB --- 2009-03-24 21:00:53 - cd /src TB --- 2009-03-24 21:00:53 - /usr/bin/make -B buildworld >>> World build started on Tue Mar 24 21:00:55 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 -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -DRESCUE -std=gnu99 -Wno-pointer-sign -c /src/sbin/ifconfig/ifmac.c cc -O -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -DRESCUE -std=gnu99 -Wno-pointer-sign -c /src/sbin/ifconfig/ifmedia.c cc -O -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -DRESCUE -std=gnu99 -Wno-pointer-sign -c /src/sbin/ifconfig/ifvlan.c cc -O -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -DRESCUE -std=gnu99 -Wno-pointer-sign -c /src/sbin/ifconfig/ifgre.c cc -O -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -DRESCUE -std=gnu99 -Wno-pointer-sign -c /src/sbin/ifconfig/ifieee80211.c In file included from /src/sbin/ifconfig/ifieee80211.c:3024: /obj/arm/src/tmp/usr/include/net80211/ieee80211_freebsd.h:399: error: expected ')' before 'ieee80211_ioctl_getfunc' /obj/arm/src/tmp/usr/include/net80211/ieee80211_freebsd.h:404: error: expected ')' before 'ieee80211_ioctl_setfunc' *** Error code 1 Stop in /src/sbin/ifconfig. *** Error code 1 Stop in /obj/arm/src/rescue/rescue. *** Error code 1 Stop in /src/rescue/rescue. *** Error code 1 Stop in /src/rescue. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2009-03-24 21:55:10 - WARNING: /usr/bin/make returned exit code 1 TB --- 2009-03-24 21:55:10 - ERROR: failed to build world TB --- 2009-03-24 21:55:10 - 2540.67 user 320.73 system 3309.98 real http://tinderbox.des.no/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Wed Mar 25 00:40:24 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 70921106566B for ; Wed, 25 Mar 2009 00:40:24 +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 102808FC12 for ; Wed, 25 Mar 2009 00:40:23 +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 n2P0eK5E085340; Tue, 24 Mar 2009 19:40:20 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1237941620; bh=jyMo+mCucmNNuCFImp3waGDHOwDtezawj79yv6DMosg=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=AIXZ0Arx85vEMR1JQkofxB6d/TQ//69d2FH3VrNsB6p9s6D31TivMk1whLzf226iJ BEpkDQXMXkZbGXBU/LgTldLguHIfueOaqLSW/j0kb6BnBqs9sWG37h2DhPg8FO2CWz n2PQn1cwbxUO3AfJ4M+eDPUql43/TpuXxdQwzV2c= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n2P0eKHG085339; Tue, 24 Mar 2009 19:40:20 -0500 (CDT) (envelope-from tinguely) Date: Tue, 24 Mar 2009 19:40:20 -0500 (CDT) From: Mark Tinguely Message-Id: <200903250040.n2P0eKHG085339@casselton.net> To: mlfbsd@ci0.org, tinguely@casselton.net In-Reply-To: <20090325001649.GA84198@ci0.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Tue, 24 Mar 2009 19:40:20 -0500 (CDT) Cc: freebsd-arm@freebsd.org Subject: Re: ARM atomic question 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, 25 Mar 2009 00:40:24 -0000 > > 1) how does this make it atomic? no one reads ras_start or ras_end > > to verify that it has not changed since I set it. This applies > > to all non-kernel atomic commands. Oliver says: > It is done by the kernel, when a trap occurs. They are issues with that > code, though, which should be worked on. Warner says: > The kernel looks at these addresses when it does a context switch. > Since there are no atomic ops, and you can't disable interrupts in > userland, we settle for the next worse thing: set critical sections > that are restarted if the kernel interrupts them. The page is installed in the KVA writable with user permission, in machdep: #ifdef ARM_CACHE_LOCK_ENABLE pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS); arm_lock_cache_line(ARM_TP_ADDRESS); #else m = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_ZERO); pmap_kenter_user(ARM_TP_ADDRESS, VM_PAGE_TO_PHYS(m)); #endif Shouldn't a user be able to read/write to this address without a trap? I rewrote the cpu_throw() and cpu_switch(). Because: - combine the back end of cpu_throw() and cpu_switch. - implemented pmap active bit for a CPU for future SMP. - use the registers for per-cpu and TLS. - ARMv6 does not need to flush tlb/cache on context switch: - new ASID to identify 256 address spaces. - the VIPT caches need some changes to pmap_fix_cache(): - I don't want to make changes to pmap caching until we resolve the pre-ARMv6 multiple KVA map caching issue. I am running the pre-ARMv6 cache patch that I proposed (and the new swtch.S)that I proposed with QEMU. The patch finds remapping situations, but not those that caused cache problem. - the PIPT cache does not need to do pmap_fix_cache() at all. In rewiting the context change, I noticed that ARM_TP_ADDRESS/ARM_RAS_START/ ARM_RAS_END addresses are saved and restored on context switches. Atomic commands don't look to see if the ARM_RAS_START is 0 and ARM_RAS_END is 0xffffffff before they put their addresses and do their change. Thanks, --Mark. From owner-freebsd-arm@FreeBSD.ORG Wed Mar 25 01:10: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 DBD63106564A for ; Wed, 25 Mar 2009 01:10:42 +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 7EF6A8FC23 for ; Wed, 25 Mar 2009 01:10:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2P18P5b002269; Tue, 24 Mar 2009 19:08:25 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 24 Mar 2009 19:09:00 -0600 (MDT) Message-Id: <20090324.190900.1598390393.imp@bsdimp.com> To: tinguely@casselton.net From: "M. Warner Losh" In-Reply-To: <200903250040.n2P0eKHG085339@casselton.net> References: <20090325001649.GA84198@ci0.org> <200903250040.n2P0eKHG085339@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: freebsd-arm@freebsd.org Subject: Re: ARM atomic question 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, 25 Mar 2009 01:10:43 -0000 In message: <200903250040.n2P0eKHG085339@casselton.net> Mark Tinguely writes: : > > 1) how does this make it atomic? no one reads ras_start or ras_end : > > to verify that it has not changed since I set it. This applies : > > to all non-kernel atomic commands. : : Oliver says: : > It is done by the kernel, when a trap occurs. They are issues with that : > code, though, which should be worked on. : : Warner says: : > The kernel looks at these addresses when it does a context switch. : > Since there are no atomic ops, and you can't disable interrupts in : > userland, we settle for the next worse thing: set critical sections : > that are restarted if the kernel interrupts them. : : The page is installed in the KVA writable with user permission, in machdep: : : #ifdef ARM_CACHE_LOCK_ENABLE : pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS); : arm_lock_cache_line(ARM_TP_ADDRESS); : #else : m = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_ZERO); : pmap_kenter_user(ARM_TP_ADDRESS, VM_PAGE_TO_PHYS(m)); : #endif : : Shouldn't a user be able to read/write to this address without a trap? Yes. In fact, that's the idea... : I rewrote the cpu_throw() and cpu_switch(). Because: : : - combine the back end of cpu_throw() and cpu_switch. : - implemented pmap active bit for a CPU for future SMP. : - use the registers for per-cpu and TLS. : - ARMv6 does not need to flush tlb/cache on context switch: : - new ASID to identify 256 address spaces. : - the VIPT caches need some changes to pmap_fix_cache(): : - I don't want to make changes to pmap caching until we : resolve the pre-ARMv6 multiple KVA map caching issue. : I am running the pre-ARMv6 cache patch that I proposed (and : the new swtch.S)that I proposed with QEMU. The patch finds : remapping situations, but not those that caused cache problem. : - the PIPT cache does not need to do pmap_fix_cache() at all. : : In rewiting the context change, I noticed that ARM_TP_ADDRESS/ARM_RAS_START/ : ARM_RAS_END addresses are saved and restored on context switches. Atomic : commands don't look to see if the ARM_RAS_START is 0 and ARM_RAS_END is : 0xffffffff before they put their addresses and do their change. Right. The kernel checks to see if a RAS is in flight. If so, it restores the pc to the start of the RAS. Warner From owner-freebsd-arm@FreeBSD.ORG Wed Mar 25 12:20:43 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 BD5051065676 for ; Wed, 25 Mar 2009 12:20:43 +0000 (UTC) (envelope-from brucec@muon.cran.org.uk) Received: from muon.cran.org.uk (brucec-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:c09::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9B3CE8FC1F for ; Wed, 25 Mar 2009 12:20:43 +0000 (UTC) (envelope-from brucec@muon.cran.org.uk) Received: by muon.cran.org.uk (Postfix, from userid 1000) id 143561924A; Wed, 25 Mar 2009 12:20:43 +0000 (GMT) Date: Wed, 25 Mar 2009 12:20:43 +0000 From: Bruce Cran To: freebsd-arm@freebsd.org Message-ID: <20090325122042.GA13807@muon.cran.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: SYSCTL_OMIT_DESCR in config files 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, 25 Mar 2009 12:20:44 -0000 I was reading through some of the config files in /sys/arm/conf and noticed that SYSCTL_OMIT_DESCR is present but commented out. It looks like the code to omit sysctl descriptions actually got committed as NO_SYSCTL_DESCR but the config files haven't been updated. -- Bruce Cran From owner-freebsd-arm@FreeBSD.ORG Wed Mar 25 14:34:02 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 A5F54106564A for ; Wed, 25 Mar 2009 14:34:02 +0000 (UTC) (envelope-from gballet@gmail.com) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id 3E2898FC14 for ; Wed, 25 Mar 2009 14:34:01 +0000 (UTC) (envelope-from gballet@gmail.com) Received: by ewy19 with SMTP id 19so60490ewy.43 for ; Wed, 25 Mar 2009 07:34:01 -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:content-type:content-transfer-encoding; bh=v+g+l64BhVvz3CMqOQDK318Z9plFgdENPhvQLi0j4QQ=; b=DhpHItPLUHO25OmvoutT0ivt9JdbadrPpJEvlMdtFgONfZ/U/4S1A6YJzOqgBAB6qs mCFK0dQkiVPbK64A3laWEpNAz2WuLNvPkzb9tEpr1U94LXW99g/MGWyA95Xu49IXTVba qImNsWTBJ2EwtaAujjd0Wo5A//wcyOW5QFKEA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=U09r4yhKOWQ1v3Fcb3mZguer4gqHeXMSrUGy9BXodDQYhmqoGFwMVaz7QCrmYpJFuz br/fZZPnnp33W2vc9GYBI+f5qAAFhm8wmM7cFZ7UPD19P6ikdrDOmYLKp87W4v9TZTlT MQEVd4CqEJjwkWk44o4JXYs6y5ATi6jXFEnkY= MIME-Version: 1.0 Received: by 10.216.73.79 with SMTP id u57mr3300269wed.40.1237990009077; Wed, 25 Mar 2009 07:06:49 -0700 (PDT) Date: Wed, 25 Mar 2009 15:06:49 +0100 Message-ID: From: Guillaume Ballet To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: locore.S question 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, 25 Mar 2009 14:34:02 -0000 Hello list, I'm working on a FreeBSD port for the BeagleBoard. I'm starting the kernel with u-boot and wrote my own small loader for this purpose. That loader puts the kernel at 0x81000000 (physical address, since the MMU is disabled at this stage). In locore.S, however, there is the following piece of code that is executed before the MMU is disabled: 112 adr r7, Lunmapped 113 bic r7, r7, #0xff000000 114 orr r7, r7, #PHYSADDR (snip, disabling MMU) 129 mov pc, r7 Since PHYSADDR is set to 0x80000000 (physical start of RAM), then r7 is set to 0x80000000 + offset(Lunmapped) instead of 0x81000000 + offset(Lunmapped). Of course it crashes. Now, bypassing the problem is relatively easy, but still I was wondering why it is 0xff000000 instead of 0xf0000000 on line 113? Thanks, Guillaume From owner-freebsd-arm@FreeBSD.ORG Wed Mar 25 14:56:19 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 D69081065672 for ; Wed, 25 Mar 2009 14:56:19 +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 750E38FC13 for ; Wed, 25 Mar 2009 14:56:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2PEro0x019358; Wed, 25 Mar 2009 08:53:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 25 Mar 2009 08:54:26 -0600 (MDT) Message-Id: <20090325.085426.-1108469665.imp@bsdimp.com> To: bruce@cran.org.uk From: "M. Warner Losh" In-Reply-To: <20090325122042.GA13807@muon.cran.org.uk> References: <20090325122042.GA13807@muon.cran.org.uk> 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 Subject: Re: SYSCTL_OMIT_DESCR in config files 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, 25 Mar 2009 14:56:20 -0000 In message: <20090325122042.GA13807@muon.cran.org.uk> Bruce Cran writes: : I was reading through some of the config files in /sys/arm/conf and noticed that : SYSCTL_OMIT_DESCR is present but commented out. It looks like the code : to omit sysctl descriptions actually got committed as NO_SYSCTL_DESCR : but the config files haven't been updated. Good catch.... Warner From owner-freebsd-arm@FreeBSD.ORG Wed Mar 25 16:33:01 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 96C9C1065680 for ; Wed, 25 Mar 2009 16:33:01 +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 5614A8FC14 for ; Wed, 25 Mar 2009 16:33:01 +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 n2PGWtj3029857; Wed, 25 Mar 2009 11:32:55 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1237998775; bh=lNbzTXLPgvFHi9JokyOYZiRgNpvEG2bKTkgAg+xwpEo=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=q76h/AJrfFy7VDnX9dH8lJ5YVMjfW2NiZO9Phfdz8MCXdr8/UypSwwArOUrU6lqT0 rUke4+AlfrPYEiGgZpiZJPMgvZyl7gwrGZPDQpAq/aVLaJoWB+8WCzv+xDFO8uW1F8 9SwEd3BkEHM/ffCkQtVnc+rGnMehBc7UFLq/8suA= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n2PGWsLw029856; Wed, 25 Mar 2009 11:32:54 -0500 (CDT) (envelope-from tinguely) Date: Wed, 25 Mar 2009 11:32:54 -0500 (CDT) From: Mark Tinguely Message-Id: <200903251632.n2PGWsLw029856@casselton.net> To: imp@bsdimp.com, tinguely@casselton.net In-Reply-To: <20090324.190900.1598390393.imp@bsdimp.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Wed, 25 Mar 2009 11:32:55 -0500 (CDT) Cc: freebsd-arm@freebsd.org Subject: Re: ARM atomic question 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, 25 Mar 2009 16:33:01 -0000 > Right. The kernel checks to see if a RAS is in flight. If so, it > restores the pc to the start of the RAS. > > Warner Thank-you, I found it in the PUSHFRAMEINSVC definition. That was the piece of the puzzle that I was missing, sorry for the noise. Thank-you to Grzegorz Bernacki for doing testing on the cache coherency problem when the kernel mapped page is shared. He gave me insight to the fact that a shared kernel mapped page can be removed via pmap_remove_all(). --Mark. From owner-freebsd-arm@FreeBSD.ORG Fri Mar 27 09:52:01 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 28DFB106564A for ; Fri, 27 Mar 2009 09:52:01 +0000 (UTC) (envelope-from gavin.mu@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mx1.freebsd.org (Postfix) with ESMTP id F41978FC12 for ; Fri, 27 Mar 2009 09:52:00 +0000 (UTC) (envelope-from gavin.mu@gmail.com) Received: by rv-out-0506.google.com with SMTP id l9so1464582rvb.43 for ; Fri, 27 Mar 2009 02:52:00 -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:content-transfer-encoding; bh=P43td5yvnljAYVCQhToRPMmeqL4ce8cVEBbr/c9PS6g=; b=D7VHyL41vn1PL+Rh35dV5D92wZpvnfKaU+jS5AzYcw6ewvO0CfkLjvVI/DHMpzFlB/ 9iVT6MbMx68NXNOGiu5QYAovaLIshbOtrDHfaD4Y1TWS+sp5GxArT9uOpwFuDK2z7pm3 Ow/d1ByeP1y7rpVWnwbVKrZALS0iD/+TgbL9E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=iDmFQcNXTiRNaKGemh86OmYvITnPFhwwJwLL9whbYCc+zXXGj6gMNSorYEw45JfCYS IVQEMwqYQPiyiLllgxS21nUrCFjfCENOV32rC4tZGiRNW8aHCdk99NhT9H43UOlK71lF 7nAR8Ib2VGlEaXCCfItwVrqEDI/7wED81743A= MIME-Version: 1.0 Received: by 10.140.141.16 with SMTP id o16mr979251rvd.297.1238145631003; Fri, 27 Mar 2009 02:20:31 -0700 (PDT) Date: Fri, 27 Mar 2009 17:20:30 +0800 Message-ID: <708189660903270220r7991ae8fq16c0ab4d25312dfa@mail.gmail.com> From: Gavin Mu To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: does the s3c2xx0 code in perforce compilable? 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: Fri, 27 Mar 2009 09:52:01 -0000 Hi, I downloaded the s3c2xx0 code from perforce web (files in /sys/arm/s3c2xx0 and file /sys/arm/conf/FS2410), and merged to my 7-STABLE source tree. when I run ``config FS2410'', an error was reported that can't find option ARM32_NEW_VM_LAYOUT. does anybody know if the code is compilable and runable? and where's the option defined in? Thanks. Best Regards, Gavin Mu