From owner-freebsd-mips@freebsd.org Thu Dec 13 01:05:22 2018 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F18DA132CB6E for ; Thu, 13 Dec 2018 01:05:21 +0000 (UTC) (envelope-from juli@northcloak.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FBA78A1F6 for ; Thu, 13 Dec 2018 01:05:20 +0000 (UTC) (envelope-from juli@northcloak.com) Received: by mail-qk1-x734.google.com with SMTP id a132so223604qkg.1 for ; Wed, 12 Dec 2018 17:05:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=northcloak-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K0wf3LatxWTMwRp168kxjgJyn678yn4/cPpk4y3raU0=; b=aiB/ozSPIaGY6YxMR+nPyEVhrRC4DFDhHjCVQTxBGYPF6kTr58wwn5Yfcl0YFNC4qQ KIGAAMbk4bzLwGtW9X0HWVpQTO/e/KV0J6rMJYuA16JKhPieh61Jk6HaCZdiVt9uAZ7g FL3P5Njc5Yxqiec45TGk9kFcv11KRah7M4g1PGaH814DxjbPtLcPZjbkGMw6CFUipyAO jCcHYb7ISFqMe4j1GtOBxGVXKKGeo+lYyjVTin7NuSs0qQoAk7bdpV1yOFs+g5gazztx soDHTJ+Gu8M28Fqu8QLX5sRiPhXAEpKdyO+c88uUhVmEYRUA5a/iF104nLrOPEZpKyU+ w4SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K0wf3LatxWTMwRp168kxjgJyn678yn4/cPpk4y3raU0=; b=agXQAUyJOpYz898CBIUxuZJefsJinAX0Fn6EezlVeOrymjXnU75711xRRaKa5+UDZK TW7mgr/pzNCPAtaHSipy3vrJLSHNqCy+avlc/lUenP32Doa91cqBzNNwWUgweKGJmVhN TWsD962DofVrn2JSicxb+7fYEDR8w35Y0XFT+1ze0umwfTcrJFdK7i5A0uLfFHoaxXw8 GNkW+7x3wj5oFPpSV+XK5STbUYdRJuMJIMcIrPq03QzF1xDhwUcNtL4y2VvYvq6i2V6u MQUdwsmvsxXWWnT9L4PJYroJHyv5WZRPtkCQA9YXGXpYcEQKqqnGd5PzsC+90CzEyYpB giLw== X-Gm-Message-State: AA+aEWZYY7clmQXFdIu4MSc9w4h9T4/bQ/iDU3W7aozc7OoXjW0oimXo UcWqvnbRT/8eNaY0nQvCZBIrZWAGs1v3A9VLyX6nmA== X-Google-Smtp-Source: AFSGD/X9YJE2BG7jUXllh6O55lkGKjXgCgnKj+D/S4bv4oApyp6D+U03HMgIdrrJTBP90HbTsWZXlHcSSqhPd2xLGK0= X-Received: by 2002:a37:9181:: with SMTP id t123mr19602653qkd.187.1544663120468; Wed, 12 Dec 2018 17:05:20 -0800 (PST) MIME-Version: 1.0 References: <367298.45441.qm@web103901.mail.ssk.yahoo.co.jp> In-Reply-To: From: Juli Mallett Date: Wed, 12 Dec 2018 17:04:44 -0800 Message-ID: Subject: Re: MIPS future... To: Warner Losh Cc: yamori813@yahoo.co.jp, freebsd-mips@freebsd.org X-Rspamd-Queue-Id: 0FBA78A1F6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=northcloak-com.20150623.gappssmtp.com header.s=20150623 header.b=aiB/ozSP X-Spamd-Result: default: False [-4.64 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; R_DKIM_ALLOW(-0.20)[northcloak-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; DMARC_NA(0.00)[northcloak.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[northcloak-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[ASPMX3.GOOGLEMAIL.com,ALT2.ASPMX.L.GOOGLE.com,ASPMX.L.GOOGLE.com,ALT1.ASPMX.L.GOOGLE.com,ASPMX2.GOOGLEMAIL.com,ASPMX5.GOOGLEMAIL.com,ASPMX4.GOOGLEMAIL.com]; RCVD_IN_DNSWL_NONE(0.00)[4.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_CC(0.00)[yahoo.co.jp]; IP_SCORE(-2.35)[ip: (-8.81), ipnet: 2607:f8b0::/32(-1.58), asn: 15169(-1.29), country: US(-0.09)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 01:05:22 -0000 On Wed, 12 Dec 2018 at 16:12, Warner Losh wrote: > On Wed, Dec 12, 2018 at 3:53 PM Mori Hiroki wrote: > > > > > > > Hi > > > > > > ----- Original Message ----- > > >From: Warner Losh > > >To: "freebsd-mips@freebsd.org" > > >Date: 2018/12/13, Thu 07:15 > > >Subject: Re: MIPS future... > > > > > >On Wed, Dec 12, 2018 at 11:15 AM Warner Losh wrote: > > > > > >> OK. To be a good player in the FreeBSD ecosystem, we need to do a few > > >> things. > > >> > > >> First, we need to implement atomic_swap_64. hps did this for mips64 > and > > >> committed it. He sent me some further patches for it that I need to > > commit > > >> when I get a change, maybe at the airport tonight. > > >> > > >> But this brings up a couple of issues I'd like to bring up. > > >> > > >> First, to implement atomic_swap_64 on mips-32 is hard. In that it's > not > > >> just the canonical ldd/sdd sequence because those aren't available > > there. > > >> We can do the standard trick of reading STATUS0, clearing IE, storing > > it, > > >> do the operation and then restoring STATUS0. This is efficient enough > > for > > >> the use in the kernel for the supported cores we have. > > >> > > >> With two exceptions. First is running 32-bit kernels on 64-bit > hardware. > > >> We deprecated that with Octeon because of the weird hacks we needed to > > do > > >> too make it work. I'd like to universally deprecate this. There's > little > > >> benefit and a real cost to doing this. I'd like to remove the > SWARM_SMP, > > >> XLP, and GXEMUL32 (or at least remove the smp option). > > >> > > >> But there's JZ4780. It's a legit mips32 + SMP. It's on Image Creator's > > >> CI20. This was released in Nov 2014 with a refresh in March 2015. This > > is a > > >> dead-end product line (there's no new cores and none new that I can > > find). > > >> This was a RPi competitor, but it was slower, less capable and more > > >> expensive so it's kinda rare now. I'd say we need to de-support this > > >> device. I know of only one user, and he's not responded to my email. I > > >> think 12 will have to be the last release we have this in. Today, the > > only > > >> affect is for some drivers that can't run on this platform, but the > > writing > > >> is on the wall. > > >> > > >> That brings me to my next question: SWARM. Can we kill SWARM entirely? > > >> It's for the BCM1250 part, released in sometime before 2000. It was > > super > > >> popular because it was the reference for a ton of things that > followed. > > I > > >> think it's run is over and we can remove it. I can find no users of it > > in > > >> the nyc dmesg database. Mine has been in a plastic bag since before my > > sone > > >> was born in 2006... So I'm thinking we can remove this platform. It > was > > on > > >> the edge last time I did a GC in mips-land. > > >> > > >> And then there's the even larger question: how many people are still > > using > > >> mips32? It looks like a fair number, maybe, but I have no idea for > > sure, so > > >> if you do, please provide feedback on the platforms you are running > > FreeBSD > > >> 11 or newer on. > > >> > > > > > >There's one last issue this brings up. When writing the above code, I > > >discovered I could use the non-racy DI instruction. However, that was > > >introduced with mips32r2. This was defined in 2002 and gear appeared in > > the > > >market 2004 or 2005. I believe that all supported SoCs have mips32r2. > > SWARM > > >doesn't, which is another reason to kill it: it's getting in the way and > > >providing no benefit. Would anybody object to the minimum ISA being > raised > > >to mips32r2 for all 32-bit mips platforms? > > > > > >Warner > > >_______________________________________________ > > >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" > > > > > > > > > > > > > mips32 is called by 4K > > mips32r2 is called by 24K > I would note that although MIPS (the company) pushed this naming for a period in the '00s, it can be confusing, because the R4000 (which was widely called R4K or sometimes even just 4K), which was the basis for a lot of MIPS CPUs, is actually MIPS-III (or mips3 in modern parlance, but I'm trapped in the '90s), and 64-bit rather than 32-bit. MIPS32, of course, is actually MIPS-III narrowed to 32-bit, plus a little extra. This leads some people to assume that MIPS32 came first, and then there were 64-bit CPUs, but this is not so. MIPS-III was 64-bit, R4000 was 64-bit, as were R4400, and all of the SGI CPUs and many third-party MIPS ISA CPUs of the late '90s. So I would slightly discourage use of the "4K" moniker and rather suggest using the ISA names, even though those confuse people, too, as consistently as possible, in a thread where bit-width, modernness, etc., are on the table. > > In current FreeBSD mips support at 4K is Rakink RT2880 and Atheros > > AR531x. Ralink RT3050 later and Newer Atheros is 24K or 74K. > > > > OK. That's good to know. The AR531x boards generally are under-provisioned > for memory, and somewhat slow. The RT2880 appears to be in the same class. > I'd be quite surprised if anybody could do anything non-trivial with those > boards. > > Also Broadcom BCM4712 and BCM5354 is 4K but it's still hangup. Last > > Broadcom MIPS soc that is BCM4718 and BCM5357 is 74K. > > > > So the older SENTRY5 chips, which weren't all that common, but which are > definitely mips4k chips. They are only a little better than the AR531x > chips. The newer BCM stuff still looks relevant. Thanks for the pointers. > > I have question. Can do generate 24K code by gcc 4.2.1 and binutils? > > > > I think that adding the following to the config file > makeoptions ARCH_FLAGS="-march=mips32r2" > comes close. You may need too add -EL if it's little endian. > > The only other config file tagged MIPS4k is GXEMUL, which may have run its > useful lifetime in FreeBSD as well. > > Warner > > P.S. I'll post a summary of the implications of mips32"r1" removal if > there's any opposition. > _______________________________________________ > 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" >