Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2024 15:38:06 +0000
From:      Doug Rabson <dfr@rabson.org>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        Jesper Schmitz Mouridsen <jsm@freebsd.org>, John Kennedy <warlock@phouka.net>, ykla <yklaxds@gmail.com>,  FreeBSD ARM List <freebsd-arm@freebsd.org>
Subject:   Re: When will FreeBSD support RPI5?
Message-ID:  <CACA0VUh_X5nudWGOCeupW_34=aUewmwvOWmp61ONm=PtNr9wFw@mail.gmail.com>
In-Reply-To: <347FE009-A470-4765-A9B9-7C9AB5E954DA@yahoo.com>
References:  <CA%2BPGaYC6__AZUgHqfv3PO-o=7FnEzRzTPGPhMuahFNdcN0D69A@mail.gmail.com> <ddbf131c-1f2c-424b-9a3f-54ded16c5123@FreeBSD.org> <ZZHC_SjrPgs3DMKe@phouka1.phouka.net> <5a39810c-5fd8-4969-a222-2561b050b035@FreeBSD.org> <CACA0VUjoTTVje7tQe%2BVHXPco_xs4C8vSB3P3eDnhuYJYSqc7Sw@mail.gmail.com> <A2CA16F2-9894-41F2-8035-A5E8BE271B58@yahoo.com> <CACA0VUg7XHtQ7nviXVUZ_dZGaPe2uhbT-eGRbMAOajqZLGDmew@mail.gmail.com> <ECBFBAEF-C35B-4C68-B9BF-C3B62E5A4DFE@yahoo.com> <347FE009-A470-4765-A9B9-7C9AB5E954DA@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000b6018c060ed59102
Content-Type: text/plain; charset="UTF-8"

Getting back to the RPI 5, with a tweak to
arm/broadcom/bcm2835bcm2835_vcbus.c to treat the memory config the same as
RPI 4 and to dev/sdhci/sdhci_fdt.c to treat the RPI 5 sdhci controllers as
generic, I can boot to multiuser mode using the EDK2 firmware from
https://github.com/worproject/rpi5-uefi with ACPI/Device Tree mode set to
Both. This does not have working PCIe or ethernet yet - I think ethernet
ought to work since we seem to have a matching driver in the tree
in dev/cadence.

Doug.

On Thu, 11 Jan 2024 at 18:09, Mark Millard <marklmi@yahoo.com> wrote:

> On Jan 11, 2024, at 08:56, Mark Millard <marklmi@yahoo.com> wrote:
>
> > On Jan 11, 2024, at 08:20, Doug Rabson <dfr@rabson.org> wrote:
> >
> >>> On Thu, 11 Jan 2024 at 01:30, Mark Millard <marklmi@yahoo.com> wrote:
> >>> (While I normally use FreeBSD's U-Boot type of context,
> >>> My builds do have patches to allow RPi4B EDK2 use to
> >>> avoid the problems that I know to test for.)
> >>
> >> I'm curious how you were able to boot FreeBSD on rpi4 with EDK2 - I
> tried with both the FreeBSD package as well as the latest release from
> github. FreeBSD-14.0 stalled trying to initialise xhci while FreeBSD-15
> gets a little further but also hangs before reaching single user mode. I'm
> wondering if perhaps I should use the dtbs from sysutils/rpi-firmware
> rather than the ones from sysutils/edk2@rpi4.
> >
> > It has been a while since I last tested booting based on
> > a EDK2-based release from https://github.com/pftf/RPi4/ .
> > It looks like v1.35 is from 2023-Jun-05. At some point
> > I'll (re?-)try it.
> >
> > I used the same style of having EDK2 on a microsd card and
> > booting my normal USB3 media. The RPi4B is configured to
> > first try the microsd card slot (usually empty for me) and
> > then to try USB. I do set things up in EDK2 for serial
> > console use as primary. (I only rarely connect video to
> > the RPi*'s that I have access to. Mostly I ssh to them over
> > ethernet and otherwise use the serial console.)
> >
> > I've access to RPi4B Rev 1.1, 1.4, and 1.5 examples,
> > a mix of 4 GiByte and 8 GiByte.
> >
> > I've never used sysutils/edk2@rpi4 to boot as far as I
> > remember. My EDK2 activity started long before that
> > existed and I did not switch.
> >
> > The RPPi4B EDK2-based releases that I've used were from:
> >
> > https://github.com/pftf/RPi4/releases/
> >
> > But there are many releases that I've never tried.
> >
> > I do use patches to avoid some reliability
> > problems with USB file I/O . The reliability
> > problems never interfered with booting and were
> > only systematically reproducible via generating huge
> > files. But the problems were originally notice via
> > buildworld/buildkernel oddities that involved
> > randomly corrupted files, but not many. The problems
> > are FreeBSD bugs/incompletenesses in an area not used
> > with most UEFI/ACPI contexts that FreeBSD supports.
> >
>
> I found my v1.35 microsd card from the last time I tried.
>
> I had forgotten that the boot attempts now get a FreeBSD
> panic (seen via serial console use):
>
> panic: ram_attach: resource 5 failed to attach
> cpuid = 0
> time = 1
> KDB: stack backtrace:
> #0 0xffff00000050f450 at kdb_backtrace+0x58
> #1 0xffff0000004ba930 at vpanic+0x19c
> #2 0xffff0000004ba790 at panic+0x44
> #3 0xffff00000086e7c0 at ram_attach+0x1ac
> #4 0xffff0000004fba88 at device_attach+0x3f8
> #5 0xffff0000004fdce8 at bus_generic_new_pass+0x120
> #6 0xffff0000004fdc78 at bus_generic_new_pass+0xb0
> #7 0xffff000000500450 at root_bus_configure+0x40
> #8 0xffff00000042b600 at mi_startup+0xdc
> #9 0xffff0000000008ac at virtdone+0x70
>
> It is a FreeBSD problem, not an EDK2 problem. My old
> notes on the lists about the FreeBSD problem are at:
>
>
> https://lists.freebsd.org/archives/freebsd-current/2023-September/004775.html
>
> I do not know if v1.34 might sidestep the mishandling
> in FreeBSD or not.
>
> ===
> Mark Millard
> marklmi at yahoo.com
>
>

--000000000000b6018c060ed59102
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Getting back to the RPI 5, with a tweak to arm/broadcom/bc=
m2835bcm2835_vcbus.c to treat the memory config the same as RPI 4 and to=C2=
=A0dev/sdhci/sdhci_fdt.c to treat the RPI 5 sdhci controllers as generic, I=
 can boot to multiuser mode using the EDK2 firmware from=C2=A0<a href=3D"ht=
tps://github.com/worproject/rpi5-uefi">https://github.com/worproject/rpi5-u=
efi</a> with ACPI/Device Tree mode set to Both. This does not have working =
PCIe or ethernet yet - I think ethernet ought to work since we seem to have=
 a matching driver in the tree in=C2=A0dev/cadence.<div><br></div><div>Doug=
.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Thu, 11 Jan 2024 at 18:09, Mark Millard &lt;<a href=3D"mailto:mar=
klmi@yahoo.com">marklmi@yahoo.com</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;bo=
rder-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">=
On Jan 11, 2024, at 08:56, Mark Millard &lt;<a href=3D"mailto:marklmi@yahoo=
.com" target=3D"_blank">marklmi@yahoo.com</a>&gt; wrote:<br>
<br>
&gt; On Jan 11, 2024, at 08:20, Doug Rabson &lt;<a href=3D"mailto:dfr@rabso=
n.org" target=3D"_blank">dfr@rabson.org</a>&gt; wrote:<br>
&gt; <br>
&gt;&gt;&gt; On Thu, 11 Jan 2024 at 01:30, Mark Millard &lt;<a href=3D"mail=
to:marklmi@yahoo.com" target=3D"_blank">marklmi@yahoo.com</a>&gt; wrote:<br=
>
&gt;&gt;&gt; (While I normally use FreeBSD&#39;s U-Boot type of context,<br=
>
&gt;&gt;&gt; My builds do have patches to allow RPi4B EDK2 use to<br>
&gt;&gt;&gt; avoid the problems that I know to test for.)<br>
&gt;&gt; <br>
&gt;&gt; I&#39;m curious how you were able to boot FreeBSD on rpi4 with EDK=
2 - I tried with both the FreeBSD package as well as the latest release fro=
m github. FreeBSD-14.0 stalled trying to initialise xhci while FreeBSD-15 g=
ets a little further but also hangs before reaching single user mode. I&#39=
;m wondering if perhaps I should use the dtbs from sysutils/rpi-firmware ra=
ther than the ones from sysutils/edk2@rpi4.<br>
&gt; <br>
&gt; It has been a while since I last tested booting based on<br>
&gt; a EDK2-based release from <a href=3D"https://github.com/pftf/RPi4/" re=
l=3D"noreferrer" target=3D"_blank">https://github.com/pftf/RPi4/</a>; .<br>
&gt; It looks like v1.35 is from 2023-Jun-05. At some point<br>
&gt; I&#39;ll (re?-)try it.<br>
&gt; <br>
&gt; I used the same style of having EDK2 on a microsd card and<br>
&gt; booting my normal USB3 media. The RPi4B is configured to<br>
&gt; first try the microsd card slot (usually empty for me) and<br>
&gt; then to try USB. I do set things up in EDK2 for serial<br>
&gt; console use as primary. (I only rarely connect video to<br>
&gt; the RPi*&#39;s that I have access to. Mostly I ssh to them over<br>
&gt; ethernet and otherwise use the serial console.)<br>
&gt; <br>
&gt; I&#39;ve access to RPi4B Rev 1.1, 1.4, and 1.5 examples,<br>
&gt; a mix of 4 GiByte and 8 GiByte.<br>
&gt; <br>
&gt; I&#39;ve never used sysutils/edk2@rpi4 to boot as far as I<br>
&gt; remember. My EDK2 activity started long before that<br>
&gt; existed and I did not switch.<br>
&gt; <br>
&gt; The RPPi4B EDK2-based releases that I&#39;ve used were from:<br>
&gt; <br>
&gt; <a href=3D"https://github.com/pftf/RPi4/releases/" rel=3D"noreferrer" =
target=3D"_blank">https://github.com/pftf/RPi4/releases/</a><br>;
&gt; <br>
&gt; But there are many releases that I&#39;ve never tried.<br>
&gt; <br>
&gt; I do use patches to avoid some reliability<br>
&gt; problems with USB file I/O . The reliability<br>
&gt; problems never interfered with booting and were<br>
&gt; only systematically reproducible via generating huge<br>
&gt; files. But the problems were originally notice via<br>
&gt; buildworld/buildkernel oddities that involved<br>
&gt; randomly corrupted files, but not many. The problems<br>
&gt; are FreeBSD bugs/incompletenesses in an area not used<br>
&gt; with most UEFI/ACPI contexts that FreeBSD supports.<br>
&gt; <br>
<br>
I found my v1.35 microsd card from the last time I tried.<br>
<br>
I had forgotten that the boot attempts now get a FreeBSD<br>
panic (seen via serial console use):<br>
<br>
panic: ram_attach: resource 5 failed to attach<br>
cpuid =3D 0<br>
time =3D 1<br>
KDB: stack backtrace:<br>
#0 0xffff00000050f450 at kdb_backtrace+0x58<br>
#1 0xffff0000004ba930 at vpanic+0x19c<br>
#2 0xffff0000004ba790 at panic+0x44<br>
#3 0xffff00000086e7c0 at ram_attach+0x1ac<br>
#4 0xffff0000004fba88 at device_attach+0x3f8<br>
#5 0xffff0000004fdce8 at bus_generic_new_pass+0x120<br>
#6 0xffff0000004fdc78 at bus_generic_new_pass+0xb0<br>
#7 0xffff000000500450 at root_bus_configure+0x40<br>
#8 0xffff00000042b600 at mi_startup+0xdc<br>
#9 0xffff0000000008ac at virtdone+0x70<br>
<br>
It is a FreeBSD problem, not an EDK2 problem. My old<br>
notes on the lists about the FreeBSD problem are at:<br>
<br>
<a href=3D"https://lists.freebsd.org/archives/freebsd-current/2023-Septembe=
r/004775.html" rel=3D"noreferrer" target=3D"_blank">https://lists.freebsd.o=
rg/archives/freebsd-current/2023-September/004775.html</a><br>
<br>
I do not know if v1.34 might sidestep the mishandling<br>
in FreeBSD or not.<br>
<br>
=3D=3D=3D<br>
Mark Millard<br>
marklmi at <a href=3D"http://yahoo.com" rel=3D"noreferrer" target=3D"_blank=
">yahoo.com</a><br>
<br>
</blockquote></div>

--000000000000b6018c060ed59102--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACA0VUh_X5nudWGOCeupW_34=aUewmwvOWmp61ONm=PtNr9wFw>