From owner-freebsd-arm@freebsd.org Tue Jan 16 17:38:46 2018 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 73163E7D0F1 for ; Tue, 16 Jan 2018 17:38:46 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) (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 3FCE7A31; Tue, 16 Jan 2018 17:38:45 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-it0-f43.google.com with SMTP id c102so12160067itd.0; Tue, 16 Jan 2018 09:38:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Z0kBEIO47GwO1565S2gmNLgVRLdB7TrC+keVKwA1Z0A=; b=U3olC0xhdleCSijUc0Y8UTqRkj/NFxVEFVWqhnHemsUwt4+lt/djbYeaueJmCyNwk9 xT3vVMkdBwV+RkMm5uo5PtO4JQSSV8rnEA1X67lRzmE3jrpGv9yLhqOO/H9+1g+1BXKi A3eeVTFcL/DRMgfRGvLRz2gWpyDj6vhO1iWorITtW0Pe0aM+R6IbvKI0mAYT16Xw3GMe VS8pampdJhH9R7REHIMxuIxCgDf3HSsFHGfTLoWlBbLkyGDj+P+SCKji4Y6Wi5757cc/ xkmxKMsOhakBd5xW9PD1+8Nuk2LVdgI+iUb5tKBDtRKQwSItVaEC4fpVj6DY5O8bt7KB yFfQ== X-Gm-Message-State: AKwxytcOjdp9kX4o05/dWn79Gws5dJyADe1uKWdGw8Wuzjn/VzfE9yNy PDAHdkD+Mop3OwIrU2Dkipc75lwf X-Google-Smtp-Source: ACJfBovGG6XsvWy8+kUQcrZp2dFXz9969MHYL916K4qF6Kg0eDZzVpJzJRxqvRyyZPDc78/1cy/zyg== X-Received: by 10.36.157.151 with SMTP id f145mr9604055itd.113.1516123851622; Tue, 16 Jan 2018 09:30:51 -0800 (PST) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com. [209.85.223.182]) by smtp.gmail.com with ESMTPSA id m21sm1375907itb.43.2018.01.16.09.30.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 09:30:51 -0800 (PST) Received: by mail-io0-f182.google.com with SMTP id m11so8248324iob.2; Tue, 16 Jan 2018 09:30:50 -0800 (PST) X-Received: by 10.107.151.131 with SMTP id z125mr34625394iod.224.1516123850582; Tue, 16 Jan 2018 09:30:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.149.147 with HTTP; Tue, 16 Jan 2018 09:30:29 -0800 (PST) In-Reply-To: <20180116180800.07a8f8ef@zeta.dino.sk> References: <8DD425C1-FEF4-4BC0-9A80-916B50620896@dsl-only.net> <20180116180800.07a8f8ef@zeta.dino.sk> From: Kyle Evans Date: Tue, 16 Jan 2018 11:30:29 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Orange pi one ,receive panic: bad pte2 To: Milan Obuch Cc: =?UTF-8?B?6Zi/6YeR?= , "freebsd-arm@freebsd.org" , Emmanuel Vadot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2018 17:38:46 -0000 On Tue, Jan 16, 2018 at 11:08 AM, Milan Obuch wrote: > On Tue, 16 Jan 2018 08:21:47 -0600 > Kyle Evans wrote: > >> On Tue, Jan 16, 2018 at 7:19 AM, =E9=98=BF=E9=87=91 wrote: >> > OKOK below is booting message. >> >> Thanks! >> >> > [ .. snip .. ] >> > syscon_generic0: mem 0x1c00000-0x1c00033 on simplebus0 >> > [.. snip ..] >> > awg0: mem >> > 0x1c30000-0x1c30103,0x1c00030-0x1c00033 irq 23 on simplebus0 >> > awg0: cannot get tx clock >> > [.. snip .. ] >> >> That explains it- I hadn't encountered this in practice, so it broke. >> =3D( Your DTS here has a /soc/syscon *and* uses our former hacky method >> for passing syscon, so syscon_generic takes the syscon registers and >> awg can't. You have I think three choices for recourse here, any of >> which should fix your problem: >> >> 1.) Remove the /soc/syscon from the DTB you're using >> 2.) Update your DTB to actually use /soc/syscon, removing the syscon >> reg from /soc/ethernet and adding a 'syscon =3D <&syscon>' attribute to >> that node. >> 3.) Update to r327825 or later and pull new DTS from Linux. If pulling >> new from Linux is a pain, I can generate a new DTB for you based on >> what we'll be importing from Linux in a couple weeks. >> >> r327825 added support for the new stable emac bindings, so after DTS >> update this won't break again. >> > > In my case, using Orange Pi Zero, I observed similar behavior. Using > older DTB ethernet works, and with tips mentioned above I was quickly > able to modify my DTS, so ethernet works again. It just uses different > MAC. Question is, where does it actually come from, and, maybe, where > should it come from. IIRC, The following are possible sources of MAC address in an order of precedence: 1.) You set it manually 2.) It's set in hardware (U-Boot, maybe?) 3.) It's set explicitly in DTS 4.) There's a sid driver in your DTS, then awg will use the rootkey from sid to derive a rootkey 5.) None of the above are true, then it will randomly generate a MAC addres= s I'm not sure about your board, but on a couple of mine only options 1,4, and 5 are applicable- there is no hardware-set MAC and it's not set in DTS. > This is from dmesg: > > awg0: mem 0x1c30000-0x1c30103 irq 38 on simp= lebus0 > simplebus0: no default resources for rid =3D 1, type =3D 3 > awg0: PHY type: mii, conf mode: reg > awg0: EMAC clock: 0x00168000 > awg0: AHB frequency 300000000 Hz, MDC div: 0x3 > > Any idea what resource is not found here? IS it something to worry > about? The resource not found would be the syscon register that we used to pass in. No need to worry about it unless the line spitting out the PHY type and conf mode is telling you it's using the "clk" conf mode instead of "reg" because it's specified as an 'optional' At this point, the "clk" mode is effectively legacy and I would like to rip it out once we get sufficiently far down the road that .dts using it (read: our older dts) will effectively no longer be supported. These exist in stable/11, so it'll be a while. =3D)