From owner-freebsd-mips@freebsd.org Thu Nov 10 23:37:40 2016 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 09C80C3B6C6; Thu, 10 Nov 2016 23:37:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::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 C36571078; Thu, 10 Nov 2016 23:37:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x22e.google.com with SMTP id u205so78848387itc.0; Thu, 10 Nov 2016 15:37:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=It19lkmJQkHUNsyuVqjVdSf7s5dql/gCrE1ek1VZGSo=; b=zve/JmXYG3yTnnetHgdzV7QB31ZLbEU3UKjoGLnTPRpz6xoxBIyVZY6meSPo8QtRfu FEU5uRtb1B33DkQoaEDFf9fv/HEIZ75wPVBPM28GZxjyG5PrhtBECdhgUBxOaUclFfTJ lX6sR2Q5uv8jQ/4awRVHcBEj41CQ9XKNG9Bn/kFXqFfjRBak3QyOItxZv/W3x+DvOTPi sXMQ24N+A01WLusAYb4hP3aKTiLjVzOJ3/NQb01kXksXH4v9cadSWNclqziDeRzb6oOu gI2p/RfoFjORrLfUPaVD4P4hs6EluccV0WiwibRzXxwax23P8zZPb49OJ2hatKGVSeF9 7+nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=It19lkmJQkHUNsyuVqjVdSf7s5dql/gCrE1ek1VZGSo=; b=kDHNUbFBuLNYKfz8gjrAu262pcN2VMLT6BZ11xWeEZDXQLp/f1E/lhFOdNwdKNaM2i B7rG2+jrNvkWlcvsUMyz2Y/zjNT7Z3Z63R5eobmx6Ur6QeODkQChcpSr/1AJhhKYDhO2 z/xuf9AeuOSUvkwHkUPf6d0WErnArWfS+VAJtIOE+2X4xEMo1Jr3MsUA836R/9pciI0F jqx7CAf5+LnUkeRnzn9lmzgZXck9xMVdt+jnz0ncgHVDpnN/b0h4j2JCw61CyWaMqOcf 7+QIW4Le1nD2UyYlS3xG8bmpCw0STZYSaZNAOYzmBgAnodfAhznTpSbHN3MtqcRuYvYE ZRAw== X-Gm-Message-State: ABUngvfJlFHvg8cCnb56n5wrDl+sRowoZmf/jJQylbX9g69ImGtbxOcIEsaB019e4VV7F6Jn7E9JwYdkDqruvw== X-Received: by 10.107.174.157 with SMTP id n29mr4753135ioo.177.1478821059234; Thu, 10 Nov 2016 15:37:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Thu, 10 Nov 2016 15:37:38 -0800 (PST) In-Reply-To: <20161110213412.GA21672@bsdpad.com> References: <201610311533.u9VFXw2x053156@repo.freebsd.org> <128f2edc-eced-dc8b-72b4-267e1d26bd48@FreeBSD.org> <20161103201059.GA2104@bsdpad.com> <20161110213412.GA21672@bsdpad.com> From: Adrian Chadd Date: Thu, 10 Nov 2016 15:37:38 -0800 Message-ID: Subject: Re: svn commit: r308130 - in head: . gnu/lib/libgcc gnu/usr.bin/binutils gnu/usr.bin/binutils/ld gnu/usr.bin/binutils/libbfd gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb lib/libc lib/libc/mips... To: Ruslan Bukin Cc: "freebsd-mips@freebsd.org" , Bryan Drewery , Ruslan Bukin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 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, 10 Nov 2016 23:37:40 -0000 The places where we set MIPS_SR_COP_1_BIT in locore.S, exception.S. -adrian On 10 November 2016 at 13:34, Ruslan Bukin wrote: > Hi, Adrian, > > thanks, but I have lack of ideas yet. > > I just tested this on Ingenic X1000 (mips.mipsel) and it works fine, > as well as mips.mipselhf (this hardware has FPU). > > I have no hardware without FPU. > > What exactly COP_1 bits you have commented to get rid of COP1_UNUSABLE? > > Ruslan > > On Thu, Nov 10, 2016 at 01:09:20PM -0800, Adrian Chadd wrote: >> ok, so there are two problems with mips now. >> >> * COP1_UNUSABLE - which is now being logged, and we were likely >> triggering it before. The problem: we always turned it on. If I >> comment out flipping on the COP1 bits in the .S files, those >> exceptions go away. >> >> * Page faults, but that may be me with an older userland: >> >> BAD_PAGE_FAULT: pid 1 tid 100001 (init), uid 0: pc 0x404237c0 got a >> read fault (type 0x2) at 0x8 >> Trapframe Register Dump: >> zero: 0 at: 0xffffffffffffffe0 v0: 0x404471b8 v1: >> 0xffffffffffffffff >> a0: 0x404471b8 a1: 0x7ffeea50 a2: 0x16c a3: 0 >> t0: 0 t1: 0 t2: 0 t3: 0x70000011 >> t4: 0x11 t5: 0x70000013 t6: 0x3 t7: 0 >> t8: 0 t9: 0x4041c940 s0: 0 s1: 0x40417000 >> s2: 0x7fffeee0 s3: 0xffffffffffffffff s4: 0xc s5: 0x40427000 >> s6: 0x7fffeecc s7: 0x7ffeea50 k0: 0 k1: 0 >> gp: 0x4044e630 sp: 0x7ffee838 s8: 0x2 ra: 0x404224d4 >> sr: 0xfc13 mullo: 0 mulhi: 0 badvaddr: 0x8 >> cause: 0x8 pc: 0x404237c0 >> Page table info for pc address 0x404237c0: pde = 0x809aa000, pte = 0xa001ba9a >> Dumping 4 words starting at pc address 0x404237c0: >> 8e100008 1600fff1 8f828070 100000a3 >> >> >> >> -adrian >> >> >> On 10 November 2016 at 12:49, Adrian Chadd wrote: >> > hi, >> > >> > This fails to boot on actual mips24k hardware, no hardfloat: >> > >> > COP1_UNUSABLE: pid 1 tid 100001 (init), uid 0: pc 0x404237c0 ra 0x404224d4 >> > Trapframe Register Dump: >> > zero: 0 at: 0xffffffffffffffe0 v0: 0x404471b8 v1: >> > 0xffffffffffffffff >> > >> > .. lots of that the moment we boot userland. >> > >> > >> > >> > -adrian >> > >> > >> > On 3 November 2016 at 13:10, Ruslan Bukin wrote: >> >> On Thu, Nov 03, 2016 at 12:39:48PM -0700, Bryan Drewery wrote: >> >>> On 10/31/16 8:33 AM, Ruslan Bukin wrote: >> >>> > Modified: head/share/mk/bsd.cpu.mk >> >>> > ============================================================================== >> >>> > --- head/share/mk/bsd.cpu.mk Mon Oct 31 15:11:55 2016 (r308129) >> >>> > +++ head/share/mk/bsd.cpu.mk Mon Oct 31 15:33:58 2016 (r308130) >> >>> > @@ -303,6 +303,9 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 >> >>> > >> >>> > .if ${MACHINE_CPUARCH} == "mips" >> >>> > CFLAGS += -G0 >> >>> > +.if ${TARGET_ARCH:Mmips*hf} >> >>> >> >>> TARGET_ARCH is not valid here. This broke building ports. Fixed in >> >>> r308262. >> >>> >> >> >> >> Thank you! >> >> >> >> Ruslan >> >>