From owner-freebsd-arm@freebsd.org Mon Nov 28 07:46:21 2016 Return-Path: Delivered-To: freebsd-arm@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 B8545C59BB7 for ; Mon, 28 Nov 2016 07:46:21 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from deinprogramm.de (deinprogramm.de [88.198.58.179]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC161F04 for ; Mon, 28 Nov 2016 07:46:21 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from jellaby.local (unknown [195.52.203.132]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by deinprogramm.de (Postfix) with ESMTPSA id 3170F3028B; Mon, 28 Nov 2016 07:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=deinprogramm.de; s=default; t=1480319173; bh=9GOSRJqdvzxs2ozxYJsZ0KV1iG2a+/nIuecNkAHB4ls=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=G2sKiV/8T1iGPVC76oH2RVOBjXbe40lRteaWo8qFRaRjUAl0mNvSswy3/IViQtCk9 CuLe5g1bkwWLinrke6Zftm7nPWyy7zdoLccsz2ZQlurGl6VrNUDnr+ls6c2ddEOdDy /wlehCU8bmmvxVWKUbg5YDTY6HMjQxMpKl+qlzqU= Received: from jellaby.local.deinprogramm.de (localhost [IPv6:::1]) by jellaby.local (Postfix) with ESMTP id 084F99343686; Mon, 28 Nov 2016 08:46:14 +0100 (CET) From: Michael Sperber To: Mark Millard Cc: freebsd-arm Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> Date: Mon, 28 Nov 2016 08:46:13 +0100 In-Reply-To: <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> (Mark Millard's message of "Thu, 24 Nov 2016 14:00:13 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 07:46:21 -0000 Mark Millard writes: > I use one of those from adafruit for a BPi-M3, a RPI2B V1.1, or a Pine64. (Thanks for the all the help on this!) So I found one one of those, and did cu -k /dev/cuaU0 -s 115200 from my FreeBSD host box: Absolutely nothing. As per this: https://github.com/freebsd/crochet/tree/master/board/BananaPi-M3 I tried reversing the pins, but that also didn't yield any output whatsoever. Any suggestions? I'd be cool if there were an image known to be working somewhere ... -- Regards, Mike From owner-freebsd-arm@freebsd.org Mon Nov 28 08:20:42 2016 Return-Path: Delivered-To: freebsd-arm@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 BAA27C575A1 for ; Mon, 28 Nov 2016 08:20:42 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-32.reflexion.net [208.70.210.32]) (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 6E68D1DA6 for ; Mon, 28 Nov 2016 08:20:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 29363 invoked from network); 28 Nov 2016 08:20:18 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 28 Nov 2016 08:20:18 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Mon, 28 Nov 2016 03:20:40 -0500 (EST) Received: (qmail 9007 invoked from network); 28 Nov 2016 08:20:40 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 28 Nov 2016 08:20:40 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 17D3DEC8A89; Mon, 28 Nov 2016 00:20:33 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 From: Mark Millard In-Reply-To: Date: Mon, 28 Nov 2016 00:20:32 -0800 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> To: Michael Sperber X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 08:20:42 -0000 On 2016-Nov-27, at 11:46 PM, Michael Sperber wrote: > Mark Millard writes: >=20 >> I use one of those from adafruit for a BPi-M3, a RPI2B V1.1, or a = Pine64. >=20 > (Thanks for the all the help on this!) >=20 > So I found one one of those, and did >=20 > cu -k /dev/cuaU0 -s 115200 I happen to use an old Mac OS X laptop to monitor the serial connection, not FreeBSD. Even the software I use is from the App Store (better = drivers from what I read). So I've not tried such with FreeBSD and have no observation of what works vs. does not. > from my FreeBSD host box: Absolutely nothing. As per this: >=20 > https://github.com/freebsd/crochet/tree/master/board/BananaPi-M3 >=20 > I tried reversing the pins, but that also didn't yield any output > whatsoever. Black <-> Gnd Green <-> Rx (middle pin of the 3) White <-> Tx Red not connected > Any suggestions? I'd be cool if there were an image known to be = working > somewhere ... Before I tried FreeBSD on the BPi-M3 I tried an Official Linux for it. http://www.banana-pi.org/m3-download.html I knew up front that there were no FreeBSD snapshot images or other such and I did not want to confuse DOA power supplies or a DOA board or such with problematical software builds/installations. I tested the serial connection, HDMI, USB keyboard/mouse, and Ethernet so I'd know what worked vs. what did not and that I had my environment well set up. I know that, for example, FreeBSD does not do HDMI yet for the BPi-M3. (All the more important to check it up front.) =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-arm@freebsd.org Mon Nov 28 14:36:17 2016 Return-Path: Delivered-To: freebsd-arm@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 8C427C59DE8 for ; Mon, 28 Nov 2016 14:36:17 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh502-vm3.bullet.mail.kks.yahoo.co.jp (nh502-vm3.bullet.mail.kks.yahoo.co.jp [183.79.56.148]) by mx1.freebsd.org (Postfix) with SMTP id F22F817F0 for ; Mon, 28 Nov 2016 14:36:16 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.139] by nh502.bullet.mail.kks.yahoo.co.jp with NNFMP; 28 Nov 2016 14:33:57 -0000 Received: from [183.79.100.134] by t502.bullet.mail.kks.yahoo.co.jp with NNFMP; 28 Nov 2016 14:33:57 -0000 Received: from [127.0.0.1] by omp503.mail.kks.yahoo.co.jp with NNFMP; 28 Nov 2016 14:33:57 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 378318.33143.bm@omp503.mail.kks.yahoo.co.jp Received: (qmail 52899 invoked by uid 60001); 28 Nov 2016 14:33:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1480343637; bh=AbM7qR0ZX6MbZnFv2fbjaprQEZR3CxMvAG6LBvkYfP0=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=RJVSyndHpnXZcobtuDhLOp5Ai2C1o14odcrFtuA1ik+iyQdyj6d1HDYlvzNvSPz4v2sNQUq6LdVeJRhl6YeKWsT3YfmnI/Joi0maZOfnB+S5RdW+In9yoAmZ4v/pGMwCQug3CNFAIx80Yu5sEADv30MyFXv4nc6cXMY3e4kdBQQ= 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:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WXUVFGxvABH3YKZp18xLL/skQBSORcmThVMht5CMsWEIow+bmljg5jS+yaxx6xfiM7384XX5SuJVEllUwFuvebqTd4a2OrNvWnfi5YSXooLJwZcD4XvD3TDnsr4ALGfvpJpVT3ctByy5NA4fj1YwP9Onjb8NT1YNDyWqyijiq/A=; Message-ID: <105386.51359.qm@web101710.mail.ssk.yahoo.co.jp> X-YMail-OSG: ELfFNMYVM1ktmTiv9_qayMr9CZ_IXo9U9JQ8sPsQqRCuxDT9suTx_I6tWKE2K3Yer0V8scgBw4LJDizsNzMdsqDcKAz1zD9SRBtISOULfNhiJswgE7zrJflSgfGlKha9mJQ.dM5TnQiQ0jst5_9N.7SEPJD3vjUtbaacxhk1uxaKSR3rxmCJYP2JJaOav5r3dGjhbcIDxJ4V6KEcc_Ssp_g60.kVx9faXf1xT0GrmYXXzfRkxH8lQW3fCh5WoFJuaTpCtEKltoEGx00ni2_gHNAwhCImjEeayqujBuoF5MC8CMEicWRv6LZD_Vk9oteH458YQMsY445dPGy1CWvL2UIuLTOqB54mlem644ZMDSbfeIcuVUhK78pNgf3ZW3zFHqCHHXhGwm4TPbyfMND90xWRcogTsLFw_vyUf_ItA1Tpdqaafa47cJK.6cLR4sm4hC5_z6g0S0ZxSDqu3OaOPglUl4xEpQGuXsqx6VOj3IhORUZSUMQa6ewDclEiv734ZkRAxOXJ0POYakbmf6WxZezMkqD.dCZ5Z05KBU5XIs5WUIm4JkQBUJBp Received: from [110.134.192.208] by web101710.mail.ssk.yahoo.co.jp via HTTP; Mon, 28 Nov 2016 23:33:56 JST X-Mailer: YahooMailWebService/0.8.111_70 X-YMail-JAS: T5_FdloVM1l0OpTFEZwtlyx5U6djRygFHJveEo5rh5SEoxRwx2kMSaLaNeJJI63jFfPiC_T0VJ2vQAaNO09t_tL38Wwdl8_Mk98E0_D2d8C4S0nhmXvCcbwKSpbKPIe6dgkX Date: Mon, 28 Nov 2016 23:33:56 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: FDT_DTB_STATIC and LINUX_BOOT_ABI To: "freebsd-arm@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 14:36:17 -0000 Hi.=0A=0AI have problem at u-boot arm module.=0A=0AI found double size memo= ry.=0A=0ABecause of u-boot parameter have=A0ATAG_MEM and dts have memory en= tory.=0AIt's doble count.=0A=0AI think check=A0FDT_DTB_STATIC at=A0linux_pa= rse_boot_param()=A0is good.=0A=0A#if !defined(FDT_DTB_STATIC)=0A=0A=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0=A0case ATAG_MEM:=0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 arm_physmem_hardware_region(walker->u.tag_mem.start,=0A=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 walker->u.tag_mem.size)= ;=0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;=0A#endif=0A=0AHo= w about this?=0A=0ARegards=0A=0AHiroki Mori From owner-freebsd-arm@freebsd.org Tue Nov 29 03:17:46 2016 Return-Path: Delivered-To: freebsd-arm@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 5C951C5AC9B for ; Tue, 29 Nov 2016 03:17:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 F1D031C37 for ; Tue, 29 Nov 2016 03:17:45 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 667555cb-b5e2-11e6-b17f-19517aec265d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 667555cb-b5e2-11e6-b17f-19517aec265d; Tue, 29 Nov 2016 03:17:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id uAT3HYqc017173; Mon, 28 Nov 2016 20:17:34 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1480389454.1889.153.camel@freebsd.org> Subject: Re: FDT_DTB_STATIC and LINUX_BOOT_ABI From: Ian Lepore To: Mori Hiroki , "freebsd-arm@freebsd.org" Date: Mon, 28 Nov 2016 20:17:34 -0700 In-Reply-To: <105386.51359.qm@web101710.mail.ssk.yahoo.co.jp> References: <105386.51359.qm@web101710.mail.ssk.yahoo.co.jp> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 03:17:46 -0000 On Mon, 2016-11-28 at 23:33 +0900, Mori Hiroki wrote: > Hi. > > I have problem at u-boot arm module. > > I found double size memory. > > Because of u-boot parameter have ATAG_MEM and dts have memory entory. > It's doble count. > > I think check FDT_DTB_STATIC at linux_parse_boot_param() is good. > > #if !defined(FDT_DTB_STATIC) > >                 case ATAG_MEM:                        > arm_physmem_hardware_region(walker->u.tag_mem.start, >                             walker->u.tag_mem.size); >                         break; > #endif > > How about this? > > Regards > > Hiroki Mori What if someone wants to use a static dtb, but leaves the memory out of it so that u-boot can report the actual memory via atag? I think a better fix might be to have arm_physmem_hardware_region() handle the case where the same region is added twice. Can you do a verbose boot, or on a running system break into the kernel debugger using " ~ ^B" and do a "show physmem" (then you can "cont" to resume running the kernel).  I'm looking for this output: Physical memory chunk(s):   0x00001000 - 0x1dffffff,   479 MB ( 122879 pages) Excluded memory regions:   0x00400000 - 0x00d44fff,     9 MB (   2373 pages) NoAlloc   0x08000000 - 0x0fffffff,   128 MB (  32768 pages) NoAlloc NoDump -- Ian From owner-freebsd-arm@freebsd.org Tue Nov 29 20:56:31 2016 Return-Path: Delivered-To: freebsd-arm@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 B7443C5B1FC for ; Tue, 29 Nov 2016 20:56:31 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 A2B821F95 for ; Tue, 29 Nov 2016 20:56:31 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [208.184.220.60] (helo=[10.112.203.32]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1cBpRw-000Gv2-74 for freebsd-arm@freebsd.org; Tue, 29 Nov 2016 12:56:25 -0800 From: Oleksandr Tymoshenko Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: SMP support for Raspberry Pi 3 Message-Id: <69A40241-CD89-4AFA-BA35-32EEB2663FDE@bluezbox.com> Date: Tue, 29 Nov 2016 12:55:53 -0800 To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3251) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Hello, SMP support for Raspberry Pi 3 is in usable state now. I didn’t run any load tests, only checked that all four cores are started on boot. Short instruction: [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 20:56:31 -0000 Hello, SMP support for Raspberry Pi 3 is in usable state now. I didn=E2=80=99t = run any load tests, only checked that all four cores are started on boot. Short instruction: - Build GENERIC arm64 kernel for your image, not GENERIC-UP - Copy https://people.freebsd.org/~gonzo/arm/rpi3-smp/u-boot.bin and https://people.freebsd.org/~gonzo/arm/rpi3-smp/armstub8.bin to FAT partition on SD card. - Edit config.txt: change value of device_tree_address parameter: device_tree_address=3D0x4000 - Reboot device. It should boot with all four cores enabled and reboot should work too. More detailed description of what all these binaries/changes contain is in these two posts: https://kernelnomicon.org/?p=3D714 https://kernelnomicon.org/?p=3D718 Please note that FreeBSD/arm64 has been broken by clang 3.9.0 import and you will have to update aarch64-binutils to the 2.27_5 to get it booting. Details: https://reviews.freebsd.org/D8622 --=20 gonzo From owner-freebsd-arm@freebsd.org Tue Nov 29 21:44:43 2016 Return-Path: Delivered-To: freebsd-arm@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 3B2D6C5C2D5 for ; Tue, 29 Nov 2016 21:44:43 +0000 (UTC) (envelope-from eddy.petrisor@gmail.com) Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::22a]) (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 E5032188E for ; Tue, 29 Nov 2016 21:44:42 +0000 (UTC) (envelope-from eddy.petrisor@gmail.com) Received: by mail-ua0-x22a.google.com with SMTP id b35so192906851uaa.3 for ; Tue, 29 Nov 2016 13:44:42 -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; bh=oab0pEo07fW2W1QN37vKqPF4u+xSk/SQ8lwUUkce7TM=; b=ZGpKjhAKpYwG5mQta/Ex28KKi8IjMvqRYsoRWjUndMOgu2S+w7/ZfFeY4KOCyeMk9J DoJ2ESgI2truP62XeB387+sKoSLuCQzNeBOz3T5vSZaB/KSbe4FZX4siFxdfb+MLRsjS Z3u13Wj9fnX/iIYxyxNEeGQtjT4ZXRjiSajK73jvGJL8DpU8bm2Gy1A2RVhCA4L+Mcqh /9X/Wiljv3y2HF9gz3hQ09169MBQ+CZV3jGGTjgAaq5nIESlT1A3kZGMchWRJu0gyDxw tTHPEImYIr76vHrVAgNFtE16YMStI+Gv4U2ytCPFfGP6paVzpyNdB8fKIAtvrjuUZrCH DHJQ== 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; bh=oab0pEo07fW2W1QN37vKqPF4u+xSk/SQ8lwUUkce7TM=; b=DUCHwjjhNlRVaqxsxqEVBkVHdayAtcB+WdCu9eRbVNkGORW2+sYCN3vM27VLOOXISh 22Qo6FVZmFm+jthZr3UZow+lHM94tvPIIxyA/RudzKTIBh10o4FtAj7t5QCcDzWWkfRY nQwkJgNLsKum89z7PiQyqpyxV9zYxGEuXvoOpqnn/Wzr6WYvAtenadfcq+jDYPBlQY08 4PVcWhEr+danNHcQZr/qBFC/S772A//SK94EAWmtB7qnwP3qCxFHEuG1Xfu9czS76o1u vshTswX7/v6EDpL0uFMu30SLpv84u0zRbYFnwdNFDk+itaaiOAM5Lxmqwc9uUI5zJ0gu cV/A== X-Gm-Message-State: AKaTC03tLBEZG6dbRXy8Ci1cWrmSr7w11dGcNcYxhj9vBwBcvlci1oT83jpT6/UDkpa06eY8FLI29FVCSrcqdQ== X-Received: by 10.176.82.71 with SMTP id j7mr17643483uaa.77.1480455881836; Tue, 29 Nov 2016 13:44:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.49.27 with HTTP; Tue, 29 Nov 2016 13:44:41 -0800 (PST) Received: by 10.159.49.27 with HTTP; Tue, 29 Nov 2016 13:44:41 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Eddy_Petri=C8=99or?= Date: Tue, 29 Nov 2016 23:44:41 +0200 Message-ID: Subject: Alien OS (Linux) cross build support To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 21:44:43 -0000 Hi all, I looked at the current code, the handbook and whatever documentation I could find on the topic, and my conclusion was that alien OS cross building of FreeBSD is NOT supported. Is this correct? Do I need to have a FreeBSD host to cross build for ARM or ARM64? Can I at least build part of the system on a non-FreeBSD host? Was/Is there any effort going on to add this to FreeBSD, NetBSD style? Would it be easier to support first other *BSD hosts, then maybe add Linux? Eddy From owner-freebsd-arm@freebsd.org Tue Nov 29 23:20:35 2016 Return-Path: Delivered-To: freebsd-arm@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 1F95EC5C531 for ; Tue, 29 Nov 2016 23:20:35 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) (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 006491056 for ; Tue, 29 Nov 2016 23:20:34 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=j+KT4HdkWy3Bv/CB46fur21o0TJYOYQyw4/H6ATAiN4=; b=VMs706mWJvRSGOa8e+fNChGkKN 5i/+mClw7AlRNFEtzqYGJnLqGKJm9gUvJYkL3fySFu4yQswsJG4BAG/6rgg64BbdfryDQ4WCrjD7N rZ3pas2Mn/JirtLOxE1bw5HbArOOwrCYB7PVryLqrywHBsCT3XonEqYEWz1QJ+NfT/Sg=; Received: from [114.125.80.70] (port=54587 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cBrhL-001f5w-R3; Tue, 29 Nov 2016 16:20:28 -0700 Date: Wed, 30 Nov 2016 07:20:20 +0800 From: Erich Dollansky To: Oleksandr Tymoshenko Cc: freebsd-arm@freebsd.org Subject: Re: SMP support for Raspberry Pi 3 Message-ID: <20161130072020.3a73b180@X220.alogt.com> In-Reply-To: <69A40241-CD89-4AFA-BA35-32EEB2663FDE@bluezbox.com> References: <69A40241-CD89-4AFA-BA35-32EEB2663FDE@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Authenticated-Sender: sl-508-2.slc.westdc.net: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 23:20:35 -0000 Hi, this is good news. Erich On Tue, 29 Nov 2016 12:55:53 -0800 Oleksandr Tymoshenko wrote: > Hello, >=20 > SMP support for Raspberry Pi 3 is in usable state now. I didn=E2=80=99t r= un > any load tests, only checked that all four cores are started on boot. >=20 > Short instruction: >=20 > - Build GENERIC arm64 kernel for your image, not GENERIC-UP > - Copy https://people.freebsd.org/~gonzo/arm/rpi3-smp/u-boot.bin and > https://people.freebsd.org/~gonzo/arm/rpi3-smp/armstub8.bin to FAT > partition on SD card. > - Edit config.txt: change value of device_tree_address parameter: > device_tree_address=3D0x4000 > - Reboot device. It should boot with all four cores enabled and reboot > should work too. >=20 > More detailed description of what all these binaries/changes contain > is in these two posts: >=20 > https://kernelnomicon.org/?p=3D714 > https://kernelnomicon.org/?p=3D718 >=20 > Please note that FreeBSD/arm64 has been broken by clang 3.9.0 import > and you will have to update aarch64-binutils to the 2.27_5 to get > it booting. Details: https://reviews.freebsd.org/D8622 >=20 From owner-freebsd-arm@freebsd.org Wed Nov 30 03:54:48 2016 Return-Path: Delivered-To: freebsd-arm@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 AED60C59FA4 for ; Wed, 30 Nov 2016 03:54:48 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com [IPv6:2607:f8b0:400e:c05::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 7C1AF1975 for ; Wed, 30 Nov 2016 03:54:48 +0000 (UTC) (envelope-from tim@kientzle.com) Received: by mail-pg0-x233.google.com with SMTP id f188so76666143pgc.3 for ; Tue, 29 Nov 2016 19:54:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kientzle-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=d1ATgPHEuNrVv+EQ8FFGXdHHeeLfjsuf1M5XZRnumHU=; b=WyF1t4AF/Uj2pBKz6Z2KNyeb2nbTrPNfIGNCth6o2I/sUs2qSMfrZcivIudyVikC1O ILl5BWNbQxGMZizMye7Tqq8G9R8aAlxy/uf6g7/5hR6JkmpILyqqItyLus38PiQoYeSW lVg11NWPAFKPI6k+BFgKsCC00dwsa1dEqs03j6vb4y1bjdMGuEjjFQNIqa0/LougSOi9 W4uHSVpiffoGXjkr7ruiPVg0vCCH8eWgWA+8Ax80mSsadRXfwynIkmlL3OVE8owRDvMD znmqUXykPocEqEdi825xc2TB5DvdjpAqd8+ASKDIgb2WfOjChA9RmkzWseDQEkeECDAa KMSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=d1ATgPHEuNrVv+EQ8FFGXdHHeeLfjsuf1M5XZRnumHU=; b=N9pUJMFDe7WpGmNPAQMu4iEnxL/Bbm59Wa/IALeA9Nx5A8+2pKEl3LrYEB9iZt8uxZ Ov8fFymfWR1op2E7ARNOK0FXUEd/H+lU14KJwEudav5QD8VVK5w3Y5F4PZfDYqL1dXkY zQU8GbNmqNDNKEg5TsQvTvwm880dN1sTXPOJ2BL0nUxy/3EYMYTP+gAuTK1wgFwz+whu wLoEx6VWP04r7cq9KqlusNXAAYXGbp2DPkbZKI3XN7C/p2Fbsejw+Zjlwy1lluvNP4LS 8qFJcCGA6lJmvVY8WOVnpsuOmtuGLpYJv7w+1/G4DVBtYXNwLDV7g3D+soFiaANeSXZ8 y0iw== X-Gm-Message-State: AKaTC00ouux93ow7w5Khyh4cXZ3U53n+r0fwrWKaniawTVsFiiDu5+apKoCX8i1JKiRX5Q== X-Received: by 10.99.178.6 with SMTP id x6mr55735691pge.63.1480478087852; Tue, 29 Nov 2016 19:54:47 -0800 (PST) Received: from [192.168.1.101] (c-24-6-102-176.hsd1.ca.comcast.net. [24.6.102.176]) by smtp.gmail.com with ESMTPSA id i76sm98270490pfk.89.2016.11.29.19.54.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Nov 2016 19:54:47 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Alien OS (Linux) cross build support From: Tim Kientzle In-Reply-To: Date: Tue, 29 Nov 2016 19:54:48 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: =?utf-8?Q?Eddy_Petri=C8=99or?= X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 03:54:48 -0000 > On Nov 29, 2016, at 1:44 PM, Eddy Petri=C8=99or = wrote: >=20 > Hi all, >=20 > I looked at the current code, the handbook and whatever documentation = I > could find on the topic, and my conclusion was that alien OS cross = building > of FreeBSD is NOT supported. Is this correct? Do I need to have a = FreeBSD > host to cross build for ARM or ARM64? Can I at least build part of the > system on a non-FreeBSD host? I think that with VM solutions (VirtualBox, VMWare, etc) being so common and easy to use, there hasn=E2=80=99t been much demand for it. For starters, I suggest: * Download and install VirtualBox or some other VM system https://www.virtualbox.org/wiki/Linux_Downloads * Install FreeBSD/amd64 onto it * Build there. Cheers, Tim P.S. FreeBSD has prebuilt images for many boards already. So you could download a prebuilt ARM or ARM64 image, then use that to build a custom image for the same or different hardware. From owner-freebsd-arm@freebsd.org Thu Dec 1 03:31:59 2016 Return-Path: Delivered-To: freebsd-arm@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 1D98DC5EA1D for ; Thu, 1 Dec 2016 03:31:59 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.51.7]) (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 E85E013CC for ; Thu, 1 Dec 2016 03:31:58 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from pool-108-46-177-117.nycmny.fios.verizon.net ([108.46.177.117]:56248 helo=[192.168.64.1]) by vps.hungerhost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cCI6A-0002ke-Rd; Wed, 30 Nov 2016 22:31:50 -0500 From: "George Neville-Neil" To: "Oleksandr Tymoshenko" Cc: freebsd-arm@freebsd.org Subject: Re: SMP support for Raspberry Pi 3 Date: Wed, 30 Nov 2016 22:31:50 -0500 Message-ID: <0E215457-596F-46AE-BF3A-46E59E69552E@neville-neil.com> In-Reply-To: <69A40241-CD89-4AFA-BA35-32EEB2663FDE@bluezbox.com> References: <69A40241-CD89-4AFA-BA35-32EEB2663FDE@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (1.9.6r5310) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Authenticated-Sender: vps.hungerhost.com: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 03:31:59 -0000 On 29 Nov 2016, at 15:55, Oleksandr Tymoshenko wrote: > Hello, > > SMP support for Raspberry Pi 3 is in usable state now. I didn’t run > any load tests, only checked that all four cores are started on boot. > > Short instruction: > > - Build GENERIC arm64 kernel for your image, not GENERIC-UP > - Copy https://people.freebsd.org/~gonzo/arm/rpi3-smp/u-boot.bin and > https://people.freebsd.org/~gonzo/arm/rpi3-smp/armstub8.bin to FAT > partition on SD card. > - Edit config.txt: change value of device_tree_address parameter: > device_tree_address=0x4000 > - Reboot device. It should boot with all four cores enabled and reboot > should work too. > > More detailed description of what all these binaries/changes contain > is in these two posts: > > https://kernelnomicon.org/?p=714 > https://kernelnomicon.org/?p=718 > > Please note that FreeBSD/arm64 has been broken by clang 3.9.0 import > and you will have to update aarch64-binutils to the 2.27_5 to get > it booting. Details: https://reviews.freebsd.org/D8622 > Thanks for all this work! I'm going to be away for about 10 days but will test this on the pi-top I have when I get back. Best, George From owner-freebsd-arm@freebsd.org Thu Dec 1 17:41:10 2016 Return-Path: Delivered-To: freebsd-arm@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 530D1C6113A for ; Thu, 1 Dec 2016 17:41:10 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from deinprogramm.de (deinprogramm.de [88.198.58.179]) by mx1.freebsd.org (Postfix) with ESMTP id 1A4DC1591 for ; Thu, 1 Dec 2016 17:41:09 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from jellaby.local (p4FD1C3DC.dip0.t-ipconnect.de [79.209.195.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by deinprogramm.de (Postfix) with ESMTPSA id 225C43028B for ; Thu, 1 Dec 2016 17:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=deinprogramm.de; s=default; t=1480614062; bh=goSoz6Wgl/bgypivjN9+drJPYr18zfJVJ/WOYzNzMWE=; h=From:To:Subject:References:Date:In-Reply-To; b=lGVwGk3X4bru6e0pJQpH+Gt/4IDCz2nG+pLRG3Dy6xAi7Z76k9Pd80A4NZg2Y1PZX ceajdHLiJtn38YCABTcGLpT2ONKpZbJTVOxy5ODG/rh3FGac5SdByhBXuAUcjLSld+ DApJkCem+99800h0a3MJoJHLVQKfXM8stKKVMzxo= Received: from jellaby.local.deinprogramm.de (localhost [IPv6:::1]) by jellaby.local (Postfix) with ESMTP id AEA0493A51C1 for ; Thu, 1 Dec 2016 18:41:02 +0100 (CET) From: Michael Sperber To: freebsd-arm@freebsd.org Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> Date: Thu, 01 Dec 2016 18:41:02 +0100 In-Reply-To: (Mark Millard's message of "Mon, 28 Nov 2016 00:20:32 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 17:41:10 -0000 Mark Millard writes: > Black <-> Gnd > Green <-> Rx (middle pin of the 3) > White <-> Tx > > Red not connected Ah, thanks! This got me here: Loader variables: Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> ? List of GEOM managed disk devices: da0 diskid/DISK-E79F652A mmcsd1 diskid/DISK-BDA51C2Ds2a ufsid/582fa82db6b4890b diskid/DISK-BDA51C2Ds2 diskid/DISK-BDA51C2Ds1 mmcsd0s2a msdosfs/BOOT diskid/DISK-BDA51C2D mmcsd0s2 mmcsd0s1 mmcsd0 I tried this (not really knowing what I'm doing): mountroot> ufs:/dev/da0s1a Trying to mount root from ufs:/dev/da0s1a []... mountroot: waiting for device /dev/da0s1a... Mounting from ufs:/dev/da0s1a failed with error 19. Any suggestions on how to go on from here? -- Regards, Mike From owner-freebsd-arm@freebsd.org Thu Dec 1 21:46:54 2016 Return-Path: Delivered-To: freebsd-arm@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 81332C6122C for ; Thu, 1 Dec 2016 21:46:54 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-58.reflexion.net [208.70.210.58]) (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 347C71D8A for ; Thu, 1 Dec 2016 21:46:53 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 25090 invoked from network); 1 Dec 2016 21:46:36 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 1 Dec 2016 21:46:36 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Thu, 01 Dec 2016 16:47:03 -0500 (EST) Received: (qmail 29038 invoked from network); 1 Dec 2016 21:47:02 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 1 Dec 2016 21:47:02 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 561DCEC9211; Thu, 1 Dec 2016 13:46:51 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 From: Mark Millard In-Reply-To: Date: Thu, 1 Dec 2016 13:46:50 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> To: Michael Sperber X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 21:46:54 -0000 On 2016-Dec-1, at 9:41 AM, Michael Sperber = wrote: > Mark Millard writes: >=20 >> Black <-> Gnd >> Green <-> Rx (middle pin of the 3) >> White <-> Tx >>=20 >> Red not connected >=20 > Ah, thanks! This got me here: >=20 > Loader variables: >=20 > Manual root filesystem specification: > : [options] > Mount using filesystem > and with the specified (optional) option list. >=20 > eg. ufs:/dev/da0s1a > zfs:tank > cd9660:/dev/cd0 ro > (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) The "eg." list is not based on what is on your FreeBSD machine. The later GEOM is based on what it found on the FreeBSD machine. > ? List valid disk boot devices > . Yield 1 second (for background tasks) > Abort manual input >=20 > mountroot> ? >=20 > List of GEOM managed disk devices: > da0 diskid/DISK-E79F652A mmcsd1 diskid/DISK-BDA51C2Ds2a = ufsid/582fa82db6b4890b diskid/DISK-BDA51C2Ds2 diskid/DISK-BDA51C2Ds1 = mmcsd0s2a msdosfs/BOOT diskid/DISK-BDA51C2D mmcsd0s2 mmcsd0s1 mmcsd0 The root filesystem is a ufs file system. So one way is: ufs:/dev/ufsid/582fa82db6b4890b since it is the only ufsid present. It avoids needing to understand the partition structure and naming. It is based on a unique number stored in the specific ufs file system. But it is more to type accurately. There is also: ufs:/dev/mmcsd0s2a and ufs:/dev/diskid/DISK-BDA51C2Ds2a which have parts of the names identifying partitions directly. mmcsd0 is for where the "disk" is physically plugged in. DISK-BDA51C2D is for the storage device that was plugged in (an ID number that is on the "disk" is involved). But none of the explains why it could not mount the root file system in the first place and the attempt may just fail as well. > I tried this (not really knowing what I'm doing): >=20 > mountroot> ufs:/dev/da0s1a (Variant of the earlier note:) The "eg." list was not based on what is on your FreeBSD machine. The above GEOM list is based on what it found as existing on the FreeBSD machine. > Trying to mount root from ufs:/dev/da0s1a []... > mountroot: waiting for device /dev/da0s1a... > Mounting from ufs:/dev/da0s1a failed with error 19. >=20 > Any suggestions on how to go on from here? =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-arm@freebsd.org Fri Dec 2 11:58:12 2016 Return-Path: Delivered-To: freebsd-arm@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 9C3B6C624E1 for ; Fri, 2 Dec 2016 11:58:12 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from deinprogramm.de (deinprogramm.de [88.198.58.179]) by mx1.freebsd.org (Postfix) with ESMTP id 5D3D01892 for ; Fri, 2 Dec 2016 11:58:12 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from jellaby.local (p4FD1E649.dip0.t-ipconnect.de [79.209.230.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by deinprogramm.de (Postfix) with ESMTPSA id 9EF6E3028B; Fri, 2 Dec 2016 11:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=deinprogramm.de; s=default; t=1480679888; bh=rQF3HcswgrHTYkMK6HvffbijG9NNF0bKec2onQehlvo=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=NCAbbnsN+5Bip9Ox9tmVn7gS7UiKao+O1z+btFqHgv5N+QjWkGn0f0ruNzncnMJIE PzPJdFdd/Z4ASyqK9XNQ1JHVN/yya9MblKlF9PfxsjvORrLWvudb2skur7dmxNSF8M z4hCGbzZMf+EAqniC5QBpDhdFCsyCN3HnDviO8CY= Received: from jellaby.local.deinprogramm.de (localhost [IPv6:::1]) by jellaby.local (Postfix) with ESMTP id 853F393B11AA; Fri, 2 Dec 2016 12:58:09 +0100 (CET) From: Michael Sperber To: Mark Millard Cc: freebsd-arm@freebsd.org Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> Date: Fri, 02 Dec 2016 12:58:09 +0100 In-Reply-To: <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> (Mark Millard's message of "Thu, 1 Dec 2016 13:46:50 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 11:58:12 -0000 Mark Millard writes: > But none of the explains why it could not mount the root > file system in the first place and the attempt may just > fail as well. A closer look revealed this: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SPC-2 SCSI device da0: Serial Number 000000000033 da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present da0: quirks=0x2 So maybe the SD card was just slow. And indeed, with: > ufs:/dev/ufsid/582fa82db6b4890b I get to a login prompt. I tried this in /boot/loader.conf: kern.cam.boot_delay="10000" kern.cam.scsi_delay="3000" ... but that didn't help. Now, I see this: # dmesg | fgrep net awg0: mem 0x1c30000-0x1c300ff on simplebus0 ... but no Ethernet interface here: # ifconfig -a lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21 Any ideas on that one? (BTW, thanks for your patience - very helpful!) -- Regards, Mike From owner-freebsd-arm@freebsd.org Fri Dec 2 21:12:12 2016 Return-Path: Delivered-To: freebsd-arm@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 B9E76C63084 for ; Fri, 2 Dec 2016 21:12:12 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 8D3F710D2 for ; Fri, 2 Dec 2016 21:12:12 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [208.184.220.60] (helo=[10.112.202.219]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1cCv7l-00033L-8Z; Fri, 02 Dec 2016 13:12:06 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Questions about i2c.c (TMP102 temperature sensor) From: Oleksandr Tymoshenko In-Reply-To: <9424D7FD-C4B6-43D5-A0C5-76D5BE9ED1DE@ip-knowhow.com> Date: Fri, 2 Dec 2016 13:11:34 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <58B43D61-0B46-4310-868F-D7336585731B@bluezbox.com> References: <9424D7FD-C4B6-43D5-A0C5-76D5BE9ED1DE@ip-knowhow.com> To: Nick Hibma X-Mailer: Apple Mail (2.3251) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Switching freebsd-embedded@ to freebsd-arm@ since the former does not get as much attention as the latter. > On Dec 1, 2016, at 2:11 AM, Nick Hibma wrote: > > Gents, > > I am not quite sure who to owner of i2c.c is, so perhaps some I2C enthousiast could help me with the following problem. > > I was trying to access a TMP102 I2C temperature sensor. It kind of works with the default i2c utility. But it returns twice the high byte instead of the high and low byte for the temperature. Probably because it does 1 byte reads on the I2C bus, sending a stop condition after every byte. This was verified with a logic analyser. > > The device expects continuous reads and no stop/start in between the 2 bytes. Trying all options i2c, most notably the -m mode switch, yields the same results all the time. Looking at the code in i2c.c I get confused as it seems to somehow fiddle with start/stop to get it right because of the -m switch, but uses read() in the end to get the data, not I2CREAD. > > fd = open(dev, O_RDWR); > if (i2c_opt.width) { > error = ioctl(fd, I2CSTART, &cmd); > error = ioctl(fd, I2CWRITE, &cmd); > if (i2c_opt.mode == I2C_MODE_STOP_START) { > error = ioctl(fd, I2CSTOP, &cmd); > } > } > if (i2c_opt.mode == I2C_MODE_STOP_START) { > error = ioctl(fd, I2CSTART, &cmd); > } else if (i2c_opt.mode == I2C_MODE_REPEATED_START) { > error = ioctl(fd, I2CRPTSTART, &cmd); > } > /******** Without i2c_opt.width set there is no START condition either to set the slave address for the read() ****/ > /******** Why this stop? ***/ > error = ioctl(fd, I2CSTOP, &cmd); > for (i = 0; i < i2c_opt.count; i++) { > error = read(fd, &i2c_buf[i], 1); > } > close(fd); > > I would have expected: > > fd = open(dev, O_RDWR); > if (i2c_opt.width) { > error = ioctl(fd, I2CSTART, &cmd); > error = ioctl(fd, I2CWRITE, &cmd); > if (i2c_opt.mode == I2C_MODE_STOP_START) { > error = ioctl(fd, I2CSTOP, &cmd); > error = ioctl(fd, I2CSTART, &cmd); > } else if (i2c_opt.mode == I2C_MODE_REPEATED_START) { > error = ioctl(fd, I2CRPTSTART, &cmd); > } > } else { > /***** Use START/STOP to set the slave address for the read() below ***/ > error = [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ip-knowhow.com] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 21:12:12 -0000 Switching freebsd-embedded@ to freebsd-arm@ since the former does not = get as much attention as the latter. > On Dec 1, 2016, at 2:11 AM, Nick Hibma wrote: >=20 > Gents, >=20 > I am not quite sure who to owner of i2c.c is, so perhaps some I2C = enthousiast could help me with the following problem. >=20 > I was trying to access a TMP102 I2C temperature sensor. It kind of = works with the default i2c utility. But it returns twice the high byte = instead of the high and low byte for the temperature. Probably because = it does 1 byte reads on the I2C bus, sending a stop condition after = every byte. This was verified with a logic analyser. >=20 > The device expects continuous reads and no stop/start in between the 2 = bytes. Trying all options i2c, most notably the -m mode switch, yields = the same results all the time. Looking at the code in i2c.c I get = confused as it seems to somehow fiddle with start/stop to get it right = because of the -m switch, but uses read() in the end to get the data, = not I2CREAD. >=20 > fd =3D open(dev, O_RDWR); > if (i2c_opt.width) { > error =3D ioctl(fd, I2CSTART, &cmd); > error =3D ioctl(fd, I2CWRITE, &cmd); > if (i2c_opt.mode =3D=3D I2C_MODE_STOP_START) { > error =3D ioctl(fd, I2CSTOP, &cmd); > } > } > if (i2c_opt.mode =3D=3D I2C_MODE_STOP_START) { > error =3D ioctl(fd, I2CSTART, &cmd); > } else if (i2c_opt.mode =3D=3D I2C_MODE_REPEATED_START) { > error =3D ioctl(fd, I2CRPTSTART, &cmd); > } > /******** Without i2c_opt.width set there is no START condition either = to set the slave address for the read() ****/ > /******** Why this stop? ***/ > error =3D ioctl(fd, I2CSTOP, &cmd); > for (i =3D 0; i < i2c_opt.count; i++) { > error =3D read(fd, &i2c_buf[i], 1); > } > close(fd); >=20 > I would have expected: >=20 > fd =3D open(dev, O_RDWR); > if (i2c_opt.width) { > error =3D ioctl(fd, I2CSTART, &cmd); > error =3D ioctl(fd, I2CWRITE, &cmd); > if (i2c_opt.mode =3D=3D I2C_MODE_STOP_START) { > error =3D ioctl(fd, I2CSTOP, &cmd); > error =3D ioctl(fd, I2CSTART, &cmd); > } else if (i2c_opt.mode =3D=3D I2C_MODE_REPEATED_START) { > error =3D ioctl(fd, I2CRPTSTART, &cmd); > } > } else { > /***** Use START/STOP to set the slave address for the read() below = ***/ > error =3D ioctl(fd, I2CSTART, &cmd); > error =3D ioctl(fd, I2CSTOP, &cmd); > } > error =3D ioctl(fd, I2CREAD, &cmd); // read all bytes in one go > error =3D ioctl(fd, I2CSTOP, &cmd); > close(fd); >=20 > Any opinions on where I am wrong? There is no need for I2CSTART/I2CSTOP sequence, there is I2CSADDR ioctl for that purpose. I agree that i2c tool looks broken from quick glance, but someone with more knowledge should take a look. > Second question: >=20 > Rolling my own little program with this change fails because I cannot = get I2CREAD to work. It keeps returning EIO. Some other web pages claim = that there is an implementation problem with that. Using read() on the = fd works fine, so do get a valid temperature out of the device now. I picked up TMP102 as a device to test I2C drivers for new boards and wrote C application to talk to it. I used RPi as a reference platform. The problem with I2C driver on RPi is that it does not support sending explicit START/STOP conditions. So all ioctl(I2CSTART) and ioctl(I2CSTOP). And READ/WRITE does not work without explicit START. So I ended up working around it using I2CRDWR. For some other boards it probably can be written with START/WRITE/READ/STOP, or with read/write. I=E2=80=99m going to spend some time and get this = app working on all boards I have to get a general feeling of what bits of I2C are supported on them what are not.=20 Source code: https://people.freebsd.org/~gonzo/tmp102.c= From owner-freebsd-arm@freebsd.org Fri Dec 2 23:35:53 2016 Return-Path: Delivered-To: freebsd-arm@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 B0D29C6395B for ; Fri, 2 Dec 2016 23:35:53 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-4.reflexion.net [208.70.210.4]) (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 75CA8A9D for ; Fri, 2 Dec 2016 23:35:52 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 13982 invoked from network); 2 Dec 2016 23:35:31 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 2 Dec 2016 23:35:31 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Fri, 02 Dec 2016 18:36:02 -0500 (EST) Received: (qmail 24783 invoked from network); 2 Dec 2016 23:36:02 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 2 Dec 2016 23:36:02 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id CC4B3EC916F; Fri, 2 Dec 2016 15:35:50 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 From: Mark Millard In-Reply-To: Date: Fri, 2 Dec 2016 15:35:50 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1E9515A0-06D5-4CF9-9D29-D6FF591686F4@dsl-only.net> References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> To: Michael Sperber X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 23:35:53 -0000 On 2016-Dec-2, at 3:58 AM, Michael Sperber = wrote: > Mark Millard writes: >=20 >> But none of the explains why it could not mount the root >> file system in the first place and the attempt may just >> fail as well. >=20 > A closer look revealed this: >=20 > da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 > da0: Fixed Direct Access SPC-2 SCSI = device > da0: Serial Number 000000000033 > da0: 40.000MB/s transfers > da0: Attempt to query device size failed: NOT READY, Medium not = present > da0: quirks=3D0x2 /dev/da0 is not the same as /dev/mmcsd0 . /dev/da0 is the interface to the SATA port. That hardware is accessed over USB on the BPi-M3. I get the same messages as you report, even the fake Serial=20 Number. I do not have a SATA drive plugged in. With a SATA drive in place it likely would show differently. I do not have anything plugged into the lower USB port currently. I've a SSD that I use as the root file system plugged into the upper USB port and it shows: umass1 on uhub2 umass1: on usbus0 da1 at umass-sim1 bus 1 scbus1 target 0 lun 0 da1: Fixed Direct Access SPC-4 SCSI device da1: Serial Number da1: 40.000MB/s transfers da1: 228936MB (468862128 512 byte sectors) da1: quirks=3D0x2 There is also the information: # dmesg | grep usbphy awusbphy0: on simplebus0 # dmesg | grep umass umass0 on uhub2 umass0: on = usbus0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 umass1 on uhub2 umass1: on usbus0 da1 at umass-sim1 bus 1 scbus1 target 0 lun 0 (But I have that external root file system SSD plugged in that causes the umass1, da2, and umass-sim1.) > So maybe the SD card was just slow. /dev/da0 is not the same as where the SD card is plugged in. Those messages above are not about the sd card. /dev/mmcsd0 is for where the sd card is plugged in. A normal massage for mine looks like: mmcsd0: 32GB at mmc0 = 50.0MHz/4bit/65535-block /dev/mmcsd1 is for the 8 GByte emmc that is built in. To my knowledge FreeBSD does not support it yet. It has a message: mmcsd1: 8GB at = mmc1 50.0MHz/8bit/65535-block (There are earlier messages that mention "mmc" but not "sd". I'm not going to show them all. There are "a10_mmc1" error messages involved for the 8 GByte emmc.) > And indeed, with: >=20 >> ufs:/dev/ufsid/582fa82db6b4890b As stands this indirectly references /dev/mmcsd0 and the sd card that is in it. > I get to a login prompt. Good but it is not clear why the selection was not automatic. > I tried this in /boot/loader.conf: >=20 > kern.cam.boot_delay=3D"10000" > kern.cam.scsi_delay=3D"3000" >=20 > ... but that didn't help. I do have the kern.cam.boot_delay line because of the external SSD that I use for the root file system. It was not needed for just using the sd card that I'm using. (And the BPi-M3 has to read from that sd card before the setting applies.) I do not have the scsi_delay line. > Now, I see this: >=20 > # dmesg | fgrep net >=20 > awg0: mem 0x1c30000-0x1c300ff on = simplebus0 Other related messages. . . # dmesg | grep rgephy rgephy0: PHY 0 on = miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, = 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, = 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, = 1000baseT-FDX-flow-master, auto, auto-flow rgephy1: PHY 1 on = miibus0 rgephy1: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, = 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, = 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, = 1000baseT-FDX-flow-master, auto, auto-flow # dmesg | grep awg awg0: mem 0x1c30000-0x1c300ff on simplebus0 miibus0: on awg0 awg0: Ethernet address: f2:00:1a:f1:d9:c8 awg0: link state changed to DOWN awg0: link state changed to UP # dmesg | grep net awg0: mem 0x1c30000-0x1c300ff on simplebus0 awg0: Ethernet address: f2:00:1a:f1:d9:c8 I do not know why you do not get the "Ethernet address". You might look for other related messages. For some of the terminology used, see the above messages that I report. There could be more that I've not noticed. # more /etc/rc.conf hostname=3D"" ifconfig_awg0=3D"DHCP" sshd_enable=3D"YES" > ... but no Ethernet interface here: >=20 > # ifconfig -a >=20 > lo0: flags=3D8049 metric 0 mtu 16384 > options=3D600003 > inet6 ::1 prefixlen 128=20 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1=20 > inet 127.0.0.1 netmask 0xff000000=20 > groups: lo=20 > nd6 options=3D21 Mine shows a "awg0" and its information but it also earlier showed what I reported above. > Any ideas on that one? Nothing specific. > (BTW, thanks for your patience - very helpful!) No problem. > --=20 > Regards, > Mike =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-arm@freebsd.org Sat Dec 3 13:23:21 2016 Return-Path: Delivered-To: freebsd-arm@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 6AFF2C646D5 for ; Sat, 3 Dec 2016 13:23:21 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from deinprogramm.de (deinprogramm.de [88.198.58.179]) by mx1.freebsd.org (Postfix) with ESMTP id 3053F1B96 for ; Sat, 3 Dec 2016 13:23:20 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from jellaby.local (p4FD1CBBB.dip0.t-ipconnect.de [79.209.203.187]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by deinprogramm.de (Postfix) with ESMTPSA id D7CEA3028B; Sat, 3 Dec 2016 13:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=deinprogramm.de; s=default; t=1480771392; bh=imNqU1LhRimdewTPdiOj3iu8L9LhPDMQzheqDrpjc1Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=bKMNoDriFBkt7jyPaaqe6z4hLRrJEufRvBtFehd+ZGcQRDnYlIS33ag6J1r3AiHvG ZDrfK2rIbKONGR8GBOOhElgOuA0FDx17wA+UJ+00Z4seQGJRkDIO3tZVIQT9/jOeSR c13KHaqWLV4I2Y0fwSfd0iGPREQuaGfq+remDSVE= Received: from jellaby.local.deinprogramm.de (localhost [IPv6:::1]) by jellaby.local (Postfix) with ESMTP id 834B693BD9FD; Sat, 3 Dec 2016 14:23:13 +0100 (CET) From: Michael Sperber To: Mark Millard Cc: freebsd-arm@freebsd.org Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> <1E9515A0-06D5-4CF9-9D29-D6FF591686F4@dsl-only.net> Date: Sat, 03 Dec 2016 14:23:13 +0100 In-Reply-To: <1E9515A0-06D5-4CF9-9D29-D6FF591686F4@dsl-only.net> (Mark Millard's message of "Fri, 2 Dec 2016 15:35:50 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 13:23:21 -0000 Mark Millard writes: > /dev/da0 is not the same as /dev/mmcsd0 . /dev/da0 is the > interface to the SATA port. That hardware is accessed over > USB on the BPi-M3. Ah, now I understand. Sorry for my being stupid about this! I finally noticed this: eval: cannot open /etc/fstab: No such file or directory And indeed /etc/fstab is not there - creating one fixed that problem. (Shouldn't Crochet have created one?) So that leaves the Ethernet problem. I get this: awg0: mem 0x1c30000-0x1c300ff on simplebus0 awg0: soft reset timed out device_attach: awg0 attach returned 60 Any ideas on that one? Broken hardware? I see the awg driver is fairly new - is 11.0-RELEASE recent enough? -- Regards, Mike From owner-freebsd-arm@freebsd.org Sat Dec 3 21:01:50 2016 Return-Path: Delivered-To: freebsd-arm@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 27445C654FF for ; Sat, 3 Dec 2016 21:01:50 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-8.reflexion.net [208.70.210.8]) (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 CD09F1EE3 for ; Sat, 3 Dec 2016 21:01:49 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 16802 invoked from network); 3 Dec 2016 21:01:54 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 3 Dec 2016 21:01:54 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 03 Dec 2016 16:01:55 -0500 (EST) Received: (qmail 3063 invoked from network); 3 Dec 2016 21:01:55 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 3 Dec 2016 21:01:55 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 2FDB5EC9143; Sat, 3 Dec 2016 13:01:47 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Can't get 11.0-RELEASE to boot on Banana PI M3 From: Mark Millard In-Reply-To: Date: Sat, 3 Dec 2016 13:01:46 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <53608BFE-4653-4407-AFBE-7AB5E45AF2C1@dsl-only.net> References: <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> <1E9515A0-06D5-4CF9-9D29-D6FF591686F4@dsl-only.net> To: Michael Sperber X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 21:01:50 -0000 On 2016-Dec-3, at 5:23 AM, Michael Sperber = wrote: > Mark Millard writes: >=20 >> /dev/da0 is not the same as /dev/mmcsd0 . /dev/da0 is the >> interface to the SATA port. That hardware is accessed over >> USB on the BPi-M3. >=20 > Ah, now I understand. Sorry for my being stupid about this! >=20 > I finally noticed this: >=20 > eval: cannot open /etc/fstab: No such file or directory >=20 > And indeed /etc/fstab is not there - creating one fixed that problem. In . . ./crochet/board/BananaPi-M3/overlay/etc/ there should be: # ls fstab rc.conf rc.d When things work right these are simply copied. If one of these files was not copied over then it may be that some other(s) were not copied over as well. > (Shouldn't Crochet have created one?) So that leaves the Ethernet > problem. I get this: >=20 > awg0: mem 0x1c30000-0x1c300ff on = simplebus0 > awg0: soft reset timed out > device_attach: awg0 attach returned 60 >=20 > Any ideas on that one? Broken hardware? I see the awg driver is = fairly > new - is 11.0-RELEASE recent enough? awg Ethernet support was added about 2 months before head -r304406 was turned into stable/11 -r304408 based on the svn history: Ethernet added for A83T back on 2016-May-4 ( -r299084 ). > --=20 > Regards, > Mike While I do not know anything about the details I can find the source code for the "soft reset timed out": 1122 static int 1123 awg_reset(device_t dev) 1124 { 1125 struct awg_softc *sc; 1126 int retry; 1127=09 1128 sc =3D device_get_softc(dev); 1129=09 1130 /* Soft reset all registers and logic */ 1131 WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST); 1132=09 1133 /* Wait for soft reset bit to self-clear */ 1134 for (retry =3D SOFT_RST_RETRY; retry > 0; retry--) { 1135 if ((RD4(sc, EMAC_BASIC_CTL_1) & = BASIC_CTL_SOFT_RST) =3D=3D 0) 1136 break; 1137 DELAY(10); 1138 } 1139 if (retry =3D=3D 0) { 1140 device_printf(dev, "soft reset timed out\n"); 1141 #ifdef AWG_DEBUG 1142 awg_dump_regs(dev); 1143 #endif 1144 return (ETIMEDOUT); 1145 } 1146=09 1147 return (0); 1148 } I'd guess that the message indicates a hardware problem. As I've suggested before: you could see of an official Linux also fails to initialize the Ethernet interface. Once checked: A) If Linux did fail as well then blame the hardware. B) If Linux worked then get the FreeBSD folks that work on the A83T/ALLWINNER support to look into the issue. My guess is the that FreeBSD folks would want a build with that AWG_DEBUG enabled and information from the "dump" that it makes if Linux worked. =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-arm@freebsd.org Sat Dec 3 21:31:34 2016 Return-Path: Delivered-To: freebsd-arm@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 83881C6517D for ; Sat, 3 Dec 2016 21:31:34 +0000 (UTC) (envelope-from jenkins-admin@FreeBSD.org) Received: from jenkins-9.freebsd.org (jenkins-9.freebsd.org [8.8.178.209]) by mx1.freebsd.org (Postfix) with ESMTP id 36D4F16F0; Sat, 3 Dec 2016 21:31:34 +0000 (UTC) (envelope-from jenkins-admin@FreeBSD.org) Received: from jenkins-9.freebsd.org (localhost [127.0.0.1]) by jenkins-9.freebsd.org (Postfix) with ESMTP id 6A6A6C1; Sat, 3 Dec 2016 21:31:34 +0000 (UTC) Date: Sat, 3 Dec 2016 21:31:31 +0000 (GMT) From: jenkins-admin@FreeBSD.org To: bdrewery@FreeBSD.org, martymac@FreeBSD.org, peter@FreeBSD.org, scottl@FreeBSD.org, hselasky@FreeBSD.org, manu@FreeBSD.org, adrian@FreeBSD.org, danfe@FreeBSD.org, markj@FreeBSD.org, misha@FreeBSD.org, emaste@FreeBSD.org, oleg@FreeBSD.org, sephe@FreeBSD.org, jmcneill@FreeBSD.org, tsoome@FreeBSD.org, avos@FreeBSD.org, mm@FreeBSD.org, kadesai@FreeBSD.org, landonf@FreeBSD.org, br@FreeBSD.org, dexuan@FreeBSD.org, gjb@FreeBSD.org, rpokala@FreeBSD.org, alc@FreeBSD.org, jhb@FreeBSD.org, cem@FreeBSD.org, delphij@FreeBSD.org, cognet@FreeBSD.org, dteske@FreeBSD.org, rwatson@FreeBSD.org, kib@FreeBSD.org, gnn@FreeBSD.org, mizhka@FreeBSD.org, rstone@FreeBSD.org, des@FreeBSD.org, avg@FreeBSD.org, ae@FreeBSD.org, pfg@FreeBSD.org, andrew@FreeBSD.org, dab@FreeBSD.org, dim@FreeBSD.org, jchandra@FreeBSD.org, mav@FreeBSD.org, fabient@FreeBSD.org, marcel@FreeBSD.org, julian@FreeBSD.org, np@FreeBSD.org, ngie@FreeBSD.org, imp@FreeBSD.org, phk@FreeBSD.org, matthew@FreeBSD.org, brooks@FreeBSD.org, jkim@FreeBSD.org, loos@FreeBSD.org, jceel@FreeBSD.org, rmacklem@FreeBSD.org, brueffer@FreeBSD.org, shurd@FreeBSD.org, ken@FreeBSD.org, tuexen@FreeBSD.org, hiren@FreeBSD.org, rakuco@FreeBSD.org, n_hibma@FreeBSD.org, araujo@FreeBSD.org, kan@FreeBSD.org, ian@FreeBSD.org, kevlo@FreeBSD.org, jhibbits@FreeBSD.org, vangyzen@FreeBSD.org, mjg@FreeBSD.org, sbruno@FreeBSD.org, sevan@FreeBSD.org, jilles@FreeBSD.org, bapt@FreeBSD.org, gonzo@FreeBSD.org, jenkins-admin@FreeBSD.org, freebsd-arm@FreeBSD.org Message-ID: <1256829967.2.1480800694508.JavaMail.jenkins@jenkins-9.freebsd.org> In-Reply-To: <220726409.69.1479515031385.JavaMail.jenkins@jenkins-9.freebsd.org> References: <220726409.69.1479515031385.JavaMail.jenkins@jenkins-9.freebsd.org> Subject: FreeBSD_HEAD_arm64 - Build #4287 - Fixed MIME-Version: 1.0 X-Jenkins-Job: FreeBSD_HEAD_arm64 X-Jenkins-Result: SUCCESS Precedence: bulk X-Mailman-Approved-At: Sat, 03 Dec 2016 21:46:51 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 21:31:34 -0000 FreeBSD_HEAD_arm64 - Build #4287 - Fixed: Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_arm64/4287/ Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_arm64/4287/changes Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_arm64/4287/console Change summaries: 309504 by dteske: Fix bug preventing limits(1) from being applied PR: misc/212493 Differential Revision: https://reviews.freebsd.org/D8232 Submitted by: girgen Reviewed by: adrian MFC after: 3 days X-MFC-to: stable/11 309491 by rpokala: Build smbios.ko as a module for amd64 and i386 For whatever reason, smapi, smbios, vpd are all under the "bios" directory. smapi is only for i386, so the entire "bios" directory is only built for i386. Break smapi out, and make only it i386-specific. Then, build the "bios" directory for both amd64 and i386. Reviewed by: imp MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D8609 309490 by pfg: Revert r253678, r253661: Fix a segfault in ctfmerge(1) due to a bug in GCC. The change was correct and the bug real, but upstream didn't adopt it and we want to remain in sync. When/if upstream does something about it we can bring their version. The bug in question was fixed in GCC 4.9 which is now the default in FreeBSD's ports. Our native gcc-4.2, which is still in use in some Tier-2 platforms also has a workaround so no end-user should be harmed by the revert. 309486 by avos: rtwn: fix bitmap size calculation. Tested with RTL8188CE, STA mode. 309481 by avos: rsu: fix frame processing in the Rx path (similar to r292207). - Fill in Rx radiotap header correctly (for every packet in a chain; not once per chain). - Fix rate / flags fields in Rx radiotap. - Add debug messages for discarded frames. - Pass received control (< sizeof(struct ieee80211_frame)) frames to net80211 (if allowed by device filter; cannot happen yet). Tested with Asus USB-N10. Differential Revision: https://reviews.freebsd.org/D5723 309480 by kevlo: Fix logic error so the R92C_TDECTRL register value is updated correctly. Reviewed by: avos 309479 by avos: rsu: remove unused structures / variables. 309478 by bdrewery: DIRDEPS_BUILD: Fix '/' in group names creating a bad cookie. This is reworking the change in r296585 but to still properly install the files. This limits the change to only the DIRDEPS_BUILD logic for what it considers the name of the staging set, which is what the cookie name is based off of. Sponsored by: Dell EMC Isilon MFC after: 1 week 309477 by bdrewery: Revert r296585. This broke installing dtrace test files. It was poorly tested. Reported by: markj Pointyhat to: bdrewery MFC after: 1 week 309476 by bdrewery: Create the /usr/lib/include symlink as relative. This ugly code is done to avoid assuming LIBDIR is 2 components deep. Reported by: jhb 309474 by ngie: Don't build :strvis_locale if VIS_NOLOCALE is undefined The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower in conditionally running the test instead of backporting the newer version of libc-vis MFC after: now 309472 by ngie: Restore pathing for factor(1), which unnecessarily diverged in r278616 factor lives in /usr/games/, not /usr/bin, in NetBSD. The correct way to handle this is do on-the-fly manipulation of the test script via ATF_TESTS_SH_SED_, not by modify the pathing directly in the test script. This is being done to resolve an unnecessary conflict made when pulling back ^/head@r309469 (contrib/netbsd-tests update) to ^/stable/10. No functional change MFC after: now 309467 by adrian: [ath] use the correct AMPDU frame limit for the given node, rather than the global config. This is important in hostap, ibss, (11s at some magical future date, etc) where different nodes may have smaller limits. Oops! MFC after: 1 week Relnotes: Yes 309465 by adrian: [net80211] prepare for 11ac aware NICs that want to know per-vdev channel and centre frequencies. * ic_freq is the centre of the primary channel, not the centre of the HT40/HT80/etc channel. Add a method to access that. * Add a method to access the centre of the primary channel, including knowing the centre of the 5/10/20/40/80, versus the primary channel. Ie, it's the centre of the 40, 80, 160MHz channel. * Add a method to access the centre frequency of the secondary 80MHz channel - we don't support VHT yet, but when we do. * Add methods to access the current channel and the per-dev desired channel. Ideally drivers that do full offload with a per-vap channel configuration should use the vap channel, NOT ic_curchan. Non-offload drivers that require net80211 to change the channel should be accessing ic_curchan. 309464 by ngie: Expect 01:main to fail Changes were made to ZFS in the past year with respect to how ACLs are handled, causing failures in this test. Mark it TODO so (hopefully) someone more knowledgeable (like mav or trasz) will fix the code or the test. PR: 212323 309463 by ngie: Expect :coredump_phnum to fail The number of program headers on my system (GENERIC-NODEBUG) don't match the expected (hardcoded) number in the test PR: 215019 309462 by ngie: Fix test coredump_phnum_test:coredump_phnum require.config specification The requirement is set via `atf_set "require.config" "allow_sysctl_side_effects"', not `atf_set "require.config" "allow_sysctl_side_effects"' X-MFC with: r308177 Pointyhat to: cmeyer 309461 by loos: Allow simultaneous access to switch device, there is no reason to prevent it. Remove bogus wrappers and use the kernel defaults. While here, use DEVMETHOD_END. Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) 309460 by vangyzen: thr_set_name(): silently truncate the given name as needed Instead of failing with ENAMETOOLONG, which is swallowed by pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1 bytes. This is more likely what the user wants, and saves the caller from truncating it before the call (which was the only recourse). Polish pthread_set_name_np(3) and add a .Xr to thr_set_name(2) so the user might find the documentation for this behavior. Reviewed by: jilles MFC after: 3 days Sponsored by: Dell EMC 309451 by pfg: Document undocumented indent(1) options badp/nbadp, bs/nbs, and lc. Submitted by: Piotr Stefaniak Differential Revision: https://reviews.freebsd.org/D8690 309439 by pfg: ext2fs: renumber the license clauses to avoid skipping #3. This is to keep consistency with other files, and help license-checking utilities determine the number of clauses that apply. No functional change. 309425 by mjg: vfs: provide fake locking primitives for the crossmp vnode Since the vnode is only expected to be shared locked, we can save a little overhead by only pretending we are locking in the first place. Reviewed by: kib Tested by: pho 309419 by pfg: indent(1): Avoid out-of-bound accesses of array ps.p_stack. Submitted by: Piotr Stefaniak 309418 by pfg: indent(1): Avoid out-of-bound accesses of arrays. ps.paren_indents: When ps.paren_level was 0, this was accessing paren_indents[-1]. in_buffer: This fragment checks if "*/" was read, but there's no guarantee that there is more than one byte in the array (actually, this happens frequently for the "{" in things like "int main(void) {"). Submitted by: Piotr Stefaniak 309417 by pfg: indent(1): Remove an extra newline added in a previous commit. It doesn't math the remaining of the case statement. 309416 by alc: Eliminate a stale comment; vm_radix_prealloc() was replaced in r254141. MFC after: 3 days 309415 by pfg: indent(1): Optimize parser stack usage. When special else-if processing is enabled (-ei), we can assume "else if" and "if" to be equivalent for indentation purposes. This reduction saves a lot of stack space in case of a long "if-else-if ... else-if" sequence; with this change, Postgres/src/bin/psql/tab-complete.c as of 9.6beta3 requires minimum of the stack length to be 31 instead of 444. Submitted by: Piotr Sephaniak 309414 by rstone: Revert r309372 The bug intended to be fixed by r309372 was already addressed by r296178, so revert my change. Reported by: seph 309413 by imp: Flag the vendor specific pages as such. This allows different decoding for the same page number as different vendors encode vendor specific pages differently. 309412 by imp: dd is currently a bootstrap tool. It really doesn't have any business being a bootstrap tool. However, for reproducible build output, FreeBSD added dd status=none because it was otherwise difficult to suppress the status information, but retain any errors that might happen. There's no real reason that dd has to be a build tool, other than we use status=none unconditional. Remove dd from a bootstrap tool entirely by only using status=none when available. This may also help efforts to build the system on non-FreeBSD hosts as well. Differential Revision: https://reviews.freebsd.org/D8605 309411 by emaste: Retire long-broken/unused static rtld support rtld-elf has some vestigial support for building as a static executable. r45501 introduced a partial implementation with a prescient note that it "might never be enabled." r153515 introduced ELF symbol versioning support, and removed part of the unused build infrastructure for static rtld. GNU ld populates rela relocation addends and GOT entries with the same values, and rtld's run-time dynamic executable check relied on this. Alternate toolchains may not populate the GOT entries, which caused RTLD_IS_DYNAMIC to return false. Simplify rtld by just removing the unused check. If we want to restore static rtld support later on we ought to introduce a build-time #ifdef flag. PR: 214972 Reviewed by: kan MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8687 309410 by n_hibma: Fix man page: - It should say 'read' in the I2CREAD section. - last in the struct indicates the last command in a sequence, not the reverse. Reviewed by: imp MFC after: 3 days 309409 by n_hibma: More typos in strings. Submitted by: bde MFC after: 3 days 309408 by julian: Changes to allow the patching of packets with an offset (and other changes.. see man page) PR: 206185 Submitted by: Dmitry Vagin MFC after: 1 week Relnotes: yes (also ng_checksum node) 309407 by julian: A little light wordsmithing only. Sponsored by: FreeBSD 309406 by hselasky: Remove useless NULL checks. NULL is not returned when allocating memory passing the M_WAITOK flag. Submitted by: trasz @ Differential Revision: https://reviews.freebsd.org/D5772 Sponsored by: Mellanox Technologies MFC after: 1 week 309405 by mm: MFV r309403: Sync libarchive with vendor. Vendor bugfixes: Fix for heap-buffer-overflow in archive_le16dec() Fix for heap-buffer-overflow in uudecode_bidder_bid() Reworked fix for compatibility with archives created by Perl Archive::Tar MFC after: 1 week 309404 by hselasky: Fix return value from ng_uncallout(). callout_stop() recently started returning -1 when the callout is already stopped, which is not handled by the netgraph code. Properly filter the return value. Netgraph callers only want to know if the callout was cancelled and not draining or already stopped. Discussed with: julian, glebius MFC after: 2 weeks 309400 by hselasky: Fix for endless recursion in the ACPI GPE handler during boot. When handling a GPE ACPI interrupt object the EcSpaceHandler() function can be called which checks the EC_EVENT_SCI bit and then recurse on the EcGpeQueryHandler() function. If there are multiple GPE events pending the EC_EVENT_SCI bit will be set at the next call to EcSpaceHandler() causing it to recurse again via the EcGpeQueryHandler() function. This leads to a slow never ending recursion during boot which prevents proper system startup, because the EC_EVENT_SCI bit never gets cleared in this scenario. The behaviour is reproducible with the ALASKA AMI in combination with a newer Skylake based mainboard in the following way: Enter BIOS and adjust the clock one hour forward. Save and exit the BIOS. System fails to boot due to the above mentioned bug in EcGpeQueryHandler() which was observed recursing multiple times. This patch adds a simple recursion guard to the EcGpeQueryHandler() function and also also adds logic to detect if new GPE events occurred during the execution of EcGpeQueryHandler() and then loop on this function instead of recursing. Reviewed by: jhb MFC after: 2 weeks 309397 by tuexen: Fix the handling of TCP FIN-segments in the CLOSED state When a TCP segment with the FIN bit set was received in the CLOSED state, a TCP RST-ACK-segment is sent. When computing SEG.ACK for this, the FIN counts as one byte. This accounting was missing and is fixed by this patch. Reviewed by: hiren MFC after: 1 month Sponsored by: Netflix, Inc. Differential Revision: https://svn.freebsd.org/base/head 309394 by marcel: Fix use-after-free bugs in pfsync(4) Use after free happens for state that is deleted. The reference count is what prevents the state from being freed. When the state is dequeued, the reference count is dropped and the memory freed. We can't dereference the next pointer or re-queue the state. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8671 309393 by araujo: Use memset(3) instead of bzero(3). Obtained from: OpenBSD (r1.12, r1.20, r1.18 and r1.37) 309392 by araujo: String terminators are called NUL, not NULL, also the variable mentioned in the comment is p and not u. Obtained from: OpenBSD (r1.34) 309382 by pfg: indent(1): Do not define opchar unless it will be used. "opchar" is only used once depending on "undef" macro being defined. Conditionalize it in the same way. Submitted by: Piotr Sephaniak 309380 by pfg: indent(1): Fix indent's confusion about custom FreeBSD macros. Teach indent(1) about storage-class specifiers. Don't assume "in_parameter_declaration" state if "in_decl" hasn't been set. Don't set "in_decl" for storage-class specifiers. That set of changes helps with recognizing the difference between file scope declarations like this: static LIST_HEAD(, alq) ald_active; static int ald_shuttingdown = 0; struct thread *ald_thread; and old style function declarators like this: static int do_execve(td, args, mac_p) struct thread *td; struct image_args *args; struct mac *mac_p; { Unfortunately, at the same time this change makes indent(1) require explicit int in declarations like "static a;", in order to understand that it's part of a declaration. On the other hand, declarations like in the first example are no longer indented as if ald_shuttingdown and ald_thread were parameters of a function named LIST_HEAD. Submitted by: Piotr Stefaniak 309374 by ken: Add SCSI REPORT TIMESTAMP and SET TIMESTAMP support. This adds support to camcontrol(8) and libcam(3) for getting and setting the time on SCSI protocol drives. This is more commonly found on tape drives, but is a SPC (SCSI Primary Commands) command, and may be found on any device that speaks SCSI. The new camcontrol timestamp subcommand allows getting the current device time or setting the time to the current system time or any arbitrary time. sbin/camcontrol/Makefile: Add timestamp.c. sbin/camcontrol/camcontrol.8: Document the new timestamp subcommand. sbin/camcontrol/camcontrol.c: Add the timestamp subcommand to camcontrol. sbin/camcontrol/camcontrol.h: Add the timestamp() function prototype. sbin/camcontrol/timestamp.c: Timestamp setting and reporting functionality. sys/cam/scsi/scsi_all.c: Add two new CCB building functions, scsi_set_timestamp() and scsi_report_timestamp(). Also, add a new helper function, scsi_create_timestamp(). sys/cam/scsi/scsi_all.h: Add CDB and parameter data for the the set and report timestamp commands. Add function declarations for the new CCB building and helper functions. Submitted by: Sam Klopsch Sponsored by: Spectra Logic MFC After: 2 weeks 309373 by bdrewery: Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired. This uses the same fix as r294894 did for the mlock test. The code from that commit is moved into a common object file which PROGS supports building first. Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8689 309372 by rstone: Fix a false positive in a buf_ring assert buf_ring contains an assert that checks whether an item being enqueued already exists on the ring. There is a subtle bug in this assert. An item can be returned by a peek() function and freed, and then the consumer thread can be preempted before calling advance(). If this happens the item appears to still be on the queue, but another thread may allocate the item from the free pool and wind up trying to enqueue it again, causing the assert to trigger incorrectly. Fix this by skipping the head of the consumer's portion of the ring, as this index is what will be returned by peek(). Sponsored by: Dell EMC Isilon MFC After: 1 week Differential Revision: https://reviews.freebsd.org/D8685 Reviewed by: hselasky 309369 by tsoome: libstand: dosfs cstyle cleanup for return keyword. Reviewed by: bapt, imp, allanjude Approved by: imp (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8678 309367 by vangyzen: locale: enable more warnings; fix them Do not set WARNS, so it gets the current default of 6. Fix the warnings by sprinkling static, const, or strdup. Make some constant data tables const. Fix whitespace. MFC after: 1 week Sponsored by: Dell EMC 309366 by cem: capsicum_helpers: Squash errors from closed fds Squash EBADF from closed stdin, stdout, or stderr in caph_limit_stdio(). Any program used during special shell scripts may commonly be forked from a parent process with closed standard stream. Do the common sense thing for this common use. Reported by: Iblis Lin Reviewed by: oshogbo@ (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8657 309365 by alc: During vm_page_cache()'s call to vm_radix_insert(), if vm_page_alloc() was called to allocate a new page of radix trie nodes, there could be a call to vm_radix_remove() on the same trie (of PG_CACHED pages) as the in-progress vm_radix_insert(). With the removal of PG_CACHED pages, we can simplify vm_radix_insert() and vm_radix_remove() by removing the flags on the root of the trie that were used to detect this case and the code for restarting vm_radix_insert() when it happened. Reviewed by: kib, markj Tested by: pho Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8664 309364 by vangyzen: locale: fix buffer management Also, handle signed and unsigned chars, and more gracefully handle invalid input. Submitted by: bde in response to r309331 MFC after: 1 week Sponsored by: Dell EMC 309363 by mm: MFC r309362: Sync libarchive with vendor. Small improvements, style fixes, bugfixes. Restores compatibility with tar archives created with Perl Archive::Tar (1) MFC after: 1 week Reported by: Matthew Seaman (1) 309361 by danfe: - Mention mismatching numbers in MSR vs. ACPI _PSS count warning: seeing actual numbers would help debugging (also, `MSR' and `ACPI' are standard abbreviations and thus should be properly capitalized) - Rephrase unsupported AMD CPUs message and wrap as an overly long line: `sorry' 1) is wrongly spelled after period (starts with a small letter) and 2) carries emotional "tinge" that is unnecessary and even bogus in debug message; `implemented' is not the best word as `supported' suits better in this context - Improve readability when reporting resulted P-state transition (debug) Approved by: jhb 309360 by emaste: EFI loaders: parse rela relocations on amd64 Prior to this change the loader self relocation code interpreted amd64's rela relocations as if they were rel relocations, discarding the addend. This "works" because GNU ld 2.17.50 stores the addend value in both the r_addend field of the relocation (as expected) and at the target of the relocation. Other linkers, and possibly other versions of GNU ld, won't have this behaviour, so interpret the relocations correctly. Reported by: George Rimar Reviewed by: andrew MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8681 309357 by n_hibma: Speling fixes and fix line endings for err_msg output. In some cases there was not \n, in other cases there was. 309356 by peter: Update from subversion 1.9.4 to 1.9.5. This includes a security fix for a component that we do not build, and two potentially useful client side fixes for reintegrate merges and tree conflict handling. See CHANGES for full details. 309353 by sephe: hyperv/hn: Add 'options RSS' support. Reviewed by: adrian MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8676 309352 by imp: Finish incomplete comments in prior revision. I was going to fix this after I tested it, but didn't. 309351 by imp: Revert the 'performance' setting to 'NONE' from C2. C2 has issues with USB in places, as well as having the potential for reducing performance. Since this is used even when powerd isn't enabled, these two problems can cause on servers. Supermicro X9 motherboards, for example, have problems with the virtual IPMI USB keyboards and mice attaching and detaching repeatedly. Since there are issues on some CPUs with C2, fail safe by defaulting to not altering it. MFC After: 3 days 309350 by imp: If the kenv variable rc_debug is set, turn on rc_debug. 309349 by imp: Simplify test. 309348 by sephe: hyperv/hn: Don't hold txdesc, if no BPFs are attached. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8675 309347 by loos: MDIO_PHYACCESS_ACK is only valid for read access, remove it from miibus_writereg. Reduce the DELAY() between reads while waiting for MII access. Spotted by: yongari Sponsored by: Rubicon Communications, LLC (Netgate) 309346 by sephe: hyperv/hn: Add HN_DEBUG kernel option. If bufring is used for per-TX ring descs, don't update "available" counter, which is only used to help debugging. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8674 309345 by loos: The RX_FREEBUFFER registers are a write to increment field. Writing the full queue size to it every time was makeing it overflow with a lot of bogus values. This fixes the interrupt storms on irq 40. Sponsored by: Rubicon Communications, LLC (Netgate) 309344 by cem: Remove a death threat from the FreeBSD sources Reported by: koobs@, araujo@, linimon@, bjk@, emaste@, jhb@, ngie@, cem@ Maintainer timeout: des@ 309343 by pfg: indent(1): Don't unnecessarily add a blank before a comment ends. pr_comment() did avoid adding surplus space character when a comment contained it at the end. Now it's also paying attention to tabs. Taken from: Piotr Stefaniak 309342 by pfg: indent(1): Don't ignore newlines after comments that follow braces. indent.c has a special loop that stores tokens from between an if () and the next statement into a buffer. The loop ignored all newlines, but that resulted in not calling dump_line() when it was needed to produce the final line of the buffered up comment. Taken from: Piotr Stefaniak 309341 by pfg: indent(1): Avoid out of bound access of array in_buffer Work-around a somewhat complex interaction within the code. From Piotr's commit [1]: When pr_comment() calls dump_line() for the first line of a multiline comment, it doesn't include any indentation - it starts with the "/*". This is consistent for both boxed and not boxed comments. Where the logic diverges is in how it treats the rest of the lines of the comment. For box comments indent assumes that it must not change anything, so lines are dumped as they were, including the indentation where it exists. For the rest of comments, it will first remove the indentation to store plain text of the comment and then add it again where indent thinks it's appropriate -- this is part of comment re-indenting process. For continuations of multi-line comments, the code that handles comments in dump_line() will use pad_output() to create indentation from the beginning of the line (what indent calls the first column) and then write string pointed by s_com afterwards. But if it's a box comment, the string will include original indentation, unless it's the first line of the comment. This is why tab characters from s_com have to be considered when calculating how much padding is needed and the "while (*com_st == '\t') com_st++, target += 8;" does that. In dump_line(), /target/ is initially set to ps.com_col, so it always assumes that indentation needs to be produced in this function, regardless of which line of a box comment it is. But for the first line of a box comment it is not true, so pr_comment() signals it by setting ps.n_comment_delta, the negative comment delta, to a negative number which is then added to /target/ in dump_line() on all lines except the first one, so that the function produces adequate indentation in this special case. The bug was in how that negative offset was calculated: pr_comment() used count_spaces() on in_buffer, which pr_comment() expected to contain non-null terminated sequence of characters, originating from whatever originally was on the left side of the comment. Understanding that count_spaces() requires a string, pr_comment() temporarily set buf_ptr[-2] to 0 in hope that it would nul-terminate the right thing in in_buffer and calling count_spaces() would be safe and do the expected thing. This was false whenever buf_ptr would point into save_com, an entirely different char array than in_buffer. The short-term fix is to recognize whether buf_ptr points into in_buffer or save_com. Reference: [1] https://github.com/pstef/freebsd_indent/commit/ea486a2aa3b056b146bdfbb8e94843159750f200 Taken from: Piotr Stefaniak 309339 by gjb: Revert r309314, which breaks installing ports. Requested by: antoine Differential Revision: https://reviews.freebsd.org/D8120 (related) Sponsored by: The FreeBSD Foundation 309338 by cem: ioat(4): Fix 'bogus completion_pending' KASSERT Fix ioat_release to only set is_completion_pending if DMAs were actually queued. Otherwise, the spurious flag could trigger an assert in the reset path on INVARIANTS kernels. Reviewed by: bdrewery, Suraj Raju @ Isilon Sponsored by: Dell EMC Isilon 309332 by dim: Cleanup old debug dirs in delete-old-dirs target Any .debug or .symbols files under /usr/lib/debug which correspond to OLD_FILES entries in ObsoleteFiles.inc are also automatically cleaned up by the delete-old target. Make this also apply to any OLD_DIRS entries. Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D8683 309331 by vangyzen: Include limits.h for CHAR_MAX This was needed on stable/10. Apparently, sys/param.h supplies CHAR_MAX on head. Include limits.h anyway, for consistency, and because C says so. Sponsored by: Dell EMC 309328 by andrew: Fix the PCI host generic FDT driver to call into the common code and not recurse into itself. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309327 by andrew: Fix the alloc function the ThunderX PCIe driver calls, the previous function may not exist when FDT is removed from the kernel. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309326 by rwatson: Clarify warning message when failing to configure audit on user login: when au_user_mask() fails, it's not a failure to set the audit mask, but to calculate the audit mask -- and hence a condfiguration-file issue (of some sort). MFC after: 3 days Sponsored by: DARPA, AFRL 309324 by andrew: Mark the Alpine ethernet driver as FDT only. It calls alpine_serdes_resource_get which is defined in an FDT only file. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309323 by andrew: Move the FDT specific parts of the GIC diver softc to the FDT attachment. This allows the driver to be built in a kernel with no FDT support, e.g. on arm64 with just ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309322 by andrew: Only include FDT headders when building for FDT. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309321 by mav: Add `gmirror create` subcommand, alike to gstripe, gconcat, etc. It is quite specific mode of operation without storing on-disk metadata. It can be useful in some cases in combination with some external control tools handling mirror creation and disks hot-plug. MFC after: 2 weeks Sponsored by: iXsystems, Inc. 309320 by sephe: hyperv/storvsc: Don't use timedwait. The timeout is unnecessary. Reviewed by: jhb MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8656 309319 by sephe: hypver/vmbus: Remove extra assertion. It is asserted by vmbus_chan_gpadl_connect() now. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8660 309318 by sephe: hyperv/hn: Allow TX to share event taskqueues. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8659 309316 by sephe: hyperv/vmbus: Add DEVMETHOD to map cpu to event taskq. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8658 309314 by matthew: Allow a user-overridable setting 'PKG_CMD' to control the command used to create a repo during 'make packages' This would have been useful for a situation I found myself in where pkg(8) had been upgraded to a version that wanted the FBSD_1.5 ABI version but libc.so.7 had not been upgraded, and only provided FBSD_1.4. I found I needed to update libc in order to run pkg, and I also needed to use pkg to update libc... Which is why pkg-static exists, but there's currently no way to tell the build system to use pkg-static instead of pkg. This creates a variable PKG_CMD, default value 'pkg', that can be overridden from the command line. Reviewed by: gjb Approved by: gjb Differential Revision: https://reviews.freebsd.org/D8120 309311 by sephe: hyperv/hn: Allow multiple TX taskqueues. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8655 309310 by sephe: hyperv/hn: Nuke the unused TX taskqueue CPU binding tunable. It was an experimental tunable, and is now deemed to be road blocker for further changes. Time to retire it. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8654 309309 by jhibbits: Bring the powerpc DDB disassembler into the 21st century Bring in the most recent copy of NetBSD's db_disasm, to fix bugs and add more instructions. * Fix several bugs in the disassembler, most notably the disassembly of the rlwi* instructions, the original reason for bringing in this change. * Add more registers to the SPR list * Add more instructions to the opcode table Obtained from: NetBSD MFC after: 2 weeks 309308 by mjg: vfs: fix a whitespace nit in r309307 309307 by mjg: vfs: avoid VOP_ISLOCKED in the common case in lookup 309306 by emaste: netmap: add cast to fix powerpc64 LINT kernel Attempt to fix powerpc64 LINT kernel broken by r308000. Netmap's use of a uint64_t wchan seems odd, but in the interest of minimizing this change just cast through uintptr_t to silence the compiler warning. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8669 309302 by np: cxgbe(4): Include firmware for T6 cards in the driver. Update all firmwares to 1.16.12.0. Obtained from: Chelsio Communications MFC after: 3 days Sponsored by: Chelsio Communications 309300 by mm: MFV r309299: Sync libarchive with vendor. Important vendor bugfixes (relevant to FreeBSD): #821: tar -P cannot extract hardlinks through symlinks #825: Add sanity check of tar "uid, "gid" and "mtime" fields PR: 213255 Reported by: Tijl Coosemans MFC after: 1 week 309298 by emaste: libm: remove duplicate version script entries These symbols already appear in the common lib/msun/Symbol.map. Duplicate entries produce an error with LLVM's LLD linker. Reviewed by: br MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8627 309297 by mav: Make SES status updates more aggressive. - On control request update all status pages, since they may also be affected if user enables/disables enclosure slots. - Periodically update element descriptors too, since there is some hardware where they are changed dynamically. MFC after: 2 weeks Sponsored by: iXsystems, Inc. 309296 by andrew: We only use the cpu0 variable in the FDT code. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309295 by avg: bhyve: stability and performance improvement for dbgport The TCP server implementation in dbgport does not track clients, so it may try to write to a disconected socket resulting in SIGPIPE. Avoid that by setting SO_NOSIGPIPE socket option. Because dbgport emulates an I/O port to guest, the communication is done byte by byte. Reduce latency of the TCP/IP transfers by using TCP_NODELAY option. In my tests that change improves performance of kgdb commands with lots of output (e.g. info threads) by two orders of magnitude. A general note. Since we have a uart emulation in bhyve, that can be used for the console and gdb access to guests. So, bvmconsole and bvmdebug could be de-orbited now. But there are many existing deployments that still dependend on those. Discussed with: julian, jhb MFC after: 2 weeks Sponsored by: Panzura 309294 by kadesai: This patch upgrades driver version to 06.712.04.00-fbsd Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309293 by kadesai: This patch will add code to refire IOCTL commands after OCR. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309292 by kadesai: This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers. For Thunderbolt controller, keep the legacy behavior i.e. return the SYNCHRONIZE_CACHE command with success status from driver itself. There is Sysctl parameter 'block_sync_cache' is provided to enable customers either to block/unblock these commands to facilitate legacy behavior if there is a compatibility issue. Default value for module parameter is to unblock this command. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309291 by kadesai: Wait for AEN task to be completed(if in queue) before resetting the controller and return without processing event in AEN thread, if controller reset is in progress. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309290 by kadesai: This patch will add task management support in driver. Below is high level description: If a SCSI IO times out, then before initiating OCR, now the driver will try to send a target reset to the particular target for which the IO is timed out. If that also fails, then the driver will initiate OCR. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309289 by kadesai: Process outstanding reply descriptors from all the reply descriptor post queues before initiating OCR. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309288 by kadesai: Clean up reference to AEN command if abort AEN is succesful as the command is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309287 by kadesai: Update controller properties(read OCR capability bit) when MR_EVT_CTRL_PROP_CHANGED recieved. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309286 by kadesai: Add sanity check in IO and IOCTL path not to process command further if controller is in HW_CRITICAL_ERROR. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309285 by kadesai: Use a variable to indicate Gen3 controllers and remove all PCI ids based checks used for gen3 controllers. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309284 by kadesai: Problem statement: MFI linked list in megaraid_sas driver is used for mfi-mpt pass-through commands. This list can be corrupted due to many possible race conditions in driver and eventually we may see kernel panic. One example - MFI frame is freed from calling process as driver send command via polling method and interrupt for that command comes after driver free mfi frame (actually even after some other context reuse the mfi frame). When driver receive MPT frame in ISR, driver will be using the index of MFI and access that MFI frame and finally in-used MFI frames list will be corrupted. High level description of new solution - Free MFI and MPT command from same context. Free both the command either from process (from where mfi-mpt pass-through was called) or from ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which will do MFI/MPT list. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies 309283 by andrew: Mark the Broadcom code as FDT only, there is no ACPI support for the Raspberry Pi 3. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309282 by mav: Explicitly initialize cdai.flags. In SES driver uninitialized value caused unreliable physpath reporting. MFC after: 1 week Sponsored by: iXsystems, Inc. 309281 by oleg: Fix 'ipfw delete set N': do not emit meaningless 'rule 0 not found' warning if set was already empty. MFC after: 1 week 309276 by jchandra: Fix interrupt clear in pl011 uart receive function Clear the interrupt state before reading the input char from the input FIFO. In the current code there is a window between the read to the data register and the write to the the ICR, during which an input char will not cause an interrupt. This fixes the issue by which the serial port input on QEMU freezes when using the emulated pl011 serial port. 309274 by jhb: Use the correct name for the GCC macro indicating max_align_t is defined. MFC after: 3 days 309271 by imp: Trying to autodetect legacy setups lead to problems when people overrode the disk image creation routine. For now, just always bring in the legecy defines / routines. 309270 by cognet: Add a FREEBSD-Xlist file for CK. 309269 by des: Use malloc()ed buffers instead of stack buffers in gr_copy() and pw_copy(). This allows pw(8) to operate on passwd and group files with longer lines than could be accomodated by a stack buffer. It doesn't take more than a few hundred users to exceed 8192 bytes in /etc/group. MFC after: 3 weeks Sponsored by: The University of Oslo 309268 by cognet: Hook CK to the kernel build. 309267 by cognet: Add FreeBSD-specific files. 309266 by cognet: Import Concurrency Kit in the kernel. CK is a toolkit providing different lockfree algorithms/data structures. More information can be found here : www.concurrencykit.org 309262 by dim: Fix packaging for clang, lldb and lld 3.9.0 During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE directive in the usr.bin/clang/*.mk files got dropped accidentally. Restore it, with a few minor changes and additions: * Correct license in clang.ucl to NCSA * Add PACKAGE=clang for clang and most of the "ll" tools * Put lldb in its own package * Put lld in its own package Reviewed by: gjb, jmallett X-MFC-With: 309124 Differential Revision: https://reviews.freebsd.org/D8666 309257 by ae: Rework ip_tryforward() to use FIB4 KPI. Tested by: olivier Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D8526 309256 by adrian: [ath] force wake the hardware if we see a missed beacon. This adds a workaround to incorrectly behaving APs (ie, FreeBSD APs) which don't beacon out exactly when they should (at TBTT multiples of beacon intervals.) It forces the hardware awake (but leaves it in network-sleep so self generated frames still state that the hardware is asleep!) and will remain awake until the next sleep transition driven by net80211. That way if the beacons are just at the wrong interval, we get a much better chance of hearing more consecutive beacons before we go to sleep, thus not constantly disconnecting. Tested: * AR9485, STA mode, against a misbehaving FreeBSD AP. 309253 by adrian: [ath] revert the previous commit, after reading the 802.11-2012 spec a bit more. The 802.11-2012 spec talks about this - section 10.1.3.2 - Beacon Generation in Infrastructure Networks. So yes, we should be expecting beacons to be going out in multiples of intval. Silly adrian. So: * fix the FreeBSD APs that are sending beacons at incorrect TBTTs (target beacon transmit time); and * yes indeed we will have to wake up out of network sleep until we sync a beacon. 309252 by mav: Add more ASMedia PCI IDs from different sources. Exact device names are not clear, but its better then nothing at all. MFC after: 1 month 309251 by mav: Process port interrupt even is PxIS register is zero. ASMedia ASM1062 AHCI chips with some fancy firmware handling PMP inside seems sometimes forgeting to set bits in PxIS, causing command timeouts. Removal of this check fixes the issue by the theoretical cost of slightly higher CPU usage in some odd cases, but this is what Linux does too. MFC after: 1 month 309250 by avg: MFV r309249: 3821 Race in rollback, zil close, and zil flush Note: there was a merge conflict resolved by me. illumos/illumos-gate@43297f973a3543e7403ac27076490ab958a94b15 https://github.com/illumos/illumos-gate/commit/43297f973a3543e7403ac27076490ab958a94b15 https://www.illumos.org/issues/3821 We recently had nodes with some of the latest zfs bits panic on us in a rollback-heavy environment. The following is from my preliminary analysis: Let's look at where we died: > $C ffffff01ea6b9a10 taskq_dispatch+0x3a(0, fffffffff7d20450, ffffff5551dea920, 1) ffffff01ea6b9a60 zil_clean+0xce(ffffff4b7106c080, 7e0f1) ffffff01ea6b9aa0 dsl_pool_sync_done+0x47(ffffff4313065680, 7e0f1) ffffff01ea6b9b70 spa_sync+0x55f(ffffff4310c1d040, 7e0f1) ffffff01ea6b9c20 txg_sync_thread+0x20f(ffffff4313065680) ffffff01ea6b9c30 thread_start+8() If we dig in we can find that this dataset corresponds to a zone: > ffffff4b7106c080::print zilog_t zl_os->os_dsl_dataset->ds_dir->dd_myname zl_os->os_dsl_dataset->ds_dir->dd_myname = [ "8ffce16a-13c2-4efa-a233- 9e378e89877b" ] Okay so we have a null taskq pointer. That only happens during the calls to zil_open and zil_close. If we poke around we can see that we're actually in midst of a rollback: > ::pgrep zfs | ::printf "0x%x %s\\n" proc_t . p_user.u_psargs 0xffffff43262800a0 zfs rollback zones/15714eb6-f5ea-469f-ac6d- 4b8ab06213c2@marlin_init 0xffffff54e22a1028 zfs rollback zones/8ffce16a-13c2-4efa-a233- 9e378e89877b@marlin_init 0xffffff4362f3a058 zfs rollback zones/0ddb8e49-ca7e-42e1-8fdc- 4ac4ba8fe9f8@marlin_init 0xffffff5748e8d020 zfs rollback zones/426357b5-832d-4430-953e- 10cd45ff8e9f@marlin_init 0xffffff436b867008 zfs rollback zones/8f36bf37-8a9c-4a44-995c- 6d1b2751e6f5@marlin_init 0xffffff4381ad4090 zfs rollback zones/6c8eca18-fbd6-46dd-ac24- 2ed45cd0da70@marlin_init Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Reviewed by: Pavel Zakharov Reviewed by: Andriy Gapon Approved by: Richard Lowe Author: George Wilson MFC after: 3 weeks 309248 by andrew: Fix ISS_DATA_DFSC_MASK, it should include all bits in the field. 309246 by adrian: [ath] wake up the hardware from power-save before doing transmit completion checking. This was being done in the pre-AR9380 case, but not for AR9380 and later. When powersave in STA mode is enabled, this may have lead to the transmit completion code doing this: * call the task, which doesn't wake up the hardware * complete the frames, which doesn't touch the hardware * schedule pending frames on the hardware queue, which DOES touch the hardware, and this will be ignored This would show up in the logs like this: (with debugging enabled): Nov 27 23:03:56 lovelace kernel: Q1[ 0] (nseg=1) (DS.V:0xfffffe011bd57300 DS.P:0x49b57300) I: 168cc117 L:00000000 F:0005 ... (in general, doesn't require debugging enabled): Nov 27 23:03:56 lovelace kernel: ath_hal_reg_write: reg=0x00000804, val=0x49b57300, pm=2 That register is a EDMA TX FIFO register (queue 1), and the val is the descriptor being written. Whilst here, make sure the software queue gets kicked here. Tested; * AR9485, STA mode + powersave 309245 by sephe: hyperv/vmbus: Use poll/cancel APIs to wait for the CHOPEN response. Since hypervisor does not respond CHOPEN to a revoked channel. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8636 309244 by sephe: hyperv/vmbus: Add exec cancel support for message Hypercall API. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8635 309243 by delphij: Plug another leak with malformed IPv6 address. MFC after: 2 weeks 309242 by sephe: hyperv/vmbus: Add result polling support for message Hypercall API. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8634 309241 by delphij: Don't leak 'str' when we see a malformed IPv6 address. MFC after: 2 weeks 309240 by sephe: hyperv/vmbus: Add result polling support for xact API. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8633 309239 by delphij: style(9). MFC after: 2 weeks 309238 by delphij: Plug a potential memory leak. MFC after: 2 weeks 309237 by sephe: hyperv/vmbus: Stringent GPADL parameter assertion. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8632 309236 by sephe: hyperv/vmbus: Make sure that the allocated GPADL is not zero. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8631 309235 by sephe: hyperv/hn: Simplify RSS indirect table fixup API MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8630 309234 by delphij: pages and psize are always assigned, so there is no need to initialize them as zero. MFC after: 2 weeks 309233 by delphij: Eliminate variables that are computed, assigned but never used. MFC after: 2 weeks 309232 by delphij: Fix an obvious typo. MFC after: 2 weeks 309231 by sephe: hyperv/hn: Fix vmbus_chan_subidx usage. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8629 309230 by sephe: hyperv/hn: Enable multi-packet RNDIS message support by default. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8621 309229 by sephe: hyperv/hn: Fix attach error handling MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8620 309228 by sephe: hyperv/hn: Fix multi-packet RNDIS message aggregation size setting. Just in case that no chimney sending buffer can be used. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8619 309227 by sephe: hyperv/hn: Fix detach error handling. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8613 309226 by sephe: hyperv/hn: Utilize vmbus_chan_xact_wait MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8612 309225 by sephe: hyperv/vmbus: Add supportive transaction wait function. This function supports channel revocation properly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8611 309224 by sephe: hyperv/vmbus: Zero out GPADL if error happens. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8601 309223 by adrian: [ath] fix target beacon interval programming for STA mode when in powersave. This bug has been bugging me for quite some time. I finally sat down with enough coffee to figure it out. The short of it - rounding up to the next intval multiple of the TSF value only works if the AP is transmitting all its beacons on an interval of the TSF. If it isn't - for example, doing staggered beacons on a multi-VAP setup with a single hardware TSF - then weird things occur. The long of it - When powersave is enabled, the MAC and PHY are partially powered off. They can't receive any packets (or transmit, for that matter.) The target beacon timer programming will wake up the MAC/PHY just before the beacon is supposed to be received (well, strictly speaking, at DTIM so it can see the TIM - traffic information map - telling the STA whether any traffic is there for it) and it happens automatically. However, this relies on the target beacon time being programmed correctly. If it isn't then the hardware will wake up and not hear any beacons - and then it'll be asleep for said beacons. After enough of this, net80211 will give up and assume the AP went away. This should fix both TSFOOR interrupts and disconnects from APs with powersave enabled. The annoying bit is that it only happens if APs stagger things or start on a non-zero TSF. So, this would sometimes be fine and sometimes not be fine. What: * I don't know (yet) why the code rounds up to the next intval. For now, just disable rounding it and trust the value we get. TODO: * If we do see a beacon miss in STA mode then we should transition out of sleep for a while so we can hear beacons to resync against. I'd love a patch from someone to enable that particular behaviour. Note - that doesn't require that net80211 brings the chip out of sleep state - only that we wake the chip up through to full-on and then let it go to sleep again when we've seen a beacon. The wifi stack and AP can still completely just stay believing we're in sleep mode. Tested: * AR9485, STA mode, powersave enabled MFC after: 1 week Relnotes: Yes 309222 by adrian: [ath] include logging of TU versions of the TSF values. The beacon programming side of things deals in TUs and 1/8th TUs, so it's good to se the TU value here when debugging beaconing issues. 309220 by pfg: indent(1): Properly handle the wide string literal and wide char constant L. indent(1) treated the "L" in "L'a'" as if it were an identifier and forced a space character after it, breaking valid code. PR: 143090 MFC after: 2 weeks 309219 by pfg: indent(1): fix regression introduced in r303596. Multi-line comments are always block comments in KNF. Restore properly, handling the case when a long one-liner gets wrapped and becomes a multi-line comment. Obtained from: Piotr Stefaniak 309217 by pfg: indent(1): minor off-by-one error. This was introduced in r303571. Obtianed from: Piotr Stefaniak 309216 by bapt: Properly initialize nextp MFC after: 1 day 309215 by adrian: [ath] Begin to lay the groundwork for btcoex related ioctl controls. 309214 by avos: rsu: add support for hardware multicast filter setup. The algorithm is the same as in rtwn(4). Tested with Asus USB-N10 (STA) + RTL8188CUS (AP). 309212 by dim: Add a few missed clang 3.9.0 files to OptionalObsoleteFiles. X-MFC-With: 309149 309211 by hselasky: Fix spelling. 309210 by avos: rsu: various scanning fixes. - Set IEEE80211_FEXT_SCAN_OFFLOAD flag; firmware can send null data frames when associated. - Check IEEE80211_SCAN_ACTIVE scan flag instead of IEEE80211_F_ASCAN ic flag; the last is never set since r170530. - Eliminate software scan (net80211) <-> site_survey (driver) race: * override ic_scan_curchan and ic_scan_mindwell pointers so net80211 will not try to finish scanning automatically; * inform net80211 about current status via ieee80211_cancel_scan() and ieee80211_scan_done(); * remove corresponding workaround from rsu_join_bss(). Now the driver can associate to an AP with hidden SSID. Tested with Asus USB-N10. 309209 by kib: NFSv4 client tracks opens, and the track records are only dropped when the vnode is inactivated. This contradicts with the nullfs caching which keeps upper vnode around, as consequence keeping the use reference to lower vnode. Add a filesystem flag to request nullfs to not cache when mounted over that filesystem, and set the flag for nfs v4 mounts. Reported by: asomers Reviewed by: rmacklem Tested by: asomers, rmacklem Sponsored by: The FreeBSD Foundation MFC after: 1 week 309204 by alc: The function vm_page_cache() no longer exists. Remove its man page. 309203 by alc: Recursion on the free page queue mutex occurred when UMA needed to allocate a new page of radix trie nodes to complete a vm_radix_insert() operation that was requested by vm_page_cache(). Specifically, vm_page_cache() already held the free page queue lock when UMA tried to acquire it through a call to vm_page_alloc(). This code path no longer exists, so there is no longer any reason to allow recursion on the free page queue mutex. Improve nearby comments. Reviewed by: kib, markj Tested by: pho Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8628 309202 by landonf: bhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding. - Defined an abstract NVRAM I/O API (bhnd_nvram_io), decoupling NVRAM/SPROM parsing from the actual underlying NVRAM data provider (e.g. CFE firmware devices). - Defined an abstract NVRAM data API (bhnd_nvram_data), decoupling higher-level NVRAM operations (indexed lookup, data conversion, etc) from the underlying NVRAM file format parsing/serialization. - Implemented a new high-level bhnd_nvram_store API, providing indexed variable lookup, pending write tracking, etc on top of an arbitrary bhnd_nvram_data instance. - Migrated all bhnd(4) NVRAM device drivers to the common bhnd_nvram_store API. - Implemented a common bhnd_nvram_val API for parsing/encoding NVRAM variable values, including applying format-specific behavior when converting to/from the NVRAM string representations. - Dropped the now unnecessary bhnd_nvram driver, and moved the broadcom/mips-specific CFE NVRAM driver out into sys/mips/broadcom. - Implemented a new nvram_map file format: - Variable definitions are now defined separately from the SPROM layout. This will also allow us to define CIS tuple NVRAM mappings referencing the common NVRAM variable definitions. - Variables can now be defined within arbitrary named groups. - Textual descriptions and help information can be defined inline for both variables and variable groups. - Implemented a new, compact encoding of SPROM image layout offsets. - Source-level (but not build system) support for building the NVRAM file format APIs (bhnd_nvram_io, bhnd_nvram_data, bhnd_nvram_store) as a userspace library. The new compact SPROM image layout encoding is loosely modeled on Apple dyld compressed LINKEDIT symbol binding opcodes; it provides a compact state-machine encoding of the mapping between NVRAM variables and the SPROM image offset, mask, and shift instructions necessary to decode or encode the SPROM variable data. The compact encoding reduces the size of the generated SPROM layout data from roughly 60KB to 3KB. The sequential nature SPROM layout opcode tables also simplify iteration of the SPROM variables, as it's no longer neccessary to iterate the full NVRAM variable definition table, but instead simply scan the SPROM revision's layout opcode table. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8645 309201 by scottl: Add a missing header 309200 by markj: Launder VPO_NOSYNC pages upon vnode deactivation. As of r234483, vnode deactivation causes non-VPO_NOSYNC pages to be laundered. This behaviour has two problems: 1. Dirty VPO_NOSYNC pages must be laundered before the vnode can be reclaimed, and this work may be unfairly deferred to the vnlru process or an unrelated application when the system is under vnode pressure. 2. Deactivation of a vnode with dirty VPO_NOSYNC pages requires a scan of the corresponding VM object's memq for non-VPO_NOSYNC dirty pages; if the laundry thread needs to launder pages from an unreferenced such vnode, it will reactivate and deactivate the vnode with each laundering, potentially resulting in a large number of expensive scans. Therefore, ensure that all dirty pages are laundered upon deactivation, i.e., when all maps of the vnode are removed and all references are released. Reviewed by: alc, kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8641 309199 by rmacklem: Use November instead of the abbreviation. Requested by: Ed Shouten MFC after: 2 weeks 309198 by rmacklem: Document the -E flag for nfsstat. This is a content change. Reviewed by: bcr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8626 309197 by rmacklem: Add a -E flag to nfsstat.c so that it prints out the NFSv4.1 procedure/operation counts. It also avoids clipping the counts at 9 digits. Reviewed by: bcr (doc parts) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8626 309196 by avos: rsu: fix R92S_TXDW1_QSEL_H2C definition (0x1f -> 0x13). Without this fix firmware ignores all but first 32 commands (= almost everything (except plain Tx / Rx) stops working). Tested with ASUS USB-N10. 309195 by ian: Add an ethernet0 alias pointing to the /aix/usb/hub/ethernet node. This is required for u-boot to locate the ethernet node when it's doing fixup of the mac-address property when the user has overridden the default addr. 309194 by bapt: initialize *nextp which could be left uninitialized in case the configuration file cannot be open/read Reported by: Coverity via cem MFC after: 2 days CID: 1365665 309192 by sevan: Fix null dereference when running out of nodes during rename. PR: 212370 Submitted by: Sascha Wildner Reviewed by: bcr (mentor) Approved by: bapt Obtained from: NetBSD MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8643 309191 by rakuco: fdt: Expect strchr() to return a const char* In C, strchr(3) returns a char*, whereas C++ defines two overloads: * const char *strchr(const char*, int) * char *strchr(char*, int) Building fdt.cc (with the WITHOUT_GPL_DTC knob set) with libc++ 3.9.0 (imported in r309124) was failing because libc++ r260377 added the first overload to string.h, leading to failures such as: fdt.cc:1638:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' Just define val as a const char* to fix it. Upstreamed in https://github.com/davidchisnall/dtc/pull/14 Reviewed by: emaste Approved by: emaste 309190 by manu: PLL3 have a fractional mode where an explicit frequency (297Mhz or 270) can be selected for it. If the desired frequency is one of those two, use this mode instead of the integer one. When calculating the PLL3 freq for the dotclock, check if it is a multiple of the fracional frequencies. MFC after: 2 weeks 309189 by kib: Fix automatic eventtimer hardware selection when ARAT (APIC-Timer-always-running) is not implemented. If machine has ncpus >= 8 and non-FSB interrupt routing from HPET, default HPET eventtimer quality 450 is reduced by 100, i.e. it is 350. On the other hand, LAPIC default quality is 600 and it is reduced by 200 if ARAT is not reported. We end up with HPET quality 350 < LAPIC quality 400, despite ARAT is not set. Then, since deep Cx states are active by default, eventtimer fail. E.g., on Nehalem Core i7 CPU and X58 chipset, LAPIC only works in C0/C1/C1E and HPET does not implement FSB mode, which otherwise requires manual switch to HPET to get working system. Set LAPIC eventtimer quality to 100 if no ARAT. While there, do not ignore deadlint TSC mode for LAPIC timer if ARAT is not implemented. If user manually selected LAPIC eventtimer on such CPU, there is no reason to not use deadline if available and not disabled administratively. Sponsored by: The FreeBSD Foundation MFC after: 1 week 309188 by br: Don't build Ingenic kernels until we have non-static FDT support for them. Sponsored by: DARPA, AFRL 309187 by ae: Fix ICMPv6 Time Exceeded error message translation. Obtained from: Yandex LLC Sponsored by: Yandex LLC 309184 by delphij: style(9) indent changes, no actual code change. MFC after: 2 weeks 309179 by pfg: ext2: avoid possible overflow when calculating malloc size. This is inspired on r308064 for case of reloading UFS. MFC after: 1 week 309174 by emaste: netipsec: fix build after 309144 Reported by: rakuco 309171 by rmacklem: Stop "nfsstat -z" from clearing counts of NFSv4 state structures. The "-z" option on nfsstats was erroneously zeroing out the counts of NFSv4 state structures. These counts will normally go back down to zero as state is released. When zeroed out by "-z", these counts can go negative. This patch fixes this problem. MFC after: 2 weeks 309169 by dim: Get rid of separate Subversion mergeinfo properties for llvm-dwarfdump and llvm-lto. The mergeinfo confuses Subversion enormously, and these directories will just use the mergeinfo for llvm itself. 309167 by jhibbits: Add an isync to after mtsrin, required by the MPC750 errata MPC750 User Manual Errata (rev 1) adds a note to C.4.2.2 noting that mtsr, mtsrin, and mtmsr all require a isync after the instruction and before data address translation uses any of the segment registers. This should make FreeBSD run correctly on the G3 again. Reported by: Mark Millard MFC after: 1 week 309151 by emaste: Use explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr MAXPAGESIZE is not well defined by the GNU ld documentation. Different linkers, and different versions of the same linker, use different MAXPAGESIZE values. Current versions of GNU gold and LLVM's lld use 4K. When set to 4K the kernel panics at boot due to an issue with x86bios. Here we want the kernel physaddr to be the amd64 superpage size, so use that value (2MB) explicitly. With this change GNU gold and LLVM lld can link a working amd64 kernel. PR: 214718 (x86bios) Differential Revision: https://reviews.freebsd.org/D8610 309150 by dim: Bump FREEBSD_CC_VERSION again for r309147 and 309149. 309149 by dim: Pull in r283060 from upstream llvm trunk (by Hal Finkel): [PowerPC] Refactor soft-float support, and enable PPC64 soft float This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. Pull in r283061 from upstream clang trunk (by Hal Finkel): [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float Enable soft-float support on PPC64, as the backend now supports it. Also, the backend now uses -hard-float instead of +soft-float, so set the target features accordingly. Fixes PR26970. Reported by: Mark Millard PR: 214433 309148 by jhb: Permit timed sleeps for threads other than thread0 before timers are working. The callout subsystem already handles early callouts and schedules the first clock interrupt appropriately based on the currently pending callouts. The one nit to fix was that callouts scheduled via C_HARDCLOCK during early boot could fire too early once timers were enabled as the per-CPU base time is always zero until timers are initialized. The change in callout_when() handles this case by using the current uptime as the base time of the callout during bootup if the per-CPU base time is zero. Reviewed by: kib MFC after: 2 weeks Sponsored by: Netflix 309147 by dim: Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek): [PPC] Set SP after loading data from stack frame, if no red zone is present Follow-up to r280705: Make sure that the SP is only restored after all data is loaded from the stack frame, if there is no red zone. This completes the fix for https://llvm.org/bugs/show_bug.cgi?id=26519. Differential Revision: https://reviews.llvm.org/D24466 Reported by: Mark Millard PR: 214433 309146 by fabient: Update r309143 to prevent false sharing. Reported by: mjg Approved by: so MFC after: 1 month 309145 by andrew: Fix the TLB conflict abort value. This should be a no-op as we don't use this value in the code. 309144 by fabient: IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets. Since the previous algorithm, based on bit shifting, does not scale with large replay windows, the algorithm used here is based on RFC 6479: IPsec Anti-Replay Algorithm without Bit Shifting. The replay window will be fast to be updated, but will cost as many bits in RAM as its size. The previous implementation did not provide a lock on the replay window, which may lead to replay issues. Reviewed by: ae Obtained from: emeric.poupon@stormshield.eu Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D8468 309143 by fabient: In a dual processor system (2*6 cores) during IPSec throughput tests, we see a lot of contention on the arc4 lock, used to generate the IV of the ESP output packets. The idea of this patch is to split this mutex in order to reduce the contention on this lock. Reviewed by: delphij, markm, ache Approved by: so Obtained from: emeric.poupon@stormshield.eu MFC after: 1 month Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D8130 309142 by emaste: Add WITH_LLD_AS_LD build knob If set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is not capable of linking the world and kernel, but can self-host and link many substantial applications. GNU ld continues to be used for the world and kernel build, regardless of how this knob is set. It is on by default for arm64, and off for all other CPU architectures. Sponsored by: The FreeBSD Foundation 309140 by sephe: hyperv/vmbus: Add a simplified version of channel close. So that the caller can know the channel close error and react accordingly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8600 309139 by sephe: hyperv/vmbus: Propagate close error. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8599 309138 by sephe: hyperv/vmbus: Always try disconnect/free bufring memory upon channel close While I'm here, minor wording and style changes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8598 309136 by sephe: hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8570 309135 by sephe: hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected. So that the callers of vmbus_chan_open_br() could handle the passed in bufring memory properly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8569 309134 by sephe: hyperv/vmbus: No stranded bufring GPADL is allowed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8568 309133 by sephe: hyperv/vmbus: GPADL disconnect error on a revoked channel is benign. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8567 309132 by sephe: hyperv/vmbus: Don't close unopened channels. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8566 309131 by sephe: hyperv/vmbus: Fix sysctl tree leakage, if channel open fails. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8565 309129 by sephe: hyperv/vmbus: Minor style changes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8564 309128 by sephe: hyperv/vmbus: Commit the GPADL id only after the connection succeeds. Minor style change. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8563 309127 by dexuan: hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at least shouldn't break build. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 3 days Sponsored by: Microsoft 309126 by emaste: Correct lld llvm-tblgen dependency file name 309124 by dim: Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 release, and add lld 3.9.0. Also completely revamp the build system for clang, llvm, lldb and their related tools. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld are available here: Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan Beich for their help. Relnotes: yes MFC after: 1 month 309121 by jceel: virtio_console: handle short writes to an Unix domain socket gracefully. writev() can do a short write. Retrying it results in a very convoluted and complex code, so we iterate over iovec and do regular stream_write() instead. Approved by: trasz Sponsored by: iXsystems, Inc. 309120 by jceel: Allow opening virtio-console ports from the host side before guest enumerates them. Approved by: trasz Sponsored by: iXsystems, Inc. 309119 by avg: virtio_pci: fix announcement of MSI-X interrupts for queues Queues that do not need interrupts - for instance, output queues - do not have a corresponding entry in vtpci_msix_vq_interrupts. So, it was wrong to increment a pointer into that array when iterating over such a queue. I ran into this bug while trying to use virtio_console(4) that allocates a lot of queues with every other being an output queue without an interrupt handler (if MultiplePorts feature is negotiated). MFC after: 2 weeks 309116 by avg: virtio_console: correctly determine presense of payload and its length MFC after: 2 weeks 309114 by jhibbits: Fix the build post-r309017 for MPC85XX/MPC85XXSPE r309017 removed two fields from struct vmmeter, which is embedded in struct pcpu. This caused the struct size to change, triggering the CTASSERT in sys/pcpu.h. Add the extra 8 bytes back in as padding. 309113 by loos: Add the etherswitch(4) support for TI CPSW. Adds VLAN and port management abilities for etherswitchcfg(8). The code is conditionally enabled for now, because it is not necessary on single ethernet use cases. Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) 309112 by gonzo: [bytgpio] Fix pc98 build by disabling bytgpio module for this platform Reported by: dim 309111 by mjg: wait: avoid relocking the child if proc_to_reap returns 1 proc_to_reap would always unlock. However, if it returned 1, kern_wait6 would immediately lock it again. Save the dance. Reviewed by: kib 309109 by des: Add a warning against modifying this code without understanding it, and an example of how not to make it more portable. I've had this lying around uncommitted since 2009... 309100 by brueffer: Sync the rtwn(4) entry with the manpage. 309099 by avg: MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback illumos/illumos-gate@90f2c094b3822f4825f21cef2c2faf7d03b55139 https://github.com/illumos/illumos-gate/commit/90f2c094b3822f4825f21cef2c2faf7d03b55139 https://www.illumos.org/issues/7181 zfsvfs_setup() is called in both zfs_mount and zfs_resume_fs paths. dmu_objset_set_user(zfsvfs->z_os, zfsvfs) is called early in zfsvfs_setup() before the setup is actually completed, thus an under-constructed zfsvfs becomes visible. Additionally, there is nothing to serialize the two call paths. As a result two threads can step on each other's toes. assertion failed: zilog->zl_clean_taskq == NULL, file: ../../common/fs/zfs/zil.c, line: 1772 > $c vpanic() 0xfffffffffbdf6928() zil_open+0x45(ffffff1bbc5dd000, fffffffff7993880) zfsvfs_setup+0x84(ffffffb378d77000, 0) zfs_resume_fs+0x132(ffffffb378d77000, ffffffb37ddcf000) zfs_ioc_rollback+0x96(ffffffb37ddcf000, ffffff01dcdc4cd0, ffffff01aa091000) zfsdev_ioctl+0x215(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) cdev_ioctl+0x39(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) spec_ioctl+0x60(ffffff0197737700, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) fop_ioctl+0x55(ffffff0197737700, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) ioctl+0x9b(7, 5a19, 80465f8) sys_syscall32+0x1f7() > ffffff1bbc5dd000::print objset_t os_zil os_zil = 0xffffff1c053cf7c0 > 0xffffff1c053cf7c0::print zilog_t zl_clean_taskq Reviewed by: Matthew Ahrens Approved by: Gordon Ross Author: Andriy Gapon MFC after: 2 weeks 309098 by avg: MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try to free already free blocks 7199 dsl_dataset_rollback_sync may try to free already free blocks 7200 no blocks must be born in a txg after a snaphot is created illumos/illumos-gate@bfaed0b91e57062c38bc16b4f89db3c8f0052a9b https://github.com/illumos/illumos-gate/commit/bfaed0b91e57062c38bc16b4f89db3c8f0052a9b https://www.illumos.org/issues/7199 dsl_dataset_rollback_sync may try to free already freed blocks when it calls dsl_destroy_head_sync_impl to destroy a temporary clone. That happens if a snapshot to which we are rolling back and from which the clone is created has some ZIL records. https://www.illumos.org/issues/7200 No new blocks must be born in a dataset in the same TXG after a snapshot of the dataset is taken. Those blocks would have the same blk_birth as the dataset's ds_prev_snap_txg and as such they would be presumed to belong o the snapshot while in fact they do not. All the datasets must be clean before sync tasks are run, so the described scenario may happen only if one of the sync tasks dirties the dataset and another sync task takes its snapshot. Then, there will be another sync pass because of the dirty data and the new blocks will be born in the same TXG when the data is written out. It seems that almost all of the existing sync tasks modify only MOS and do not dirty any objsets. The only exception that I've been able to identify so far is the rollback which can modify an objset when it zeroes out the objset's ZIL. Reviewed by: Matthew Ahrens Reviewed by: Brad Lewis Approved by: Gordon Ross Author: Andriy Gapon MFC after: 3 weeks 309097 by avg: MFV r308987: 7180 potential race between zfs_suspend_fs+zfs_resume_fs and zfs_ioc_rename illumos/illumos-gate@690041b9caf801816f2d0bac90bc7cecefb73523 https://github.com/illumos/illumos-gate/commit/690041b9caf801816f2d0bac90bc7cecefb73523 https://www.illumos.org/issues/7180 If a filesystem is not unmounted while the rename is being performed, then, for example, a concurrect zfs rollback may call zfs_suspend_fs followed by zfs_resume_fs on the same filesystem. The latter takes the filesystem's name as an argument. If the filesystem name changes as a result of the rename, then dmu_objset_hold(osname, zfsvfs, &os) call in zfs_resume_fs would fail resulting in a kernel panic. So far I have been able to reproduce this problem on FreeBSD where zfs rename has -u option that skips the unmounting before doing the renaming. But I think that in theory the same problem can occur on illumos as well, because the unmounting is done in userland before invoking the rename ioctl and there could be a race with, e.g., zfs mount. panic: solaris assert: dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os) == 0 (0x2 == 0x0), file: /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/ zfs/zfs_vfsops.c, line: 2210 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004df30710 vpanic() at vpanic+0x182/frame 0xfffffe004df30790 panic() at panic+0x43/frame 0xfffffe004df307f0 assfail3() at assfail3+0x2c/frame 0xfffffe004df30810 zfs_resume_fs() at zfs_resume_fs+0xb9/frame 0xfffffe004df30860 zfs_ioc_rollback() at zfs_ioc_rollback+0x61/frame 0xfffffe004df308a0 zfsdev_ioctl() at zfsdev_ioctl+0x65c/frame 0xfffffe004df30940 devfs_ioctl_f() at devfs_ioctl_f+0x156/frame 0xfffffe004df309a0 kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe004df30a00 sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe004df30ae0 amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe004df30bf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe004df30bf0 Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Approved by: Richard Lowe MFC after: 2 weeks 309096 by avg: MFV r308989: 6428 set canmount=off on unmounted filesystem tries to unmount children This is a cosmetic and bookkeeping change as the actual change is already in FreeBSD. See r297521, r304520, r308985. 309095 by martymac: Fix path for per-user nsmb.conf file ~/nsmb.conf, as erroneously introduced by r214387, is never used. Fix the man page to specify that ~/.nsmbrc is used instead. PR: 210652 Submitted by: ganael.laplanche@corp.ovh.com Approved by: gjb (doceng@) 309094 by avg: MFV r308986: 6412 zfs receive: -u can be ignored sometimes This is a record only change, the actual change is in FreeBSD since r297520. 309093 by avg: firewire: initialize tag label to -1 in fw_xfer_alloc() Zero can be confused for a potentially valid value. For example, if I load and unload sbp driver I get a lot of messages like the following: fw_tl_free: the xfer is not in the queue (tlabel=0, flag=0x0) send: dst=0x00 tl=0x00 rt=0 tcode=0x0 pri=0x0 src=0x000 recv: dst=0x01 tl=0x21 rt=1 tcode=0x1 pri=0x0 src=0xffc0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe04464407e0 fw_tl_free() at fw_tl_free+0x18d/frame 0xfffffe0446440820 fw_xfer_unload() at fw_xfer_unload+0xca/frame 0xfffffe0446440840 fw_xferlist_remove() at fw_xferlist_remove+0x2f/frame 0xfffffe0446440870 sbp_detach() at sbp_detach+0x1e0/frame 0xfffffe04464408e0 device_detach() at device_detach+0x80/frame 0xfffffe0446440900 devclass_driver_deleted() at devclass_driver_deleted+0x6a/frame 0xfffffe0446440940 devclass_delete_driver() at devclass_delete_driver+0x7d/frame 0xfffffe0446440980 driver_module_handler() at driver_module_handler+0xff/frame 0xfffffe04464409d0 module_unload() at module_unload+0x32/frame 0xfffffe04464409f0 linker_file_unload() at linker_file_unload+0x24b/frame 0xfffffe0446440a40 kern_kldunload() at kern_kldunload+0xbc/frame 0xfffffe0446440a70 amd64_syscall() at amd64_syscall+0x314/frame 0xfffffe0446440bf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0446440bf0 MFC after: 2 weeks 309092 by avg: fwohci: report whether PhysicalUpperBound register is implemented Please see section 5.15 of 1394 OHCI Specification. If the register is not implemented, then the physical response unit is limited to the first 4GB of the physical memory. In that case the non-cooperative debugging over firewire (using /dev/fwmem) can not be expected to work if a target has more RAM than that. The method is described in gdb.4 and the Developer's Handbook. It seems that most of the consumer hardware does not implement PhysicalUpperBound register. MFC after: 1 week 309090 by avg: further fix zfs_lock() diagnostics It was very wrong to look at the vnode and znode internals without having locked the vnode first. Reported by: pho Tested by: pho MFC after: 1 week X-MFC with: r308887 309085 by sephe: hyperv/hn: Fix primary channel revocation Since hypervisor will not drain the TX bufring, once the channels are revoked: - Setup vmbus orphan handler properly. - Make sure that suspension will not wait the TX bufring draining forever. - GC the pending TX descs on detach path, before freeing the busdma stuffs. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8559 309084 by manu: Enable the SPI1 and SPI2 node for Olimex A20 SOM EVB. This was missed in r309079. 309083 by sephe: hyperv/vmbus: Fix the multi-channel revoking on vmbus side. - Reference count the sub-channel when channel offer message is processed, so that immediate rescind message on the same channel will not race sub-channel open on driver side. - Drop the above reference when sub-channel is closed, this closely mimics the hypervisor's reaction when primary channel is closed on the VM side. No drivers use sub-channel after primary channel is closed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8546 309082 by dexuan: share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386 We shouldn't install them on the architectures not supported by Hyper-V. And, hv_ata_pci_disengage.4.gz should be removed from all architectures: 1) It should have only applied to Hyper-V; 2) For Hyper-V platforms (amd64 and i386), the related driver was removed by r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016), because now we have a better mechanism to disble the ata driver for hard disks when the VM runs on Hyper-V. Reviewed by: sephe, andrew, jhb Approved by: sephe (mentor) MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8572 309081 by sephe: hyperv/vmbus: Fix the primary channel revoking on vmbus side. Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked primary channels. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8545 309080 by sephe: hyperv/vmbus: Implement orphan support for transaction API It will be used to fix the primary channel revocation support. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8525 309079 by manu: Enable the SCL and SDA i2c line for DDC. This is an undocumented register that we need to set if we do not want to rely on u-boot or other bootloader. 309078 by shurd: Add new device IDs Add device IDs for new hardware, sort the device IDs, add comment regarding fragice NPAR/VF detection. Approved by: davidch MFC after: 6 days Sponsored by: Broadcom Limited 309076 by gonzo: [rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one Now that BCM283x source are buildable with SMP option it cam be moved to GENERIC SMP config. SMP itself does not work on RPi3 yet due to lack of PSCI monitor which is work in progress at the moment 309074 by gonzo: [rpi3] Fix SMP build for FreeBSD/arm64 309073 by shurd: Fix version string This is no longer on github, but in FreeBSD base. Approved by: davidch MFC after: 6 days Sponsored by: Broadcom Limited 309070 by avos: rtwn.4: fix hostapd(8) man page section. 309069 by gnn: Add tunable to disable destructive dtrace Submitted by: Joerg Pernfuss Reviewed by: rstone, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8624 309068 by jhb: Fix _mips_rtld_bind() to handle ELF filters. MIPS does not use the common _rtld_bind() to handle runtime binding. Instead, it uses a private _mips_rtld_bind(). Update _mips_rtld_bind() to include the changes made to _rtld_bind() in r216695 and r218476 to support upgrading the read-locked rtld_bind_lock to a write lock when an object with a filter is encountered. While here, add a 'where' variable to track the location of the fixup in the GOT to make the code flow more closely match _rtld_bind(). Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D8625 309067 by mjg: cache: ensure that the number of bucket locks does not exceed hash size The size can be changed by side effect of modifying kern.maxvnodes. Since numbucketlocks was not modified, setting a sufficiently low value would give more locks than actual buckets, which would then lead to corruption. Force the number of buckets to be not smaller. Note this should not matter for real world cases. Reported and tested by: pho 309066 by brueffer: Fix various mdoc issues reported by mandoc -Tlint. 309065 by brueffer: Fix various mdoc issues reported by mandoc -Tlint. 309064 by manu: Enable UEXT related nodes for Olimex A20 SOM UEXT are Universal EXTension connector from Olimex. They embed i2c, spi and uart pins along power in one connector and are found on most, if not all, Olimex boards. The Olimex A20 SOM EVB have two UEXT connector so enable the nodes found on those two connectors. Patch has been applied upstream, in the meantime add the nodes to our custom DTS. 309063 by manu: Test that the emac device is enabled in probe function MFC after: 3 days 309062 by markj: Release laundered vnode pages to the head of the inactive queue. The swap pager enqueues laundered pages near the head of the inactive queue to avoid another trip through LRU before reclamation. This change adds support for this behaviour to the vnode pager and makes use of it in UFS and ext2fs. Some ioflag handling is consolidated into a common subroutine so that this support can be easily extended to other filesystems which make use of the buffer cache. No changes are needed for ZFS since its putpages routine always undirties the pages before returning, and the laundry thread requeues the pages appropriately in this case. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D8589 309060 by brueffer: Fix comment typo. PR: 208484 Submitted by: madpilot MFC after: 1 week 309059 by misha: - Add myself (misha) as a ports committer - Update mentor/mentee relationships Approved by: jpaetzel (mentor) 309055 by br: Split MALTA board config to big and little endian versions. This fixes compilation after r308807 ("Pass MACHINE_ARCH on command line for MIPS kernels.") Sponsored by: DARPA, AFRL 309053 by br: Increase pcpu size to 512 so it become both denominator of PAGE_SIZE and aligned to CACHE_LINE_SIZE. This fixes CTASSERT. Sponsored by: DARPA, AFRL 309051 by des: Remove debugging code. 309048 by andrew: Mark cpu_find_cpu0_fdt as FDT only. It's only called when this is set, and the kernel is using FDT. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309046 by andrew: Remove the unneeded ofw_cpu_reg function signature, it's not used in this file. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309039 by sephe: hyperv/vmbus: Merge free/active locks. These functions are only used by management stuffs, so there are no needs to introduce extra complexity. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8524 309035 by julian: This little BSD licensed library has been kicking around for years. It allows one to trivially convert an absolute path to a relative path and the reverse. The test programs themselves are very useful in scripts but the real use comes shortly with the -r and -a arguments to ln. These are sometimes known as the --relative and --absolute flags and can force a symlink to be relative when you only have an absolue path. Another place these are sometimes used is to add -a and -r args to 'realpath'. Incredibly useful in Makefiles. I was going to just add the files in with 'ln' but a library makes more sense. The test programs may come out in their own right some day for scripting. released under a BSD 2-clause: * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. * Copyright (c) 1999 Tama Communications Corporation. All rights reserved. The test directry does not conform to any framework. Not connected to build. doc people may want to play with the manual pages. Obtained from: https://www.tamacom.com/pathconvert.html Shigio Yamaguchi. MFC after: 1 month Relnotes: yes Sponsored by: Panzura, Tama Communications Corporation 309030 by sephe: hyperv/vmbus: Set a mark on the revoked channel. This will be used to fix device detach DEVMETHOD for revoked primary channel. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8522 309029 by manu: Do not attempt to disable/release clock if it had not been enabled. While here fix a style(9) issue. MFC after: 1 week 309028 by shurd: Add missing break to switch statement Minimal impact, would allow selection of LR media when KR is connected. Reported by: Coverity Approved by: davidch MFC after: 7 days Sponsored by: Broadcom Limited 309027 by brooks: Allocate a struct ifreq rather than using a (wrong) computed size for the BIOCSETIF ioctl. The kernel always copies an entire struct ifreq and IPv4 addresses will always fit in an ifreq. On systems with pointers larger than 64-bits, the computed size will be less than the size of struct ifreq, potentially resulting in the kernel attempting to copyin memory from outside the allocation. Reviewed by: jhb Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8445 309026 by jilles: open(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW. We return [EMLINK] instead of [ELOOP] when trying to open a symlink with O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code like cmp -h and xz takes advantage of this. PR: 214633 Reviewed by: kib, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8586 309025 by phk: Pass the correct size argument to ioctl(DIOCGSECTORSIZE) 309022 by andrew: Add the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309019 by dab: Add myself (dab) as a src committer and vangyzen as my mentor. Approved by: vangyzen (mentor) 309018 by br: Revert r306186 ("Adjust the sopt_val pointer on bigendian systems"). This logic doesn't work with bigger sopt_valsize (e.g. when ipfw passing 2048 bytes rule). Reported by: adrian Sponsored by: DARPA, AFRL 309017 by alc: Remove PG_CACHED-related fields from struct vmmeter, because they are no longer used. More precisely, they are always zero because the code that decremented and incremented them no longer exists. Bump __FreeBSD_version to mark this change. Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8583 309016 by andrew: Only build acpi_timer.c on x86, it fails on arm64 as it attempts to access an invalid address. It is also unneeded on arm64 as we use the ARM Generic Timer driver. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 309014 by adrian: [net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this." TODO: * drink real coffee before committing in the morning, or there's a high risk of more obviously self-evident commits being turned into attempts at humour. Reported by: cem, Coverity CID 1366219 309006 by emaste: remove unnecessary vm includes from setproctitle vm headers were needed only for the PS_STRINGS fallback, which was removed in r297888. MFC after: 1 week Sponsored by: The FreeBSD Foundation 308996 by des: Refactor fetch_connect() and fetch_bind() to improve readability and avoid repeating the same DNS lookups. MFC after: 3 weeks 308995 by kib: On error, bread(9) zeroes buffer pointer, do not dereference it. See r294954 for the bread(9) change and r297401 for similar cd9660 fix. Reported and tested by: Joshua Kinard PR: 214705 Sponsored by: The FreeBSD Foundation MFC after: 1 week 308985 by avg: revert r304520, set canmount=on is not supposed to mount the filesystem Not sure where I got the idea that it should. See https://github.com/openzfs/openzfs/pull/218 Reported by: mahrens Pointyhat to: avg MFC after: 5 days 308980 by kib: Use buffer pager for NFS. The pager, due to its construction, implements clustering for the page-ins. In particular, buildworld load demonstrates reduction of the READ RPCs from 39k down to 24k. No change in real or CPU time was observed. Discussed with, and measured by: bde No objections from: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week 308973 by kib: Minor cleanup, remove unneeded XXX comments and unused re-define. Sponsored by: The FreeBSD Foundation MFC after: 1 week 308969 by kib: Restore vnode pager statistic for buffer pagers. Reviewed by: alc, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8585 308965 by andrew: Split out the FDT parts of the pmu driver to make way for adding ACPI support. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308958 by delphij: Replay r304721 in contrib/ so the change won't get lost across import. 308957 by delphij: MFV r308954: ntp 4.2.8p9. Approved by: so 308956 by adrian: [net80211] Only send out a probe request if we see an unknown IBSS node that matches our SSID. 308953 by jkim: Merge ACPICA 20161117. 308952 by adrian: [net80211] store references to VHT and related IEs. This just stores pointers to the IE; it doesn't yet parse anything. Note: it blows out the size of ieee80211_node, so this will require ye olde kernel/modules recompile. 308951 by adrian: [ath] obey the peer A-MPDU density and max-size. * Obey the peer A-MPDU density if it's larger than the currently configured one. * Pay attention to the peer A-MPDU max-size and don't assume we can transmit a full A-MPDU (64k!) if the peer announces smaller values. Relnotes: ath(4): Fix A-MPDU transmit; obey A-MPDU density and max size. 308950 by adrian: [net80211] Remove extra \n. 308949 by adrian: [net80211] flesh out more IBSS 11n support * Pepper comments around which describe what state(s) we're in when faking up 11n nodes. * By default don't fake it up as 11n until we properly negotiate the 11n capabilities using probe request/response frames. * Send a probe request with our HT information, as the 802.11-2012 spec suggests. * Reassociate with the driver if we've been promoted. This is done because although learning a peer via beacons can learn 11n state, learning peers via hearing probe frames and broadcast frames does not. Thus, sometimes you end up with an 11n peer in the peer table and sometimes you don't. Note that the probe request/response exchange may not actually succeed. Ideally we'd put the peer into some blocking state until we've exchanged probe request/reponse to learn capabilities, or we timeout and just stay non-11n. This is more an experiment to get 11n IBSS nodes actually discovering each other and be able to transmit. There are other issues that creep up which I'll attempt to address in future commits. Tested: * AR9380 NICs in 11n mode. Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D8365 308948 by jhb: Initialize 'ticks' earlier in boot after 'hz' is set. This avoids the time-warp after kthreads have started running and the required fixup to td_slptick and td_blktick in the EARLY_AP_STARTUP case. Now, 'ticks' is initialized before any kthreads are created or any context switches are performed. Tested by: gavin MFC after: 2 weeks Sponsored by: Netflix 308947 by rwatson: Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, always audit the file-descriptor number and vnode information for all fnctl(2) commands, not just locking-related ones. This was likely an oversight in the original adaptation of this code from XNU. MFC after: 3 days Sponsored by: DARPA, AFRL 308945 by gjb: Set the 'vital' flag on the runtime and jail packages. The default pkg(8) from pkg.freebsd.org requires libjail.so, so mark the jail package as vital along with the runtime package to avoid errors when libjail.so is removed. This is a no-op for systems with WITHOUT_JAIL in src.conf(5) and pkg(8) built from the Ports Collection. In order to make this work without marking packages such as the jail-lib32, for example, the jail.ucl file needed to be split out into separate files similarly to the runtime-*.ucl files. Glanced at by: brd MFC after: 5 days Sponsored by: The FreeBSD Foundation 308944 by hiren: r308942 broke kernel build. Add acpi_if.h to module makefile to fix it. Submitted by: peter 308943 by hiren: For RTT calculations mid-session, we explicitly ignore ACKs with tsecr of 0 as many borken middle-boxes tend to do that. But during 3whs, in syncache_expand(), we don't do that which causes us to send a RST to such a client. Relax this constraint by only using tsecr to compare against timestamp that we sent when it is not 0. As a result, we'd now accept the final ACK of 3whs with tsecr of 0. Reviewed by: jtl, gnn Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D8552 308942 by gonzo: [bytgpio] Add module for bytgpio(4) MFC after: 3 days 308941 by gonzo: [bytgpio] Add bytgpio(4) man page with general description of the driver MFC after: 3 days 308940 by gonzo: [bytgpio] prepare bytgpio(4) for modularization - Add detach method - module should depend on gpiobus, not gpio 308939 by andrew: Include the missing accommon.h from the ACPI uart code. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308938 by andrew: Add support to find the arm64 serial using the ACPI tables. This uses the Serial Port Console Redirection Table to find the device to use. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308937 by mizhka: [etherswitch] add ukswitch hint that is phy offset at mdio register This patch allows to specify PHY register offset for ukswitch. For instance, switch MAICREL KS8995XA connected via MDIO to SoC, but PHY register starts at 1. So hint for this case is: hint.ukswitch.0.phyoffset=1 No change/effect if hint is not set. Submitted by: Hiroki Mori Reviewed by: adrian, mizhka Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D8584 308936 by andrew: Mark virtio_mmio as FDT only, it lacks an ACPI attachment. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308935 by andrew: Mark uart_dev_snps.c as FDT only, it doesn't have and ACPI bindings. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308934 by andrew: Mark extres as FDT only. Much of this assumes FDT and fails to build without it. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308933 by andrew: Mark the Allwinner drivers as FDT only. These are mobile and embedded parts so are unlikely to use ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation 308931 by andrew: To allow for an ACPI attachment to the generic PCIe driver split off the FDT attachment to a new file. A separate ACPI attachment will then be added to allow arm64 servers with ACPI to use it over FDT. This should also help with merging this with the ofwpci driver, with further work needed to remove restrictions this driver places on resource allocation. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7319 308928 by br: Add PDMA controller registers. Obtained from: X1000 IoT Application Processor Programming Manual Sponsored by: DARPA, AFRL 308927 by br: Move FDT option to the main SoC file and mark boards config as NO_UNIVERSE. Pointed out by: andrew Sponsored by: DARPA, AFRL 308926 by sbruno: Add Intel Atom Cherryview SOC HSUART support PR: 207910 Submitted by: johannes@brilliantservice.co.jp MFC after: 1 week 308925 by kib: Adjust r308689 to make rtld compilable with either in-tree or (hopefully) stock gcc 4.2.1 on i386 and other arches. In particular: - Do not use %ebx in the asm constraints on i386, since rtld is compiled with -fPIC and gcc cannot handle GOT-base register reload (clang and newer gcc can). - Avoid direct use of [static N] construct in the function declaration/definion. In-tree gcc was patched to support this, but stock 4.2.1 cannot handle the feature. Requested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week 308923 by br: Disable superpages reservations as we don't have implemented them yet. Requested by: Alan Cox Sponsored by: DARPA, AFRL 308922 by andrew: Add an arm64 specific uart cpu driver. As arm64 may use ACPI to find the uart we need to handle both it and FDT, and as such we need to have an architecture specific driver. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7796 308921 by andrew: Add accelerated AES with using the ARMv8 crypto instructions. This is based on the AES-NI code, and modified as needed for use on ARMv8. When loaded the driver will check the appropriate field in the id_aa64isar0_el1 register to see if AES is supported, and if so the probe function will signal the driver should attach. With this I have seen up to 2000Mb/s from the cryptotest test with a single thread on a ThunderX Pass 2.0. Reviewed by: imp Obtained from: ABT Systems Ltd MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8297 308913 by kevlo: Update struct r12a_rom. Reviewed by: avos 308909 by sephe: hyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse. Just in case, the # of TX/RX rings is changed upon synthetic parts re-attach. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8520 308908 by sephe: hyperv/hn: Allow enabling IPv6 TX checksum offloading and IPv6 TSO. They are still disabled by default. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8490 308907 by sephe: hyperv/hn: Fix WITNESS warnings And re-enable SIOCADDMULTI/SIOCDELMULTI, after WITNESS warning is fixed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8489 308906 by sephe: hyperv/vmbus: Support transction result busy-wait. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8488 308905 by sephe: hyperv/hn: Implement RNDIS multi-packet message support. Currently, it is only applied to packet sent through chimney sending buffers. Not enabled by default yet. This one gives 20%~30% performance boost for non-TSO usage in both bit/packet rate tests and nginx performance test. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8560 308904 by vangyzen: Fix error reporting from wcstof() When wcstof() skipped initial space and then parsing failed, it set endptr to the first non-space character. Fix it to correctly report failure by setting endptr to the beginning of the input string. The fix is from theraven@, who fixed this bug in wcstod() and wcstold() in r227753. While I'm here: Move assignments out of declarations in wcstod() and wcstold(). This is against my personal preference, but it is our agreed style(9). Set endptr correctly on malloc() failure in all three functions. Remove an incorrect comment: This is pointer arithmetic, so the code was not actually making that assumption. wcstold() advanced the wcp pointer beyond leading whitespace and then reset it back to the beginning of the string. Do not reset it. This seems to have no functional effect, since strtold_l() also skips leading whitespace. I'm making the change to keep this function consistent with wcstof() and wcstod(), and because the C11 spec prescribes the use of iswspace() to skip leading space. Reported by: libc++ unit test for std::stof(std::wstring) MFC after: 8 days Sponsored by: Dell EMC 308903 by jmcneill: Build and install nanopi-neo.dts and orangepi-plus-2e.dts 308902 by jmcneill: Add dts for Xunlong Orange Pi Plus 2E. 308901 by jmcneill: Add dts for FriendlyARM NanoPi NEO. 308900 by jmcneill: Add dtsi for FreeBSD-specific Allwinner H3 nodes. 308899 by gonzo: [FDT] Remove empty wrapper for upstream am335x-evm.dts Remove empty wrapper for sys/gnu version of am335x-evm.dts located in sys/boot/fdt, with current include paths priority it's recursive #include and current build system can find file in sys/gnu when generating dtb Reported by: Jared McNeill 308898 by gonzo: [bytgpio] Fix USB disconnect event after listsing pins on gpioc2 - Do not set input flag when reading value from GPIO pin, it is not required and for gpioc2(S5 bank) setting both input and output flags leads to some kind of electric interference (curren drop?) that causes USB devices to disconnect - Check pad configuration when attaching device and provide IN/OUT capabilities only for pads that are configured as GPIO. Do not let user code to configure or change value of non-GPIO pads. There is no information for NC bank in intel's datasheet so for now function check is ignored for pins in it Reported by: Frank H. MFC after: 3 days 308897 by manu: Add spigen to the ARMv6 GENERIC kernel 308896 by jilles: rc.subr: $(ps -p $$ -o jid=) is always 0, so do not fork ps for it. The JID keyword writes 0 for a process also in the host system or in the same jail. 308895 by manu: Enable the use of spigen on FDT platform MFC after: 2 weeks 308887 by avg: fix unsafe modification of zfs_vnodeops when DIAGNOSTIC is enabled The idea was to avoid a false assertion in zfs_lock, but it was implemented very dangerously and incorrectly. Reported by: pho Tested by: pho MFC after: 1 week 308877 by phk: Attempt package build even if dependencies seems to be missing 308874 by jhibbits: Actually bump __FreeBSD_version 308873 by jhibbits: Fix buildworld for powerpc. vmpage requires struct pmap to exist and contain a pm_stats field. As of r308817, either AIM or BOOKE is required to be set in order to get their respective pmap structs. Rather than expose them both, or try to unify them unnecessarily, add a third option which contains only a pm_stats field, and change the two existing pmap structures to place the common fields at the beginning of the struct. This actually fixes the stats collection by libkvm on AIM hardware, because before it was accessing a possibly different offset, which would cause it to read garbage. Bump __FreeBSD_version to denote this ABI change, so that ports which depend on libkvm can be rebuilt. 308872 by kan: Use ofw_gpiobus instead of plain gpiobus for CI20 Requesed by: mmel 308871 by rmacklem: Modify umount so that it does not do an Unmount RPC for NFSv4 mounts and uses TCP for the Unmount RPC if the mount is over TCP. Without this patch, umount does an Unmount RPC over UDP for all NFS mounts. Suggested by: cperciva Reviewed by: cperciva MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8503 308869 by imp: i386 turns out to not have __uint128_t. So confusingly use 64-bit math instead. Since we're little endian, we can get away with it. Also, since the counters in quesitons would require billions of iops for tens of billions of seconds to overflow, and since such data rates are unlikely for people using i386 for a while, that's OK. The fastest cards today can't do even a million IOPs. Noticed by: dim@ Sponsored by: Netflix, Inc 308860 by adrian: [dd] Revert the capsicum bits for now until it gets fixed. dd is a bootstrap tool and that header isn't installed as part of the bootstrap environment for previous releases (eg freebsd-10.) We'll figure it out in post and then re-commit it. 308859 by br: Enable SMP on Ingenic JZ4780. It is required to proceed full cache flush before we can use wait instruction on multicore, so use nop instead for now. Submitted by: kan Sponsored by: DARPA, AFRL 308858 by br: Restore dd changes included accidentally in r308857. 308857 by br: Bring in support for Ingenic XBurst JZ4780 and X1000 systems on chips. Imgtec CI20 and Ingenic CANNA boards supported. Submitted by: Alexander Kabaev Reviewed by: Ruslan Bukin Sponsored by: DARPA, AFRL 308856 by imp: Decode the Intel-specific Additional SMART data page (0xca) and print it in human readable form. Include a pointer to the public spec that was followed to implement this in the code. Samsung also implements page 0xca on some of their drives, but the format is slighly different, so the code skips printing zero keys. Samsung's log page has additional, unknown data after the end of Intel defined data which isn't displayed. Supported by: Netfix, Inc 308855 by imp: Implement HGST Log page 0xc1, as documented in the HGST SN100 and SN150 product manuals. Subpage 0x32 is documented, but not implemented. Sponsored by: Netflix, Inc 308854 by imp: Print Intel's expanded Temperature log page. Sponsored by: Netflix, Inc 308853 by imp: Add log pages that Intel SSDs provide. It turns out that many of these are widely implemented beyond just Intel drives. Sponsored by: Netflix, Inc 308852 by imp: Add log pages defined through NVM Express 1.2.1. Sponsored by: Netflix, Inc 308851 by imp: Expand the SMART / Health Information Log Page (Page 02) printout based on NVM Express 1.2.1 Standard. Sponsored by: Netflix, Inc 308850 by imp: Print numbers instead of hex values for smart data. The full 128-bit number is printed, even though you'd need like a billion IOPs for a 10 billion seconds to overflow the 64-bit counters (~300 years). Sponsored by: Netflix, Inc 308849 by imp: Use a table for pages we know the size of. We have a special case for the error log since it isn't a fixed size. Sponsored by: Netflix, Inc 308848 by imp: Remove check for valid log pages. Let the drive tell us which pages are valid or not. While many pages are reserved in the standard, that doesn't make them invalid and future versions of the standard may define then. Sponsored by: Netflix, Inc 308847 by br: Add XBurst CPU option. Submitted by: kan Sponsored by: DARPA, AFRL 308846 by br: Move intrng includes to the main MIPS includes file. Sponsored by: DARPA, AFRL 308845 by br: Account for bigger secondary data cache line size. Secondary data cache line size can be bigger than primary data cache line size, so use biggest value as a minimum alignment. Submitted by: kan Sponsored by: DARPA, AFRL 308843 by tsoome: loader: smbios version check is not correct The version check for sku and family values is not correct, as this data is valid for version 2.4+, that also includes version 3.0 and above. Reported by: Dan McDonald Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8578 308841 by br: Add receiver timeout interrupt enable bit implemented in some system on chips. Submitted by: kan Sponsored by: DARPA, AFRL 308840 by cognet: The only remaining offender that used ti_chip() without checking for compatibility first was the gpio code, so change that, and re-assert that the TI chip is a known chip 308839 by br: Add Ingenic XBurst coprocessor 0 extra bits. Submitted by: kan Sponsored by: DARPA, AFRL 308837 by cognet: Don't panic if it's not a TI chip, this code can be called when it is not. 308836 by cognet: Don't attempt to get the chip revision if it's not a supported TI chip 308835 by br: Identify Ingenic CPUs. Submitted by: kan Sponsored by: DARPA, AFRL 308834 by br: Add Ingenic X1000 DTS files (unofficial). This is based on JZ4780 due to missing original X1000 parts. Sponsored by: DARPA, AFRL 308833 by jmcneill: On H3, initialize alarm and shutdown trip points and do temperature conversion as it is done in the BSP. 308832 by tuexen: Ensure that TCP state changes to state-closing are reported via dtrace. This does not cover state changes from TIME-WAIT. Reviewed by: gnn MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D8443 308830 by andrew: Make fdt_is_compatible a static function. It's only used in fdt_common.c. Sponsored by: ABT Systems Ltd 308828 by cognet: Move the pandaboard initialization from the probe to the attach method. Use ofw_bus_node_is_compatible instead of fdt_is_compatible, as the later is deprecated. Suggested by: andrew 308827 by tsoome: lsdev device name section headers should be printed by dv_print callback. lsdev command does walk over devsw list, prints list element name and will use dv_print() callback to print the device list. Unfortunately this approach will add unneeded noise when there are no particular devices detected. To remove "empty" device section headers, the dv_print() callback should print the header instead. In addition, fixed dv_print callback for md module. Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D8551 308826 by avg: zfs: fix up after the removal of PG_CACHED pages in r308691 PR: 214629 Reported by: mshirk@daemon-security.com Reviewed by: alc Tested by: Shawn Webb X-MFC with: 308691 308825 by kevlo: For RTL8812AU: - The Tx power (diff) values should be signed - Fix an off by one error when reading Tx power (diff) values Reviewed by: avos, adrian Differential Revision: https://reviews.freebsd.org/D8571 308824 by vangyzen: locale: fix display of "grouping" and "mon_grouping" values The "grouping" and "mon_grouping" values are arrays of one-byte integers, not arrays of ASCII characters. Display them in a format similar to GNU and MacOS. MFC after: 3 days Sponsored by: Dell EMC 308823 by adrian: [net80211] handle hardware encryption offload in the receive path * teach the crypto modules about receive offload - although I have to do some further reviewing in places where we /can't/ have an RX key * teach the RX data path about receive offload encryption - check the flag, handle NULL key, do decap and checking as appropriate. Tested: * iwn(4), STA mode * ath(4), STA and AP mode * ath10k port, STA mode (hardware encryption) Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D8533 308822 by cognet: Resolv the remaining conflicting symbols between omap4 and am335x, and add omap4/pandaboard into the GENERIC kernel. 308821 by jhb: MFamd64: Various fatal page fault fixes. - If a page fault is triggered due to reserved bits in a PTE, treat it as a fatal fault and panic. - If PG_NX is in use, report whether a fatal page fault is due to an instruction fetch or a data access. - If a fatal page fault is due to reserved bits in a PTE, report that as the page fault type rather than a protection violation. MFC after: 1 month 308820 by jhb: Report page faults due to reserved bits in PTEs as a separate fault type. Rather than reporting a page fault due to a bad PTE as a protection violation with the "rsv" flag, treat these faults as a separate type of fault altogether. MFC after: 1 month 308819 by cognet: Don't assume we're running on a pandaboard if the pandaboard-specific code is compiled in, use FDT to detect it instead.