From owner-freebsd-arm@freebsd.org Fri Oct 9 19:25:36 2020 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 62894429D80 for ; Fri, 9 Oct 2020 19:25:36 +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.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7J2715QGz4lYK for ; Fri, 9 Oct 2020 19:25:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: m3JAV1YVM1kRUiNoycENSvZbUNEVOU2d3MKo9JGZholJx.tZh0ddhrFUHeROmq5 g9yz14zCIKhpX07xtEUxnXDnUYFNovkNx9kw9itN1SB6iqLeliorySPnvopqdkhF2DY7zejysgWc 0JRL9VrUQi2HfwCXouwwd_Css3KVfahTVprgMt1WqdPWyaQZxFDgSv3IDHvOfAOj1yxtNUdEorIX VrDtH6joUUJgufrpOFDgqImbsvjpmyRiyx4tjhtb_AaBQk0qK6ANBhYKcuiwoOsQyjc1lHphWXxW TEUGmwM8VlaSKq.tlH2W9C5JwiTVqVAawTWdPCMr.Abr9FRATOiXYfz_Gv4eSYUhQiBfVkiteByy _d5izp80ueC0USmD7LuV5DY6PsfZq.4YlIjzem04NCe98v2jkr69Wl8E8a4NVzyPscng1slvrdDg V4VtzYKjyDHDj1_fssLhZjVd4odjgQR1J1Z1eBGeDFYH6Fa9PDGyMTxTKRdXsC168s_ZO.TUaP8p xDQ5yWCY4QIv4NZWYVZydhbCgyGIKR2WKktgiFprSVxIP1Wa62SrB7lnt4DwhC2sr96zpl9P8Ew1 kqmdcG7xMC7GJG5hIJAQksYyU0gcvb5KxsHjZRzuOw9imCWxpL5FFDgtyQFj9riQq4POuMJDWWJ2 WXKuQP5wtOydIXC9xa6B6FruCtKbW1F1cAMURoWBVyiJvgiMxiHIP_3nd7PMnA7Hy6I.TIlcX2BO 0KUSjfIraFC6Xa5J0dPJEQrDybhLNFClg8vFYOQIclBY7GmUBEKuPVkN6_8ufnfiWip76EQ7ssAl KpVET2fo1ErWQSbFr5kFmrXDFTUSveaZyG5P5wN1ndICcRsQ3H3q73brYr3OjWekOccJrc4kV5E8 MuUdflVEuuVxSodkJi8qyWDTgh4Tw4MaWMp4NNig6iWrkYCDmIuJnuYp8m._QysQ.3i3.KUJMK42 3J4A2UZ0tgd76emiROQooRfBEx9.Gdtu.efAtkEXd0JZv.xkTSUxolrPuCP17fNioCyfC18HJubq RDXJ.Nbr8edAuPFNGLU49m0RS7_vJHa6blMU.hh84gBwcgm66YoOpn1X0plKQxjTRMXoRrNPtY7v hjOimR0i5edZ6J8F61pbwIR_kyvJHW56aYtIJJDLiOAx3oXCx0TtlFKM_dhX8200Uu4at1gtOiVS UtwNQVY2jcKBnqBmbj7WaZVzRLG0LGMp2KfC9lBCImG0PVtYm3oDsIGqnYIYdn7wg9VlhVH_FlfZ q4AKj0nwazrtLZ4rHX78YJkbQ.bFIO1rkoWNnyPlF8FpFSPYnWRxfDkbe1WW71QlOivUYcXWWrRj bKzbouL.U1D69g9V3LomCueNp.tvxbvM6S62caXnz.vQrVYxhyOiiNY0PIHGitSahPGbDUevGUdl 6ZfQypK_BMKleyHppfcyiLc6_5dqbqx810a6QygYsTJKh1L.lHvcB9r.N2GFf8VPrl6wsrypOhDj Q8Q9R7T._RR7A7g0P5GAElkPTWJBzwV_fQbqibfU_h5XYDZfhvaSRDAOvkFJ32aN3HN5XZGodAB9 DZtaT Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 9 Oct 2020 19:25:31 +0000 Received: by smtp409.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 7c37f04c39031a88eb55b18939c9dd7b; Fri, 09 Oct 2020 19:25:26 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: RPi4B: emmc2bus dma-range handling does not track the boot-time-FDT (u-boot based booting) From: Mark Millard In-Reply-To: Date: Fri, 9 Oct 2020 12:25:25 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: <98BC985D-EAAB-4AFB-AA8F-7391A45C4EBF@yahoo.com> <91324D35-B66A-4674-AE37-45F3DDB736FD@yahoo.com> <2B3F0409-88F2-4EBD-9C39-37929F973C77@yahoo.com> To: Klaus Cucinauomo X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4C7J2715QGz4lYK X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.55 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.03)[-1.027]; FREEMAIL_TO(0.00)[googlemail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.04)[-1.035]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.991]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.83:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.83:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 19:25:36 -0000 On 2020-Oct-9, at 05:50, Klaus Cucinauomo = wrote: >> Am 09.10.2020 um 12:02 schrieb Mark Millard : >>=20 >>=20 >>=20 >> On 2020-Oct-8, at 23:01, Mark Millard wrote: >>=20 >>> On 2020-Oct-8, at 21:29, Mark Millard wrote: >>>=20 >>>> On 2020-Oct-8, at 20:06, Mark Millard wrote: >>>>=20 >>>>> On 2020-Oct-8, at 06:27, Klaus Cucinauomo wrote: >>>>>=20 >>>>>>> Am 08.10.2020 um 11:01 schrieb Mark Millard via freebsd-arm = : >>>>>>>=20 >>=20 >> Having reverted back to u-boot 2020.10 without >> compatibility list adjustments and with xhci-pci >> in place again, trying a 4 GiByte RPi4 without a >> microsd card boots as far as the rainbow square >> on the monitor but hangs there, never displaying >> even the: >>=20 >> U-Boot 2020.10 (Oct 09 2020 - 06:50:04 +0000) >>=20 >>=20 >>=20 >=20 >=20 >=20 > the following `dmesg` of the 4GB is with the copied-over whole = msdos-partition of the Original RPI-ubuntu-distribution > /ubuntu DOESN`T use the latest fw-files from rpi-github(which also = fail with me to the hdmi-rainbow-screen) Linux has its own dts/dtsi/... sources instead of using the .dtb files from the RPi folks, not directly based on any vintage of the RPi .dtb files if I understand right. As I understand, ubuntu is based on the linux materials for producing .dtb files and so is likely not a full match to older rpi .dtb files either. They continue to update the .dtb's that they distribute, without also updating the start*.elf or fixup*.dat files. So far as I know, FreeBSD has been targeting support of some vintage of the RPi materials, including .dtb files. That is what sysutils/rpi-firmware is about. So the status relative to linux .dtb files is likely normally-unknown. I've not set up a USB3 SSD ubuntu 2020.04.1 (yet?), just a microsd card one. I use apt to update the ubuntu microsd card once and a while. It's /boot/firmware/ from a recent update currently looks like: # ls -lat /boot/firmware/ total 59854 drwxr-xr-x 4 root root 4096 Oct 8 22:46 .. drwxr-xr-x 2 root root 35328 Oct 8 22:46 overlays -rwxr-xr-x 1 root root 26516 Oct 8 22:46 bcm2710-rpi-2-b.dtb -rwxr-xr-x 1 root root 28176 Oct 8 22:46 bcm2710-rpi-3-b-plus.dtb -rwxr-xr-x 1 root root 27557 Oct 8 22:46 bcm2710-rpi-3-b.dtb -rwxr-xr-x 1 root root 26371 Oct 8 22:46 bcm2710-rpi-cm3.dtb -rwxr-xr-x 1 root root 46612 Oct 8 22:46 bcm2711-rpi-4-b.dtb -rwxr-xr-x 1 root root 19924 Oct 8 22:46 bcm2837-rpi-3-a-plus.dtb -rwxr-xr-x 1 root root 20793 Oct 8 22:46 bcm2837-rpi-3-b-plus.dtb -rwxr-xr-x 1 root root 20373 Oct 8 22:46 bcm2837-rpi-3-b.dtb -rwxr-xr-x 1 root root 19700 Oct 8 22:46 bcm2837-rpi-cm3-io3.dtb -rwxr-xr-x 1 root root 2603 Oct 8 22:46 boot.scr -rwxr-xr-x 1 root root 29276839 Oct 8 22:46 initrd.img -rwxr-xr-x 1 root root 1371 Oct 8 22:46 overlay_map.dtb -rwxr-xr-x 1 root root 8306930 Oct 8 22:46 vmlinuz -rwxr-xr-x 1 root root 251 Sep 26 22:14 usercfg.txt -rwxr-xr-x 1 root root 1514 Jul 31 16:48 README -rwxr-xr-x 1 root root 52480 Jul 31 16:48 bootcode.bin -rwxr-xr-x 1 root root 141 Jul 31 16:48 cmdline.txt -rwxr-xr-x 1 root root 1117 Jul 31 16:48 config.txt -rwxr-xr-x 1 root root 7276 Jul 31 16:48 fixup.dat -rwxr-xr-x 1 root root 5405 Jul 31 16:48 fixup4.dat -rwxr-xr-x 1 root root 3146 Jul 31 16:48 fixup4cd.dat -rwxr-xr-x 1 root root 8417 Jul 31 16:48 fixup4db.dat -rwxr-xr-x 1 root root 8419 Jul 31 16:48 fixup4x.dat -rwxr-xr-x 1 root root 3146 Jul 31 16:48 fixup_cd.dat -rwxr-xr-x 1 root root 10265 Jul 31 16:48 fixup_db.dat -rwxr-xr-x 1 root root 10265 Jul 31 16:48 fixup_x.dat -rwxr-xr-x 1 root root 240 Jul 31 16:48 meta-data -rwxr-xr-x 1 root root 770 Jul 31 16:48 network-config -rwxr-xr-x 1 root root 2997088 Jul 31 16:48 start.elf -rwxr-xr-x 1 root root 2272992 Jul 31 16:48 start4.elf -rwxr-xr-x 1 root root 816124 Jul 31 16:48 start4cd.elf -rwxr-xr-x 1 root root 3774532 Jul 31 16:48 start4db.elf -rwxr-xr-x 1 root root 3031652 Jul 31 16:48 start4x.elf -rwxr-xr-x 1 root root 816124 Jul 31 16:48 start_cd.elf -rwxr-xr-x 1 root root 4846308 Jul 31 16:48 start_db.elf -rwxr-xr-x 1 root root 3755236 Jul 31 16:48 start_x.elf -rwxr-xr-x 1 root root 327 Jul 31 16:48 syscfg.txt -rwxr-xr-x 1 root root 493528 Jul 31 16:48 uboot_rpi_3.bin -rwxr-xr-x 1 root root 492824 Jul 31 16:48 uboot_rpi_4.bin -rwxr-xr-x 1 root root 2114 Jul 31 16:48 user-data drwxr-xr-x 3 root root 4096 Jan 1 1970 . (I try to remember to do things in a way that preserves the original file dates. But, whatever update procedures do, I do not override.) One thing of note is the use of an "overlay_map.dtb". Without that things would likely be broken. Notably the start*.elf and fixup*.dat files all predate 2020-Aug-20 by a fair amount. ("USB MSD boot also requires the firmware from Raspberry Pi OS 2020-08-20 or newer.") But ubuntu need not have used a tagged release at all so it is not obvious just what vintage the start* and fixup* files are from. So, for now, ubuntu likely does not claim support of the critical release (general release) of the USB MSD ability for the RPI4 (even given modern enough eeprom contents are present). So far, I've never tried to have FreeBSD use any of these materials --or any materials from ubuntu. > , > Copying over =E2=80=9Eour=E2=80=9C old bcm2711-rpi-4-b.dtb, My FreeBSD head -r365932 "USB3 SSD only boot" context looks like (set up for uefi/ACPI booting): # ls -ldTt /usb_efi/* -rwxr-xr-x 1 root wheel 274 Oct 9 02:00:34 2020 = /usb_efi/config.txt -rwxr-xr-x 1 root wheel 182 Oct 9 00:26:10 2020 = /usb_efi/config.txt.ub -rwxr-xr-x 1 root wheel 571840 Oct 8 23:55:06 2020 = /usb_efi/u-boot.bin -rwxr-xr-x 1 root wheel 257 Sep 26 12:08:22 2020 = /usb_efi/config.txt.uefi_m_m drwxr-xr-x 1 root wheel 8192 Sep 7 22:48:50 2020 = /usb_efi/OVERLAYS -rwxr-xr-x 1 root wheel 47516 Sep 1 14:04:10 2020 = /usb_efi/bcm2711-rpi-4-b.dtb -rwxr-xr-x 1 root wheel 2283936 Sep 1 14:04:08 2020 = /usb_efi/start4.elf -rwxr-xr-x 1 root wheel 2283936 Sep 1 14:04:08 2020 = /usb_efi/start4.elf.new -rwxr-xr-x 1 root wheel 5422 Sep 1 14:04:04 2020 = /usb_efi/fixup4.dat -rwxr-xr-x 1 root wheel 5422 Sep 1 14:04:04 2020 = /usb_efi/fixup4.dat.new -rwxr-xr-x 1 root wheel 5252 Sep 1 13:59:48 2020 = /usb_efi/Readme.md -rwxr-xr-x 1 root wheel 5252 Sep 1 13:59:48 2020 = /usb_efi/Readme.md.new -rwxr-xr-x 1 root wheel 206 Sep 1 13:59:48 2020 = /usb_efi/config.txt.uefi_orig -rwxr-xr-x 1 root wheel 2581149 Sep 1 07:14:20 2020 = /usb_efi/RPi4_UEFI_Firmware_v1.20.zip -rwxr-xr-x 1 root wheel 2031616 Sep 1 07:08:52 2020 = /usb_efi/RPI_EFI.fd -rwxr-xr-x 1 root wheel 2277248 Jul 14 16:01:00 2020 = /usb_efi/start4.elf.old -rwxr-xr-x 1 root wheel 5409 Jul 14 16:00:58 2020 = /usb_efi/fixup4.dat.old -rwxr-xr-x 1 root wheel 4592 Jul 14 15:57:48 2020 = /usb_efi/Readme.md.old -rwxr-xr-x 1 root wheel 205 May 24 14:46:42 2020 = /usb_efi/config.txt.nobt -rwxr-xr-x 1 root wheel 5888 Jan 30 13:26:30 2020 = /usb_efi/armstub8-gic.bin -rwxr-xr-x 1 root wheel 18693 Nov 22 09:06:44 2019 = /usb_efi/COPYING.linux -rwxr-xr-x 1 root wheel 1594 Nov 22 09:06:44 2019 = /usb_efi/LICENCE.broadcom drwxr-xr-x 1 root wheel 8192 Sep 27 21:05:00 2018 /usb_efi/EFI My FreeBSD head -r365932 "microsd card first stages" context looks like (set up for u-boot 2020.10 booting): # ls -ldTt /microsd_efi/* -rwxr-xr-x 1 root wheel 258 Oct 9 02:02:00 2020 = /microsd_efi/config.txt -rwxr-xr-x 1 root wheel 571840 Oct 8 23:55:06 2020 = /microsd_efi/u-boot.bin -rwxr-xr-x 1 root wheel 182 Oct 4 14:18:00 2020 = /microsd_efi/config.txt.ub -rwxr-xr-x 1 root wheel 257 Sep 26 12:08:22 2020 = /microsd_efi/config.txt.uefi_m_m -rwxr-xr-x 1 root wheel 47516 Sep 1 14:04:10 2020 = /microsd_efi/bcm2711-rpi-4-b.dtb -rwxr-xr-x 1 root wheel 2283936 Sep 1 14:04:08 2020 = /microsd_efi/start4.elf.new -rwxr-xr-x 1 root wheel 5422 Sep 1 14:04:04 2020 = /microsd_efi/fixup4.dat.new -rwxr-xr-x 1 root wheel 5252 Sep 1 13:59:48 2020 = /microsd_efi/Readme.md.new -rwxr-xr-x 1 root wheel 2581149 Sep 1 07:14:20 2020 = /microsd_efi/RPi4_UEFI_Firmware_v1.20.zip -rwxr-xr-x 1 root wheel 2031616 Sep 1 07:08:52 2020 = /microsd_efi/RPI_EFI.fd drwxr-xr-x 1 root wheel 1024 Jul 14 18:43:24 2020 = /microsd_efi/OVERLAYS -rwxr-xr-x 1 root wheel 2277248 Jul 14 16:01:00 2020 = /microsd_efi/start4.elf -rwxr-xr-x 1 root wheel 2277248 Jul 14 16:01:00 2020 = /microsd_efi/start4.elf.old -rwxr-xr-x 1 root wheel 5409 Jul 14 16:00:58 2020 = /microsd_efi/fixup4.dat -rwxr-xr-x 1 root wheel 5409 Jul 14 16:00:58 2020 = /microsd_efi/fixup4.dat.old -rwxr-xr-x 1 root wheel 4592 Jul 14 15:57:48 2020 = /microsd_efi/Readme.md -rwxr-xr-x 1 root wheel 4592 Jul 14 15:57:48 2020 = /microsd_efi/Readme.md.old -rwxr-xr-x 1 root wheel 206 Jul 14 15:57:48 2020 = /microsd_efi/config.txt.uefi_orig -rwxr-xr-x 1 root wheel 205 May 24 14:46:42 2020 = /microsd_efi/config.txt.nobt -rwxr-xr-x 1 root wheel 5888 Jan 30 13:26:30 2020 = /microsd_efi/armstub8-gic.bin -rwxr-xr-x 1 root wheel 18693 Nov 22 09:06:44 2019 = /microsd_efi/COPYING.linux -rwxr-xr-x 1 root wheel 1594 Nov 22 09:06:44 2019 = /microsd_efi/LICENCE.broadcom drwxr-xr-x 1 root wheel 1024 Sep 27 21:05:00 2018 /microsd_efi/EFI # diff -rq /microsd_efi/ /usb_efi/ Only in /usb_efi/EFI/BOOT: BOOTAA64.EFI Only in /microsd_efi/EFI/BOOT: bootaa64.efi Files /microsd_efi/Readme.md and /usb_efi/Readme.md differ Files /microsd_efi/config.txt and /usb_efi/config.txt differ Files /microsd_efi/fixup4.dat and /usb_efi/fixup4.dat differ Files /microsd_efi/start4.elf and /usb_efi/start4.elf differ The content of BOOTAA64.EFI and bootaa64.efi are identical, it is just a capitalization difference in the naming. > booted a bit more (until gpio or so afaik)=E2=80=A6.it`s all about = DeviceTree=20 > and I guess Kyle Evans & friends unfortunately will have more = adjustment-work in the brcm285..dtsi=E2=80=A6 for 2020.10 > I unfortunately totally fail in my time-management but will tell more = about the 8GB - VL805-videoCore-firmware-thing when finding time..=20 > I didn=E2=80=99t yet apply kevans-patches, will test them it later.. I've not tried them either. > Directly from SSD(no SD-card inserted): > =E2=80=94-config.txt : =E2=80=94 > arm_control=3D0x200 > dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don > enable_uart=3D1 > uart_2ndstage=3D1 > dtoverlay=3Dminiuart-bt > dtoverlay=3Dmmc > dtoverlay=3Dpwm > device_tree_address=3D0x4000 > kernel=3Du-boot.bin > =E2=80=94-------------------------------------------------- >=20 > recover4.elf not found (6) > recovery.elf not found (6) > HUB [03:01] 2.00 000003:01 init port 1 speed 3 > DEV [05:03] 2.00 000013:01 class 9 VID 045b PID 0209 > HUB init [05:03] 2.00 000013:01 > Read start4.elf bytes 2272992 hnd 0x000002e7 hash '319662b44a4c80d5' > Read fixup4.dat bytes 5405 hnd 0x000001bf hash '0c1a6c6f96114a3f' > 0x00c03111 0x00000000 0x0000001f > MEM GPU: 76 ARM: 947 TOTAL: 1023 > Starting start4.elf @ 0xfeb00200 partition 0 >=20 >=20 > U-Boot 2020.10-rc5 (Oct 05 2020 - 03:08:23 +0000) >=20 > . . . > FreeBSD 13.0-CURRENT #39 a1d832e8c08-c271678(master): Fri Jul 17 = 04:56:52 UTC 2020 This identifies head -r365919 from 2020-Sep-20. I'm using head -r365932 = . > . . . > gpioled0: on ofwbus0 > sdhci_bcm1: mem 0x7e340000-0x7e3400ff = irq 80 on simplebus3 > mmc1: on sdhci_bcm1 > =E2=80=94- hanging here=E2=80=94 >=20 > just GUESSING ;-) (absolutely NO proof:-): > It comes to boot problems short before xhci will be initialized from = the DeviceTree >=20 I've not yet tried a combination that uses a u-boot from the USB3 SSD (no microsd card) and gets anywhere near that far along on any RPi4B (4 GiByte or 8 GiByte). I've only gotten u-boot to boot RPi4B FreeBSD completely when u-boot and the FreeBSD kernel were both from the microsd card. (With the FreeBSD kernel in place, I can then have the later stages use the USB3 SSD instead --and that is what I normally do.) But for this to work I've had to use older start* and fixup* files. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)