Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Apr 2013 10:17:28 -0700
From:      Benjamin Lee <ben@b1c1l1.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: panic: acpi_pci_link_srs_from_crs: can't put non-ISA IRQ 20 in legacy IRQ resource type)
Message-ID:  <20130421101728.6fc33a96@b1c1l1.com>
In-Reply-To: <201304200817.15189.jhb@freebsd.org>
References:  <20130418124940.47e3618a@b1c1l1.com> <201304191726.31089.jhb@freebsd.org> <20130419152110.213c7fbb@b1c1l1.com> <201304200817.15189.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/jgm4wesVYDIhurva5x.gei8
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Sat, 20 Apr 2013 08:17:15 -0400, John Baldwin <jhb@freebsd.org> wrote:
> On Friday, April 19, 2013 06:21:10 PM Benjamin Lee wrote:
> > On Fri, 19 Apr 2013 17:26:31 -0400, John Baldwin <jhb@freebsd.org> wrot=
e:
> > > On Friday, April 19, 2013 4:18:49 pm Benjamin Lee wrote:
> > > > On Fri, 19 Apr 2013 11:31:49 -0400, John Baldwin <jhb@freebsd.org>=
=20
> wrote:
> > > > > On Thursday, April 18, 2013 3:49:40 pm Benjamin Lee wrote:
> > > > > > I have a system that panics on boot with 10-CURRENT and boots w=
ith
> > > > > > many ACPI error messages and non-functional devices with
> > > > > > 9.1-RELEASE.
> > > > > >=20
> > > > > > Motherboard is Foxconn C51XEM2AA (NVIDIA nForce 590) desktop bo=
ard.
> > > >=20
> > > > [...]
> > > >=20
> > > > > > Even though 9.1-RELEASE boots successfully, devices such as the
> > > > > > ehci USB controller and SATA controller do not work.
> > > > >=20
> > > > > Ugh, your BIOS does unexpected things.  It uses a _CRS for these =
pci
> > > > > link devices that uses a "short" IRQ resource, but uses an extend=
ed
> > > > > IRQ
> > >=20
> > > resource in
> > >=20
> > > > > _PRS (and expects an extended one in _SRS).  We use _CRS as a
> > > > > template for
> > >=20
> > > the
> > >=20
> > > > > resource to build.
> > > > >=20
> > > > > Try this patch.  It's a bit hackish, but it forces us to not use =
_CRS
> > > > > as a template if _CRS uses a "short" IRQ resource, but the link
> > > > > supports non-
> > >=20
> > > ISA
> > >=20
> > > > > IRQs.
> > > >=20
> > > > [...]
> > > >=20
> > > > Thanks, that fixed the panic and the system boots.  Now it is
> > > > complaining about AE_AML_BAD_RESOURCE_LENGTH and still unable to ro=
ute
> > > > IRQs, but it definitely looks better than the ACPI parsing errors i=
n 9:
> > > >=20
> > > > pcib0: allocated type 3 (0xdffff000-0xdfffffff) for rid 10 of
> > > > pci0:0:10:0 pcib0: matched entry for 0.10.INTA (src \_SB_.PCI0.AUBA=
:0)
> > > > pci_link26: Picked IRQ 20 with weight 0
> > > > pci_link26: Unable to route IRQs: AE_AML_BAD_RESOURCE_LENGTH
> > > >=20
> > > > Full boot -v output:
> > > > http://www.b1c1l1.com/media/debug/20130419-10-patched-
> > >=20
> > > boot.txt.gz
> > >=20
> > > Can you add some printfs to the places that return the
> > > AE_AML_BAD_RESOURCE_LENGTH to see which one is being triggered?  (Just
> > > look for that constant in sys/contrib/dev/acpica to find the possible
> > > places.)
> >=20
> > Is there a macro for dumping information about Resource or
> > Resource->Data?  Here's what I have for now at
> > sys/contrib/dev/acpica/resources/rscalc.c line 237:
> >=20
> > pcib0: matched entry for 0.10.INTA (src \_SB_.PCI0.AUBA:0)
> > pci_link26: Picked IRQ 20 with weight 0
> > rscalc.c:237
> > Resource->Type: 7
> > Resource->Length: 0
> > pci_link26: Unable to route IRQs: AE_AML_BAD_RESOURCE_LENGTH
> >=20
> > All of the errors are from there and look identical (Type 7, Length 0).
> > Type 7 appears to be ACPI_RESOURCE_TYPE_END_TAG.
>=20
> Ah, this is easy to fix then.  It seems in sys/dev/acpica/acpi.c in=20
> acpi_AppendBufferResource() we didn't create the end tag correctly.
> Can you try this in addition to the patch to acpi_pci_link.c:
>=20
> Index: sys/dev/acpica/acpi.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- acpi.c	(revision 249195)
> +++ acpi.c	(working copy)
> @@ -2384,7 +2384,7 @@
>      /* And add the terminator. */
>      rp =3D ACPI_NEXT_RESOURCE(rp);
>      rp->Type =3D ACPI_RESOURCE_TYPE_END_TAG;
> -    rp->Length =3D 0;
> +    rp->Length =3D ACPI_RS_SIZE_MIN;
> =20
>      return (AE_OK);
>  }

Thank you!  I backed out my hacks and with your 2 patches 10-CURRENT
boots successfully (with functional devices).  Loading a custom ASL is
not necessary.


--=20
Benjamin Lee
http://www.b1c1l1.com/

--Sig_/jgm4wesVYDIhurva5x.gei8
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQIcBAEBAgAGBQJRdB8sAAoJEHpz6H1iC6qDpPUQAIUfD5zmVYuWbxWUr4KZBV3I
y03DA9UfffN4PQSbOnMTJR/RUAfVMDgOGLJJxFU+wuK0v3Nwr6PoVFUYqMd+Up9T
93BPjUZLU6iOiv5zin+BeBkZbAZk+FHju/0unuNJ9GPJjdyOI9kWPxTBbFn8swhi
bj0TRidb33df5eV10YpBVceP8K5e2xANEVPf57/ymsckSmyWt7UTHxYfIXvccCKl
8P0vV6dJEFX/74ep5DF351ljZ8I+4bsaOLPgYlg88vdnge0FqRibmqKvmN5KsZWE
+2HO+zF1L2t5d0bScqlUVqYP7Z+c0pHGF1dHy0WS30d9ro1G9GXhUwQikGf/N0Ik
dedNbBEbjYTyI2GaOCGN+SbWcWVHMHps+Q3TOfT/7TmTVZAOLckHctPigOShtoNb
zTyANfhE6Dol0Ql+bz+hp8gRlb0m7jTvvF7FL0u6IsLuH55tPP5OckGDlCmARkA3
LMCv5rkVxvoos4BCG38NA2gSluzigXT6IAFR6ifl0vov+Bzzg8CRpz2Z/VvmjNcZ
z/xWa9RuAx4NUkla0Hc3DcT2b8z6ljYEsk1N3kCxldxlYmc7EBCQYGZcWvp6bABN
alecyW8XKCVcltZ6RhZcGj2LanffbY+usYm0Zxchg09lDmDVcUXT0Byh49Xc5PZa
cXwxtlWQA9XFVp1Wa5S4
=0HD8
-----END PGP SIGNATURE-----

--Sig_/jgm4wesVYDIhurva5x.gei8--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130421101728.6fc33a96>