RPi4B "C0T" (Rev 1.5) part and the duplicate/diff/cmp huge file test for UEFI/ACPI contexts: fails far worse than past B0T testing did

From: Mark Millard <marklmi_at_yahoo.com>
Date: Tue, 29 Nov 2022 06:37:12 UTC
FreeBSD has never updated the ACPI support to deal with
the DMA limitations of the B0T RPi4B parts, here the
xhci related limitation to the lower 3 GiBytes. This was
a test do see what a C0T RPi4B ends up with for behavior
based on the not-adjusted code.

Boot media prepared on a HoneyComb with snapshot (long line split
for readability):

FreeBSD 13.1-STABLE #0 stable/13-n253133-b51ee7ac252c: Wed Nov 23 03:36:16 UTC 2022
root@releng3.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC

(so, not my build). But I replaced the U-Boot/RPi*-firmware
material with the material for ACPI use (via
/pftf/RPi4/releases/download/v1.33/RPi4_UEFI_Firmware_v1.33.zip
and my usual adjustments):

# ls -Tlat /mnt/
total 4401
drwxr-xr-x   1 root  wheel     4096 Nov 28 21:17:26 2022 normal_material_moved_here
-rwxr-xr-x   1 root  wheel      952 Sep 28 10:24:32 2022 config.txt
-rwxr-xr-x   1 root  wheel      952 Sep 28 10:24:32 2022 config.txt.uefi_m_m_fbsd
drwxr-xr-x   1 root  wheel     4096 Jun 28 20:47:10 2022 EFI
drwxr-xr-x   1 root  wheel     4096 Apr  4 00:51:20 2022 firmware
drwxr-xr-x   1 root  wheel     4096 Apr  4 00:51:20 2022 overlays
-rwxr-xr-x   1 root  wheel    51543 Mar  7 09:06:24 2022 bcm2711-rpi-4-b.dtb
-rwxr-xr-x   1 root  wheel    51675 Mar  7 09:06:24 2022 bcm2711-rpi-400.dtb
-rwxr-xr-x   1 root  wheel    52128 Mar  7 09:06:24 2022 bcm2711-rpi-cm4.dtb
-rwxr-xr-x   1 root  wheel  2241376 Mar  7 09:06:24 2022 start4.elf
-rwxr-xr-x   1 root  wheel     5352 Mar  7 09:06:22 2022 fixup4.dat
drwxr-xr-x  58 root  wheel       65 Mar  7 09:04:04 2022 ..
-rwxr-xr-x   1 root  wheel  2031616 Mar  7 09:03:46 2022 RPI_EFI.fd
-rwxr-xr-x   1 root  wheel     5067 Mar  7 08:57:38 2022 Readme.md
-rwxr-xr-x   1 root  wheel      230 Mar  7 08:57:38 2022 config.txt.uefi_rpi4_orig
-rwxr-xr-x   1 root  wheel        0 Sep 13 14:15:28 2020 timeout
drwxr-xr-x   1 root  wheel    16384 Dec 31 16:00:00 1979 .

Also I had put in place for the duplicate and diff/cmp
test use the large file in the below:

# ls -Tlat
total 27064356
drwxr-xr-x   2 root  wheel          512 Nov 29 05:23:24 2022 .
-rw-------   1 root  wheel         1498 Nov 29 05:23:24 2022 .sh_history
-rw-------   1 root  wheel          163 Nov 29 04:12:52 2022 .history
-rw-r--r--   1 root  wheel         1191 Nov 29 04:11:02 2022 .shrc
-rw-r--r--   1 root  wheel  27707039744 Nov 28 19:11:23 2022 larger-than-RAM.tar
-rw-r--r--   1 root  wheel          328 Nov 23 04:07:48 2022 .login
-rw-r--r--   2 root  wheel         1023 Nov 23 04:07:48 2022 .cshrc
-rw-r--r--   2 root  wheel          507 Nov 23 04:07:48 2022 .profile
-rw-r--r--   1 root  wheel           80 Nov 23 04:07:38 2022 .k5login
drwxr-xr-x  20 root  wheel          512 Mar  7 17:03:52 2022 ..

Then I booted it on the C0T RPi4B and did the test after
logging in. The result was:

# cp -aRx larger-than-RAM.tar larger-than-RAM.tar.copied_via_RPi4B_C0T_Rev_1.5
xhci_interrupt: host system error
xhci_interrupt: host controller halted
xhci_interrupt: host system error
xhci0: Resetting controller
uhub1: at usbus1, port 1, addr 1 (disconnected)
ugen1.2: <vendor 0x2109 USB2.0 Hub> at usbus1 (disconnected)
uhub2: at uhub1, port 1, addr 1 (disconnected)
uhub2: detached
ugen1.3: <OWC Envoy Pro mini> at usbus1 (disconnected)
umass0: at uhub1, port 2, addr 2 (disconnected)
(da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 07 95 8a 40 00 08 00 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <OWC Envoy Pro mini 0>  s/n 000000000014 detached
g_vfs_done():ufs/rootfs[WRITE(offset=65094778880, length=1048576)]error = 6
UFS: forcibly unmounting /dev/ufs/rootfs from /
g_vfs_done():ufs/rootfs[WRITE(offset=65095827456, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65096876032, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65097924608, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65098973184, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65100021760, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65101070336, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65102118912, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65103167488, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65104216064, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65105264640, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65106313216, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65107361792, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65108410368, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65109458944, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65110507520, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65111556096, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65112604672, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65113653248, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65114701824, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65115750400, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65116798976, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65117847552, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65118896128, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65119944704, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65120993280, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65122041856, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65123090432, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65124139008, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65125187584, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65126236160, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65127284736, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65128333312, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65129381888, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65130430464, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65131479040, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65132527616, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65133576192, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65134624768, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65135673344, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65136721920, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65137770496, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65138819072, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65139867648, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65140916224, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65141964800, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65143013376, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65144061952, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65145110528, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65146159104, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65147207680, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65148256256, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65149304832, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65150353408, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65151401984, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65152450560, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65153499136, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65154547712, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65155596288, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65156644864, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65157693440, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65158742016, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65159790592, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65160839168, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65161887744, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65162936320, length=32768)]error = 6
g_vfs_done():ufs/rootfs[READ(offset=80762896384, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=655818752, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=1311309824, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=1311342592, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=1311539200, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=1314488320, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=1806696448, length=28672)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=56380817408, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=57691996160, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=58347585536, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=60314353664, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=61625532416, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=62281121792, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=62936711168, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=63592300544, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=64247889920, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=64903479296, length=32768)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65086849024, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65087897600, length=1048576)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65088946176, length=589824)]error = 6
g_vfs_done():ufs/rootfs[WRITE(offset=65093730304, length=1048576)]error = 6
larger-than-RAM.tar: Device not configured
pid 668 (sh), jid 0, uid 0: exited on signal 4
pid 365 (devd), jid 0, uid 0: exited on signal 4
(da0:umass-sim0:0:0:0): Periph destroyed
pid 667 (login), jid 0, uid 0: exited on signal 4
umass0: detached
uhub1: detached
uhub1 on usbus1
uhub1: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
uhub1: 5 ports with 4 removable, self powered
ugen1.2: <vendor 0x2109 USB2.0 Hub> at usbus1
uhub2 on uhub1
uhub2: <vendor 0x2109 USB2.0 Hub, class 9/0, rev 2.10/4.21, addr 1> on usbus1
uhub2: 4 ports with 4 removable, self powered
usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device OWC Envoy Pro mini (0x1e91:0xa2a5)
ugen1.3: <OWC Envoy Pro mini> at usbus1
umass0 on uhub1
umass0: <OWC Envoy Pro mini, class 0/0, rev 3.00/1.00, addr 2> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:0:0: Attached to scbus0
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <OWC Envoy Pro mini 0> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number ***REDACTED***
da0: 400.000MB/s transfers
da0: 228936MB (468862128 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
pid 637 (cron), jid 0, uid 0: exited on signal 4


That was all the output before things were hung up.

The old B0T testing got some corrupted blocks in 
the file copy(ies) in such testing but ran to
completion. But I've not run such tests in some
time.

I may see if my currently somewhat older but patched
kernel has problems as well for C0T RPi4B's, presuming 
ufficient world compatibility to leave the rest alone.
(I've never had problems with the patched kernel
versions on the B0T RPi4B's.)

===
Mark Millard
marklmi at yahoo.com