From nobody Sun Jan 14 18:37:05 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCkXF6hWHz56r1y for ; Sun, 14 Jan 2024 18:37:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCkXF6CVmz4hmh for ; Sun, 14 Jan 2024 18:37:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a2cea0563cbso279767566b.3 for ; Sun, 14 Jan 2024 10:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1705257436; x=1705862236; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Cu2MAQJP935RpsB+xL1fsYCtZRn6tW5JBpGsT3pqnD0=; b=InpgC+7VmPql/dQZ4dP1T6zsq3N7pT5Xi312uLujnLAqRTV8CcZrHK6vP5z8hbTh4A 0WB63+mEpDEtIfua3zM/jT7sZsBfCt05mCF+v2VP7RWZgi/MaLmTyTimZawkk+qtUV8h 0LB3f0K0+RXlkft3UbLu5POP7Lb+CwwYVrMkFLaqpEkeIS/XihLzh6MhQS5AqVwII2K3 4X8UJWlnuMOay7/EAtIGPFVi9vhTODi11IyWHNEhS9REllAfvD2A7XKJlsY98n/nzANP LyvwvxSm8/dNA0mbcNgAEuMrsPQUwRS9u1g6/mYnN4bu8phsdmUiG3B9jBEhn6rzJHdQ EL/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705257436; x=1705862236; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Cu2MAQJP935RpsB+xL1fsYCtZRn6tW5JBpGsT3pqnD0=; b=N8wpVsFa7LNeqA7Qv+Bn73E7OJjWG+9rZQHdTg6TYi9h2DHNjfy1VNaabxmROrhzNL udl2D9xuzocsjzmFA0chx/N6Yh9Sc8MAfgBZiRYzYvyqPEsYojXe4p8GxEAl2jobZKM9 EkxUEABNQlwAkAVaNHh1S2djus1/+Tc040pKBM6qbCz5G1zueu+6jx59qoXE4PRDqZjM 9rrdAR+YiRqXrRw1xSDaojzQEsRORY7Uk6Nok6oHEAU0Dw+dDZAvUCK29iGQhwpsEK0A csbiywPy2j+Cd5UOSVeiM48gtdM4MvF0iB+AS8bsuUKPXaB8giqi6W6WJfYStT3QnfZd pE7A== X-Gm-Message-State: AOJu0YwYyHWTGLkEJYvJlAjSCmaYjdTM/ciwHMzE6X081tBLKQteHe84 JRAHzoZZy9x+s2v+RthYJZPnGEKdWR8wdiAAC+8lH+t4bUh5ELi8GqMPq5ISseg= X-Google-Smtp-Source: AGHT+IHrQxox7cbAehu3UeiNfttgu0iGvdDaQwhABKy0l86xpiaAHg2FSpHu8mj3XR3/HPjNhH0kkyNBLngLar+aKbA= X-Received: by 2002:a17:907:7204:b0:a28:fdc2:7f11 with SMTP id dr4-20020a170907720400b00a28fdc27f11mr2594972ejc.83.1705257436491; Sun, 14 Jan 2024 10:37:16 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <5a39810c-5fd8-4969-a222-2561b050b035@FreeBSD.org> <347FE009-A470-4765-A9B9-7C9AB5E954DA@yahoo.com> <76FA010A-338F-4E32-B381-37C7BA63CAFC@yahoo.com> <20240114161155.e82b64f2b0cf82fea0e606e4@bidouilliste.com> In-Reply-To: <20240114161155.e82b64f2b0cf82fea0e606e4@bidouilliste.com> From: Warner Losh Date: Sun, 14 Jan 2024 11:37:05 -0700 Message-ID: Subject: Re: When will FreeBSD support RPI5? To: Emmanuel Vadot Cc: Doug Rabson , Mark Millard , Jesper Schmitz Mouridsen , John Kennedy , ykla , FreeBSD ARM List Content-Type: multipart/alternative; boundary="000000000000c0c50b060eec2f35" X-Rspamd-Queue-Id: 4TCkXF6CVmz4hmh X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --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 wrote: > On Sun, 14 Jan 2024 13:52:51 +0000 > Doug Rabson wrote: > > > On Sat, 13 Jan 2024 at 18:32, Mark Millard wrote: > > > > > On Jan 13, 2024, at 07:38, Doug Rabson 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


=
On Sun, Jan 14, 2024 at 8:12=E2=80=AF= AM Emmanuel Vadot <manu@bidouil= liste.com> wrote:
On Sun, 14 Jan 2024 13:52:51 +0000
Doug Rabson <dfr@rab= son.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 th= e same as
> > RPI 4 and to dev/sdhci/sdhci_fdt.c to treat the RPI 5 sdhci contr= ollers as
> > generic, I can boot to multiuser mode using the EDK2 firmware fro= m
> > https://github.com/worproject/rpi5-uefi with AC= PI/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 et= hernet ought
> > to work since we seem to have a matching driver in the tree in de= v/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, DeviceTre= e,
> > 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.

=C2=A0'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 i= f it has a simplebus use it, otherwise
fallback to acpi if dt was= n't there or if it didn't have a simple bus. That
would f= ix 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<= /div>
--000000000000c0c50b060eec2f35--