On 2020/04/19 21:44, Mark Kettenis wrote: > The Raspberry Pi 4 has an additional SD/MMC controller. This > controller is almost completely standard and just needs one tiny > quirk. So the diff is really simple. > > By default, if you use the EDK2-base UEFI firmware this controller > isn't actually connected to anything. So you'll see > > sdmmc0: can't enable card > > in your dmesg. If you change the "Raspberry Pi Configuration" -> > "SD/MMC Configuration" -> "uSD routing" setting in the "Device > Manager" firmware configuration screen to "eMMC2 SDHCI". The uSD card > will show up behind this controller and WiFi will show up on the other > controller. Note that after you've made that configuration change and > reset the machine, any further change you make won't stick. You can > fix this by replacing the RPI_EFI.fd file on the MS-DOS partition of > your uSD card. > > For now the SDHC controllers are only supported in device tree mode > which can be enabled using the "Raspberry Pi Configuration" -> > "Advanced Configuration" -> "Device Tree" option in the "Device > Manager".
bwfm(4) is working for me, but when in device tree mode (wherever the uSD is routed) bse(4) is flaky - ethernet link doesn't come up at boot, if I leave it for a little while with a ping running to the bse from another machine I get the occasional packet through but that's all. Do you see that too? 64 bytes from 10.15.5.53: icmp_seq=1977 ttl=255 time=0.590 ms 64 bytes from 10.15.5.53: icmp_seq=1987 ttl=255 time=0.531 ms 64 bytes from 10.15.5.53: icmp_seq=1992 ttl=255 time=0.537 ms 64 bytes from 10.15.5.53: icmp_seq=2024 ttl=255 time=0.543 ms 64 bytes from 10.15.5.53: icmp_seq=2027 ttl=255 time=0.406 ms Watching interrupt rates whilst flood pinging it, none of them move. $ vmstat -i interrupt total rate irq1023/spur 47 0 irq0/ipinop 214576 197 irq153/pluart0 43887 40 irq158/sdhc0 33516 30 irq175/xhci0 305805 281 irq189/bse0 7413 6 irq27/tick 867628 797 Total 1472872 1353 ESC (setup), F1 (shell), ENTER (boot).disks: sd0* >> OpenBSD/arm64 BOOTAA64 0.22 boot> booting sd0a:/bsd: 7737056+1498096+541152+848472 [509436+109+962448+543543]=0xd3 f930 type 0x0 pa 0x0 va 0x0 pages 0x1d0 attr 0xe type 0x6 pa 0x1d0000 va 0x97a96c000 pages 0x20 attr 0x800000000000000e type 0x0 pa 0x1f0000 va 0x0 pages 0x10 attr 0xe type 0x2 pa 0x200000 va 0x0 pages 0x4000 attr 0xe type 0x7 pa 0x4200000 va 0x0 pages 0x2e8fb attr 0xe type 0x2 pa 0x32afb000 va 0x0 pages 0xc82 attr 0xe type 0x1 pa 0x3377d000 va 0x0 pages 0x2a attr 0xe type 0x0 pa 0x337a7000 va 0x0 pages 0xf9 attr 0xe type 0x6 pa 0x338a0000 va 0x9ae03c000 pages 0xa0 attr 0x800000000000000e type 0x5 pa 0x33940000 va 0x9ae0dc000 pages 0x50 attr 0x800000000000000e type 0x9 pa 0x33990000 va 0x0 pages 0x80 attr 0xe type 0x5 pa 0x33a10000 va 0x9ae1ac000 pages 0x80 attr 0x800000000000000e type 0x9 pa 0x33a90000 va 0x0 pages 0x20 attr 0xe type 0x5 pa 0x33ab0000 va 0x9ae24c000 pages 0x80 attr 0x800000000000000e type 0x7 pa 0x33b30000 va 0x0 pages 0x19e7 attr 0xe type 0x4 pa 0x35517000 va 0x0 pages 0x481 attr 0xe type 0x7 pa 0x35998000 va 0x0 pages 0x5f attr 0xe type 0x4 pa 0x359f7000 va 0x0 pages 0x1 attr 0xe type 0x7 pa 0x359f8000 va 0x0 pages 0xd7 attr 0xe type 0x4 pa 0x35acf000 va 0x0 pages 0xf55 attr 0xe type 0x7 pa 0x36a24000 va 0x0 pages 0x19e attr 0xe type 0x3 pa 0x36bc2000 va 0x0 pages 0x43e attr 0xe type 0x5 pa 0x37000000 va 0x9b179c000 pages 0x190 attr 0x800000000000000e type 0x6 pa 0x37190000 va 0x9b192c000 pages 0x250 attr 0x800000000000000e type 0x7 pa 0x373e0000 va 0x0 pages 0x1f attr 0xe type 0x4 pa 0x373ff000 va 0x0 pages 0x1 attr 0xe type 0x7 pa 0x37400000 va 0x0 pages 0x302b attr 0xe type 0x3 pa 0x3a42b000 va 0x0 pages 0x36 attr 0xe type 0x4 pa 0x3a461000 va 0x0 pages 0xf9f attr 0xe type 0x7 pa 0x40000000 va 0x0 pages 0x80000 attr 0xe [ using 2016504 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2020 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 6.7-beta (GENERIC.MP) #2: Mon Apr 20 21:13:03 BST 2020 st...@moo.spacehopper.org:/sys/arch/arm64/compile/GENERIC.MP real mem = 3076521984 (2934MB) avail mem = 2951929856 (2815MB) mainbus0 at root: Raspberry Pi 4 Model B Rev 1.2 cpu0 at mainbus0 mpidr 0: ARM Cortex-A72 r0p3 cpu0: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu0: 1024KB 64b/line 16-way L2 cache efi0 at mainbus0: UEFI 2.7 efi0: https://github.com/pftf/RPi4 rev 0x10000 smbios0 at efi0: SMBIOS 3.3.0 smbios0: vendor https://github.com/pftf/RPi4 version "UEFI Firmware v1.8" date Apr 14 2020 21:24:48 smbios0: Sony UK Raspberry Pi 4 Model B apm0 at mainbus0 psci0 at mainbus0: PSCI 1.1, SMCCC 1.2 "reserved-memory" at mainbus0 not configured "system" at mainbus0 not configured "axi" at mainbus0 not configured "thermal-zones" at mainbus0 not configured simplebus0 at mainbus0: "soc" bcmclock0 at simplebus0 bcmmbox0 at simplebus0 ampintc0 at simplebus0 nirq 256, ncpu 4 ipi: 0, 1: "gic400" "dma" at simplebus0 not configured bcmdog0 at simplebus0 bcmirng0 at simplebus0 "gpio" at simplebus0 not configured pluart0 at simplebus0: console "dsi" at simplebus0 not configured bcmaux0 at simplebus0 com0 at simplebus0: ns16550, no working fifo "local_intc" at simplebus0 not configured "thermal" at simplebus0 not configured "emmc2" at simplebus0 not configured sdhc0 at simplebus0 sdhc0: SDHC 3.0, 250 MHz base clock sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed simplebus1 at simplebus0: "firmware" "gpio" at simplebus1 not configured "power" at simplebus0 not configured "gpiomem" at simplebus0 not configured "fb" at simplebus0 not configured "vcsm" at simplebus0 not configured simplebus2 at mainbus0: "clocks" "clock" at simplebus2 not configured "clock" at simplebus2 not configured "phy" at mainbus0 not configured "arm-pmu" at mainbus0 not configured agtimer0 at mainbus0: tick rate 54000 KHz simplebus3 at mainbus0: "v3dbus" simplebus4 at mainbus0: "scb" bcmpcie0 at simplebus4 pci0 at bcmpcie0 ppb0 at pci0 dev 0 function 0 vendor "Broadcom", unknown product 0x2711 rev 0x10 pci1 at ppb0 bus 1 xhci0 at pci1 dev 0 function 0 "VIA VL805 xHCI" rev 0x01: intx, xHCI 1.0 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "VIA xHCI root hub" rev 3.00/1.00 addr 1 bse0 at simplebus4: address dc:a6:32:8b:e1:b7 brgphy0 at bse0 phy 1: BCM54210E 10/100/1000baseT PHY, rev. 2 "dma" at simplebus4 not configured "hevc-decoder" at simplebus4 not configured "rpivid-local-intc" at simplebus4 not configured "h264-decoder" at simplebus4 not configured "vp9-decoder" at simplebus4 not configured "mailbox" at simplebus4 not configured "__overrides__" at mainbus0 not configured "leds" at mainbus0 not configured "fixedregulator_3v3" at mainbus0 not configured "fixedregulator_5v0" at mainbus0 not configured "sd_io_1v8_reg" at mainbus0 not configured "sd_vcc_reg" at mainbus0 not configured "__symbols__" at mainbus0 not configured cpu1 at mainbus0 mpidr 1: ARM Cortex-A72 r0p3 cpu1: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu1: 1024KB 64b/line 16-way L2 cache cpu2 at mainbus0 mpidr 2: ARM Cortex-A72 r0p3 cpu2: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu2: 1024KB 64b/line 16-way L2 cache cpu3 at mainbus0 mpidr 3: ARM Cortex-A72 r0p3 cpu3: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu3: 1024KB 64b/line 16-way L2 cache uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs USB2.0 Hub" rev 2.10/4.20 addr 2 bwfm0 at sdmmc0 function 1 manufacturer 0x02d0, product 0xa9a6 at sdmmc0 function 2 not configured manufacturer 0x02d0, product 0xa9a6 at sdmmc0 function 3 not configured umass0 at uhub0 port 3 configuration 1 interface 0 "SanDisk Ultra Fit" rev 3.20/1.00 addr 3 umass0: using SCSI over Bulk-Only scsibus0 at umass0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SanDisk, Ultra Fit, 1.00> removable serial.0781558381079d269c03 sd0: 29340MB, 512 bytes/sector, 60088320 sectors vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets bootfile: sd0a:/bsd boot device: sd0 root on sd0a (a3d7f93f60aec212.a) swap on sd0b dump on sd0b bwfm0: address dc:a6:32:8b:e1:b8 Automatic boot in progress: starting file system checks. /dev/sd0a (a3d7f93f60aec212.a): file system is clean; not checking /dev/sd0l (a3d7f93f60aec212.l): file system is clean; not checking /dev/sd0d (a3d7f93f60aec212.d): file system is clean; not checking /dev/sd0f (a3d7f93f60aec212.f): file system is clean; not checking /dev/sd0g (a3d7f93f60aec212.g): file system is clean; not checking /dev/sd0h (a3d7f93f60aec212.h): file system is clean; not checking /dev/sd0k (a3d7f93f60aec212.k): file system is clean; not checking /dev/sd0m (a3d7f93f60aec212.m): file system is clean; not checking /dev/sd0j (a3d7f93f60aec212.j): file system is clean; not checking /dev/sd0e (a3d7f93f60aec212.e): file system is clean; not checking pf enabled starting network bse0: no link.... bse0: no lease.... sleeping reordering libraries: done.