Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2024 11:37:05 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        Doug Rabson <dfr@rabson.org>, Mark Millard <marklmi@yahoo.com>,  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:  <CANCZdfoMx4VcJ5aGkR4WJ6W6jz=xX=R5%2BPtiuHTsBKVCVVAeVg@mail.gmail.com>
In-Reply-To: <20240114161155.e82b64f2b0cf82fea0e606e4@bidouilliste.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> <CACA0VUh_X5nudWGOCeupW_34=aUewmwvOWmp61ONm=PtNr9wFw@mail.gmail.com> <76FA010A-338F-4E32-B381-37C7BA63CAFC@yahoo.com> <CACA0VUifmu=dhX0RFev30CXaHNhYQ=h6W%2BwYPG_rMiX-NZYBgw@mail.gmail.com> <20240114161155.e82b64f2b0cf82fea0e606e4@bidouilliste.com>

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

On Sun, Jan 14, 2024 at 8:12=E2=80=AFAM Emmanuel Vadot <manu@bidouilliste.c=
om>
wrote:

> On Sun, 14 Jan 2024 13:52:51 +0000
> Doug Rabson <dfr@rabson.org> wrote:
>
> > On Sat, 13 Jan 2024 at 18:32, Mark Millard <marklmi@yahoo.com> wrote:
> >
> > > On Jan 13, 2024, at 07:38, Doug Rabson <dfr@rabson.org> wrote:
> > >
> > > > 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.
> > >
> > > What does FreeBSD do with "Both"? Does it actually use some ACPI
> > > and some Device Tree? Or does it just use ACPI? Does your
> > > combination do anything different than just using ACPI?
> > >
> > > > 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.
> > >
> > > Sounds like the same status as booting just ACPI with no such
> > > adjustments too bcm2835bcm2835_vcbus.c or sdhci_fdt.c ?
> > >
> > > I think Mike Karels plans on investigating getting Ethernet
> > > going based on cgem . I've no clue if this is ACPI, DeviceTree,
> > > or both.
> > >
> > > My usage has been pure ACPI, no software adjustments specific
> > > to getting the RPi5 operational. Use of a USB3 Ethernet dongle.
> > >
> >
> > As far as I can tell, 'Both' works almost exactly the same as
> 'Devicetree'
> > - I don't think the acpi device is attached to nexus at all.
>
>  'Both' for EDK2 mean that dt and acpi table are exposed, and by
> default on FreeBSD we use dt and only fallback to acpi if dt wasn't
> found.
>

I think we should check dt and if it has a simplebus use it, otherwise
fallback to acpi if dt wasn't there or if it didn't have a simple bus. That
would fix issues I have with LinuxBoot where some data still lingers
in dt, but no devices are published there anymore. I work around this right
now by preferring ACPI manually...

Warner

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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jan 14, 2024 at 8:12=E2=80=AF=
AM Emmanuel Vadot &lt;<a href=3D"mailto:manu@bidouilliste.com">manu@bidouil=
liste.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">On Sun, 14 Jan 2024 13:52:51 +0000<br>
Doug Rabson &lt;<a href=3D"mailto:dfr@rabson.org" target=3D"_blank">dfr@rab=
son.org</a>&gt; wrote:<br>
<br>
&gt; On Sat, 13 Jan 2024 at 18:32, Mark Millard &lt;<a href=3D"mailto:markl=
mi@yahoo.com" target=3D"_blank">marklmi@yahoo.com</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; On Jan 13, 2024, at 07:38, Doug Rabson &lt;<a href=3D"mailto:dfr@=
rabson.org" target=3D"_blank">dfr@rabson.org</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Getting back to the RPI 5, with a tweak to<br>
&gt; &gt; arm/broadcom/bcm2835bcm2835_vcbus.c to treat the memory config th=
e same as<br>
&gt; &gt; RPI 4 and to dev/sdhci/sdhci_fdt.c to treat the RPI 5 sdhci contr=
ollers as<br>
&gt; &gt; generic, I can boot to multiuser mode using the EDK2 firmware fro=
m<br>
&gt; &gt; <a href=3D"https://github.com/worproject/rpi5-uefi" rel=3D"norefe=
rrer" target=3D"_blank">https://github.com/worproject/rpi5-uefi</a>; with AC=
PI/Device Tree mode set to<br>
&gt; &gt; Both.<br>
&gt; &gt;<br>
&gt; &gt; What does FreeBSD do with &quot;Both&quot;? Does it actually use =
some ACPI<br>
&gt; &gt; and some Device Tree? Or does it just use ACPI? Does your<br>
&gt; &gt; combination do anything different than just using ACPI?<br>
&gt; &gt;<br>
&gt; &gt; &gt; This does not have working PCIe or ethernet yet - I think et=
hernet ought<br>
&gt; &gt; to work since we seem to have a matching driver in the tree in de=
v/cadence.<br>
&gt; &gt;<br>
&gt; &gt; Sounds like the same status as booting just ACPI with no such<br>
&gt; &gt; adjustments too bcm2835bcm2835_vcbus.c or sdhci_fdt.c ?<br>
&gt; &gt;<br>
&gt; &gt; I think Mike Karels plans on investigating getting Ethernet<br>
&gt; &gt; going based on cgem . I&#39;ve no clue if this is ACPI, DeviceTre=
e,<br>
&gt; &gt; or both.<br>
&gt; &gt;<br>
&gt; &gt; My usage has been pure ACPI, no software adjustments specific<br>
&gt; &gt; to getting the RPi5 operational. Use of a USB3 Ethernet dongle.<b=
r>
&gt; &gt;<br>
&gt; <br>
&gt; As far as I can tell, &#39;Both&#39; works almost exactly the same as =
&#39;Devicetree&#39;<br>
&gt; - I don&#39;t think the acpi device is attached to nexus at all.<br>
<br>
=C2=A0&#39;Both&#39; for EDK2 mean that dt and acpi table are exposed, and =
by<br>
default on FreeBSD we use dt and only fallback to acpi if dt wasn&#39;t<br>
found.<br></blockquote><div><br></div><div>I think we should check dt and i=
f it has a simplebus use it, otherwise</div><div>fallback to acpi if dt was=
n&#39;t there or if it didn&#39;t have a simple bus. That</div><div>would f=
ix issues I have with LinuxBoot where some data still lingers</div><div>in =
dt, but no devices are published there anymore. I work around this right</d=
iv><div>now by preferring ACPI manually...</div><div><br></div><div>Warner<=
/div></div></div>

--000000000000c0c50b060eec2f35--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoMx4VcJ5aGkR4WJ6W6jz=xX=R5%2BPtiuHTsBKVCVVAeVg>