From owner-freebsd-mips@freebsd.org Wed Aug 23 20:52:46 2017 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 F0A5CDEEC56 for ; Wed, 23 Aug 2017 20:52:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB36781808; Wed, 23 Aug 2017 20:52:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6BEBC10AF0F; Wed, 23 Aug 2017 16:52:45 -0400 (EDT) From: John Baldwin To: FreeBSD mips Cc: dim@freebsd.org Subject: Booted clang-built FreeBSD/mips64 in qemu today Date: Wed, 23 Aug 2017 13:25:54 -0700 Message-ID: <2649255.q7UPx3PEXm@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 23 Aug 2017 16:52:45 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 20:52:47 -0000 FYI, using patches in my 'mips_xbuild' branch on github (https://github.com/freebsd/freebsd/compare/master...bsdjhb:mips_xbuild) I was able to build a mips64 kernel + world with the in-tree clang in HEAD and boot it under qemu. A few limitations are: 1) I had to use external ld.bfd because the in-tree ld.bfd doesn't support multiple GOT sections and isn't able to link rescue 2) lldb doesn't compile on MIPS currently because it has some templates that use 'class A0, class A1, etc.' and the #define's for registers A0 and A1 in wreak havoc on those 3) I had to build with TARGET_CPUTYPE=mips4. One of my patches changes the default -march= for FreeBSD/mips on clang to use mips3 (which should match what in-tree GCC does), but I got a compiler crash that I haven't sat down to debug/reproduce. I'm currently building o32 kernel + world to test those. The installed system still includes the old GPlv2 ld.bfd and can compile binaries using /usr/bin/cc (clang) so long as -integrated-as is specified. (I don't yet have a patch for clang to default to -integrated-as for FreeBSD/mips64 but we should do that eventually.) At some point I will also test N32. The last time I tried to run N32 (probably around 6 months or so ago) under qemu compiled with either in-tree or external GCC it got stuck in an infinite loop inside of init until init exhausted its stack and crashed, so that needs to be debugged first before trying clang for N32. -- John Baldwin From owner-freebsd-mips@freebsd.org Thu Aug 24 04:29:49 2017 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 26BA9DD5463 for ; Thu, 24 Aug 2017 04:29:49 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh503-vm4.bullet.mail.kks.yahoo.co.jp (nh503-vm4.bullet.mail.kks.yahoo.co.jp [183.79.56.190]) by mx1.freebsd.org (Postfix) with SMTP id 9387C698CF for ; Thu, 24 Aug 2017 04:29:48 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.139] by nh503.bullet.mail.kks.yahoo.co.jp with NNFMP; 24 Aug 2017 04:27:15 -0000 Received: from [183.79.101.63] by t502.bullet.mail.kks.yahoo.co.jp with NNFMP; 24 Aug 2017 04:27:15 -0000 Received: from [127.0.0.1] by omp507.mail.kks.yahoo.co.jp with NNFMP; 24 Aug 2017 04:27:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 425929.72313.bm@omp507.mail.kks.yahoo.co.jp Received: (qmail 94926 invoked by uid 60001); 24 Aug 2017 04:27:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1503548835; bh=g6/GfTOthjijYYrfZuLDVrJG84LiZ8BY6M/7iKB++JM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=h4a2R3GamqVnCpuzfvoH5gffD1f/1zUI0VIBpgJkZZ0nCIdubOlNskl/dPH7mVEJUZQ23n+xVZAqnf0YK2irHmJLslZaZVjUjq40hSxPbWwQcA8YbJZPR26UWisUibwkimvDlcqk5NUEOfMb6tBdk3t8xDrjh5/gCTpmdIR0jAg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WUcAsm2bSwxhNJAK++BJEoIZbMWdZx7lMTxrSohD0mMGw206RKpmsclXbmS51VSznu69FgEosQAEf/jqBDndYh3/rmwqSFaHEu+NcQX+fMJTeGXZ2pdYWn0Z1WMxYnmTuq54jjQ3c50cQoeDaujoOikUqtEiCxBTmI0jUr4mig0=; Message-ID: <2796.80438.qm@web101711.mail.ssk.yahoo.co.jp> X-YMail-OSG: X5HvUCsVM1lkiLQ2SmQQL45Ru._h4Ghh1.OrEZARyPUu9TEW4hzl5IeMSTqDpRqpcT_C_TgNIaPnh0WpS2f1U2tSlp0o5ZKJMDBlq1dH_xk80jJ5_bDBog6tQOWNE_nV4ZTMnFZcd6fSh4KuE3vw6bhy_ZelZSUNqeGHQmmID2h4VAOhH_.p7ja9iJsWxVpPze3VUsi59QDFevSQ21G6WGO0FyVMhNM50Fp41W3wc5330BvtydIT8qnLPxQhAgdqUW9P8IdTfG0FxF6j_d.ouK7AkeAmGxX5hcEnXwfin5n6uTOX1C0cvizPCmFUjqgwtNOyQawsUkh800jppKpQj8ltuk23bnoGrLTH0DeiNX711tvmwdSX1ZK72kPL.LjeZCtuvz8vJe5qM_XHvMc63hpjLb_mdmOt2EQMiR_ug79JD.Ob1u_8YC7FDBsVh0qD5ggXCWgWCOOU6arAdrKhvTrBddwisc1T932Dik1En.H465JKcYUIJrk8jtlolgx.wXNGLeZyF4cxzkG7_zv9zj.WKzD7Qbd72UPKMCfjCRDGqt0w3CB_kU53uaZtTj_SiNv4o9lZ8daXKhs71AnCcHcqlKE1Yqw9164KfMg.aB5cNA-- Received: from [203.165.246.165] by web101711.mail.ssk.yahoo.co.jp via HTTP; Thu, 24 Aug 2017 13:27:14 JST X-Mailer: YahooMailWebService/0.8.111_73 X-YMail-JAS: 74rF7bIVM1nm4Iwn0o.IDGlz1PLDLmq3n9HNoXL0wOWs7_qfdDo20pLtXhLelS1XGQ602bn5_e_gv0aIrY3VtLDaBDWavg29lJl8bnZuf8dYTHcn0aQwNJp5SOnEoNDyeq_y References: <319927.83012.qm@web101708.mail.ssk.yahoo.co.jp> <539086.28647.qm@web101720.mail.ssk.yahoo.co.jp> Date: Thu, 24 Aug 2017 13:27:14 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: Re: performance by endian To: Adrian Chadd Cc: "freebsd-mips@freebsd.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 04:29:49 -0000 Hi=0A=0AAR9331 is ONION OMEGA. This module have Winbond W9751G6KB=0ADDR2 me= mory.=0A=0A=0AI checked=A0AR9331 DDR TAP register at boot time.=0A=0ATAP_CO= NTROL_0(0x1800001c) =3D 0xf=0ATAP_CONTROL_1(0x18000020) =3D 0x10 of 0xf=0A= =0AI think this is=A0ar7240_ddr_ap_init() result in=A0u-boot code.=0A=0AI d= on't know what is TAP. But is this relation to this=0Aproblem ?=0A=0AHiroki= Mori=0A=0A----- Original Message -----=0A> From: Adrian Chadd =0A> To: Mori Hiroki =0A> Cc: "freebsd-m= ips@freebsd.org" =0A> Date: 2017/8/15, Tue 06:10= =0A> Subject: Re: performance by endian=0A> =0A> hm, which DDR bus does it = have?=0A> =0A> =0A> =0A> -adrian=0A> =0A> =0A> On 25 July 2017 at 19:09, Mo= ri Hiroki wrote:=0A>> Hi=0A>> =0A>> =0A>> Sorry I= talk about AR9331 soc.=0A>> =0A>> I check boot log.=0A>> =0A>> RT3050 is= this.=0A>> =0A>> =0A>> Cache info:=0A>> =A0 picache_stride=A0 =A0 =3D 40= 96=0A>> =A0 picache_loopcount =3D 8=0A>> =A0 pdcache_stride=A0 =A0 =3D 40= 96=0A>> =A0 pdcache_loopcount =3D 4=0A>> cpu0: MIPS Technologies processo= r v76.150=0A>> =A0 MMU: Standard TLB, 32 entries (4K 16K 64K 256K 1M 16M 6= 4M 256M pg sizes)=0A>> =A0 L1 i-cache: 4 ways of 256 sets, 32 bytes per li= ne=0A>> =A0 L1 d-cache: 4 ways of 128 sets, 32 bytes per line=0A>> =A0 L2= cache: disabled =0A> Config1=3D0xbea3319e=0A>> =A0 Config2=3D0x80000000=0A>> =A0 Config3=3D0x420=0A>> =0A>> AR93= 31 is this.=0A>> =0A>> Cache info:=0A>> =A0 picache_stride=A0 =A0 =3D 409= 6=0A>> =A0 picache_loopcount =3D 16=0A>> =A0 pdcache_stride=A0 =A0 =3D 40= 96=0A>> =A0 pdcache_loopcount =3D 8=0A>> =A0 max line size=A0 =A0 =3D 32= =0A>> cpu0: MIPS Technologies processor v116.147=0A>> =A0 MMU: Standard T= LB, 16 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes)=0A>> =A0 L1 i-ca= che: 4 ways of 512 sets, 32 bytes per line=0A>> =A0 L1 d-cache: 4 ways of = 256 sets, 32 bytes per line=0A>> =A0 L2 cache: disabled=0A>> =A0 Config1= =3D0x9ee3519e=0A>> =A0 Config2=3D0x80000= 000=0A>> =A0 Config3=3D0x20=0A>> =A0 Config7=3D0x0=0A>> =0A>> I seem AR9= 331 have more cache than RT3050.=0A>> =0A>> awk script is this.=0A>> =0A>>= BEGIN {=0A>> =A0 =A0 printf "%d=A5n", fib(32)=0A>> }=0A>> =0A>> functi= on fib(n) {=0A>> =A0 =A0 if (n < 2) return n=0A>> =A0 =A0 return fib(n - = 2) + fib(n - 1)=0A>> }=0A>> =0A>> ----- Original Message -----=0A>>> Fro= m: Adrian Chadd =0A>>> To: Mori Hiroki =0A>>> Cc: "freebsd-mips@freebsd.org" =0A> =0A>>> Date: 2017/7/26, Wed 02:14=0A>>> Subject: Re: performance b= y endian=0A>>> =0A>>> well, how much cache, how much out-of-order is it? T= he AR9330 SoC has=0A>>> very limited cache :(=0A>>> =0A>>> =0A>>> =0A>>> = -adrian=0A>>> =0A>>> =0A>>> On 24 July 2017 at 00:53, Mori Hiroki =0A> wrote:=0A>>>> =A0 Hi.=0A>>>> =0A>>>> =A0 I checked fib= (32) by awk script.=0A>>>> =0A>>>> =A0 RT3050 is 80 sec=0A>>>> =A0 AR9330 i= s 99 sec=0A>>>> =0A>>>> =0A>>>> =A0 AR9330 is newer and clock is hight. But= slow.=0A>>>> =0A>>>> =A0 Why this result ?=0A>>>> =0A>>>> =A0 I suspect th= is is endian issue.=0A>>>> =0A>>>> =A0 I have problem mruby performance at = Atheros SOC.=0A>>>> =A0 It is slow almost double from same clock little=0A>= >>> =A0 endian mips soc.=0A>>>> =0A>>>> =A0 Regards=0A>>>> =0A>>>> =A0 Hiro= ki Mori=0A>>>> =A0 _______________________________________________=0A>>>> = =A0 freebsd-mips@freebsd.org mailing list=0A>>>> =A0 https://lists.freebsd.= org/mailman/listinfo/freebsd-mips=0A>>>> =A0 To unsubscribe, send any mail = to=0A>>> "freebsd-mips-unsubscribe@freebsd.org"=0A>>> =0A> From owner-freebsd-mips@freebsd.org Thu Aug 24 21:52:06 2017 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 C24EDDE8CA8 for ; Thu, 24 Aug 2017 21:52:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (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 8891E676CA for ; Thu, 24 Aug 2017 21:52:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id x21so4355882ywg.2 for ; Thu, 24 Aug 2017 14:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oAITh3sKG1gTb5WljmMlvBSV7V3VbZtLIUqGi/uP6Qc=; b=f4m7aw6sO/iL/aXjMpPYigb7jq016mn6OSHrOEYruxjPyiwVrBmTvHPY6Vz/zpWU8m igEjfA8Rq0yXbSJ/t8z7WKXTIvzxKJpivB6Zb+FMH+4id9+lEIiruFU6opIiYwMIQhzT l1qzk4zlxlB/hxIdwsyt7PIriBGvmUCCW8TmJb6+bfH5rYEw9r8qVtczOKhYsLds3x+R 0Lv6mytVM9ORkFRgCRTbzlR4PcHjINE6plEKFteCbkaSQ9zWGclV5O675jDKicZvtmvZ fHGjNM/ri7ZzvS5jHKzMZ+Ewv1KFWqPN1girMh/67YS7Oa1pp3RJSqKnyAH3MV4DRytl dNkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=oAITh3sKG1gTb5WljmMlvBSV7V3VbZtLIUqGi/uP6Qc=; b=IQpVfjT4WZamJB03Uftf3nmNM5NhOnmBxkMlEJua9jWkEcAtoMkwZGcKwq+xBXqL1x rmK2tkD7iUZTgQQVzDzZiWqbZvKYr5nItUnFnSuTd86l5YaffpGHfEWQsI5RgPHyAOJQ YGDi88I/aMfjoiXM2IbJvsGTwOSuaMNgN9EKxXHY0f2boVci+r1o2xK+uf+/n2za86Mw E3DCr2q7ydXC4y/xRC+mdNt3mBtxM9MYKtbFgXJ4zOvDEswTY98+e8dVHGFaDbt8GjEt tVNZvjH/UJOeA1pkmphu3nxDLmoQ5HnE9VGUmEGg49UEQKCERNVtgXNTWdbNeRDQ2J0r vitA== X-Gm-Message-State: AHYfb5h/H6CKyWcpayXlO7PvhUqbn4BF6It2gBWLJfZCLVr9MTfJjF5p xPQciq+BdQSc3ypSs3swxFRl1K5vEg== X-Received: by 10.37.230.78 with SMTP id d75mr944692ybh.230.1503611525439; Thu, 24 Aug 2017 14:52:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.109.73 with HTTP; Thu, 24 Aug 2017 14:52:04 -0700 (PDT) In-Reply-To: <2796.80438.qm@web101711.mail.ssk.yahoo.co.jp> References: <319927.83012.qm@web101708.mail.ssk.yahoo.co.jp> <539086.28647.qm@web101720.mail.ssk.yahoo.co.jp> <2796.80438.qm@web101711.mail.ssk.yahoo.co.jp> From: Adrian Chadd Date: Thu, 24 Aug 2017 14:52:04 -0700 Message-ID: Subject: Re: performance by endian To: Mori Hiroki 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.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 21:52:06 -0000 Hi, 1c is DQS delay tap control byte 0 (DDR D0..D7); 20 is DQS delay tap control byte 1 (DDR D8..D15.) 0xf is: 4:0 TAP_L 0x5 Tap setting for lower 32-level delay chain for both registers= . It's to do with DDR timing. We'd have to look at the DDR2 chip and the config path to see what the appropriate values are. -adrian On 23 August 2017 at 21:27, Mori Hiroki wrote: > Hi > > AR9331 is ONION OMEGA. This module have Winbond W9751G6KB > DDR2 memory. > > > I checked AR9331 DDR TAP register at boot time. > > TAP_CONTROL_0(0x1800001c) =3D 0xf > TAP_CONTROL_1(0x18000020) =3D 0x10 of 0xf > > I think this is ar7240_ddr_ap_init() result in u-boot code. > > I don't know what is TAP. But is this relation to this > problem ? > > Hiroki Mori > > ----- Original Message ----- >> From: Adrian Chadd >> To: Mori Hiroki >> Cc: "freebsd-mips@freebsd.org" >> Date: 2017/8/15, Tue 06:10 >> Subject: Re: performance by endian >> >> hm, which DDR bus does it have? >> >> >> >> -adrian >> >> >> On 25 July 2017 at 19:09, Mori Hiroki wrote: >>> Hi >>> >>> >>> Sorry I talk about AR9331 soc. >>> >>> I check boot log. >>> >>> RT3050 is this. >>> >>> >>> Cache info: >>> picache_stride =3D 4096 >>> picache_loopcount =3D 8 >>> pdcache_stride =3D 4096 >>> pdcache_loopcount =3D 4 >>> cpu0: MIPS Technologies processor v76.150 >>> MMU: Standard TLB, 32 entries (4K 16K 64K 256K 1M 16M 64M 256M pg si= zes) >>> L1 i-cache: 4 ways of 256 sets, 32 bytes per line >>> L1 d-cache: 4 ways of 128 sets, 32 bytes per line >>> L2 cache: disabled >> Config1=3D0xbea3319e >>> Config2=3D0x80000000 >>> Config3=3D0x420 >>> >>> AR9331 is this. >>> >>> Cache info: >>> picache_stride =3D 4096 >>> picache_loopcount =3D 16 >>> pdcache_stride =3D 4096 >>> pdcache_loopcount =3D 8 >>> max line size =3D 32 >>> cpu0: MIPS Technologies processor v116.147 >>> MMU: Standard TLB, 16 entries (4K 16K 64K 256K 1M 16M 64M 256M pg si= zes) >>> L1 i-cache: 4 ways of 512 sets, 32 bytes per line >>> L1 d-cache: 4 ways of 256 sets, 32 bytes per line >>> L2 cache: disabled >>> Config1=3D0x9ee3519e >>> Config2=3D0x80000000 >>> Config3=3D0x20 >>> Config7=3D0x0 >>> >>> I seem AR9331 have more cache than RT3050. >>> >>> awk script is this. >>> >>> BEGIN { >>> printf "%d=C2=A5n", fib(32) >>> } >>> >>> function fib(n) { >>> if (n < 2) return n >>> return fib(n - 2) + fib(n - 1) >>> } >>> >>> ----- Original Message ----- >>>> From: Adrian Chadd >>>> To: Mori Hiroki >>>> Cc: "freebsd-mips@freebsd.org" >> >>>> Date: 2017/7/26, Wed 02:14 >>>> Subject: Re: performance by endian >>>> >>>> well, how much cache, how much out-of-order is it? The AR9330 SoC has >>>> very limited cache :( >>>> >>>> >>>> >>>> -adrian >>>> >>>> >>>> On 24 July 2017 at 00:53, Mori Hiroki >> wrote: >>>>> Hi. >>>>> >>>>> I checked fib(32) by awk script. >>>>> >>>>> RT3050 is 80 sec >>>>> AR9330 is 99 sec >>>>> >>>>> >>>>> AR9330 is newer and clock is hight. But slow. >>>>> >>>>> Why this result ? >>>>> >>>>> I suspect this is endian issue. >>>>> >>>>> I have problem mruby performance at Atheros SOC. >>>>> It is slow almost double from same clock little >>>>> endian mips soc. >>>>> >>>>> Regards >>>>> >>>>> Hiroki Mori >>>>> _______________________________________________ >>>>> 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 Sat Aug 26 00:26:22 2017 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 B72B0DE4D79 for ; Sat, 26 Aug 2017 00:26:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88366769EC for ; Sat, 26 Aug 2017 00:26:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id ED8F210AF07 for ; Fri, 25 Aug 2017 20:26:19 -0400 (EDT) From: John Baldwin To: freebsd-mips@freebsd.org Subject: Re: svn commit: r322915 - head/contrib/compiler-rt/lib/builtins Date: Fri, 25 Aug 2017 17:26:13 -0700 Message-ID: <22196862.mDqZGdaYp0@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201708260017.v7Q0Hv9f054007@repo.freebsd.org> References: <201708260017.v7Q0Hv9f054007@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 25 Aug 2017 20:26:20 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Aug 2017 00:26:22 -0000 On Saturday, August 26, 2017 12:17:57 AM John Baldwin wrote: > Author: jhb > Date: Sat Aug 26 00:17:57 2017 > New Revision: 322915 > URL: https://svnweb.freebsd.org/changeset/base/322915 > > Log: > Extend the workaround for LLVM bug 11663 to MIPS N32. > > This fixes infinite recursion in /sbin/init for MIPS N32. > > Submitted by: Robert M. Kovacsics > MFC after: 1 week > Sponsored by: DARPA / AFRL With this fix (and some minor changes in the kernel to fix int-to-pointer-cast warnings) I was able to boot a MALTAN32 kernel with an n32 world (built with GCC 4.2.1) under qemu-system-mips64. I'm going to test external GCC next before seeing what kind of carnage clang wreaks. FYI, I've run into a few issues getting o32 built with clang to boot. I first tried to use in-tree ld.bfd which while it linked a full world, the /bin/sh binary was corrupted (in some places it had 'jal 0' rather than than a jump to a real symbol, in particular in __start() in crt1.c where it tries to call 'atexit(cleanup)'). Using external ld.bfd fixed that, but the resulting /bin/sh binary uses additional relocations (that N64 curiously doesn't), including R_MIPS_COPY. The /bin/sh binary also has a .pltrel which rtld doesn't currently grok, but I'm working on. -- John Baldwin