From owner-freebsd-mips@freebsd.org Wed Dec 9 19:32:31 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E6FE9D6BBE for ; Wed, 9 Dec 2015 19:32:31 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E0E21E8A for ; Wed, 9 Dec 2015 19:32:30 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id EC5AD1928D7 for ; Wed, 9 Dec 2015 19:32:23 +0000 (UTC) Subject: Re: MIPS64 using clang head To: freebsd-mips@freebsd.org References: <56605E75.5090004@freebsd.org> <20151203173806.GA39703@spindle.one-eyed-alien.net> <56608FF6.3050706@freebsd.org> <56609E80.9070803@freebsd.org> From: Sean Bruno Message-ID: <566881C6.3070502@freebsd.org> Date: Wed, 9 Dec 2015 11:32:22 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56609E80.9070803@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 19:32:31 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 12/03/15 11:56, Sean Bruno wrote: > > > On 12/03/15 10:54, Sean Bruno wrote: > > >> On 12/03/15 09:38, Brooks Davis wrote: >>> On Thu, Dec 03, 2015 at 07:23:33AM -0800, Sean Bruno wrote: >>>> We're still making progress, with a couple more updates to >>>> clang we've made it past libc ... now seeing a failure to >>>> figure out what "LONG_BITS" is. >>>> >>>> https://people.freebsd.org/~sbruno/mips64_buildworld.log >>>> >>>> I'm not quite sure what's missing and I've tried a few hacks >>>> to get it past here. > >>> This is due to an incompatibility with our limits.h and clang's >>> limits.h in freestanding mode. IMO it's a bug that clang's >>> limits.h doesn't include the system one in freestanding mode, >>> but currently it doesn't which means LONG_BITS doesn't get set. >>> Deleting/not installing the clang limits.h should do the job. > >>> -- Brooks > > >> Cool! I've removed my build version of limits.h > >> ~/clang/build % mv ./lib/clang/3.8.0/include/limits.h /var/tmp > >> Restarted my freebsd build of mips64. > >> sean _______________________________________________ >> freebsd-mips@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips To >> unsubscribe, send any mail to >> "freebsd-mips-unsubscribe@freebsd.org" > > > Yep, this did indeed get past the LONG_BITS things. > > Heh ... now hitting a clang assertion in libstand: > > https://llvm.org/bugs/show_bug.cgi?id=25730 > > The fun continues. > > sean _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips To > unsubscribe, send any mail to > "freebsd-mips-unsubscribe@freebsd.org" > Made it to sys/boot today. We seem to have some clang incompatible flags in mips/beri/boot2/Makefile: CFLAGS= -ffreestanding \ -I${.CURDIR} \ -I${.CURDIR}/../../../common \ -I${.CURDIR}/../../../.. \ -D_KERNEL \ -Wall \ -G0 -Xassembler -G0 \ -fno-pic -mno-abicalls \ -msoft-float \ -g ===> sys/boot/mips/beri/boot2 (all) /home/sbruno/clang/build/bin/clang -msoft-float - -Wno-typedef-redefinition -target mips64-unknown-freebsd11.0 - --sysroot=/var/tmp/mips.mips64/usr/home/sbruno/fbsd_head/tmp - -B/var/tmp/mips.mips64/usr/home/sbruno/fbsd_head/tmp/usr/bin - -ffreestanding - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2 - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../../../common -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../../../.. -D_KERNEL -Wall - -G0 -Xassembler -mno-abicalls -msoft-float -g - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../../../../../lib/libstand/ - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../common - -ffreestanding -std=gnu99 -Qunused-arguments -c /usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/relocate.S -o relocate.o clang-3.8: error: unsupported argument '-G0' to option 'Xassembler' *** Error code 1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJWaIHCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k25MH/in6me/Vy+kyzpW2hgbSZOfA bxHrXfjEjjzLwJs0B9S1ThRXqUwYlPStEor5VaKbGNeSJ3dJsNG7IjKX2AK6zzVW sBKYQ9uM36/Utn0MwDDaup1wK5FJB8FlhHOgjEXHHhL++jf3JMQ4tbTZFpE005qh kHNddbQDdTokvwI0CoLnUhCHjFzveq3UYFCA5y6OYFFEltl+wPKVGDmrcANHuTDN iMxvvmqDX3P7IXr8zBdN1UkijTnpvcUrMqEo5XcCyq9bLgH9Tw6cmhnf3YVfLyXs GiSi33HxVplbhFMSlktxy9DtDrUog1cfCUIHgZZKgG1asxLS3ePZnUfuWs+S/Qs= =91KZ -----END PGP SIGNATURE----- From owner-freebsd-mips@freebsd.org Wed Dec 9 20:42:03 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23FA39D6CDC for ; Wed, 9 Dec 2015 20:42:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC7411BF6 for ; Wed, 9 Dec 2015 20:42:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgec40 with SMTP id c40so98842202qge.2 for ; Wed, 09 Dec 2015 12:42:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=9UpmEkLxG0YNBrpagMR9ukNQn4XXyMVRYEz2nnnoAZA=; b=poJ2MCq2br0oCKfrK6OtFEmYT5lfpo5f7CoyBqgai5ht/pCBJHvq7Ank+LmBwLE033 aEiFTQ5lBERu6rTc4fm+2iiiwoUpmgSvs3GWNI5X9snIixjIs3pUkuFoDjcM5BQtaW09 MjjzqfEVZ5hO+LbYWb9d1uD2UP4elXM0/zM6C1MpHvluFMp5K1PlhfldVSFoP4FZllaD qwzUNE+anPJRTe0KcZQcqaSdfLrpQhIUiQuPVZEZOCyTVFqkQBP1wiYXacnb55BxFnOh RsTE4SmlNYCYvEr1RpZad0s2znqPN5U87DZe1ZqlH4nu16o+hQu94KY7Gxf5pxxO0HJW oMkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9UpmEkLxG0YNBrpagMR9ukNQn4XXyMVRYEz2nnnoAZA=; b=B0FvpMWDwc84pGgF6cHV3XtebFOg0La7AaElRQnDemyD0grZ4KRm55jGloY6XYigwg o2nG3mszraNPhRbR9aaU1WTleC9ljIFP/RY75+61VeBVMWIPfJ8F5iY7lwYNW7yvYnNu 3dpCBQNOc4rjSvBmu4XBFiaew7y4vNpTGLnk0PmAYkPHNeEjNS3UMpAH6JmZumcdywZe vsF3ABqfVbqsdMEV13vACtRqlM/jxCCCUslIv1GXWU2imh5aGOsmyR0mma/8L4ex7RfO z3l6S9pyRAI29qqB47aWwKCJ1ojw8pC4XOqiHHpQATNHzgIDVJvhj+qA2KWOgxMVIpsb nWuQ== X-Gm-Message-State: ALoCoQm2FjD3Vr/63+aZMc8sojZYutVrhVdbvgRH+8c++kgLphxlL0zTJaLEnv54l5zgxuLEwc83FPmixHrzfm17QLQmHI5CwA== MIME-Version: 1.0 X-Received: by 10.140.40.38 with SMTP id w35mr10210100qgw.52.1449693721642; Wed, 09 Dec 2015 12:42:01 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Wed, 9 Dec 2015 12:42:01 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <566881C6.3070502@freebsd.org> References: <56605E75.5090004@freebsd.org> <20151203173806.GA39703@spindle.one-eyed-alien.net> <56608FF6.3050706@freebsd.org> <56609E80.9070803@freebsd.org> <566881C6.3070502@freebsd.org> Date: Wed, 9 Dec 2015 13:42:01 -0700 X-Google-Sender-Auth: tGnTz4phBjCJFh5mCAxXrGI5ZH8 Message-ID: Subject: Re: MIPS64 using clang head From: Warner Losh To: Sean Bruno Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 20:42:03 -0000 While we could fix it, this is a bug in clang's gcc emulation as well as historical practice dating back to IRIX times... Warner On Wed, Dec 9, 2015 at 12:32 PM, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > > > On 12/03/15 11:56, Sean Bruno wrote: > > > > > > On 12/03/15 10:54, Sean Bruno wrote: > > > > > >> On 12/03/15 09:38, Brooks Davis wrote: > >>> On Thu, Dec 03, 2015 at 07:23:33AM -0800, Sean Bruno wrote: > >>>> We're still making progress, with a couple more updates to > >>>> clang we've made it past libc ... now seeing a failure to > >>>> figure out what "LONG_BITS" is. > >>>> > >>>> https://people.freebsd.org/~sbruno/mips64_buildworld.log > >>>> > >>>> I'm not quite sure what's missing and I've tried a few hacks > >>>> to get it past here. > > > >>> This is due to an incompatibility with our limits.h and clang's > >>> limits.h in freestanding mode. IMO it's a bug that clang's > >>> limits.h doesn't include the system one in freestanding mode, > >>> but currently it doesn't which means LONG_BITS doesn't get set. > >>> Deleting/not installing the clang limits.h should do the job. > > > >>> -- Brooks > > > > > >> Cool! I've removed my build version of limits.h > > > >> ~/clang/build % mv ./lib/clang/3.8.0/include/limits.h /var/tmp > > > >> Restarted my freebsd build of mips64. > > > >> sean _______________________________________________ > >> freebsd-mips@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips To > >> unsubscribe, send any mail to > >> "freebsd-mips-unsubscribe@freebsd.org" > > > > > > Yep, this did indeed get past the LONG_BITS things. > > > > Heh ... now hitting a clang assertion in libstand: > > > > https://llvm.org/bugs/show_bug.cgi?id=25730 > > > > The fun continues. > > > > sean _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips To > > unsubscribe, send any mail to > > "freebsd-mips-unsubscribe@freebsd.org" > > > > > Made it to sys/boot today. We seem to have some clang incompatible > flags in mips/beri/boot2/Makefile: > > CFLAGS= -ffreestanding \ > -I${.CURDIR} \ > -I${.CURDIR}/../../../common \ > -I${.CURDIR}/../../../.. \ > -D_KERNEL \ > -Wall \ > -G0 -Xassembler -G0 \ > -fno-pic -mno-abicalls \ > -msoft-float \ > -g > > ===> sys/boot/mips/beri/boot2 (all) > /home/sbruno/clang/build/bin/clang -msoft-float > - -Wno-typedef-redefinition -target mips64-unknown-freebsd11.0 > - --sysroot=/var/tmp/mips.mips64/usr/home/sbruno/fbsd_head/tmp > - -B/var/tmp/mips.mips64/usr/home/sbruno/fbsd_head/tmp/usr/bin > - -ffreestanding > - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2 > > - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../../../common > -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../../../.. > -D_KERNEL -Wall > - -G0 -Xassembler -mno-abicalls -msoft-float > -g > - > > -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../../../../../lib/libstand/ > - -I/usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/../common > - -ffreestanding -std=gnu99 -Qunused-arguments -c > /usr/home/sbruno/fbsd_head/sys/boot/mips/beri/boot2/relocate.S -o > relocate.o > clang-3.8: error: unsupported argument '-G0' to option 'Xassembler' > *** Error code 1 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQF8BAEBCgBmBQJWaIHCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k25MH/in6me/Vy+kyzpW2hgbSZOfA > bxHrXfjEjjzLwJs0B9S1ThRXqUwYlPStEor5VaKbGNeSJ3dJsNG7IjKX2AK6zzVW > sBKYQ9uM36/Utn0MwDDaup1wK5FJB8FlhHOgjEXHHhL++jf3JMQ4tbTZFpE005qh > kHNddbQDdTokvwI0CoLnUhCHjFzveq3UYFCA5y6OYFFEltl+wPKVGDmrcANHuTDN > iMxvvmqDX3P7IXr8zBdN1UkijTnpvcUrMqEo5XcCyq9bLgH9Tw6cmhnf3YVfLyXs > GiSi33HxVplbhFMSlktxy9DtDrUog1cfCUIHgZZKgG1asxLS3ePZnUfuWs+S/Qs= > =91KZ > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@freebsd.org Wed Dec 9 21:16:27 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 027889D644B for ; Wed, 9 Dec 2015 21:16:27 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB1F31097; Wed, 9 Dec 2015 21:16:26 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igcph11 with SMTP id ph11so128641696igc.1; Wed, 09 Dec 2015 13:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=PFuoWnbVdP4CAxJgyjrfZNj0pQEZLgKDorOoK5x6LQQ=; b=qUft2qucX0hP0tz0cdcOYa9DcdmTYAHksVIWLiysw7QGrT5bSlCsF7s0ywuINZcwMS 4PTm7KAo2vHC701u6iEfJu7hElVE7p6Z0H5YxuqF70ykKDlp3afdCpfz2uTNRD0wJzgk /ostAy7b3YIuPOQYmUTeVgO+NdVmL5v4L3GLuCIiOBIxURSDgqx7+mWVffJC5Pw712Ri SsYaSQ5abNDMaOsqbYJIn/a/ILAGz/19knzosnsAx1AhViVdyWSdQ8wa0GGi5fGahn7N yDvdCc/DOa0CBbYT1GdnVjZdVdtGX7nDEuzrXgx8eo6BtqNuw9vDsq0H428Dwo3JWhav bF5Q== X-Received: by 10.50.6.104 with SMTP id z8mr30995800igz.58.1449695786192; Wed, 09 Dec 2015 13:16:26 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.169.85 with HTTP; Wed, 9 Dec 2015 13:16:06 -0800 (PST) In-Reply-To: <566881C6.3070502@freebsd.org> References: <56605E75.5090004@freebsd.org> <20151203173806.GA39703@spindle.one-eyed-alien.net> <56608FF6.3050706@freebsd.org> <56609E80.9070803@freebsd.org> <566881C6.3070502@freebsd.org> From: Ed Maste Date: Wed, 9 Dec 2015 16:16:06 -0500 X-Google-Sender-Auth: rg22ITZVG8kx2PAM8gwc88QXnYw Message-ID: Subject: Re: MIPS64 using clang head To: Sean Bruno Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 21:16:27 -0000 On 9 December 2015 at 14:32, Sean Bruno wrote: > > clang-3.8: error: unsupported argument '-G0' to option 'Xassembler' FWIW, for my FreeBSD/lld investigation when I encountered a case like this I disabled or stubbed out the offending component in order to continue finding new issues. Once I had a successful build I started tracking down the individual failures. This specific one looks like it deserves an upstream issue. From owner-freebsd-mips@freebsd.org Thu Dec 10 19:32:18 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 942929D6FEB for ; Thu, 10 Dec 2015 19:32:18 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 31ED21F1B for ; Thu, 10 Dec 2015 19:32:17 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id tBAJ5GG6076907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 10 Dec 2015 20:05:21 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id tBAJ5AYS044109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Dec 2015 20:05:10 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id tBAJ596f002826; Thu, 10 Dec 2015 20:05:09 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id tBAJ593G002825; Thu, 10 Dec 2015 20:05:09 +0100 (CET) (envelope-from ticso) Date: Thu, 10 Dec 2015 20:05:09 +0100 From: Bernd Walter To: Michael Iline Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Subject: Re: No serial read access on WR1043ND v2.1 Message-ID: <20151210190509.GA1425@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <254027871.12583504.1448923211678.JavaMail.yahoo.ref@mail.yahoo.com> <254027871.12583504.1448923211678.JavaMail.yahoo@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 19:32:18 -0000 On Mon, Nov 30, 2015 at 04:23:20PM -0800, Adrian Chadd wrote: > you may have to solder something on the board - sometimes they don't > populate resistors or 0 ohm links. > > That photo looks like they're all populated though. Hm. I would measure the unconnected RX pin voltage. It should be pulled high by a resistor as they can't left it floating. If you measure no voltage at that pin it likely means that it is not connected on the board. Another thing to test is playing with the bps-rate. 120000bps seems an odd datarate, but unless it is precisely measured it could be anything else. The receiver on the router might be more picky about matching speed than your computers serial. > Does the serial console work once openwrt is booted? > > > -a > > > > On 30 November 2015 at 14:40, Michael Iline via freebsd-mips > wrote: > > Hello everyone. > > I've been working hard on trying to get FreeBSD on my wr1043nd v2.1 but I'm having a lot of trouble that nobody else seemed to encounter... Here is a forum post that I created on the topic:https://forum.openwrt.org/viewtopic.php?id=61240It contains a brief description of the issue as well as some photos of my board. > > There are two reasons I'm posting on this list.First, I'm hoping someone can provide some insight on my problem.Second, maybe I can find a workaround. Viper-7 from ##electronics at freenode suggested that other methods of flashing the image may be used, since I do have an working OpenWRT installation. He recommended this: https://wiki.openwrt.org/toh/tp-link/tl-wr1043nd#flashingrecovery_using_tftp_only_without_serial_consoleI'd like to hear some thoughts before I go ahead and do this, as because of my serial writing issues bricking the device would be extra painful for me. > > Please let me know of someone can provide some assistance, and be sure to tell me if you need any more info. > > Thanks in advanceMichael > > > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@freebsd.org Fri Dec 11 08:25:36 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C997B9D617C for ; Fri, 11 Dec 2015 08:25:36 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE6B1CC0 for ; Fri, 11 Dec 2015 08:25:36 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id c17so2397611wmd.1 for ; Fri, 11 Dec 2015 00:25:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; bh=aWGBA37VUzkUwVMT5IjByCubdTjmihfhtQqvzqTPpek=; b=jhHBqhVi3lSOVSHfpsQrG7Pq0zbC8iPMfvQzoltCCwpZ0f9po9aZFHVfO+r6DdeGDl gy6EE6czZYEHyJVM+tXoxucckmSSbAe8Pvr96rsroKiJANq0A7RX1oN1xRZyfO62AGM8 16DESq8ytHkcVyZH3U6msfPYq7Q/5i/36EOTHinOo5dnGUnusgn0vs2V9co4LHC3pNLs /igg/MelnGFPrBCn471Gfleo8yoKGPz29YeSviCGwkblFSLTBUaasltfXYU2WZzEbHlZ ecWfwaokirjutGAghJbLuvYeu+xWVVWmtsaSCmyo1N4aURGevmgzf39FmKBnNNpwLHuA RVEQ== X-Received: by 10.28.95.193 with SMTP id t184mr4187567wmb.7.1449822334817; Fri, 11 Dec 2015 00:25:34 -0800 (PST) Received: from macbookpro-894a.hsmt ([193.178.153.131]) by smtp.gmail.com with ESMTPSA id f11sm2334810wmd.7.2015.12.11.00.25.33 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Dec 2015 00:25:34 -0800 (PST) From: Stanislav Galabov Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Interest in support for Mediatek/Ralink SoCs? Date: Fri, 11 Dec 2015 10:25:32 +0200 Message-Id: To: freebsd-mips@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 08:25:36 -0000 Hi all, Is there any interest on bringing support for Ralink/Mediatek more = up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to = FreeBSD? The first three are pretty standard in terms of CPU - they=E2=80=99re = all MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far = as booting FreeBSD goes. The last one and, in my opinion, the most interesting one, the MT7621 is = a MIPS 1004Kc - dual core with dual hardware threads per core. It also = introduces new (to FreeBSD/mips) concepts such as the global interrupt = controller (gic) for example and could be interesting from this = perspective as well as it could pave the way for MIPS 1074K support as = well. I am currently able to boot MT7621 single core to multi user. I can = start the rest of the cores and threads as well, but am still having = difficulties figuring out the proper cache and TLB management so it = basically doesn=E2=80=99t support SMP at the moment. I have also done some work on PCI support for the MT7621 and am = currently using userland on a SATA drive, connected to an ASMedia 1061 = on the PCI bus, which seems to be quite stable as well, although the = code is nowhere near ready to show to other people :-) The support for all the peripherals, however, is not something I would = be able to take on all by myself, due to lack of spare time. There is some support in the tree for older Ralink systems (in = sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), = but it needs work. Also, the WiFi drivers do not seem to support the chipsets embedded in = or used with MT76xx, so this will be a major challenge it seems, = especially given the lack of documentation=E2=80=A6 however, a piece of = good news is that OpenWRT supports most/all of these chipsets, so at = least we would have a frame of reference=E2=80=A6 So, anyone else interested in working on MT76xx support? Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Fri Dec 11 09:27:56 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ED1A9D8E5D for ; Fri, 11 Dec 2015 09:27:56 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CBAF1D93; Fri, 11 Dec 2015 09:27:56 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: by oihr132 with SMTP id r132so391229oih.1; Fri, 11 Dec 2015 01:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1RzEsvm2A89c77SUCd2DqMtN8hvmAriAhqVyBaukJ+M=; b=wzH9+1am9RwC051uFo4l+akqUwamai0uEBxEbWCRxdxTT2oNRvatuI9hRQFKjF4E0g CxghIOCbCdvr2XWF2aZA5KcX4ucsFR3ZUNy6F/os36I0HTlFh6JDxTWGjUne1nTgJ0K+ aDb7089W/PX5ig0Bjy1T2bGyIjTS/jhCukozOaeYYYa4YsZFrIT2ZWAITDyyMiTZVvK+ 7C/FNazQgrkVYa6Os3gpp3ePOye06yYi9aVaECaaERe91KADy47KaLl019L7MThKHRXA 2iqm5AEDoZhR52HMKtna+84DoH+KDdE0LEzzOgGlL3NUru/dbuDK9YNL+i7GuRckPziA +Tnw== MIME-Version: 1.0 X-Received: by 10.202.208.83 with SMTP id h80mr13132436oig.74.1449826075365; Fri, 11 Dec 2015 01:27:55 -0800 (PST) Received: by 10.182.169.34 with HTTP; Fri, 11 Dec 2015 01:27:55 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Dec 2015 17:27:55 +0800 Message-ID: Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Ganbold Tsagaankhuu To: Stanislav Galabov Cc: freebsd-mips@freebsd.org, kevlo@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 09:27:56 -0000 Stanislav, On Fri, Dec 11, 2015 at 4:25 PM, Stanislav Galabov wrote: > Hi all, > > Is there any interest on bringing support for Ralink/Mediatek more > up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to > FreeBSD? > > The first three are pretty standard in terms of CPU - they=E2=80=99re all= MIPS > 24Kc based, so they should =E2=80=98just work=E2=80=99 as far as booting = FreeBSD goes. > The last one and, in my opinion, the most interesting one, the MT7621 is = a > MIPS 1004Kc - dual core with dual hardware threads per core. It also > introduces new (to FreeBSD/mips) concepts such as the global interrupt > controller (gic) for example and could be interesting from this perspecti= ve > as well as it could pave the way for MIPS 1074K support as well. > > I am currently able to boot MT7621 single core to multi user. I can start > the rest of the cores and threads as well, but am still having difficulti= es > figuring out the proper cache and TLB management so it basically doesn=E2= =80=99t > support SMP at the moment. > > I have also done some work on PCI support for the MT7621 and am currently > using userland on a SATA drive, connected to an ASMedia 1061 on the PCI > bus, which seems to be quite stable as well, although the code is nowhere > near ready to show to other people :-) > Very nice. > > The support for all the peripherals, however, is not something I would be > able to take on all by myself, due to lack of spare time. > There is some support in the tree for older Ralink systems (in > sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), bu= t > it needs work. > Also, the WiFi drivers do not seem to support the chipsets embedded in or > used with MT76xx, so this will be a major challenge it seems, especially > given the lack of documentation=E2=80=A6 however, a piece of good news is= that > OpenWRT supports most/all of these chipsets, so at least we would have a > frame of reference=E2=80=A6 > > So, anyone else interested in working on MT76xx support? > I think some developers in this list already have MT7621 board so maybe they have some interest and can test your changes. Ganbold > > Best wishes, > Stanislav > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Fri Dec 11 13:07:30 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6EC49D8DC6 for ; Fri, 11 Dec 2015 13:07:30 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C46A197D; Fri, 11 Dec 2015 13:07:30 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 9E35215340D; Fri, 11 Dec 2015 14:07:20 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RqOA5jjkpjZD; Fri, 11 Dec 2015 14:06:52 +0100 (CET) Received: from [192.168.101.176] (vpn.ecoracks.nl [31.223.170.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 66966153408; Fri, 11 Dec 2015 14:06:52 +0100 (CET) Subject: Re: Interest in support for Mediatek/Ralink SoCs? To: Ganbold Tsagaankhuu , Stanislav Galabov References: Cc: kevlo@freebsd.org, freebsd-mips@freebsd.org From: Willem Jan Withagen Message-ID: <566ACA6D.8090502@digiware.nl> Date: Fri, 11 Dec 2015 14:06:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 13:07:30 -0000 On 11-12-2015 10:27, Ganbold Tsagaankhuu wrote: > Stanislav, > > On Fri, Dec 11, 2015 at 4:25 PM, Stanislav Galabov > wrote: > >> Hi all, >> >> Is there any interest on bringing support for Ralink/Mediatek more >> up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to >> FreeBSD? I've purchased 2 WitiBoards so see if in lost/spare time anything FreeBSd-ish would be runnable on it... They are based on MT7621.... I have 2: one to be testing/breaking/flashing/..... The other to be used and referenced. So the least i can do, is run code on itto test , it there is any... And give feedback. https://www.indiegogo.com/projects/witi-board-open-extensible-router-nas-platform#/ --WjW From owner-freebsd-mips@freebsd.org Fri Dec 11 15:08:44 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1849D87A4 for ; Fri, 11 Dec 2015 15:08:44 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BD5BD1C1F for ; Fri, 11 Dec 2015 15:08:42 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.9/8.14.9) with ESMTP id tBBF8Pjb044484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 11 Dec 2015 23:08:25 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.9/8.14.9/Submit) id tBBF8OFo044483; Fri, 11 Dec 2015 23:08:24 +0800 (CST) (envelope-from kevlo) Date: Fri, 11 Dec 2015 23:08:24 +0800 From: Kevin Lo To: Ganbold Tsagaankhuu Cc: Stanislav Galabov , freebsd-mips@freebsd.org Subject: Re: Interest in support for Mediatek/Ralink SoCs? Message-ID: <20151211150824.GA44467@ns.kevlo.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 15:08:44 -0000 On Fri, Dec 11, 2015 at 05:27:55PM +0800, Ganbold Tsagaankhuu wrote: > Stanislav, > > On Fri, Dec 11, 2015 at 4:25 PM, Stanislav Galabov > wrote: > > > Hi all, > > > > Is there any interest on bringing support for Ralink/Mediatek more > > up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to > > FreeBSD? > > > > The first three are pretty standard in terms of CPU - they’re all MIPS > > 24Kc based, so they should ‘just work’ as far as booting FreeBSD goes. > > The last one and, in my opinion, the most interesting one, the MT7621 is a > > MIPS 1004Kc - dual core with dual hardware threads per core. It also > > introduces new (to FreeBSD/mips) concepts such as the global interrupt > > controller (gic) for example and could be interesting from this perspective > > as well as it could pave the way for MIPS 1074K support as well. > > > > I am currently able to boot MT7621 single core to multi user. I can start > > the rest of the cores and threads as well, but am still having difficulties > > figuring out the proper cache and TLB management so it basically doesn’t > > support SMP at the moment. > > > > I have also done some work on PCI support for the MT7621 and am currently > > using userland on a SATA drive, connected to an ASMedia 1061 on the PCI > > bus, which seems to be quite stable as well, although the code is nowhere > > near ready to show to other people :-) > > > > Very nice. > > > > > > > The support for all the peripherals, however, is not something I would be > > able to take on all by myself, due to lack of spare time. > > There is some support in the tree for older Ralink systems (in > > sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), but > > it needs work. > > Also, the WiFi drivers do not seem to support the chipsets embedded in or > > used with MT76xx, so this will be a major challenge it seems, especially > > given the lack of documentation… however, a piece of good news is that > > OpenWRT supports most/all of these chipsets, so at least we would have a > > frame of reference… > > > > So, anyone else interested in working on MT76xx support? > > > > I think some developers in this list already have MT7621 board so maybe > they have some interest and can test your changes. I have a FireWRT and I'm willing to test Stanislav's changes and give feedback. :) > Ganbold > > > > > > > Best wishes, > > Stanislav Kevin From owner-freebsd-mips@freebsd.org Fri Dec 11 16:02:20 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A14879D7015 for ; Fri, 11 Dec 2015 16:02:20 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 414A01DA4 for ; Fri, 11 Dec 2015 16:02:20 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id l68so20245082wml.0 for ; Fri, 11 Dec 2015 08:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; bh=EBqh/BDXcy56wzikyV0vogrLx9Ml6kVg9sxbxTdsee0=; b=T67bk4V/LvqGIx9LT5A0YFLGH86NAehNBEpefzs91ppxjwcdsccsmMjmLo/nINyWpP +AjcUE2Z4Bk9dbTFjSeWAxSaiEf6ViyL180kY6HJMSrtkE8Mv82a+uvGnlfkeDx8en2P pkYozHPEPQqA7Gin4Du9j3GZW4bw3NgpXHG6H1wx06YWWE0CY7QUNSOmcoMNfv9dI22/ yxtcNJG25iM6MtpxA6FC4lYNssSrptKAz89iOOAx/YWgt/uOXXRAbadRBG/prVaA/eGx WZFW9f1JeWdf9rLcnYAnUSCAx+d9j4igKTha9iGfdDlkngWZc+G6lWnxGZ46I8HcmTjZ HLrQ== X-Received: by 10.194.246.132 with SMTP id xw4mr21057315wjc.75.1449849738801; Fri, 11 Dec 2015 08:02:18 -0800 (PST) Received: from ?IPv6:2001:67c:2154:ffff:d198:2b0c:9743:90ee? ([2001:67c:2154:ffff:d198:2b0c:9743:90ee]) by smtp.gmail.com with ESMTPSA id ql10sm17581746wjc.23.2015.12.11.08.02.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Dec 2015 08:02:17 -0800 (PST) From: Stanislav Galabov Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: MIPS_CONFIG0_VI defined wrong in sys/mips/include/cpuregs.h? Date: Fri, 11 Dec 2015 18:02:15 +0200 Message-Id: <7514D462-9B7F-4728-8784-135614215992@gmail.com> To: freebsd-mips@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:02:20 -0000 Hi all, It seems that MIPS_CONFIG0_VI is defined wrong in = sys/mips/include/cpuregs.h. According to MIPS=C2=AE Architecture For Programmers Volume III, page = 149, Figure 9-29 (Config Register Format), accessed via = http://www.t-es-t.hu/download/mips/md00090c.pdf, bit 3 of config0 is = supposed to be VI (Virtual Instruction Cache), while the current = definition of MIPS_CONFIG0_VI (0x00000004) implies that it=E2=80=99s bit = 2. This leads to a lot of headaches when trying to bring up a new CPU = (1004KC in my case) and trying to use Cachable-Coherent CCA (0x5 or = 0b101) for Kseg0 :-) I guess we=E2=80=99ve been able to get away with this so far due to = mainly 2 things: 1. CPUs that use CCA 0x4 - 0x7 for Kseg0 usually are cache-coherent = anyway, so their cache ops are most likely no-op. 2. CPUs that use CCA 0x0 - 0x3 for Kseg0 work just fine, as bit 2 is not = set :-) This leads to improper detection of the I-Cache type (it=E2=80=99s = detected as virtual when it actually isn=E2=80=99t) on kernels that use = CCA >=3D 0x4 for Kseg0, which, in turn, leads to a lot of fun trying to = figure out what=E2=80=99s wrong and why things work with CCA 0x3 and not = with 0x5 on a single core... After changing the definition of MIPS_CONFIG0_VI from 0x00000004 to = 0x00000008 everything goes back to normal even with CCA 0x5. I would appreciate it if someone would commit this change (if you guys = think it=E2=80=99s necessary). I would do it myself if I but I have no = commit privileges. Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Fri Dec 11 16:06:41 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05EDD9D7354 for ; Fri, 11 Dec 2015 16:06:41 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99C451F54 for ; Fri, 11 Dec 2015 16:06:40 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by wmec201 with SMTP id c201so76578274wme.1 for ; Fri, 11 Dec 2015 08:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=e7vcGqe+HSq5RGCiAtvwIfHs9p6iEFqQCJYyeatwd7s=; b=rxkRdQfCER5AGuBfwhNU0Laca3HJrKlbFwfrhYw+ArOHGHh/SHlWEPLqfzG8+1USyA nCXgTYXLm+z+HVJ+iESTVpH/vgbZyJft+3Y9yTsw/K7Z1xrGaiOdjYs0+Nlc7Tn+OCB8 h1mwSv3JfSebqSr9u9Mjx3mIv7Ch9aTDB1RkXCT5Oo/DOpGV5gLCZLOtkghMFNCARhVI GAZ45tZR6DVQVhAgaHvmNt8Kk51r+d66JN9EcdTY8l2UfOkyywz4gl+FsczQRRF4DBDX oCZ15BYAcCWcIMEtyG6dtEAUj4CkfyfdOOmrDPVFfcuo4kaVWLksAP4Q3MCnT2ZdwtV9 y4CQ== X-Received: by 10.28.0.149 with SMTP id 143mr7397608wma.48.1449849999144; Fri, 11 Dec 2015 08:06:39 -0800 (PST) Received: from ?IPv6:2001:67c:2154:ffff:d198:2b0c:9743:90ee? ([2001:67c:2154:ffff:d198:2b0c:9743:90ee]) by smtp.gmail.com with ESMTPSA id z10sm3961165wmg.4.2015.12.11.08.06.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Dec 2015 08:06:38 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Stanislav Galabov In-Reply-To: Date: Fri, 11 Dec 2015 18:06:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: freebsd-mips@freebsd.org X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:06:41 -0000 > On Dec 11, 2015, at 10:25, Stanislav Galabov = wrote: >=20 > Hi all, >=20 > Is there any interest on bringing support for Ralink/Mediatek more = up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to = FreeBSD? >=20 > The first three are pretty standard in terms of CPU - they=E2=80=99re = all MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far = as booting FreeBSD goes. > The last one and, in my opinion, the most interesting one, the MT7621 = is a MIPS 1004Kc - dual core with dual hardware threads per core. It = also introduces new (to FreeBSD/mips) concepts such as the global = interrupt controller (gic) for example and could be interesting from = this perspective as well as it could pave the way for MIPS 1074K support = as well. >=20 > I am currently able to boot MT7621 single core to multi user. I can = start the rest of the cores and threads as well, but am still having = difficulties figuring out the proper cache and TLB management so it = basically doesn=E2=80=99t support SMP at the moment. >=20 > I have also done some work on PCI support for the MT7621 and am = currently using userland on a SATA drive, connected to an ASMedia 1061 = on the PCI bus, which seems to be quite stable as well, although the = code is nowhere near ready to show to other people :-) >=20 > The support for all the peripherals, however, is not something I would = be able to take on all by myself, due to lack of spare time. > There is some support in the tree for older Ralink systems (in = sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), = but it needs work. > Also, the WiFi drivers do not seem to support the chipsets embedded in = or used with MT76xx, so this will be a major challenge it seems, = especially given the lack of documentation=E2=80=A6 however, a piece of = good news is that OpenWRT supports most/all of these chipsets, so at = least we would have a frame of reference=E2=80=A6 >=20 > So, anyone else interested in working on MT76xx support? >=20 > Best wishes, > Stanislav Hi all, I can put a single core kernel (uImage) somewhere (where?) so you guys = can download it and see if it starts up on your boards=E2=80=A6 It won=E2=80=99t do too much at the moment, unless you have a SATA disk = with root filesystem (UFS) attached on an ASMedia 1061 on PCIe. :-) Also, for the guys that mentioned they had MT7621 based boards: how much = RAM do you guys have on your boards? I have 512MB on mine, but I=E2=80=99v= e currently hard-coded the kernel to use 256MB. Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Fri Dec 11 16:36:01 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D861D9D8B5A for ; Fri, 11 Dec 2015 16:36:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6F6F180B for ; Fri, 11 Dec 2015 16:36:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iouu10 with SMTP id u10so134582097iou.0 for ; Fri, 11 Dec 2015 08:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=1clKE3cXWN40MvsK7TERLeIlwRRTiI2N/Ucc31IFLCY=; b=WjO/gBGnnibw+qZefIaOylAKGs70q1tZRhS8Ac3ecAitufYar/DcE4G6ZXCP4++hpT XbFdfjMTgndA6uicl0UFt6AXL1n2Cb0svDEe3dyEX65iQyuDhHoBSU/VPWtTWW225hnZ WNWtqTiEUxQN4HBUYmyR0PPVqrs4eLE5znyC0a8BQwEP9LBi2VscygIuiKW9WgKQGlL/ tCsshnnFZNHogBXx2RvlBUTJk6dC0Ym1QlAKns2amjdkElZzXD0ZwD4reWMNsOQvyVCg KKrzTpAoiNMWA0FqR4KRfgbH3PIx7CTRd3iI+2lXSnHbL96NXews5//OzMom/WguZku6 PkfQ== MIME-Version: 1.0 X-Received: by 10.107.10.199 with SMTP id 68mr17278007iok.75.1449851761056; Fri, 11 Dec 2015 08:36:01 -0800 (PST) Received: by 10.36.121.202 with HTTP; Fri, 11 Dec 2015 08:36:00 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Dec 2015 08:36:00 -0800 Message-ID: Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Adrian Chadd To: Stanislav Galabov Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:36:02 -0000 hi, holy hell yes. Can you please put all of your patches up online? I acquired some MT7621 hardware to do a port, and I see you've beaten me to it. I'd like to get it up and working so I can work on the 11ac wifi support. (I don't mind how dirty or what you think the work is - it's going to be great, and I'll tidy it up and get it into -HEAD.) Thanks! -a On 11 December 2015 at 08:06, Stanislav Galabov wrote: > >> On Dec 11, 2015, at 10:25, Stanislav Galabov wrote: >> >> Hi all, >> >> Is there any interest on bringing support for Ralink/Mediatek more up-to= -date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to FreeBSD? >> >> The first three are pretty standard in terms of CPU - they=E2=80=99re al= l MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far as boo= ting FreeBSD goes. >> The last one and, in my opinion, the most interesting one, the MT7621 is= a MIPS 1004Kc - dual core with dual hardware threads per core. It also int= roduces new (to FreeBSD/mips) concepts such as the global interrupt control= ler (gic) for example and could be interesting from this perspective as wel= l as it could pave the way for MIPS 1074K support as well. >> >> I am currently able to boot MT7621 single core to multi user. I can star= t the rest of the cores and threads as well, but am still having difficulti= es figuring out the proper cache and TLB management so it basically doesn= =E2=80=99t support SMP at the moment. >> >> I have also done some work on PCI support for the MT7621 and am currentl= y using userland on a SATA drive, connected to an ASMedia 1061 on the PCI b= us, which seems to be quite stable as well, although the code is nowhere ne= ar ready to show to other people :-) >> >> The support for all the peripherals, however, is not something I would b= e able to take on all by myself, due to lack of spare time. >> There is some support in the tree for older Ralink systems (in sys/mips/= rt305x and in sys/dev/rt for the ethernet/switch peripheral), but it needs = work. >> Also, the WiFi drivers do not seem to support the chipsets embedded in o= r used with MT76xx, so this will be a major challenge it seems, especially = given the lack of documentation=E2=80=A6 however, a piece of good news is t= hat OpenWRT supports most/all of these chipsets, so at least we would have = a frame of reference=E2=80=A6 >> >> So, anyone else interested in working on MT76xx support? >> >> Best wishes, >> Stanislav > > Hi all, > > I can put a single core kernel (uImage) somewhere (where?) so you guys ca= n download it and see if it starts up on your boards=E2=80=A6 > It won=E2=80=99t do too much at the moment, unless you have a SATA disk w= ith root filesystem (UFS) attached on an ASMedia 1061 on PCIe. :-) > > Also, for the guys that mentioned they had MT7621 based boards: how much = RAM do you guys have on your boards? I have 512MB on mine, but I=E2=80=99ve= currently hard-coded the kernel to use 256MB. > > Best wishes, > Stanislav > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Fri Dec 11 16:38:08 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4154B9D8CBB for ; Fri, 11 Dec 2015 16:38:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 138A5187A for ; Fri, 11 Dec 2015 16:38:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by ioc74 with SMTP id 74so131986546ioc.2 for ; Fri, 11 Dec 2015 08:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=rCmuBRQhwgwxbnNN2zVHBwxH2QqC47jeyTs4H4lIg1A=; b=ZVU252RvAQPRvPs2od20uu+HI5orNibGuhMYHMB+bzjczquXDriO4bQa1+f+IbxkiM rRe4gSUjuAZCOoppgxtyP3HGerUUCEAC9vPB12JqpnvtvFXRZRpKRvdCk6BTG/lp+oey 7qDTdlVGRvA0wUneb/CFQKVU37G6GuK0XbFtTgFpDDGxgbo+rmkePODj9ZvD0EqZWDWN POufHde6gtHgDUtTZlknX+chaZPRTlkyuUVT2kSamj0b7b+34IoiDRyWexoGM4qQPC4m /nuXY71Z3QTzTJMFqk2AuMhajhsOgwI4tCtrIsc1qi4Ak6Un1PHM7IgAZ0xs58uKwFxr Cn/A== MIME-Version: 1.0 X-Received: by 10.107.162.21 with SMTP id l21mr16728078ioe.123.1449851887462; Fri, 11 Dec 2015 08:38:07 -0800 (PST) Received: by 10.36.121.202 with HTTP; Fri, 11 Dec 2015 08:38:07 -0800 (PST) In-Reply-To: <7514D462-9B7F-4728-8784-135614215992@gmail.com> References: <7514D462-9B7F-4728-8784-135614215992@gmail.com> Date: Fri, 11 Dec 2015 08:38:07 -0800 Message-ID: Subject: Re: MIPS_CONFIG0_VI defined wrong in sys/mips/include/cpuregs.h? From: Adrian Chadd To: Stanislav Galabov Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:38:08 -0000 Hm, Would you file a freebsd pr about it? I'll go take a look at it and fix it = up. I'll go review the more recent mips core docs and see what's going on too. Thanks! -a On 11 December 2015 at 08:02, Stanislav Galabov wrote: > Hi all, > > It seems that MIPS_CONFIG0_VI is defined wrong in sys/mips/include/cpureg= s.h. > > According to MIPS=C2=AE Architecture For Programmers Volume III, page 149= , Figure 9-29 (Config Register Format), accessed via http://www.t-es-t.hu/d= ownload/mips/md00090c.pdf, bit 3 of config0 is supposed to be VI (Virtual I= nstruction Cache), while the current definition of MIPS_CONFIG0_VI (0x00000= 004) implies that it=E2=80=99s bit 2. > > This leads to a lot of headaches when trying to bring up a new CPU (1004K= C in my case) and trying to use Cachable-Coherent CCA (0x5 or 0b101) for Ks= eg0 :-) > I guess we=E2=80=99ve been able to get away with this so far due to mainl= y 2 things: > 1. CPUs that use CCA 0x4 - 0x7 for Kseg0 usually are cache-coherent anywa= y, so their cache ops are most likely no-op. > 2. CPUs that use CCA 0x0 - 0x3 for Kseg0 work just fine, as bit 2 is not = set :-) > > This leads to improper detection of the I-Cache type (it=E2=80=99s detect= ed as virtual when it actually isn=E2=80=99t) on kernels that use CCA >=3D = 0x4 for Kseg0, which, in turn, leads to a lot of fun trying to figure out w= hat=E2=80=99s wrong and why things work with CCA 0x3 and not with 0x5 on a = single core... > After changing the definition of MIPS_CONFIG0_VI from 0x00000004 to 0x000= 00008 everything goes back to normal even with CCA 0x5. > > I would appreciate it if someone would commit this change (if you guys th= ink it=E2=80=99s necessary). I would do it myself if I but I have no commit= privileges. > > Best wishes, > Stanislav > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Fri Dec 11 16:40:52 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC2929D8E9D for ; Fri, 11 Dec 2015 16:40:52 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494EE196B for ; Fri, 11 Dec 2015 16:40:52 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x236.google.com with SMTP id c17so18330490wmd.1 for ; Fri, 11 Dec 2015 08:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hnebDr/7D610PgjoHdCczbMxKd5NeMh8DY+MI011rtE=; b=HjFXBPg6Okf7mRwOoeJJu3VgMI1nIe7xAoJt43ICtDE+IFlOO2J3xmTC0ZHHV9Msgg fuwY9jBIQJWWMcZpj3IoSpcBzidqFyB20dZUeinYnhnzVS8Zu/cubVi/LRS7ws/vvYe+ HLUZSyMwBA7Ssf+3lUV/LL3IeTiVFZjzjZ9IbJCq28XxWPvlk4p4Rul8T5/qY4xXuVd+ 6muGO8juPC1fTVnZs/jmD2iIVHffbXuITUsjlO0Ai7HqmxqEJuWiHlHZzQoBGhUJHg4w XsBo40R57n91MW28KA57o+/cSvX2SDB0JAJDaW2RrF/4IysBkl2/iwpgJV6sX+9VmhKJ ytYg== X-Received: by 10.28.93.144 with SMTP id r138mr7369160wmb.84.1449852050849; Fri, 11 Dec 2015 08:40:50 -0800 (PST) Received: from macbookpro-894a.hsmt ([193.178.153.131]) by smtp.gmail.com with ESMTPSA id gl4sm17727619wjd.17.2015.12.11.08.40.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Dec 2015 08:40:49 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Stanislav Galabov In-Reply-To: Date: Fri, 11 Dec 2015 18:40:48 +0200 Cc: Stanislav Galabov , "freebsd-mips@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:40:52 -0000 Now this is something I was hoping for :-) I=E2=80=99ll tidy things up next week and I=E2=80=99ll send the initial = dirty patches over to you only (for now) if it=E2=80=99s ok with you? I=E2=80=99ve hacked on top of the rt305x support that=E2=80=99s in the = tree for now, but in a mt762x directory and there are still a lot of = leftovers from rt305x, but at least the thing boots and goes multiuser = albeit on a single core right now :-) Please let me know if this works for you. Best wishes, Stanislav > On Dec 11, 2015, at 18:36, Adrian Chadd = wrote: >=20 > hi, >=20 > holy hell yes. >=20 > Can you please put all of your patches up online? I acquired some > MT7621 hardware to do a port, and I see you've beaten me to it. I'd > like to get it up and working so I can work on the 11ac wifi support. >=20 > (I don't mind how dirty or what you think the work is - it's going to > be great, and I'll tidy it up and get it into -HEAD.) >=20 > Thanks! >=20 >=20 > -a >=20 >=20 > On 11 December 2015 at 08:06, Stanislav Galabov = wrote: >>=20 >>> On Dec 11, 2015, at 10:25, Stanislav Galabov = wrote: >>>=20 >>> Hi all, >>>=20 >>> Is there any interest on bringing support for Ralink/Mediatek more = up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to = FreeBSD? >>>=20 >>> The first three are pretty standard in terms of CPU - they=E2=80=99re = all MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far = as booting FreeBSD goes. >>> The last one and, in my opinion, the most interesting one, the = MT7621 is a MIPS 1004Kc - dual core with dual hardware threads per core. = It also introduces new (to FreeBSD/mips) concepts such as the global = interrupt controller (gic) for example and could be interesting from = this perspective as well as it could pave the way for MIPS 1074K support = as well. >>>=20 >>> I am currently able to boot MT7621 single core to multi user. I can = start the rest of the cores and threads as well, but am still having = difficulties figuring out the proper cache and TLB management so it = basically doesn=E2=80=99t support SMP at the moment. >>>=20 >>> I have also done some work on PCI support for the MT7621 and am = currently using userland on a SATA drive, connected to an ASMedia 1061 = on the PCI bus, which seems to be quite stable as well, although the = code is nowhere near ready to show to other people :-) >>>=20 >>> The support for all the peripherals, however, is not something I = would be able to take on all by myself, due to lack of spare time. >>> There is some support in the tree for older Ralink systems (in = sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), = but it needs work. >>> Also, the WiFi drivers do not seem to support the chipsets embedded = in or used with MT76xx, so this will be a major challenge it seems, = especially given the lack of documentation=E2=80=A6 however, a piece of = good news is that OpenWRT supports most/all of these chipsets, so at = least we would have a frame of reference=E2=80=A6 >>>=20 >>> So, anyone else interested in working on MT76xx support? >>>=20 >>> Best wishes, >>> Stanislav >>=20 >> Hi all, >>=20 >> I can put a single core kernel (uImage) somewhere (where?) so you = guys can download it and see if it starts up on your boards=E2=80=A6 >> It won=E2=80=99t do too much at the moment, unless you have a SATA = disk with root filesystem (UFS) attached on an ASMedia 1061 on PCIe. :-) >>=20 >> Also, for the guys that mentioned they had MT7621 based boards: how = much RAM do you guys have on your boards? I have 512MB on mine, but = I=E2=80=99ve currently hard-coded the kernel to use 256MB. >>=20 >> Best wishes, >> Stanislav >> _______________________________________________ >> freebsd-mips@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >> To unsubscribe, send any mail to = "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Fri Dec 11 16:45:14 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28B459D71FC for ; Fri, 11 Dec 2015 16:45:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED06C1C21 for ; Fri, 11 Dec 2015 16:45:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iojd73 with SMTP id d73so14119516ioj.3 for ; Fri, 11 Dec 2015 08:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+zQsggcEEK7U4vI3HNVJuS3VxIOyCnYKrECx/WYE8mk=; b=IlPoNEP4/sZin1CQK3nLcM9rIVAn9QhnT4GDzZh6EyiRnHW5KbwX9MW00X22iYGbXL /D0JlM28dy/y938dvKLNr7c6IA6gBkLrqqv9VO0SqUL1R5JueV2TxlJrZMz9wKaWsma7 cEjuAcjZKBFEcC4dkS/wo2cJSv4byOKUUUyLCNezY4NRNOK/7iaF0N1l5IK4O+1r63KY QBRwVHGd/JMkYkHRNUIbLqMF+L8teIgJLoBakQF5wllPo5QqY0vY3TItnrnjhwpDaH8f XxgINTVva9YYaeFQKLeJlQ+2gEpNMiwfxK49pJ9PhMwGds93ue7Bz67XlZwGMJ9j7naP BrVQ== MIME-Version: 1.0 X-Received: by 10.107.10.199 with SMTP id 68mr17316032iok.75.1449852313207; Fri, 11 Dec 2015 08:45:13 -0800 (PST) Received: by 10.36.121.202 with HTTP; Fri, 11 Dec 2015 08:45:11 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Dec 2015 08:45:11 -0800 Message-ID: Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Adrian Chadd To: Stanislav Galabov Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:45:14 -0000 yup, it works fine! Send em over. -a On 11 December 2015 at 08:40, Stanislav Galabov wrote: > Now this is something I was hoping for :-) > > I=E2=80=99ll tidy things up next week and I=E2=80=99ll send the initial d= irty patches over to you only (for now) if it=E2=80=99s ok with you? > I=E2=80=99ve hacked on top of the rt305x support that=E2=80=99s in the tr= ee for now, but in a mt762x directory and there are still a lot of leftover= s from rt305x, but at least the thing boots and goes multiuser albeit on a = single core right now :-) > > Please let me know if this works for you. > > Best wishes, > Stanislav > >> On Dec 11, 2015, at 18:36, Adrian Chadd wrote: >> >> hi, >> >> holy hell yes. >> >> Can you please put all of your patches up online? I acquired some >> MT7621 hardware to do a port, and I see you've beaten me to it. I'd >> like to get it up and working so I can work on the 11ac wifi support. >> >> (I don't mind how dirty or what you think the work is - it's going to >> be great, and I'll tidy it up and get it into -HEAD.) >> >> Thanks! >> >> >> -a >> >> >> On 11 December 2015 at 08:06, Stanislav Galabov wro= te: >>> >>>> On Dec 11, 2015, at 10:25, Stanislav Galabov wrot= e: >>>> >>>> Hi all, >>>> >>>> Is there any interest on bringing support for Ralink/Mediatek more up-= to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to FreeBS= D? >>>> >>>> The first three are pretty standard in terms of CPU - they=E2=80=99re = all MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far as b= ooting FreeBSD goes. >>>> The last one and, in my opinion, the most interesting one, the MT7621 = is a MIPS 1004Kc - dual core with dual hardware threads per core. It also i= ntroduces new (to FreeBSD/mips) concepts such as the global interrupt contr= oller (gic) for example and could be interesting from this perspective as w= ell as it could pave the way for MIPS 1074K support as well. >>>> >>>> I am currently able to boot MT7621 single core to multi user. I can st= art the rest of the cores and threads as well, but am still having difficul= ties figuring out the proper cache and TLB management so it basically doesn= =E2=80=99t support SMP at the moment. >>>> >>>> I have also done some work on PCI support for the MT7621 and am curren= tly using userland on a SATA drive, connected to an ASMedia 1061 on the PCI= bus, which seems to be quite stable as well, although the code is nowhere = near ready to show to other people :-) >>>> >>>> The support for all the peripherals, however, is not something I would= be able to take on all by myself, due to lack of spare time. >>>> There is some support in the tree for older Ralink systems (in sys/mip= s/rt305x and in sys/dev/rt for the ethernet/switch peripheral), but it need= s work. >>>> Also, the WiFi drivers do not seem to support the chipsets embedded in= or used with MT76xx, so this will be a major challenge it seems, especiall= y given the lack of documentation=E2=80=A6 however, a piece of good news is= that OpenWRT supports most/all of these chipsets, so at least we would hav= e a frame of reference=E2=80=A6 >>>> >>>> So, anyone else interested in working on MT76xx support? >>>> >>>> Best wishes, >>>> Stanislav >>> >>> Hi all, >>> >>> I can put a single core kernel (uImage) somewhere (where?) so you guys = can download it and see if it starts up on your boards=E2=80=A6 >>> It won=E2=80=99t do too much at the moment, unless you have a SATA disk= with root filesystem (UFS) attached on an ASMedia 1061 on PCIe. :-) >>> >>> Also, for the guys that mentioned they had MT7621 based boards: how muc= h RAM do you guys have on your boards? I have 512MB on mine, but I=E2=80=99= ve currently hard-coded the kernel to use 256MB. >>> >>> Best wishes, >>> Stanislav >>> _______________________________________________ >>> freebsd-mips@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >>> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@freebsd.org Fri Dec 11 16:46:53 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90E5D9D7345 for ; Fri, 11 Dec 2015 16:46:53 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 351071CD0 for ; Fri, 11 Dec 2015 16:46:53 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by wmnn186 with SMTP id n186so39593148wmn.0 for ; Fri, 11 Dec 2015 08:46:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Wa/vBVy3RM4WM2ltwSr5aSsh4ZeqkVK2kE9kYWFx0H8=; b=eUVIEi7K1n4HC40dFUdzc1m0sIy+PYALv2mKHeDnCFFCxb4GarWS8TDyXjtitdG2oU MX9/t5qk9MgQWcSWqLIZX3qlC30k4VCiJQtqectJ1d9kUgevtyTFh74H3Wi0FBGiEsk3 drVkVB/8Ba2zCnQ2yda7FJBm9ELM3iMIX/DOiyZ5DFijJNEk/OpFow3OBa7tRBAdyPM8 w2b8g7Z7ReU3bkstvHe7emBCr52dJaVvDGYxJjsZppRYz7GPxqT4/w0FWiNAr0Fls8XX +bMEZSTH4FntVsphURbGCfMdt6uPCC6+L06DmcqIq80OHMjq5yPVV4P/J8qXOCqTI2gC b5Ug== X-Received: by 10.28.52.213 with SMTP id b204mr7530368wma.32.1449852411731; Fri, 11 Dec 2015 08:46:51 -0800 (PST) Received: from ?IPv6:2001:67c:2154:ffff:d198:2b0c:9743:90ee? ([2001:67c:2154:ffff:d198:2b0c:9743:90ee]) by smtp.gmail.com with ESMTPSA id w4sm17707873wje.49.2015.12.11.08.46.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Dec 2015 08:46:51 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: MIPS_CONFIG0_VI defined wrong in sys/mips/include/cpuregs.h? From: Stanislav Galabov In-Reply-To: Date: Fri, 11 Dec 2015 18:46:50 +0200 Cc: Stanislav Galabov , "freebsd-mips@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <5866093A-E70C-4417-BFF6-B41CC35B571B@gmail.com> References: <7514D462-9B7F-4728-8784-135614215992@gmail.com> To: Adrian Chadd X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:46:53 -0000 Hi Adrian, Done: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205249 Best wishes, Stanislav > On Dec 11, 2015, at 18:38, Adrian Chadd = wrote: >=20 > Hm, >=20 > Would you file a freebsd pr about it? I'll go take a look at it and = fix it up. >=20 > I'll go review the more recent mips core docs and see what's going on = too. >=20 > Thanks! >=20 >=20 > -a >=20 >=20 > On 11 December 2015 at 08:02, Stanislav Galabov = wrote: >> Hi all, >>=20 >> It seems that MIPS_CONFIG0_VI is defined wrong in = sys/mips/include/cpuregs.h. >>=20 >> According to MIPS=C2=AE Architecture For Programmers Volume III, page = 149, Figure 9-29 (Config Register Format), accessed via = http://www.t-es-t.hu/download/mips/md00090c.pdf, bit 3 of config0 is = supposed to be VI (Virtual Instruction Cache), while the current = definition of MIPS_CONFIG0_VI (0x00000004) implies that it=E2=80=99s bit = 2. >>=20 >> This leads to a lot of headaches when trying to bring up a new CPU = (1004KC in my case) and trying to use Cachable-Coherent CCA (0x5 or = 0b101) for Kseg0 :-) >> I guess we=E2=80=99ve been able to get away with this so far due to = mainly 2 things: >> 1. CPUs that use CCA 0x4 - 0x7 for Kseg0 usually are cache-coherent = anyway, so their cache ops are most likely no-op. >> 2. CPUs that use CCA 0x0 - 0x3 for Kseg0 work just fine, as bit 2 is = not set :-) >>=20 >> This leads to improper detection of the I-Cache type (it=E2=80=99s = detected as virtual when it actually isn=E2=80=99t) on kernels that use = CCA >=3D 0x4 for Kseg0, which, in turn, leads to a lot of fun trying to = figure out what=E2=80=99s wrong and why things work with CCA 0x3 and not = with 0x5 on a single core... >> After changing the definition of MIPS_CONFIG0_VI from 0x00000004 to = 0x00000008 everything goes back to normal even with CCA 0x5. >>=20 >> I would appreciate it if someone would commit this change (if you = guys think it=E2=80=99s necessary). I would do it myself if I but I have = no commit privileges. >>=20 >> Best wishes, >> Stanislav >> _______________________________________________ >> freebsd-mips@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >> To unsubscribe, send any mail to = "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Fri Dec 11 17:14:39 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B5D89D890D for ; Fri, 11 Dec 2015 17:14:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03B881FC7 for ; Fri, 11 Dec 2015 17:14:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgcc31 with SMTP id c31so202271851qgc.3 for ; Fri, 11 Dec 2015 09:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=46DBVHLmjPodYB3KT8bpmjK7khIiO1uoSe94vJHif3s=; b=saBdKr5xE3UMsi7yqxx29sMU5t3uZj7l6V9SNGUOie0LROI4XRXtFUhlsZlCdLMBir qyW7cfZCpPj2j4KLzuzjCeTnwcsfiNqQbaDZGRKVwORewEV2fFxf5REoiw7nsvj7kbtq y3KJ0tlfoGrWxTiEZprqb2FxMRNdJrLbgoebbx+g46ffixjDQAL8VkwxW1jFyFQ64qnD OWuf239UnInKJ2/F2/h01/PyV6gzJnHcSsnZHbJJzVwPL39NtrXXo5ZqYRsbBaMVA2/G cFfyVkTs0hPyhChfyKAEwSNyx/+ltHSJCM3GcQ/ifHT+E4KCd5eJWt/uhJT+R7TRs57O Iucw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=46DBVHLmjPodYB3KT8bpmjK7khIiO1uoSe94vJHif3s=; b=hu/tE14GH7qsY6V2zxFJVRNnyQNEcv3/QuIzHaKPhYKyGrOCi5LAPG7wrwaIXx/1q6 09oQnNPnJ9qbqUUbkhLaP3/865/ilxuLT8qTbMR87zrd7G5hsd1KBlkZ55L5ti4Mip15 4STgumoCzHntyRJAYU1L6rTo/3DZzfgGZt1VokCnbSs+dtLhrV346J9DHjTNYhF95brN 8AKINnUyXzRtkkVw8KdGSjLMnUFKr9OWWrKRUSKwc1tevcxU8ZVA+2mb8uzAl+PJ6qN8 g4cfAaisb/REVJi/0kgxPCzbv8p4U3USskywa0U2PXq0uNboMF9Eh1e8zaCuXTUYcXnQ Br5g== X-Gm-Message-State: ALoCoQml3NiuA1ZEz5q8/2t2Fg32lQi8UId14GoLrKg4fnO+yC3LnVGI+rmSDqbxfZXppzdoiSSTQt9G5Ix33YwwUnsABsLkuw== MIME-Version: 1.0 X-Received: by 10.140.31.73 with SMTP id e67mr25694475qge.46.1449854077748; Fri, 11 Dec 2015 09:14:37 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Fri, 11 Dec 2015 09:14:37 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <5866093A-E70C-4417-BFF6-B41CC35B571B@gmail.com> References: <7514D462-9B7F-4728-8784-135614215992@gmail.com> <5866093A-E70C-4417-BFF6-B41CC35B571B@gmail.com> Date: Fri, 11 Dec 2015 10:14:37 -0700 X-Google-Sender-Auth: 3o0ckHCKZCYfZMSFyF0zWqIkgrg Message-ID: Subject: Re: MIPS_CONFIG0_VI defined wrong in sys/mips/include/cpuregs.h? From: Warner Losh To: Stanislav Galabov Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 17:14:39 -0000 Comitted. On Fri, Dec 11, 2015 at 9:46 AM, Stanislav Galabov wrote: > Hi Adrian, > > Done: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205249 > > Best wishes, > Stanislav > > > On Dec 11, 2015, at 18:38, Adrian Chadd wrote: > > > > Hm, > > > > Would you file a freebsd pr about it? I'll go take a look at it and fix > it up. > > > > I'll go review the more recent mips core docs and see what's going on > too. > > > > Thanks! > > > > > > -a > > > > > > On 11 December 2015 at 08:02, Stanislav Galabov > wrote: > >> Hi all, > >> > >> It seems that MIPS_CONFIG0_VI is defined wrong in > sys/mips/include/cpuregs.h. > >> > >> According to MIPS=C2=AE Architecture For Programmers Volume III, page = 149, > Figure 9-29 (Config Register Format), accessed via > http://www.t-es-t.hu/download/mips/md00090c.pdf, bit 3 of config0 is > supposed to be VI (Virtual Instruction Cache), while the current definiti= on > of MIPS_CONFIG0_VI (0x00000004) implies that it=E2=80=99s bit 2. > >> > >> This leads to a lot of headaches when trying to bring up a new CPU > (1004KC in my case) and trying to use Cachable-Coherent CCA (0x5 or 0b101= ) > for Kseg0 :-) > >> I guess we=E2=80=99ve been able to get away with this so far due to ma= inly 2 > things: > >> 1. CPUs that use CCA 0x4 - 0x7 for Kseg0 usually are cache-coherent > anyway, so their cache ops are most likely no-op. > >> 2. CPUs that use CCA 0x0 - 0x3 for Kseg0 work just fine, as bit 2 is > not set :-) > >> > >> This leads to improper detection of the I-Cache type (it=E2=80=99s det= ected as > virtual when it actually isn=E2=80=99t) on kernels that use CCA >=3D 0x4 = for Kseg0, > which, in turn, leads to a lot of fun trying to figure out what=E2=80=99s= wrong and > why things work with CCA 0x3 and not with 0x5 on a single core... > >> After changing the definition of MIPS_CONFIG0_VI from 0x00000004 to > 0x00000008 everything goes back to normal even with CCA 0x5. > >> > >> I would appreciate it if someone would commit this change (if you guys > think it=E2=80=99s necessary). I would do it myself if I but I have no co= mmit > privileges. > >> > >> Best wishes, > >> Stanislav > >> _______________________________________________ > >> freebsd-mips@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips > >> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org= " > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@freebsd.org Fri Dec 11 19:58:21 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 265669D780E for ; Fri, 11 Dec 2015 19:58:21 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E289B1297 for ; Fri, 11 Dec 2015 19:58:19 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 7AA78153413; Fri, 11 Dec 2015 20:58:16 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c3LGgXg1Zidu; Fri, 11 Dec 2015 20:57:49 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:2933:4275:f149:7936] (unknown [IPv6:2001:4cb8:3:1:2933:4275:f149:7936]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 3EA7F15340D; Fri, 11 Dec 2015 20:57:49 +0100 (CET) Subject: Re: Interest in support for Mediatek/Ralink SoCs? To: Stanislav Galabov , freebsd-mips@freebsd.org References: From: Willem Jan Withagen Message-ID: <566B2ABE.1000703@digiware.nl> Date: Fri, 11 Dec 2015 20:57:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 19:58:21 -0000 On 11-12-2015 17:06, Stanislav Galabov wrote: > Also, for the guys that mentioned they had MT7621 based boards: how > much RAM do you guys have on your boards? I have 512MB on mine, but > I’ve currently hard-coded the kernel to use 256MB. The WitiBoard has 256Mb. 512Mb is a future option. --WjW From owner-freebsd-mips@freebsd.org Sat Dec 12 07:57:05 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E97A14174 for ; Sat, 12 Dec 2015 07:57:05 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4408B18D2 for ; Sat, 12 Dec 2015 07:57:05 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by wmpp66 with SMTP id p66so484040wmp.1 for ; Fri, 11 Dec 2015 23:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=eHBw3hD6ZOBzBtU56gZ7YawL8ieTx5kROBVw4bBegT0=; b=CpNdKKyprBJ6GJatnAEOdWHQIkigoA5s02kwvvdlazCQCXqyhefLU8gORe4z1O/fD5 ErjXbffSERwZsYhkm2r8DqO+2qx7iZYxQhaHcrj48QEZIwIDG071gGEn0jmbTOnxaeFk U+n4Gb5+gqOpNTKVoofHzOhsAViB12XSRdokcIsU/0ss8HVZRi9HSAlkC4SqU2r96gaX 78fmMxMnrY/hfxJXPV5CgRC7RbTzMdPiUA5g6lJaJuf3/clhFFS6Dt9JeLE7KU1LRZCc 121WSszFEgF9zyfnUNWlQrmK67YI0dvJ5zJoOMn9lQMZbDrMFW0Y5ytvsID3tZ5gg/oG vdow== X-Received: by 10.28.68.213 with SMTP id r204mr10685595wma.35.1449907023778; Fri, 11 Dec 2015 23:57:03 -0800 (PST) Received: from [10.0.50.11] ([94.155.70.123]) by smtp.gmail.com with ESMTPSA id ql10sm20228850wjc.23.2015.12.11.23.57.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Dec 2015 23:57:03 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Stanislav Galabov In-Reply-To: Date: Sat, 12 Dec 2015 09:57:01 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <435B59EC-2C17-48FC-AED1-337DBE6829CB@gmail.com> References: To: "freebsd-mips@freebsd.org" X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2015 07:57:05 -0000 Hi all, I=E2=80=99ve sent the files to Adrian and will be cleaning things next = week so we can start off with MT7621 support a little cleaner. In the meantime, if anyone wants to try to boot a kernel on their MT7621 = boards, I=E2=80=99ve put one here: https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=3D0 It=E2=80=99s a uImage, so you=E2=80=99d have to get it on the board in = u-boot via tftp and do a bootm on it. For example (from the u-boot prompt): tftp 0x80800000 kernel.uboot; bootm 0x80800000 There currently is no file system within the kernel. It expects to find = a filesystem on ada0, attached to ASMedia 1061 on the pci bus (in case = your boards have SATA ports). So if you don=E2=80=99t have SATA you = won=E2=80=99t have a filesystem, but at least we=E2=80=99ll know whether = it boots on your boards or not. Please let me know if it boots on your boards. Best wishes, Stanislav > On Dec 11, 2015, at 18:40, Stanislav Galabov = wrote: >=20 > Now this is something I was hoping for :-) >=20 > I=E2=80=99ll tidy things up next week and I=E2=80=99ll send the = initial dirty patches over to you only (for now) if it=E2=80=99s ok with = you? > I=E2=80=99ve hacked on top of the rt305x support that=E2=80=99s in the = tree for now, but in a mt762x directory and there are still a lot of = leftovers from rt305x, but at least the thing boots and goes multiuser = albeit on a single core right now :-) >=20 > Please let me know if this works for you. >=20 > Best wishes, > Stanislav >=20 >> On Dec 11, 2015, at 18:36, Adrian Chadd = wrote: >>=20 >> hi, >>=20 >> holy hell yes. >>=20 >> Can you please put all of your patches up online? I acquired some >> MT7621 hardware to do a port, and I see you've beaten me to it. I'd >> like to get it up and working so I can work on the 11ac wifi support. >>=20 >> (I don't mind how dirty or what you think the work is - it's going to >> be great, and I'll tidy it up and get it into -HEAD.) >>=20 >> Thanks! >>=20 >>=20 >> -a >>=20 >>=20 >> On 11 December 2015 at 08:06, Stanislav Galabov = wrote: >>>=20 >>>> On Dec 11, 2015, at 10:25, Stanislav Galabov = wrote: >>>>=20 >>>> Hi all, >>>>=20 >>>> Is there any interest on bringing support for Ralink/Mediatek more = up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to = FreeBSD? >>>>=20 >>>> The first three are pretty standard in terms of CPU - they=E2=80=99re= all MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far = as booting FreeBSD goes. >>>> The last one and, in my opinion, the most interesting one, the = MT7621 is a MIPS 1004Kc - dual core with dual hardware threads per core. = It also introduces new (to FreeBSD/mips) concepts such as the global = interrupt controller (gic) for example and could be interesting from = this perspective as well as it could pave the way for MIPS 1074K support = as well. >>>>=20 >>>> I am currently able to boot MT7621 single core to multi user. I can = start the rest of the cores and threads as well, but am still having = difficulties figuring out the proper cache and TLB management so it = basically doesn=E2=80=99t support SMP at the moment. >>>>=20 >>>> I have also done some work on PCI support for the MT7621 and am = currently using userland on a SATA drive, connected to an ASMedia 1061 = on the PCI bus, which seems to be quite stable as well, although the = code is nowhere near ready to show to other people :-) >>>>=20 >>>> The support for all the peripherals, however, is not something I = would be able to take on all by myself, due to lack of spare time. >>>> There is some support in the tree for older Ralink systems (in = sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), = but it needs work. >>>> Also, the WiFi drivers do not seem to support the chipsets embedded = in or used with MT76xx, so this will be a major challenge it seems, = especially given the lack of documentation=E2=80=A6 however, a piece of = good news is that OpenWRT supports most/all of these chipsets, so at = least we would have a frame of reference=E2=80=A6 >>>>=20 >>>> So, anyone else interested in working on MT76xx support? >>>>=20 >>>> Best wishes, >>>> Stanislav >>>=20 >>> Hi all, >>>=20 >>> I can put a single core kernel (uImage) somewhere (where?) so you = guys can download it and see if it starts up on your boards=E2=80=A6 >>> It won=E2=80=99t do too much at the moment, unless you have a SATA = disk with root filesystem (UFS) attached on an ASMedia 1061 on PCIe. :-) >>>=20 >>> Also, for the guys that mentioned they had MT7621 based boards: how = much RAM do you guys have on your boards? I have 512MB on mine, but = I=E2=80=99ve currently hard-coded the kernel to use 256MB. >>>=20 >>> Best wishes, >>> Stanislav >>> _______________________________________________ >>> freebsd-mips@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >>> To unsubscribe, send any mail to = "freebsd-mips-unsubscribe@freebsd.org" >=20 From owner-freebsd-mips@freebsd.org Sat Dec 12 08:14:51 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EB759D84AE for ; Sat, 12 Dec 2015 08:14:51 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9A6131D for ; Sat, 12 Dec 2015 08:14:51 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id l68so43375027wml.0 for ; Sat, 12 Dec 2015 00:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BeGM1n5efSLJKUxdNQzysdNnUZO6t37iGesO8YCXtTs=; b=nkN97RDLkynj5ugF9p4WLF37Sp7Kl0Dlf0QHY/ogKY6W3wTx1yfkShc0FccWjBKE82 Dm5dPRiS7Sabdpp8E2U60vQ4mSpOv9FKrpR7e8xcgf/sAw5yfESCSHlq8CrbNcJM2H58 33eP3V8xmiJuhyWOT2haFlFsG1vdxnseAUgGzpZbfo0bDQniclWOKRFbiiEjQPuuQRAr W+I0aWa/V21+VPkfAEsM8vDkaYfDCNgsWbBarSnKeAWnsD3UU1oogDiNG2mI3ECqXthy f0B53lX136P0YJsjdqLeG5N62eQqjXialuIDPoy0afbyQw/vBuqw6NPUTc7Np/FsnDdE dSGw== X-Received: by 10.194.246.200 with SMTP id xy8mr24283086wjc.62.1449908089737; Sat, 12 Dec 2015 00:14:49 -0800 (PST) Received: from [10.0.50.11] ([94.155.70.123]) by smtp.gmail.com with ESMTPSA id w141sm6595065wmw.24.2015.12.12.00.14.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Dec 2015 00:14:48 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Interest in support for Mediatek/Ralink SoCs? From: Stanislav Galabov In-Reply-To: <435B59EC-2C17-48FC-AED1-337DBE6829CB@gmail.com> Date: Sat, 12 Dec 2015 10:14:47 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6CE6533C-D7CE-4B17-9530-3559A4F5D0CD@gmail.com> References: <435B59EC-2C17-48FC-AED1-337DBE6829CB@gmail.com> To: "freebsd-mips@freebsd.org" X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2015 08:14:51 -0000 Sorry, the previous version was compiled with SMP support, which is far = from working right now=E2=80=A6 please use the following one for now if = interested: https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=3D0 Stanislav > On Dec 12, 2015, at 09:57, Stanislav Galabov = wrote: >=20 > Hi all, >=20 > I=E2=80=99ve sent the files to Adrian and will be cleaning things next = week so we can start off with MT7621 support a little cleaner. >=20 > In the meantime, if anyone wants to try to boot a kernel on their = MT7621 boards, I=E2=80=99ve put one here: > https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=3D0 >=20 > It=E2=80=99s a uImage, so you=E2=80=99d have to get it on the board in = u-boot via tftp and do a bootm on it. > For example (from the u-boot prompt): > tftp 0x80800000 kernel.uboot; bootm 0x80800000 >=20 > There currently is no file system within the kernel. It expects to = find a filesystem on ada0, attached to ASMedia 1061 on the pci bus (in = case your boards have SATA ports). So if you don=E2=80=99t have SATA you = won=E2=80=99t have a filesystem, but at least we=E2=80=99ll know whether = it boots on your boards or not. >=20 > Please let me know if it boots on your boards. >=20 > Best wishes, > Stanislav >=20 >> On Dec 11, 2015, at 18:40, Stanislav Galabov = wrote: >>=20 >> Now this is something I was hoping for :-) >>=20 >> I=E2=80=99ll tidy things up next week and I=E2=80=99ll send the = initial dirty patches over to you only (for now) if it=E2=80=99s ok with = you? >> I=E2=80=99ve hacked on top of the rt305x support that=E2=80=99s in = the tree for now, but in a mt762x directory and there are still a lot of = leftovers from rt305x, but at least the thing boots and goes multiuser = albeit on a single core right now :-) >>=20 >> Please let me know if this works for you. >>=20 >> Best wishes, >> Stanislav >>=20 >>> On Dec 11, 2015, at 18:36, Adrian Chadd = wrote: >>>=20 >>> hi, >>>=20 >>> holy hell yes. >>>=20 >>> Can you please put all of your patches up online? I acquired some >>> MT7621 hardware to do a port, and I see you've beaten me to it. I'd >>> like to get it up and working so I can work on the 11ac wifi = support. >>>=20 >>> (I don't mind how dirty or what you think the work is - it's going = to >>> be great, and I'll tidy it up and get it into -HEAD.) >>>=20 >>> Thanks! >>>=20 >>>=20 >>> -a >>>=20 >>>=20 >>> On 11 December 2015 at 08:06, Stanislav Galabov = wrote: >>>>=20 >>>>> On Dec 11, 2015, at 10:25, Stanislav Galabov = wrote: >>>>>=20 >>>>> Hi all, >>>>>=20 >>>>> Is there any interest on bringing support for Ralink/Mediatek more = up-to-date SoCs, such as MT7620, MT7628, MT7688 and, notably, MT7621 to = FreeBSD? >>>>>=20 >>>>> The first three are pretty standard in terms of CPU - they=E2=80=99r= e all MIPS 24Kc based, so they should =E2=80=98just work=E2=80=99 as far = as booting FreeBSD goes. >>>>> The last one and, in my opinion, the most interesting one, the = MT7621 is a MIPS 1004Kc - dual core with dual hardware threads per core. = It also introduces new (to FreeBSD/mips) concepts such as the global = interrupt controller (gic) for example and could be interesting from = this perspective as well as it could pave the way for MIPS 1074K support = as well. >>>>>=20 >>>>> I am currently able to boot MT7621 single core to multi user. I = can start the rest of the cores and threads as well, but am still having = difficulties figuring out the proper cache and TLB management so it = basically doesn=E2=80=99t support SMP at the moment. >>>>>=20 >>>>> I have also done some work on PCI support for the MT7621 and am = currently using userland on a SATA drive, connected to an ASMedia 1061 = on the PCI bus, which seems to be quite stable as well, although the = code is nowhere near ready to show to other people :-) >>>>>=20 >>>>> The support for all the peripherals, however, is not something I = would be able to take on all by myself, due to lack of spare time. >>>>> There is some support in the tree for older Ralink systems (in = sys/mips/rt305x and in sys/dev/rt for the ethernet/switch peripheral), = but it needs work. >>>>> Also, the WiFi drivers do not seem to support the chipsets = embedded in or used with MT76xx, so this will be a major challenge it = seems, especially given the lack of documentation=E2=80=A6 however, a = piece of good news is that OpenWRT supports most/all of these chipsets, = so at least we would have a frame of reference=E2=80=A6 >>>>>=20 >>>>> So, anyone else interested in working on MT76xx support? >>>>>=20 >>>>> Best wishes, >>>>> Stanislav >>>>=20 >>>> Hi all, >>>>=20 >>>> I can put a single core kernel (uImage) somewhere (where?) so you = guys can download it and see if it starts up on your boards=E2=80=A6 >>>> It won=E2=80=99t do too much at the moment, unless you have a SATA = disk with root filesystem (UFS) attached on an ASMedia 1061 on PCIe. :-) >>>>=20 >>>> Also, for the guys that mentioned they had MT7621 based boards: how = much RAM do you guys have on your boards? I have 512MB on mine, but = I=E2=80=99ve currently hard-coded the kernel to use 256MB. >>>>=20 >>>> Best wishes, >>>> Stanislav >>>> _______________________________________________ >>>> freebsd-mips@freebsd.org mailing list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >>>> To unsubscribe, send any mail to = "freebsd-mips-unsubscribe@freebsd.org" >>=20 >=20