Bug 264574 - sdhci(4): Support ACPI attachment in BCM2835_sdhci driver: aarch64 memstick images fail to boot on RaspberryPi 4: Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19 (RPI image books ok)
Summary: sdhci(4): Support ACPI attachment in BCM2835_sdhci driver: aarch64 memstick i...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 13.1-RELEASE
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2022-06-09 13:54 UTC by JohannesNeu
Modified: 2024-01-05 06:25 UTC (History)
2 users (show)

See Also:
koobs: mfc-stable13?


Attachments
This file is the putty output from the serial console while booting the raspberry (19.32 KB, text/plain)
2022-06-09 13:54 UTC, JohannesNeu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description JohannesNeu 2022-06-09 13:54:06 UTC
Created attachment 234582 [details]
This file is the putty output from the serial console while booting the raspberry

Hello,

I am experiencing a "Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19." error on a raspberry pi 4 compute module board, when I boot into https://github.com/pftf/RPi4 and from there boot the FreeBSD-13.1-RELEASE-arm64-aarch64-memstick.img image.

It does not matter, whether the UEFI is on the integrated emmc or an sdcard or on a usb thumb drive, the error occurs. It does not matter whether the memstick image is on the emmc or an sdcard or an usb drive either.

I checked the following bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239876 but unlike this one, my "List of GEOM managed disk devices:" is empty. Which I guess may be part of the problem.

I have referenced this problem here: https://github.com/pftf/RPi4/issues/219 because I am not sure whether this may be due to an error in the UEFI implementation or Freebsd or a combination of both.

The RPI image of Freebsd 13.1 works without a problem, it is just the memstick version that doesn't work. (I did not use the RPI image together with UEFI, but on its own)

I have seen the same behaviour with 13.0

I hope someone has an idea how this can be fixed.

kind regards
Comment 1 Mitchell Horne freebsd_committer freebsd_triage 2022-06-09 15:36:17 UTC
Hi,

This is an issue with FreeBSD, at least in some sense. The EDK2 UEFI firmware that you are using describes its devices using ACPI. The typical boot firmware is u-boot, which describes its devices by providing a DTB (device tree blob).

FreeBSD's driver for the SDHCI device on the RPI4 does not have the bindings required to attach via ACPI. Therefore, no driver is attached for the device containing the root filesystem, and mountroot suitably fails with error 19 == ENODEV.

As far as I'm aware, nobody has been working on making sure FreeBSD can boot on the RPI4 with EDK2 firmware, and no such support is claimed. It's likely there are more drivers that will fail to attach for the same reasons. Adding the ACPI attachment to this driver (bcm2835_sdhci) would be a good starting point if someone was interested in this.
Comment 2 JohannesNeu 2022-06-09 15:42:48 UTC
Thank you very much for that detailed explanation, I was unaware how specific drivers are. I thought ACPI would be such a common standard, that most drivers just support it.
Rewriting a driver is way out of my capabilities, I hope someone might be interested to have a closer look.