Date: Sat, 28 Dec 2024 13:52:20 +0100 From: tuexen@freebsd.org To: Andrew Turner <andrew@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 1f5c50a86173 - main - pci_host_generic:Add pcib_request_feature on ACPI Message-ID: <75B236EB-ECB4-46B5-807D-4B5802E96485@freebsd.org> In-Reply-To: <202412121819.4BCIJ6fq097364@gitrepo.freebsd.org> References: <202412121819.4BCIJ6fq097364@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <andrew@FreeBSD.org> 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 <andrew@FreeBSD.org> > AuthorDate: 2024-12-12 16:30:39 +0000 > Commit: Andrew Turner <andrew@FreeBSD.org> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?75B236EB-ECB4-46B5-807D-4B5802E96485>