From nobody Sat Dec 28 12:52:20 2024 X-Original-To: dev-commits-src-all@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 4YL2MG1hcHz5jL8X; Sat, 28 Dec 2024 12:52:26 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Certum Domain Validation CA SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YL2MF2V1fz4Lgl; Sat, 28 Dec 2024 12:52:25 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 193.175.24.27 is neither permitted nor denied by domain of tuexen@freebsd.org) smtp.mailfrom=tuexen@freebsd.org; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=freebsd.org (policy=none) Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:8c31:93fe:2e38:cc39]) (Authenticated sender: macmic) by drew.franken.de (Postfix) with ESMTPSA id 666AB721E2806; Sat, 28 Dec 2024 13:52:21 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: git: 1f5c50a86173 - main - pci_host_generic:Add pcib_request_feature on ACPI From: tuexen@freebsd.org In-Reply-To: <202412121819.4BCIJ6fq097364@gitrepo.freebsd.org> Date: Sat, 28 Dec 2024 13:52:20 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <75B236EB-ECB4-46B5-807D-4B5802E96485@freebsd.org> References: <202412121819.4BCIJ6fq097364@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3826.300.87.4.3) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Spamd-Result: default: False [-2.60 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, No valid DKIM,none]; RCVD_IN_DNSWL_LOW(-0.10)[193.175.24.27:from]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_NO_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[tuexen]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE]; TO_DN_EQ_ADDR_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4YL2MF2V1fz4Lgl X-Spamd-Bar: -- Hi Andrew, this commits breaks the booting of my arm64 VM using VMWare fusion on an = M1 MacBookPro. During booting it reports: ... mountroot: waiting for device /dev/nda0p2 uhub0: 6 port with 6 removable, self powered Mounting from ufs:/dev/nda0p2 failed with error 19 Loader variables: vfs.root.mountfrom=3Dufs:/dev/nda0p2 vfs.root.montfrom.options=3Drw Manual root filesystem specification: ... Any idea what is going wrong? Best regards Michael > On 12. Dec 2024, at 19:19, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D1f5c50a8617355758510675cb9412f56= fed12efc >=20 > commit 1f5c50a8617355758510675cb9412f56fed12efc > Author: Andrew Turner > AuthorDate: 2024-12-12 16:30:39 +0000 > Commit: Andrew Turner > CommitDate: 2024-12-12 18:00:23 +0000 >=20 > pci_host_generic:Add pcib_request_feature on ACPI >=20 > In the ACPI attachment add support for the pcib_request_feature = method. > This uses the common _OSC handling. >=20 > Reviewed by: imp, jhb > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D48048 > --- > sys/dev/pci/pci_host_generic_acpi.c | 27 +++++++++++++++++++++++++++ > sys/dev/pci/pci_host_generic_acpi.h | 1 + > 2 files changed, 28 insertions(+) >=20 > diff --git a/sys/dev/pci/pci_host_generic_acpi.c = b/sys/dev/pci/pci_host_generic_acpi.c > index d90b7c0c01f8..1ff3a6bda707 100644 > --- a/sys/dev/pci/pci_host_generic_acpi.c > +++ b/sys/dev/pci/pci_host_generic_acpi.c > @@ -287,6 +287,8 @@ pci_host_generic_acpi_init(device_t dev) > sc =3D device_get_softc(dev); > handle =3D acpi_get_handle(dev); >=20 > + acpi_pcib_osc(dev, &sc->osc_ctl, 0); > + > /* Get Start bus number for the PCI host bus is from _BBN method */ > status =3D acpi_GetInteger(handle, "_BBN", &sc->base.bus_start); > if (ACPI_FAILURE(status)) { > @@ -504,6 +506,30 @@ generic_pcie_acpi_get_id(device_t pci, device_t = child, enum pci_id_type type, > return (pcib_get_id(pci, child, type, id)); > } >=20 > +static int > +generic_pcie_acpi_request_feature(device_t pcib, device_t dev, > + enum pci_feature feature) > +{ > + struct generic_pcie_acpi_softc *sc; > + uint32_t osc_ctl; > + > + sc =3D device_get_softc(pcib); > + > + switch (feature) { > + case PCI_FEATURE_HP: > + osc_ctl =3D PCIM_OSC_CTL_PCIE_HP; > + break; > + case PCI_FEATURE_AER: > + osc_ctl =3D PCIM_OSC_CTL_PCIE_AER; > + break; > + default: > + return (EINVAL); > + } > + > + return (acpi_pcib_osc(pcib, &sc->osc_ctl, osc_ctl)); > +} > + > + > static device_method_t generic_pcie_acpi_methods[] =3D { > DEVMETHOD(device_probe, generic_pcie_acpi_probe), > DEVMETHOD(device_attach, pci_host_generic_acpi_attach), > @@ -517,6 +543,7 @@ static device_method_t generic_pcie_acpi_methods[] = =3D { > DEVMETHOD(pcib_release_msix, generic_pcie_acpi_release_msix), > DEVMETHOD(pcib_map_msi, generic_pcie_acpi_map_msi), > DEVMETHOD(pcib_get_id, generic_pcie_acpi_get_id), > + DEVMETHOD(pcib_request_feature, generic_pcie_acpi_request_feature), >=20 > DEVMETHOD_END > }; > diff --git a/sys/dev/pci/pci_host_generic_acpi.h = b/sys/dev/pci/pci_host_generic_acpi.h > index 802099abb9d7..5617da971306 100644 > --- a/sys/dev/pci/pci_host_generic_acpi.h > +++ b/sys/dev/pci/pci_host_generic_acpi.h > @@ -35,6 +35,7 @@ > struct generic_pcie_acpi_softc { > struct generic_pcie_core_softc base; > int segment; > + uint32_t osc_ctl; > ACPI_BUFFER ap_prt; /* interrupt routing table */ > }; >=20