From nobody Wed Jan 31 18:12:03 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TQ99c6zc6z590dr for ; Wed, 31 Jan 2024 18:12:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TQ99c0H6Kz4N0Q for ; Wed, 31 Jan 2024 18:12:19 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=QOv+ZKVJ; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706724737; bh=iL1Ef8vAI+En6gOuERAwRlO/QhcQFXXLS1EllPWfJRw=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=QOv+ZKVJpoliuLKza5YublqSYXbB/yfU3hca5Fh/pfNlvBR/7iu+M4GUrjVbgOKkeyheC6nkRWSjCPqH/aYA1BZ+kWCForoDIu5xWpaHm9oQvmnW0tr2Gn3gEjm3X9FIJ1yt/m4yJ3BfNUunWYSlkR/SrAir/i31HrOVlNPNmdVRI6hJ/9C3HVPMmaj5j7jBXfA3nDaEeNfyDAi28wvoF8UwTvs3QZMf831u3d45CqKBzCsKJknwBdANTuYJ8O5JwFgyiK7p6G+ECDKHlYDsPCll4XPWrdlzwVJIm7wnMYokqzHmeLhkRiN61qj0YR6suKJGwweeH/7B0kzrlR/eQw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706724737; bh=QH8uwViyGmHs32PBQTWCmMGaq7SdXIVxQItXr3Q0QyC=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=AaBkzHt6cUyhj6cHBpBIddBNIPgwmP/cpeDLuzZIutBBZu28yjtu9D8tjaplxhvOk9F7SRjg/GaSBmqxeYKYBDimkdyIAA1sLCYdd1p45vdBC5pTzsEkLwxjziXuLEDOjiy4DKxdNHENgfWQJ/tjqOYLLs21c/dRofNcBqZ/ULzS12mkGV0v9iJZYFJGA+86PFvHTzwnqTJK1lEXuLiuaQ50tnIPnBl95smYspR2ZuVrwjqqy1aLOsh/E+u8ZR+YedU3Dxb15PJDDBGxWS2z3OaBXWlc0pUFaH2nuRaVr8ofXVKyKz7Ytrl0SJOX3s+bGKscT1l1hkV7m+iu9fBXZg== X-YMail-OSG: a.6c48QVM1mOb04MiZtAhAufvLtufsyL07fn_OnZlc3tMtvyDPF44HIHhTfpemK c4ibUsDlbMyH8Haqpm6pTkKN2RS29YRBf9LDMRk79XtmR1IgYNxZVwUsODri7U.pjPNrh_nKxAtK HFYmP4Kkq_SuP27H6ChwKOfEchtONft6GIHwo8rxBNIZJ7lSX5K2vw7nFI35D3kaxwlEkSHacYrg qjpqfrtRTD4tNFjbUN_N_CsHZJqmMc9iTVEkEzgOo9AHo5kkmwu8nUKbcsKgfSZnvYVJxc0B0szO uvQmuErrV2HsvSflhwCKfj207M5mSrQomuUMZcC.jlM6_N5W76AHIoh7_Y7wVyZ4krfqmiiHT00f fOLjhymynOYribD4oM1thh.SWCoa2KLEZx2nz1azyNsC5AXsLXw325i3rCBbOOJs0HqaXrCpAZR7 6K1tAIzaBNau2Ojc9X8jTkzQQupLytd6uOsltecwlDwU4lOYdTn7r0FkhdvUhSkwbtZ1eQGjLcdY UTIR3ILVtaLMy6NdOAAEYg68HT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1xk88C6Y6VKPXSX_OrPYZcmViLZ9WzmiwrE6KH3rov9ywGV6gIn VdzLrrjF.2CE46dgH4NJDOOhXQqB85th1O_X6zviPc_DuPa8nvRWqZ01VnUTbw3D70BOfmXWOs4. 0ynj.kWUhfwLNAnjGCS_H.N5Btl48diLTWJl9GWwiFkoYtW7y_.deaMqUAevItgOEFy4VaS0uB5. OZibDt8UHvq1Ii7NNGXxKLroWPoRGmTIp8AeKw8XIUCkut41Qp8CAkr.osL4BaCp.ijwQhv4_HW7 sVEH5VLCm4lUtCOZySrRLH0qnZGwIkmGZ9.pV5pbxh0LYNfmRF0p3lPtXKP3o5jNb9Hl6iYVOCLP YfHq1AIYrOQ4SIXBSKOj._QbA1wsANdw28CRjd5G6yZn80PIHj3yAmoe84ZxmVRhz5mMVhQtVQDZ KTBCAae_xprdprjUQUAs9KV3TYjzWv3tavcLh9tYgiFCt77sqKVXB_IS7UUMIaMZl.hMm2zCKLgb i7vKIhrpfh1TR0aBWD8sGIVZrOapbPDj6j.odM3qNOBk5wVEl3iar7AoWxJcpmg_j.HtzbCkbsEj ibtKHbz2SUtiZtPha93ZSmAtQUGQKeD2f0Z9iofa6PxR66sQOchC.ja90FV.FPR91TlyxiVEm5ox 1e6yZPJHSfxtsC4OO9eZkvwSNxRA1.ulRg8mxIayGt1waHgxwAHr_l9s6DA-- X-Sonic-MF: X-Sonic-ID: 66235825-f5ca-4867-b200-b7bbf12e06cc Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Wed, 31 Jan 2024 18:12:17 +0000 Received: by hermes--production-gq1-5c57879fdf-wt62k (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4df7138ee31076f59a69b985f3d4d2c5; Wed, 31 Jan 2024 18:12:14 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: RPi5 and EDK2 ( https://github.com/worproject/rpi5-uefi ): USB-is-broken notes Message-Id: Date: Wed, 31 Jan 2024 10:12:03 -0800 To: FreeBSD ARM List X-Mailer: Apple Mail (2.3774.300.61.1.2) References: X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; URL_IN_SUBJECT(1.00)[github.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; TO_DN_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.83:from]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.83:from] X-Rspamd-Queue-Id: 4TQ99c0H6Kz4N0Q QUOTE USB is unreliable and may cause data corruption on all supported OSes. = We're currently investigating this issue, see: #3. END QUOTE So what I've reported for FreeBSD is not unique. The best details for now (from that #3): QUOTE of mariobalanica : Yep, I've recently done some testing in Linux and seen corruption there = as well. Unfortunately I haven't been able to consistently reproduce it = across different configurations. There were moments when I could = transfer dozens of gigabytes and it would all be fine - only sometimes = would it actually start corrupting data badly. Here's what I've tried, roughly: =E2=80=A2 Flashed stock RPI OS and checked USB -> OK =E2=80=A2 Modified DTB to expose a single USB controller as = generic-xhci and hide the rest of the RP1 PCIe bus, relying on the VPU = FW PCIe setup (to replicate what UEFI does) -> Corruption =E2=80=A2 Changed the generic-xhci device back to snps,dwc3 with = original quirks, in case the VPU FW didn't take care of that -> = Corruption =E2=80=A2 Reverted all the changes -> OK Then I recompiled the RPi kernel to add ACPI support in and booted RPi = OS via EDK2. Same story: ACPI is bad, FDT is good as long as I don't do = the modifications above. EDK2 itself appears to be unaffected, all transferred data came back = good. The only notable difference (that I'm currently aware of) between = exposing the full RP1 PCIe bus vs. just the XHCI controller as a simple = platform device is interrupts: =E2=80=A2 full RP1 PCIe in Linux with FDT uses MSIs =E2=80=A2 XHCI platform device uses the shared legacy INTA I suspect the RP1 XHCI edge-triggered interrupts don't translate very = well to level ones. This would be bad news for ACPI, since the MSI = controller here is (unsurprisingly) non-standard and we're forced to use = legacy interrupts. This might also explain why EDK2 is not affected, as it uses polling = instead. END QUOTE =3D=3D=3D Mark Millard marklmi at yahoo.com