From gonzo at bluezbox.com Fri Oct 3 21:26:59 2008 From: gonzo at bluezbox.com (Oleksandr Tymoshenko) Date: Fri Oct 3 21:27:05 2008 Subject: Gxemul & FreeBSD/MIPS Message-ID: <48E68E17.7090808@bluezbox.com> Just to save time to somebody who's going to try it. Due to small issue with gxemul (PCI registers values of piix controller are not saved having been written) FreeBSD in gxemul panics after detecting IDE devices. Apply this patch to fix it: http://people.freebsd.org/~gonzo/mips2/gxemul.diff From imp at bsdimp.com Fri Oct 3 22:58:01 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Fri Oct 3 22:58:12 2008 Subject: Gxemul & FreeBSD/MIPS In-Reply-To: <48E68E17.7090808@bluezbox.com> References: <48E68E17.7090808@bluezbox.com> Message-ID: <20081003.165538.-1303461389.imp@bsdimp.com> In message: <48E68E17.7090808@bluezbox.com> Oleksandr Tymoshenko writes: : Just to save time to somebody who's going to try it. Due to small : issue with gxemul (PCI registers values of piix controller are not : saved having been written) FreeBSD in gxemul panics after detecting : IDE devices. Apply this patch to fix it: : : http://people.freebsd.org/~gonzo/mips2/gxemul.diff I've taken the liberty of snagging the gxemul port from ports@ and adding this patch. gxemul 0.4.6.5_1 or newer will have this fix. Warner From alancyang at gmail.com Tue Oct 7 21:59:29 2008 From: alancyang at gmail.com (alan yang) Date: Tue Oct 7 21:59:35 2008 Subject: Cavium port Message-ID: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> hi, there, i would like to port freebsd onto Cavium (CN5860 eval) wonder people could shed some light on which branch to get / where that's most close to Cavium. thanks in advance. alan From imp at bsdimp.com Tue Oct 7 23:07:31 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Tue Oct 7 23:07:37 2008 Subject: Cavium port In-Reply-To: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> References: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> Message-ID: <20081007.170708.-1540438263.imp@bsdimp.com> In message: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> "alan yang" writes: : i would like to port freebsd onto Cavium (CN5860 eval) wonder people : could shed some light on which branch to get / where that's most close : to Cavium. There's an out of tree 32-bit version that's been ported to the CN3800. There's some issues with the code such that I can't give it out right now, or I'd have it in the tree... Warner From jrytoung at gmail.com Wed Oct 8 22:26:06 2008 From: jrytoung at gmail.com (Jerry Toung) Date: Wed Oct 8 22:26:13 2008 Subject: Cavium port In-Reply-To: <20081007.170708.-1540438263.imp@bsdimp.com> References: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> <20081007.170708.-1540438263.imp@bsdimp.com> Message-ID: <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> if you can get the SDK from Cavium, that'll help. They wrote their code for Linux, but it is a very good start when going to FreeBSD. On Tue, Oct 7, 2008 at 4:07 PM, M. Warner Losh wrote: > In message: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> > "alan yang" writes: > : i would like to port freebsd onto Cavium (CN5860 eval) wonder people > : could shed some light on which branch to get / where that's most close > : to Cavium. > > There's an out of tree 32-bit version that's been ported to the > CN3800. There's some issues with the code such that I can't give it > out right now, or I'd have it in the tree... > > Warner > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From imp at bsdimp.com Wed Oct 8 22:34:33 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Wed Oct 8 22:34:39 2008 Subject: Cavium port In-Reply-To: <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> References: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> <20081007.170708.-1540438263.imp@bsdimp.com> <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> Message-ID: <20081008.163336.-325781299.imp@bsdimp.com> In message: <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> "Jerry Toung" writes: : if you can get the SDK from Cavium, that'll help. : They wrote their code for Linux, but it is a very good : start when going to FreeBSD. The code I have is from Cavium, but I need to sort out some rights details... Also, the SDK code from Cavium is GPL'd, which makes it harder to just bring in... Warner : On Tue, Oct 7, 2008 at 4:07 PM, M. Warner Losh wrote: : : > In message: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> : > "alan yang" writes: : > : i would like to port freebsd onto Cavium (CN5860 eval) wonder people : > : could shed some light on which branch to get / where that's most close : > : to Cavium. : > : > There's an out of tree 32-bit version that's been ported to the : > CN3800. There's some issues with the code such that I can't give it : > out right now, or I'd have it in the tree... : > : > Warner : > _______________________________________________ : > freebsd-mips@freebsd.org mailing list : > http://lists.freebsd.org/mailman/listinfo/freebsd-mips : > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" : > From alancyang at gmail.com Wed Oct 8 23:40:38 2008 From: alancyang at gmail.com (alan yang) Date: Wed Oct 8 23:40:45 2008 Subject: Cavium port In-Reply-To: <20081008.163336.-325781299.imp@bsdimp.com> References: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> <20081007.170708.-1540438263.imp@bsdimp.com> <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> <20081008.163336.-325781299.imp@bsdimp.com> Message-ID: <290865fd0810081640t519fae12v3fa3e0ae312b1dac@mail.gmail.com> Hi, Warner, wounder you are looking at rough time line sorting out rights for a release. I have Cavium SDK, if people could shed some light on porting guidance / procedures I would start experimenting it. On Wed, Oct 8, 2008 at 3:33 PM, M. Warner Losh wrote: > In message: <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> > "Jerry Toung" writes: > : if you can get the SDK from Cavium, that'll help. > : They wrote their code for Linux, but it is a very good > : start when going to FreeBSD. > > The code I have is from Cavium, but I need to sort out some rights > details... Also, the SDK code from Cavium is GPL'd, which makes it > harder to just bring in... > > Warner > > : On Tue, Oct 7, 2008 at 4:07 PM, M. Warner Losh wrote: > : > : > In message: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> > : > "alan yang" writes: > : > : i would like to port freebsd onto Cavium (CN5860 eval) wonder people > : > : could shed some light on which branch to get / where that's most close > : > : to Cavium. > : > > : > There's an out of tree 32-bit version that's been ported to the > : > CN3800. There's some issues with the code such that I can't give it > : > out right now, or I'd have it in the tree... > : > > : > Warner > : > _______________________________________________ > : > freebsd-mips@freebsd.org mailing list > : > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > : > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > : > > From rrs at lakerest.net Wed Oct 8 23:50:44 2008 From: rrs at lakerest.net (Randall Stewart) Date: Wed Oct 8 23:50:50 2008 Subject: Cavium port In-Reply-To: <290865fd0810081640t519fae12v3fa3e0ae312b1dac@mail.gmail.com> References: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com> <20081007.170708.-1540438263.imp@bsdimp.com> <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com> <20081008.163336.-325781299.imp@bsdimp.com> <290865fd0810081640t519fae12v3fa3e0ae312b1dac@mail.gmail.com> Message-ID: Alan: We did the port.. I helped lead here... had it working PERFECTLY on a 38xx 16 core machine (only one core.. did not do the SMP stuff.. it was on my todo list BEFORE I left cisco). But has warner points out there are ISSUES with the code. He has a MUCH better handle on the code release issues.. one company claims its there until some event happens... not sure of the details.. Basically until Cavium says yes you can release it and that the few files (there are only a couple) are your choice GPL and BSD license I don't see how we can proceed... This is a license issue ... NOT a technology issue. R On Oct 8, 2008, at 7:40 PM, alan yang wrote: > Hi, Warner, wounder you are looking at rough time line sorting out > rights for a release. > I have Cavium SDK, if people could shed some light on porting guidance > / procedures I would start experimenting it. > > On Wed, Oct 8, 2008 at 3:33 PM, M. Warner Losh wrote: >> In message: <86068e730810081500rb7e5f9cv392ac169a184f229@mail.gmail.com >> > >> "Jerry Toung" writes: >> : if you can get the SDK from Cavium, that'll help. >> : They wrote their code for Linux, but it is a very good >> : start when going to FreeBSD. >> >> The code I have is from Cavium, but I need to sort out some rights >> details... Also, the SDK code from Cavium is GPL'd, which makes it >> harder to just bring in... >> >> Warner >> >> : On Tue, Oct 7, 2008 at 4:07 PM, M. Warner Losh >> wrote: >> : >> : > In message: <290865fd0810071431r74fb563bi4f8f5ca443749dcb@mail.gmail.com >> > >> : > "alan yang" writes: >> : > : i would like to port freebsd onto Cavium (CN5860 eval) wonder >> people >> : > : could shed some light on which branch to get / where that's >> most close >> : > : to Cavium. >> : > >> : > There's an out of tree 32-bit version that's been ported to the >> : > CN3800. There's some issues with the code such that I can't >> give it >> : > out right now, or I'd have it in the tree... >> : > >> : > Warner >> : > _______________________________________________ >> : > freebsd-mips@freebsd.org mailing list >> : > http://lists.freebsd.org/mailman/listinfo/freebsd-mips >> : > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org >> " >> : > >> > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From imp at bsdimp.com Thu Oct 9 02:54:52 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Thu Oct 9 02:54:59 2008 Subject: Cavium port In-Reply-To: References: <20081008.163336.-325781299.imp@bsdimp.com> <290865fd0810081640t519fae12v3fa3e0ae312b1dac@mail.gmail.com> Message-ID: <20081008.205418.1411163205.imp@bsdimp.com> In message: Randall Stewart writes: : But has warner points out there are ISSUES with the code. He has a MUCH : better handle on the code release issues.. one company claims its there : until some event happens... not sure of the details.. The issues aren't technical, but the short version is that I've not received permission from the copyright owner to release the code. Warner From rjdfhorn_06 at yahoo.com Thu Oct 9 15:32:23 2008 From: rjdfhorn_06 at yahoo.com (Izzy K.) Date: Thu Oct 9 16:35:13 2008 Subject: MIPS...detecting least significant bit. Message-ID: <19900967.post@talk.nabble.com> I'm working on an assignment and have reached a road block. If I have a 16 bit integer like: 0000 0000 0000 0100 how would I check to see what the value in the LEAST significant bit is? Basically, how would I check to see if the least significant bit is 0 or 1? How would I code it? I am a beginner at MIPS...is there a simple instruction that detects this? Please help me. -- View this message in context: http://www.nabble.com/MIPS...detecting-least-significant-bit.-tp19900967p19900967.html Sent from the freebsd-mips mailing list archive at Nabble.com. From jrytoung at gmail.com Thu Oct 9 19:41:34 2008 From: jrytoung at gmail.com (Jerry Toung) Date: Thu Oct 9 19:41:41 2008 Subject: Cavium port In-Reply-To: <20081008.205418.1411163205.imp@bsdimp.com> References: <20081008.163336.-325781299.imp@bsdimp.com> <290865fd0810081640t519fae12v3fa3e0ae312b1dac@mail.gmail.com> <20081008.205418.1411163205.imp@bsdimp.com> Message-ID: <86068e730810091235q3f41b5a3w4dbc38fb23164483@mail.gmail.com> On Wed, Oct 8, 2008 at 7:54 PM, M. Warner Losh wrote: > > > > The issues aren't technical, but the short version is that I've not > received permission from the copyright owner to release the code. > > > Hi Warner, are you able to run the build on FreeBSD or is it cross-built ? what version of your FreeBSD is running on CN38xx ? thank you, Jerry From zbeeble at gmail.com Thu Oct 9 19:47:38 2008 From: zbeeble at gmail.com (Zaphod Beeblebrox) Date: Thu Oct 9 19:48:02 2008 Subject: MIPS...detecting least significant bit. In-Reply-To: <19900967.post@talk.nabble.com> References: <19900967.post@talk.nabble.com> Message-ID: <5f67a8c40810091158y4a334f17g7ee25f67888e84e8@mail.gmail.com> On Thu, Oct 9, 2008 at 11:09 AM, Izzy K. wrote: > > I'm working on an assignment and have reached a road block. If I have a 16 > bit integer like: > > 0000 0000 0000 0100 > > how would I check to see what the value in the LEAST significant bit is? > Basically, how would I check to see if the least significant bit is 0 or 1? > How would I code it? I am a beginner at MIPS...is there a simple > instruction > that detects this? Please help me. My first guess at the solution (and forgive me for not knowing the MIPS instruction set --- so I'm just speaking in general machine language terms) is to loop while left shifting and testing with an AND 0x01. You need to count the loops to know when you encountered the first bit set. Now... often the result of the left shift sets a status register based on the previous value of the 0 bit (carry or underflow?) ... so your loop might be an instruction shorter --- not requiring the AND --- if this is the case. Now... this all seems rather fundamental. Even the brute force case of AND'ing with a bunch of values might pipeline well. Are you sure you should be taking this course? From imp at bsdimp.com Thu Oct 9 19:51:53 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Thu Oct 9 19:52:00 2008 Subject: Cavium port In-Reply-To: <86068e730810091235q3f41b5a3w4dbc38fb23164483@mail.gmail.com> References: <20081008.205418.1411163205.imp@bsdimp.com> <86068e730810091235q3f41b5a3w4dbc38fb23164483@mail.gmail.com> Message-ID: <20081009.135213.-1585756288.imp@bsdimp.com> In message: <86068e730810091235q3f41b5a3w4dbc38fb23164483@mail.gmail.com> "Jerry Toung" writes: : On Wed, Oct 8, 2008 at 7:54 PM, M. Warner Losh wrote: : : > : > : > : > The issues aren't technical, but the short version is that I've not : > received permission from the copyright owner to release the code. : > : > : > Hi Warner, : are you able to run the build on FreeBSD or is it cross-built ? Both, although the version I'm running now is cross-built. I'll be doing native builds soon enough... : what version of your FreeBSD is running on CN38xx ? FreeBSD -current as of Tuesday. Prior versions of -current have worked as well. Warner From imp at bsdimp.com Thu Oct 9 19:55:35 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Thu Oct 9 19:55:41 2008 Subject: MIPS...detecting least significant bit. In-Reply-To: <5f67a8c40810091158y4a334f17g7ee25f67888e84e8@mail.gmail.com> References: <19900967.post@talk.nabble.com> <5f67a8c40810091158y4a334f17g7ee25f67888e84e8@mail.gmail.com> Message-ID: <20081009.135410.1613257537.imp@bsdimp.com> In message: <5f67a8c40810091158y4a334f17g7ee25f67888e84e8@mail.gmail.com> "Zaphod Beeblebrox" writes: : On Thu, Oct 9, 2008 at 11:09 AM, Izzy K. wrote: : : > : > I'm working on an assignment and have reached a road block. If I have a 16 : > bit integer like: : > : > 0000 0000 0000 0100 : > : > how would I check to see what the value in the LEAST significant bit is? : > Basically, how would I check to see if the least significant bit is 0 or 1? : > How would I code it? I am a beginner at MIPS...is there a simple : > instruction : > that detects this? Please help me. : : : My first guess at the solution (and forgive me for not knowing the MIPS : instruction set --- so I'm just speaking in general machine language terms) : is to loop while left shifting and testing with an AND 0x01. You need to : count the loops to know when you encountered the first bit set. Now... : often the result of the left shift sets a status register based on the : previous value of the 0 bit (carry or underflow?) ... so your loop might be : an instruction shorter --- not requiring the AND --- if this is the case. : : Now... this all seems rather fundamental. Even the brute force case of : AND'ing with a bunch of values might pipeline well. Are you sure you should : be taking this course? Or you could just call ffs. FFS(3) FreeBSD Library Functions Manual FFS(3) NAME ffs, ffsl, fls, flsl -- find first or last bit set in a bit string Warner From freebsd-mips at dino.sk Mon Oct 27 22:56:40 2008 From: freebsd-mips at dino.sk (Milan Obuch) Date: Mon Oct 27 22:56:47 2008 Subject: Some patches In-Reply-To: <20080729.160859.1791047885.imp@bsdimp.com> References: <20080729.160859.1791047885.imp@bsdimp.com> Message-ID: <200810272320.04577.freebsd-mips@dino.sk> On Wednesday 30 July 2008 00:08:59 M. Warner Losh wrote: > Gonzo and I have been cleaning up the mips import. We're down to 4 > patches and we thought we'd share them here for testing: > > http://people.freebsd.org/~gonzo/mips2/binutils.diff > http://people.freebsd.org/~gonzo/mips2/cc.diff > http://people.freebsd.org/~gonzo/mips2/cddl.diff > http://people.freebsd.org/~gonzo/mips2/libpam.diff > > They are all independent, and are all required for a buildworld to > succeed. Please share any feedback you have on them. > > Warner > Today I managed to compile FreeBSD/mips for ADM5120 based Omnima board mentioned some time ago on freebsd-embedded list - see http://www.omnima.co.uk/store/catalog/Embedded-controller-p-16140.html for some info. I put my simple scripts on my page http://www.dino.sk, so others can comment and give some advice. First I csup'ped my 8-current sources, then run patch-mips, next build-omnima. Patch files used in patch-mips are from http://people.freebsd.org/~gonzo/mips2/ as mentioned above, but I need to modify cc.diff a bit (put on my page as well) in order to apply cleanly. Some patched seem to be already in sources, other does not apply cleanly and I adjusted it. I would like you to see at it, I am not sure I did not make an error somewhere, but it builds. I tried to boot resulting kernel, but for some reason firmware stops somewhere after 2 MB or so, and I have no idea how to compress the kernel and make it uncompress and run on load. There is no loader for mips, too... Any advice? As for NetBSD support for this board - I tried precompiled binary loaded from http://linux-adm5120.sourceforge.net/netbsd/ and it runs, exactly as written there. But this is not complete, it looks like some kind of skeleton, and I did not yet manage to generate rootfs - crunchgen does not work for me (but that's for another list, I know). Regards, Milan