From owner-freebsd-arm@freebsd.org Wed Oct 9 14:57:06 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F21D214E42E for ; Wed, 9 Oct 2019 14:57:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46pHPG0PzZz4XYv for ; Wed, 9 Oct 2019 14:57:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id z67so2440418qkb.12 for ; Wed, 09 Oct 2019 07:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B/jbQP+kLYGazjlgwSUZA1wR6XSHYXKU4K7CGavJ3NY=; b=k7Eit9fw6q8mcrrue1zPqByCOa//6FNRRHF9Cw+xcM6PZpxd5NGUIDDUhKYLknwtSM QYLCMCQZ5HzbBwcvzFKthTu4i3XSUZlC9wbFPbiVQzstrfuvwi+5Q1X2aHm4mnutkWYg jN6IcGcLVkNpc9S00YlmT5QhDltyy/voCcOtddOhnXl5QEuvOGANGABe0HiKxNcKaVof WzPLxNw8SPash0dSWAcTHFeA5H++qd5CqWZYknwVLfn4q30qpZbrhezytynstJa+cYE1 Faia2f20Sxd5qGquaaBGNigT5Vmo8wTG6l7r2r7hZNxlPgSU8qtPU2UGSFmJUyoPVHrK +fuQ== 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=B/jbQP+kLYGazjlgwSUZA1wR6XSHYXKU4K7CGavJ3NY=; b=dZWsG3xDkZ08Mcym16whc6nSBjVbWLqPNPJQPWdMJ9N8+iWsfllcTsjQIQvj+lvVAW dUpOoSUok1fg3oQzTfAltzsT79CpC3xFxis48AEPV6DlhWxTyZUN5eoQ2KwmHYsU3KCw x7H3/1mfhDeYysI8rR/vyJtlm/+33ffISGhyWTGhPO3cfyXhsWKbw7UiyZQb9mX8LJMZ 6hfyiIuHTkirB+jurDaxd0Ywsn8X5Aiwp5+DTCCJw/LjPDa3DbJcsZuuwqukb6u03rkR TRtCZkSSWtJ/ww42h7WDc8evP+hujMcRU6bpoRdgEeD/hVtyB0dJRONsadDj6nxl5MQR 5miw== X-Gm-Message-State: APjAAAXV5QhRTtek0s2K7aKKBH/reQQ/+0TISE62SonjQyXSTzfRb50h wxR97JS6gGq2/Wx0/JVqyEiHTAzszNHbxhmseCY6hQ== X-Google-Smtp-Source: APXvYqzhkHuvglJAx5qwieV5RPdEnRS6od48jj/KWnBSd7crlPMzC8ihvVc/Ct5VcDTX53p0M1iFyC8gvZodT6Qc/pE= X-Received: by 2002:a37:a5d3:: with SMTP id o202mr3748205qke.240.1570633024348; Wed, 09 Oct 2019 07:57:04 -0700 (PDT) MIME-Version: 1.0 References: <256784304.3333098.1570612921981.JavaMail.yahoo.ref@jws701102.mail.ssk.yahoo.co.jp> <256784304.3333098.1570612921981.JavaMail.yahoo@jws701102.mail.ssk.yahoo.co.jp> In-Reply-To: <256784304.3333098.1570612921981.JavaMail.yahoo@jws701102.mail.ssk.yahoo.co.jp> From: Warner Losh Date: Wed, 9 Oct 2019 08:56:53 -0600 Message-ID: Subject: Re: arm1136 support on CURRENT To: Mori Hiroki Cc: "freebsd-arm@freebsd.org" X-Rspamd-Queue-Id: 46pHPG0PzZz4XYv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=k7Eit9fw; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::733) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.80 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[3.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]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[yahoo.co.jp]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.80)[ip: (-9.30), ipnet: 2607:f8b0::/32(-2.53), asn: 15169(-2.14), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; 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-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2019 14:57:07 -0000 On Wed, Oct 9, 2019 at 3:22 AM Mori Hiroki wrote: > Hi > > I try to Mindspeed Comcerto 1000 on CURRENT. > > Comcerto 1000 is arm1136. > > I write timer and pic code in kernel. > > http://dmesgd.nycbug.org/index.cgi?do=view&id=5136 > > > Now single user sh is crash. > > arm.armv6 clang default is 1176. But I want > comple on 1136. > > How to comple on 1136 on arm.armv6 ? > You'll run into five different issues. First issue is that clang's code generator is ill-tested for the 1136, so you are likely to find bugs there. Your program died with SIGILL, so this is likely. Second issue is that we turn on bits in the CP of the 1176 that may not be on the 1136. This is relevant because these bits control unaligned access. Third issue is lld. It generates instructions that might not exist on the 1136. I know that's the issue for armv5. Forth, our atomics assume at least a 1176. There was a discussion in one of the code reviews, I think for atomics but may be wrong, about how the code in question wouldn't work generically on armv6, but will on the 1176. Finally, cache stuff is different between the 1176 and the Cortex v7 chips. I recall other discussions that highlighted that the 1176 was different than earlier armv6 processors wrt caches, but can't find them quickly nor do I know if the 1136 is affected. You may be able to get farther with an external gcc, but there's been a long-term assumption that the 1176 is the minimum FreeBSD will run on, and there will be significant resistance to changing that if the changes aren't trivial tweaks in a couple of places. There's also a long-term pressure to raise the minimum FreeBSD will run on (In FreeBSD 13 we plant to remove the last bit of arm support < v6, for example). Were it not for the RPi0, we'd also be looking at trimming the 1176 support as well due to lack of relevance. Bringing FreeBSD up on the 1136 runs counter to these trends. Warner