Raspberry Pi 4 announced

weberjn

Member

Reaction score: 11
Messages: 31

I am pleased to report I have reached the login prompt on the raspberry pi 4.

Unfortunately I can’t login yet as shortly after /sbin/init starts something trashes the serial com link and I only get garbage over serial (in either direction). Probably just a misconfiguration.
Any progress in the last three months?
 

RobCrowston

Member

Reaction score: 27
Messages: 22

Any progress in the last three months?
I am able to login interactively over serial by doubling the speed of the serial link after init starts. I haven’t the faintest idea why the link speed changes. Things work well enough, but no peripherals or network so I’m limited in what I can test after logging in. But fundamentally the operating system works.

I took a look at the Linux ethernet driver “genet” in the hopes I could re-implement it on the FreeBSD side. I guess there might be licensing issues with that, but I figured it’s better than nothing. Unfortunately I don’t really understand the Linux stack well enough to make much progress. I also reached out to broadcom to ask for the specs. They were not helpful. I haven’t really had a lot of time to work on it unfortunately.
 

weberjn

Member

Reaction score: 11
Messages: 31

I also reached out to broadcom to ask for the specs. They were not helpful. I haven’t really had a lot of time to work on it unfortunately.
Anyway, thanks for the update. Is your code so far somewhere accessible?

Thanks for your work, I do believe support for the RPI4 ist very important.
 

RobCrowston

Member

Reaction score: 27
Messages: 22

Kyle Evans has picked this up and made a number of PRs to mainline in the last few days to enable pi4 support out of the box. I’m very pleased. In particular he figured out the DMA controller problem I wasn’t able to solve.
 

ucomp

Active Member

Reaction score: 39
Messages: 212

Any progress ......?
from the developers view : YES
from the users view : NO
--
it's bootable, with me it managed an over 10 hours compilation with the -j4 option(100%CPU usage) with only few problems, so the CPU-hacks are not the worst. the next major step will be the integration/implementation of drivers for SDIO because there's no network at the moment.the "official" wifi-driver worked for me with NetBSD-SDIO- implementation, so it`s technically possible to get Wifi to work with the brcmfmac closed source driver.
Don`t know if someone's working on reverse engineering but a guess : no

Although we will get this amateur board to work one day... :
if you expect a working FreeBSD-board with similar performance in this price range, buy another one (I could give a recommendation but don't want to advertise it here).
don't look for boards which are better advertised than RPI(because you won't find one). look for boards which work better than RPI instead and for those with more professional features.
 

weberjn

Member

Reaction score: 11
Messages: 31

it's bootable
So you booted from SD using the NetBSD drivers?

What about an SSD attached to USB (via a USB to Sata adapter cable)? would that work?

Does ethernet work? Wifi is not important, I'd prefer ethernet for stability and security reasons.
 

RobCrowston

Member

Reaction score: 27
Messages: 22

We have a working SD card driver in HEAD (currently doesn’t work for me again probably because I have some weird setup to get the JTAG to work).

USB is attached over PCI-E, so there’s no USB. Even if we had a working USB, you would still need to keep /boot/kernel on the SD card because u-boot doesn’t support the pi4 PCIE/USB, so we couldn’t start the kernel from USB.

There’s no ethernet (yet another custom chip that will need a new driver).

The NetBSD driver mentioned above is for wifi. Someone is working on that I think.
 

ucomp

Active Member

Reaction score: 39
Messages: 212

So you booted from SD using the NetBSD drivers?
yes, FreeBSD boots from SD on the RPI4 but that has nothing to do with NetBSD

We have a working SD card driver in HEAD (currently doesn’t work for me again probably because I have some weird setup to get the JTAG to work).
..... The NetBSD driver ...
.. there's no SD-card driver in that sense , it boots from u-boot & the manufacturer's firmware.
there's no NetBSD-driver, it's even funnier:
I had bind the Debian-driver in NetBSD because the original brcmfmac von Broadcom didn't work :)
So to make it a little more understandable:
for Wifi there's only a closed source driver from Broadcom but it seems that there are 'different' versions around.

from my reading in the FreeBSD-src the only thing to do is to bind the brcmfmac-file to SDIO(SDIO is implemented in FreeBSD src). I didn't finish the last compile with SDIO on RPI4 yet because some other things had to be fixed in src. We will see if binding the brcmfmac-file in SDIO is an accepted way for merging in src.
All other Rob described is correct: USB etc. is apparently really problematic because of the closed source ...
 

ucomp

Active Member

Reaction score: 39
Messages: 212

.... you could mount root .....
(maybe for coincidence)
I'm exactly hanging @mountroot at the moment :)
(after installkernel GENERIC-MMCCAM )
MMC: emmc2@7e340000: 0, mmc@7e300000: 1
Loading Environment from FAT... In: serial
Out: serial
Err: serial
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk emmc2@7e340000.blk...
Scanning disk mmc@7e300000.blk...
Disk mmc@7e300000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
678800 bytes read in 78 ms (8.3 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Consoles: EFI console
Reading loader env vars from /efi/freebsd/loader.env


Loading kernel...
/boot/kernel/kernel text=0x98e51c data=0x1900a8 data=0x0+0x79d260 syms=[0x8+0x145a58+0x8+0x12fb47]
Loading configured modules...
/boot/kernel/umodem.ko text=0x2100 text=0x13a0 data=0x6e0+0x10 syms=[0x8+0xf48+0x8+0xb6e]
/boot/entropy size=0x1000

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
Using DTB provided by EFI at 0x7ef2000.
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT #0 r357013M: Thu Jan 23 19:55:28 UTC 2020
root@generic:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-MMCCAM arm64
FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
module firmware already present!
KLD file umodem.ko is missing dependencies
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP 39f53000 mode 2 pages 1
MAP 39f57000 mode 2 pages 1
MAP 3b360000 mode 2 pages 16
MAP fe100000 mode 0 pages 1
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 13.0.
kbd0 at kbdmux0
WARNING: Device "openfirm" is Giant locked and may be deleted before FreeBSD 13.0.
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
ofw_clkbus0: <OFW clocks bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofw_clkbus0
clk_fixed1: <Fixed clock> on ofw_clkbus0
simplebus1: <Flattened device tree simple bus> on ofwbus0
simplebus2: <Flattened device tree simple bus> on ofwbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
gic0: <ARM Generic Interrupt Controller> mem 0x40041000-0x40041fff,0x40042000-0x40043fff,0x40044000-0x40045fff,0x40046000-0x40047fff irq 46 on simplebus0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 256
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 22,23 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
generic_timer0: <ARMv7 Generic Timer> irq 4,5,6,7 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 54000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 54000000 Hz quality 1000
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
usb_nop_xceiv0: <USB NOP PHY> on ofwbus0
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version number mismatched with DT
device_attach: psci0 attach returned 6
bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007aff irq 9,10,11,12,13,14,15,16,17,18,19 on simplebus0
bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100113,0x7e00a000-0x7e00a023,0x7ec11000-0x7ec1101f on simplebus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 21 on simplebus0
gpioc0: <GPIO controller> on gpio0
uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e2011ff irq 24 on simplebus0
uart0: console (115200,n,8,1)
spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e2041ff irq 26 on simplebus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
spibus0: <unknown card> at cs 1 mode 0
iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 38 on simplebus0
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e340000-0x7e3400ff irq 60 on simplebus0
mmc_alloc_device()
sdhci_bcm1: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 61 on simplebus0
mmc_alloc_device()
fb0: <BCM2835 VT framebuffer driver> on simplebus0
fb0: changing fb bpp from 0 to 24
mbox0: mbox response error
fb0: bcm2835_mbox_fb_init failed, err=5
device_attach: fb0 attach returned 6
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led1> failed to map pin
gpioregulator0: <GPIO controlled regulator> on ofwbus0
gpioregulator0: cannot get pin 0
gpioregulator0: cannot parse parameters
device_attach: gpioregulator0 attach returned 6
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
mmc_dev_async(async_code=0x20, path_id=0, target_id=0, lun_id=0
Got AC_PATH_REGISTERED -- whatever...
mmc_dev_async(async_code=0x20, path_id=0, target_id=ffffffff, lun_id=ffffffff
mmc_dev_async(async_code=0x20, path_id=1, target_id=0, lun_id=0
Got AC_PATH_REGISTERED -- whatever...
mmc_dev_async(async_code=0x20, path_id=1, target_id=ffffffff, lun_id=ffffffff
Obsolete code will be removed soon: random(9) is the obsolete Park-Miller LCG from 1988
usb_needs_explore_all: no devclass
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
(noperiph:sdhci_slot0:0:-1:ffffffff): XPT_SCAN_{BUS,TGT,LUN}
(noperiph:sdhci_slot0:0:0:0): XPT_SCAN_{BUS,TGT,LUN}
(noperiph:sdhci_slot0:0:0:0): Set up the mmcprobe device...
(mmcprobe0:sdhci_slot0:0:0:0): Periph created
(mmcprobe0:sdhci_slot0:0:0:0): Probe started
(mmcprobe0:sdhci_slot0:0:0:0): Probe PROBE_INVALID to PROBE_RESET
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_start
(mmcprobe0:sdhci_slot0:0:0:0): Start with PROBE_RESET
sdhci_bcm0-slot0: Clock => 0
sdhci_bcm0-slot0: VDD => 21
sdhci_bcm0-slot0: CS => 0
sdhci_bcm0-slot0: Bus width => 0
sdhci_bcm0-slot0: Power mode => 1
sdhci_bcm0-slot0: Bus mode => 1
sdhci_bcm0-slot0: sdhci_cam_update_ios: power_mode=1, clk=0, bus_width=0, timing=0
Release APs...Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
Root mount waiting for: CAM
sdhci_bcm0-slot0: Clock => 400000
sdhci_bcm0-slot0: Power mode => 2
sdhci_bcm0-slot0: Timing => 0
sdhci_bcm0-slot0: sdhci_cam_update_ios: power_mode=2, clk=400000, bus_width=0, timing=0
sdhci_bcm0-slot0: CS => 1
sdhci_bcm0-slot0: sdhci_cam_update_ios: power_mode=2, clk=400000, bus_width=0, timing=0
(mmcprobe0:sdhci_slot0:0:0:0): Send first XPT_MMC_IO
(noperiph:sdhci_slot1:0:-1:ffffffff): XPT_SCAN_{BUS,TGT,LUN}
(noperiph:sdhci_slot1:0:0:0): XPT_SCAN_{BUS,TGT,LUN}
(noperiph:sdhci_slot1:0:0:0): Set up the mmcprobe device...
(mmcprobe1:sdhci_slot1:0:0:0): Periph created
(mmcprobe1:sdhci_slot1:0:0:0): Probe started
(mmcprobe1:sdhci_slot1:0:0:0): Probe PROBE_INVALID to PROBE_RESET
(mmcprobe1:sdhci_slot1:0:0:0): mmcprobe_start
(mmcprobe1:sdhci_slot1:0:0:0): Start with PROBE_RESET
sdhci_bcm1-slot0: Clock => 0
sdhci_bcm1-slot0: VDD => 21
sdhci_bcm1-slot0: CS => 0
sdhci_bcm1-slot0: Bus width => 0
sdhci_bcm1-slot0: Power mode => 1
sdhci_bcm1-slot0: Bus mode => 1
sdhci_bcm1-slot0: sdhci_cam_update_ios: power_mode=1, clk=0, bus_width=0, timing=0
APs not started
CPU 0: ARM Cortex-A72 r0p3 affinity: 0
Instruction Set Attributes 0 = <CRC32>
Instruction Set Attributes 1 = <>
Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
Processor Features 1 = <>
Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,16TB PA>
Memory Model Features 1 = <8bit VMID>
Memory Model Features 2 = <32bit CCIDX,48bit VA>
Debug Features 0 = <2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
Debug Features 1 = <>
Auxiliary Features 0 = <>
Auxiliary Features 1 = <>
CPU 1: (null) (null) r0p0 affinity: 0
CPU 2: (null) (null) r0p0 affinity: 0
CPU 3: (null) (null) r0p0 affinity: 0
WARNING: WITNESS option enabled, expect reduced performance.
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_done
Starting completion of PROBE_RESET
(mmcprobe0:sdhci_slot0:0:0:0): done with PROBE_RESET
(mmcprobe0:sdhci_slot0:0:0:0): Probe PROBE_RESET to PROBE_SEND_IF_COND
mmc_probedone: remaining freezecnt 0
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_start
(mmcprobe0:sdhci_slot0:0:0:0): Start with PROBE_SEND_IF_COND
sdhci_bcm1-slot0: Clock => 399361
sdhci_bcm1-slot0: Power mode => 2
sdhci_bcm1-slot0: Timing => 0
sdhci_bcm1-slot0: sdhci_cam_update_ios: power_mode=2, clk=399361, bus_width=0, timing=0
Root mount waiting for: CAM
sdhci_bcm1-slot0: CS => 1
sdhci_bcm1-slot0: sdhci_cam_update_ios: power_mode=2, clk=399361, bus_width=0, timing=0
(mmcprobe1:sdhci_slot1:0:0:0): Send first XPT_MMC_IO
mountroot: waiting for device /dev/ufs/rootfs...
Mounting from ufs:/dev/ufs/rootfs failed with error 19.

Loader variables:
vfs.root.mountfrom=ufs:/dev/ufs/rootfs
vfs.root.mountfrom.options=rw

Manual root filesystem specification:
<fstype>:<device> [options]
Mount <device> using filesystem <fstype>
and with the specified (optional) option list.

eg. ufs:/dev/da0s1a
zfs:zroot/ROOT/default
cd9660:/dev/cd0 ro
(which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

? List valid disk boot devices
. Yield 1 second (for background tasks)
<empty line> Abort manual input

mountroot> sdhci_bcm0-slot0: Controller timeout
sdhci_bcm0-slot0: ============== REGISTER DUMP ==============
sdhci_bcm0-slot0: Sys addr: 0x00000000 | Version: 0x00001002
sdhci_bcm0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
sdhci_bcm0-slot0: Argument: 0x000001aa | Trn mode: 0x00000000
sdhci_bcm0-slot0: Present: 0x1fff0000 | Host ctl: 0x00000000
sdhci_bcm0-slot0: Power: 0x0000000f | Blk gap: 0x00000080
sdhci_bcm0-slot0: Wake-up: 0x00000000 | Clock: 0x00007d07
sdhci_bcm0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001
sdhci_bcm0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff003b
sdhci_bcm0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
sdhci_bcm0-slot0: Caps: 0x45ee6432 | Caps2: 0x0000a525
sdhci_bcm0-slot0: Max curr: 0x00080008 | ADMA err: 0x00000000
sdhci_bcm0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000001
sdhci_bcm0-slot0: ===========================================
sdhci_bcm1-slot0: Controller timeout
sdhci_bcm1-slot0: ============== REGISTER DUMP ==============
sdhci_bcm1-slot0: Sys addr: 0x00000000 | Version: 0x00009902
sdhci_bcm1-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
sdhci_bcm1-slot0: Argument: 0x00000000 | Trn mode: 0x00000000
sdhci_bcm1-slot0: Present: 0x000f0001 | Host ctl: 0x00000000
sdhci_bcm1-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_bcm1-slot0: Wake-up: 0x00000000 | Clock: 0x00003947
sdhci_bcm1-slot0: Timeout: 0x00000000 | Int stat: 0x00038000
sdhci_bcm1-slot0: Int enab: 0x01ff00bb | Sig enab: 0x01ff00bb
sdhci_bcm1-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
sdhci_bcm1-slot0: Caps: 0x00000000 | Caps2: 0x00000000
sdhci_bcm1-slot0: Max curr: 0x00000001 | ADMA err: 0x00000000
sdhci_bcm1-slot0: ADMA addr:0x00000000 | Slot int: 0x00000001
sdhci_bcm1-slot0: ===========================================
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_done
(mmcprobe0:sdhci_slot0:0:0:0): IF_COND: error 1, pattern 00000000
(mmcprobe0:sdhci_slot0:0:0:0): Probe PROBE_SEND_IF_COND to PROBE_SDIO_RESET
mmc_probedone: remaining freezecnt 0
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_start
(mmcprobe0:sdhci_slot0:0:0:0): Start with PROBE_SDIO_RESET
(mmcprobe1:sdhci_slot1:0:0:0): mmcprobe_done
Starting completion of PROBE_RESET
(mmcprobe1:sdhci_slot1:0:0:0): done with PROBE_RESET
(mmcprobe1:sdhci_slot1:0:0:0): GO_IDLE_STATE failed with error 1
(mmcprobe1:sdhci_slot1:0:0:0): Probe PROBE_RESET to PROBE_INVALID
mmc_probedone: remaining freezecnt 0
(mmcprobe1:sdhci_slot1:0:0:0): Periph invalidated
(mmcprobe1:sdhci_slot1:0:0:0): Periph destroyed
?

List of GEOM managed disk devices:


mountroot> sdhci_bcm0-slot0: Controller timeout
sdhci_bcm0-slot0: ============== REGISTER DUMP ==============
sdhci_bcm0-slot0: Sys addr: 0x00000000 | Version: 0x00001002
sdhci_bcm0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
sdhci_bcm0-slot0: Argument: 0x88000c08 | Trn mode: 0x00000000
sdhci_bcm0-slot0: Present: 0x1fff0000 | Host ctl: 0x00000000
sdhci_bcm0-slot0: Power: 0x0000000f | Blk gap: 0x00000080
sdhci_bcm0-slot0: Wake-up: 0x00000000 | Clock: 0x00007d07
sdhci_bcm0-slot0: Timeout: 0x00000000 | Int stat: 0x00018000
sdhci_bcm0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff003b
sdhci_bcm0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
sdhci_bcm0-slot0: Caps: 0x45ee6432 | Caps2: 0x0000a525
sdhci_bcm0-slot0: Max curr: 0x00080008 | ADMA err: 0x00000000
sdhci_bcm0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000001
sdhci_bcm0-slot0: ===========================================
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_done
(mmcprobe0:sdhci_slot0:0:0:0): SDIO_RESET: error 1, CCCR CTL register: 00000000
(mmcprobe0:sdhci_slot0:0:0:0): Probe PROBE_SDIO_RESET to PROBE_SDIO_INIT
mmc_probedone: remaining freezecnt 0
(mmcprobe0:sdhci_slot0:0:0:0): mmcprobe_start
(mmcprobe0:sdhci_slot0:0:0:0): Start with PROBE_SDIO_INIT
?

List of GEOM managed disk devices:


mountroot> ?

List of GEOM managed disk devices:


mountroot>
panic: mountroot: unable to (re-)mount root.
cpuid = 0
time = 32
KDB: stack backtrace:
db_trace_self() at db_trace_self_wrapper+0x28
pc = 0xffff00000073c68c lr = 0xffff000000110570
sp = 0xffff000040265370 fp = 0xffff000040265580

db_trace_self_wrapper() at vpanic+0x194
pc = 0xffff000000110570 lr = 0xffff00000040b03c
sp = 0xffff000040265590 fp = 0xffff000040265640

vpanic() at panic+0x44
pc = 0xffff00000040b03c lr = 0xffff00000040ade4
sp = 0xffff000040265650 fp = 0xffff0000402656d0

panic() at vfs_mountroot+0x1558
pc = 0xffff00000040ade4 lr = 0xffff0000004d1950
sp = 0xffff0000402656e0 fp = 0xffff000040265880

vfs_mountroot() at start_init+0x28
pc = 0xffff0000004d1950 lr = 0xffff0000003a3cec
sp = 0xffff000040265890 fp = 0xffff000040265940

start_init() at fork_exit+0x7c
pc = 0xffff0000003a3cec lr = 0xffff0000003ca2f8
sp = 0xffff000040265950 fp = 0xffff000040265980

fork_exit() at fork_trampoline+0x10
pc = 0xffff0000003ca2f8 lr = 0xffff0000007592cc
sp = 0xffff000040265990 fp = 0x0000000000000000

KDB: enter: panic
[ thread pid 1 tid 100002 ]
Stopped at 0
db>
 

J O H N

New Member


Messages: 1

In case people haven't noticed, the Raspberry Pi 4 has been announced. Theoretically it's available but as is typical, everything is back-order (in the suppliers I deal with). There are some interesting updates:

1.5 GHz Quad Core
1, 2, or 4 GB of RAM (you choose at time of purchase)
Dual 4K display support (and switch to HDMI-C type connector)
New power (usb-c type connector)

I am looking forward to seeing how things progress for FreeBSD on RPi for this one. The specs are on-par with a low-end desktop/netbook type system.
I just imaged an SD card with 64-bit ARMv8 aarch64 and booted it on a 4GB Raspberry Pi 4 model B (2018). It booted without modification and displayed on an HDMI monitor but there was no power to any of the USB ports. It did recognize the Ethernet port (not the wireless one). So close....

Anyway, I just wanted to congratulate all of you whom have been working so hard on this distro and, in particular, for the Raspberry Pi.

Kind regards.
 

kpedersen

Daemon

Reaction score: 1,043
Messages: 2,048

This is really great. It is really nice to see that FreeBSD is remaining fairly light and portable to alternative architectures. I like the idea that if a truely fantastic one comes along, FreeBSD will not be lagging behind in support due to too much reliance on x86 assumptions.

I notice that the OpenBSD port to this platform has no HDMI (needs to be setup via serial). I assumed this was due to some missing Broadcom blob. How is it that the FreeBSD port has working HDMI?
 

RobCrowston

Member

Reaction score: 27
Messages: 22

I haven't looked in a lot of detail, but OpenBSD uses TianoCore EDK2 instead of U-Boot. That has some advantages, for instance, the PCI-E controller is initialized ready for the operating system to use. I wasn't aware that HDMI didn't function. AFAIK we do nothing special for HDMI, it's just prepared for us by u-boot like any other video device.

Also, this is not the only arm64 device. On the other side of the scale FreeBSD works for instance on Amazon's 64 core Graviton2 architecture and Amazon has been submitting patches recently to improve the situation there. There's also been long standing support for Cavium ThunderX 96 core machines. I don't see support for the Pi ever being much better than experimental because we really have no manufacturer support at all.

I figured out how to route MSI interrupts on the Pi4 today ... but the USB controller is still not initializing properly. Still more work required!
 

RobCrowston

Member

Reaction score: 27
Messages: 22

In good news, I have an early version of the PCI-E driver now available for anyone who wants to test it. It works okay enough for me with a keyboard and mouse, but mass storage devices are a bit less reliable. Folks connecting through USB hubs are having more trouble. I'll try to get it up on Phabricator shortly as I made some minor surgery in the current PCI-E system which someone will probably want me to change.

In bad news, it seems that the Pi foundation has redesigned the hardware path by which the XHCI chip loads its firmware in the 8 GiB design of the Pi 4. I have an 8 GiB model on order, should arrive in the next few days.
 

ucomp

Active Member

Reaction score: 39
Messages: 212

PCI-E driver now available for anyone who wants to test it.
Freaks, what's going on here, nobody of you tests the driver? Everyone wants something but nobody wants to help?
So let's go: one two three four, start the test,
five six seven eight, come on, start your tests ✌😁
 

ucomp

Active Member

Reaction score: 39
Messages: 212

So let's go: one two three four, start the test,
five six seven eight, come on, start your tests
we `ve found another tester , so we are complete, thanks a lot !

you here can drive home , you can, you can, you can drive home ... scoobidooo, lullaloo... 🤘🎤🎸 😁
 

RobCrowston

Member

Reaction score: 27
Messages: 22

Acquired the 8 GB model and got it started this morning. Requires a relatively simple patch to u-boot.

However the progress we made with xhci and ethernet has been undone. I think repairing xhci will be easy enough. Not sure about ethernet.
 

ucomp

Active Member

Reaction score: 39
Messages: 212

Not sure about ethernet.
As you already know, your BSD-world-premiere-u-boot-hack on the RPI4/8GB is even better than you thought :)
Code:
root@generic:~ # sysctl hw.physmem
hw.physmem: 8422461440
root@generic:~ # ping forums.freebsd.org
PING forums.freebsd.org (204.109.59.195): 56 data bytes
64 bytes from 204.109.59.195: icmp_seq=0 ttl=45 time=213.881 ms
64 bytes from 204.109.59.195: icmp_seq=1 ttl=45 time=203.807 ms
64 bytes from 204.109.59.195: icmp_seq=2 ttl=45 time=189.085 ms
^C
--- forums.freebsd.org ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 189.085/202.258/213.881/10.182 ms
 
Top