From owner-freebsd-arm@freebsd.org Mon Oct 28 13:10:36 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F1281A2642 for ; Mon, 28 Oct 2019 13:10:36 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 471w7b38kvz3R02 for ; Mon, 28 Oct 2019 13:10:35 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm1-x344.google.com with SMTP id 22so8946724wms.3 for ; Mon, 28 Oct 2019 06:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=uJ3hKfPbRKkpGG5S4sKXl9AECSz5I13KGZg/WUjW4ro=; b=GxzCQx3mmh0pq56XbN7ilRu3H6CZoxOlRz9uWAFJixkQYCPoUMuNOEmEmubquc9Z+F whDdRBnnM9/UWy+/QbUtzeZdN84kXXVgpMcQuEuDX0gefEM+TJcVtXdQLdTqH+GrfNX9 NTE+zpkH2RnokrA9z4ThvMZNxQVgCFPIARSiT4VsYCmeUIlh6wAL3h/KbZ7XRAZ+TNNb Oxwpi86A2Qxj67ZflfRD9u2uQzftXHZ+XmwN2QFfS0SON/i13cl2+y9KNhZxco73uBXc lfr+Wkp5wDtUqMdNq1uuZSzd8PYqHR9wEU7XNyFYKZPEHqptA/u1UrdWvAQfiG2fK0dM k+kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:cc:references :openpgp:autocrypt:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=uJ3hKfPbRKkpGG5S4sKXl9AECSz5I13KGZg/WUjW4ro=; b=L18DG5crTZERgexJdUYUEB2ox1c5QnuEEvvp1GnvG7YRtyqzfxR2xyWYPB+WjrSCxN VfkUPjWnNH4jldzzu1YcH0X7O8SQ4fc7Z31KHi/hkHL9/kERQF0U8SPLi8BO7jWEuEB9 OxaqQVlCBKJSJohZlaAlOqWkOfCVOIMOQAfIKls+IDEU9VPJgFFY3+SElJP4feU9wF9G c0IvtoEXBktTSe0OJV6gxE/UhX8tb3d+/9qEc8mk+Qz7TH0Zmqo0isWWkzL+sJu8jbNG SmOMWSHkqaub8XY6rBuTqxmo/FTXbBX/BMPX0JfY3NKyHIl6wdA5wV8a9Nktq1Vfw0bo mdjA== X-Gm-Message-State: APjAAAX2FJR4r5Xew7eCyzzJaSlYMzKcU0HvCWOnW55RdpS/VScB9vhA iz01mGp5gl9QH2ASkv8THV4TGV76 X-Google-Smtp-Source: APXvYqwPY8jHhYMCyVxxZS4u/qGbfG5h/hyAeOryJT3c54I9Qy3QWZHBgLCwCqDzM2ilJ5tJLTX5nA== X-Received: by 2002:a1c:7305:: with SMTP id d5mr15305119wmb.84.1572268233511; Mon, 28 Oct 2019 06:10:33 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id r188sm11813118wmr.17.2019.10.28.06.10.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2019 06:10:32 -0700 (PDT) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: FreeBSD 13-CURRENT download status on RK3399 SBC`s To: Emmanuel Vadot Cc: Michal Meloun , Sleep Walker , freebsd-arm@freebsd.org References: <20191028121027.8c89aef2a2809cd844ccad80@bidouilliste.com> <150c9db3-26f9-bd3b-eb16-c2801d6944f6@freebsd.org> <20191028132358.cd225b5127fb7396c11c4585@bidouilliste.com> Openpgp: preference=signencrypt Autocrypt: addr=mmel@freebsd.org; prefer-encrypt=mutual; keydata= mQENBFYuVRkBCADZiwLCCne3wG9b9k+R2Neo5zVo2bLaZRfNNY/v9kg283i0sb1Da4EdEiNT 15El5UyozhphUIbIR/zrVpxF1TvvFdoCyzx6a68bNY2d9dBrDcNDZC+XnyDdHQoobN87DWT1 mRVkmbg9LHZ/SVUOkGYuWyE+8UYeDAcUizuXwSK5zFWmeTyIoWNa68ifrWLfQe0p4x5jC/AI VURCi17p360vU4fhgwoMvEEhrRBWCr4DYHToFjIt2WdBy3GR1qoO0+Xkd6G+OoBULo+XDfgu L2WdPvh0K69F9/LgHkMmG5Il7SCe62QGpG2vaCgRV7BQhLX+kxlvM+WrdRatWRml4Y/3ABEB AAG0IE1pY2hhbCBNZWxvdW4gPG1tZWxAZnJlZWJzZC5vcmc+iQFXBBMBCgBBAhsDBQsJCAcD BRUKCQgLBRYDAgEAAh4BAheAAhkBFiEEAN1KEEuAn+Apg413aR6ya17FqqoFAlw3aO8FCQ9v FVYACgkQaR6ya17FqqrIFwf/V/NRuAutw1cZ/HRCwfp00KY+8g730KwOaAMhPYvq8tqf8krD whFRWt9s4DSVTVJUC2dRZa5g1MS77iQL/WWzBUhJj7rW4uMpcKpi7UXi060sKrnE+1ZBvanG 8YCMTHKxQgQDD0cBqsyOAfrSA+Pyya3/HyAh1vvjQZfu5vWxA1X5NX5l5KtonprJ+ybVacwO W34yfWSX+ncx089JpUknenGdI+gVoKfa6uh/8YiCZTI5poxBttrOB8NGfylTsTTTbw2pkire Vkc87qq++I9bBNtTqWOZjB/3KBUd4q1veEUa4MS63TWtAvcEcsxHiBv4AH6npPO/iPycuGGh qldT1LkB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cVp qqQ+KhrrGiCCYQPfZwpFAJSSgV3bR5O0BlNaGKJOoVTV1yexRbVEStswiFP8JFQp6U+S3nqE FFob7daQBLxi80oUVRn6eEdzR8tBhIy7sbeD Message-ID: Date: Mon, 28 Oct 2019 14:10:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191028132358.cd225b5127fb7396c11c4585@bidouilliste.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 471w7b38kvz3R02 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=GxzCQx3m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::344 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[mmel@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[4.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (2.80), ipnet: 2a00:1450::/32(-2.80), asn: 15169(-2.05), country: US(-0.05)]; FREEMAIL_CC(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2019 13:10:36 -0000 On 28.10.2019 13:23, Emmanuel Vadot wrote: > On Mon, 28 Oct 2019 12:59:30 +0100 > Michal Meloun wrote: > >> >> >> On 28.10.2019 12:10, Emmanuel Vadot wrote: >>> On Mon, 28 Oct 2019 13:57:57 +0300 >>> Sleep Walker wrote: >>> >>>> Hi All! >>>> >>>> On Khadas-EDGE-V >>>> >>>> - mainline uboot U-Boot TPL 2019.10-rc3 >>>> - bootup from SD >>>> - eth OK >>>> - uart OK >>>> - emmc OK >>>> - sd OK >>>> - USB 2.0 OK >>>> - USB 3.0 OK >>>> - USB HID OK >>>> - USB DISK OK >>> >>> Good to know that everything is working on this board too. >>> >>>> >>>> On Rock Pi4 >>>> >>>> UEFI booting, very cool. >>>> >>>> But I can not log into the console. >>>> >>>> it seems it keeps rebooting. >>>> >>>> Here is the log: >>>> https://pastebin.com/JFX7Ssnz >>> >>> This is known. Let me try to describe the problem. >>> So the sd and panic: clknode_init_parent_idx: Invalid parent index 5 for clock sclk_sdmmc have multiple possible parent, one of them is >>> the usb clock that is generated by the usb controller. The problem is >>> that when we create the clock domain of the CRU (Clock and Reset >>> Unit) the usb controller isn't probed yet because it needs clock from >>> the CRU. When a clock domain is finished (by calling clkdom_finit) we >>> need all the clocks to be present so we cannot add the unknown for now >>> usb clock. >>> So to fix this issue we need a way to create a fake clock when the CRU >>> clock domain is created that will be later replaced by the usb >>> controller. There is multiple approch to this and I'm not yet sure >>> which one will work best. >>> >>> 1) We allow to list non-existing clock as parent and don't throw >>> errors anymore at clkdom_finit but at some SYSINIT. >>> This will work well with a big static kernel but not if the clock is >>> created by a kernel module. >>> 2) We create some fake clock domain where we can add clocks to it so >>> it became a somewhat valid parent (but not usable so you cannot select >>> it with clknode_set_parent for example) and when a clock domain is >>> finished we remove clock from the fake domain that are present in the >>> newly created one (as clock names are unique this should not cause >>> problem). The question is then what should we do when we still have >>> clock in the fake domain ? >>> >>> Maybe mmel@ have more ideas. >>> >> All above is right but is not related to this panic >> "panic: clknode_init_parent_idx: Invalid parent index 5 for clock >> sclk_sdmmc". In this case, the parent clock at index 5 for sclk_sdmmc >> (named "clk_sdmmc in TRM) is CLK_24M (at least in my TRM). > > Mhm right, it's the clock parent id 4 ("upll" in the TRM) the one I > was talking about. So I guess that puttin parent 4 = NULL and xin24m > for parent 5 should work. > >> Problem (for me) is that rockchip clock code is slightly incomplete and it uses >> different nomenclature (naming) that is in TRM. >> Unfortunately, putting >> right clock for this index doesn't helps much, my RockPRo64 still fails >> with another (not yet identified)problem. > > What are the symptoms ? > See attached log. It occurs on every second hard reboot (by pressing reset button) reboot, only if both clusters are enabled. And, please, don't ask me why :) Michal ---------------------------------------------------------------------- ... WARNING: WITNESS option enabled, expect reduced performance. uhub2: 1 port with 1 removable, self powered uhub4: 1 port with 1 removable, self powered uhub3: 2 ports with 2 removable, self powered Root mount waiting for: usbus4 usbus2 usbus0 uhub0: 1 port with 1 removable, self powered uhub1: 1 port with 1 removable, self powered Root mount waiting for: usbus4 usbus0 ugen4.2: at usbus4 umass0 on uhub3 umass0: on usbus4 umass0: SCSI over Bulk-Only; quirks = 0x8100 umass0:0:0: Attached to scbus0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Removable Direct Access SPC-2 SCSI device da0: Serial Number 02UIG9DQD7J9880G da0: 40.000MB/s transfers da0: 3764MB (7708672 512 byte sectors) da0: quirks=0x12 ugen0.2: at usbus0 umass1 on uhub0 umass1: on usbus0 umass1: SCSI over Bulk-Only; quirks = 0x8100 umass1:1:1: Attached to scbus1 Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex CAM bus lock (CAM bus lock) r = 0 (0xfffffd0003fe7260) locked @ /usr2/Meloun/git/pmap/sys/cam/cam_xpt.c:1039 exclusive sleep mutex XPT topology lock (XPT topology lock) r = 0 (0xffff000000d0dee8) locked @ /usr2/Meloun/git/pmap/sys/cam/cam_xpt.c:5367 exclusive sleep mutex CAM device lock (CAM device lock) r = 0 (0xfffffd000e02d4d0) locked @ /usr2/Meloun/git/pmap/sys/cam/cam_xpt.c:5494 stack backtrace: #0 0xffff0000005b3ae0 at witness_checkorder+0xd04 #1 0xffff0000005b4afc at witness_warn+0x3f8 #2 0xffff000000899c6c at do_el1h_sync+0x318 #3 0xffff000000899a78 at do_el1h_sync+0x124 #4 0xffff000000880874 at handle_el1h_sync+0x74 #5 0xffff0000000161f0 at xpt_remove_periph+0x38 #6 0xffff000000012674 at cam_periph_release_locked_buses+0x158 #7 0xffff00000001284c at cam_periph_release_locked+0x1c #8 0xffff00000002de74 at nvme_get_identify_ns+0x6d18 #9 0xffff00000001b474 at xpt_done_direct+0x3b4 #10 0xffff00000001d26c at xpt_register_async+0x13fc #11 0xffff00000050b040 at fork_exit+0x7c x0: fffffd0003fe7260