From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 20 00:10:17 2013 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 75C3813E; Sat, 20 Apr 2013 00:10:17 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by mx1.freebsd.org (Postfix) with ESMTP id 44929752; Sat, 20 Apr 2013 00:10:17 +0000 (UTC) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 19 Apr 2013 17:10:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,512,1363158000"; d="scan'208";a="288845994" Received: from fmsmsx108.amr.corp.intel.com ([10.19.9.228]) by azsmga001.ch.intel.com with ESMTP; 19 Apr 2013 17:09:56 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.19.9.53) by FMSMSX108.amr.corp.intel.com (10.19.9.228) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 19 Apr 2013 17:09:56 -0700 Received: from fmsmsx153.amr.corp.intel.com ([169.254.9.79]) by FMSMSX102.amr.corp.intel.com ([169.254.2.214]) with mapi id 14.01.0355.002; Fri, 19 Apr 2013 17:09:56 -0700 From: "Moore, Robert" To: Benjamin Lee Subject: RE: panic: acpi_pci_link_srs_from_crs: can't put non-ISA IRQ 20 in legacy IRQ resource type) Thread-Topic: panic: acpi_pci_link_srs_from_crs: can't put non-ISA IRQ 20 in legacy IRQ resource type) Thread-Index: AQHOPG391d2djyxEFEWgLAw8ZTDWIJjeIoGAgABQL4CAABLrgIAAD0UAgAAIawD//4zvYIAAf2gA//+UG8A= Date: Sat, 20 Apr 2013 00:09:55 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E36FE42EA2@FMSMSX153.amr.corp.intel.com> References: <20130418124940.47e3618a@b1c1l1.com> <201304191131.49433.jhb@freebsd.org> <20130419131849.7357c8f6@b1c1l1.com> <201304191726.31089.jhb@freebsd.org> <20130419152110.213c7fbb@b1c1l1.com> <20130419155118.7bafe9fc@b1c1l1.com> <94F2FBAB4432B54E8AACC7DFDE6C92E36FE42E28@FMSMSX153.amr.corp.intel.com> <20130419163528.204bf3ff@b1c1l1.com> In-Reply-To: <20130419163528.204bf3ff@b1c1l1.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-acpi@freebsd.org" X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2013 00:10:17 -0000 Can you send the actual binary DSDT or the ASCII acpidump (not disassembled= ) > -----Original Message----- > From: Benjamin Lee [mailto:ben@b1c1l1.com] > Sent: Friday, April 19, 2013 4:35 PM > To: Moore, Robert > Cc: John Baldwin; 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) >=20 > On Fri, 19 Apr 2013 23:00:07 +0000, "Moore, Robert" > wrote: > > No, the length must be set in all descriptors, end tag included. >=20 > Do you have any pointers on how I can fix my ASL? Where do I find the en= d > tags and what should I set the lengths to? >=20 > Here is the output from acpidump -dt: > http://www.b1c1l1.com/media/debug/20130418-nvidia.asl.gz >=20 > > > > > -----Original Message----- > > > From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > > > acpi@freebsd.org] On Behalf Of Benjamin Lee > > > Sent: Friday, April 19, 2013 3:51 PM > > > To: John Baldwin > > > 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) > > > > > > On Fri, 19 Apr 2013 15:21:10 -0700, Benjamin Lee > wrote: > > > > On Fri, 19 Apr 2013 17:26:31 -0400, John Baldwin > > > wrote: > > > > > On Friday, April 19, 2013 4:18:49 pm Benjamin Lee wrote: > > > > > > On Fri, 19 Apr 2013 11:31:49 -0400, John Baldwin > > > > > > > > > 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 with many ACPI error messages and non-functional > > > > > > > > devices with > > > 9.1-RELEASE. > > > > > > > > > > > > > > > > Motherboard is Foxconn C51XEM2AA (NVIDIA nForce 590) > > > > > > > > desktop > > > board. > > > > > > [...] > > > > > > > > Even though 9.1-RELEASE boots successfully, devices such > > > > > > > > as the ehci USB controller and SATA controller do not work. > > > > > > > > > > > > > > Ugh, your BIOS does unexpected things. It uses a _CRS for > > > > > > > these pci link devices that uses a "short" IRQ resource, but > > > > > > > uses an extended IRQ > > > > > resource in > > > > > > > _PRS (and expects an extended one in _SRS). We use _CRS as > > > > > > > a template for > > > > > the > > > > > > > resource to build. > > > > > > > > > > > > > > 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- > > > > > ISA > > > > > > > IRQs. > > > > > > [...] > > > > > > > > > > > > Thanks, that fixed the panic and the system boots. Now it is > > > > > > complaining about AE_AML_BAD_RESOURCE_LENGTH and still unable > > > > > > to route IRQs, but it definitely looks better than the ACPI > > > > > > parsing > > > errors in 9: > > > > > > > > > > > > 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 > > > > > > > > > > > > Full boot -v output: > > > > > > http://www.b1c1l1.com/media/debug/20130419-10-patched- > > > > > boot.txt.gz > > > > > > > > > > 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.) > > > > > > > > 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: > > > > > > > > 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 > > > > > > > > All of the errors are from there and look identical (Type 7, Length > 0). > > > > Type 7 appears to be ACPI_RESOURCE_TYPE_END_TAG. > > > > > > This hack fixes everything (now the SATA controller works). It > > > seems that the Resource->Length check might not be necessary for > > > ACPI_RESOURCE_TYPE_END_TAG. > > > > > > blee@genesis /usr/src/sys/contrib/dev/acpica $ svn diff > > > Index: components/resources/rscalc.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 > > > --- components/resources/rscalc.c (revision 249624) > > > +++ components/resources/rscalc.c (working copy) > > > @@ -234,6 +234,15 @@ > > > > > > if (!Resource->Length) > > > { > > > + if (Resource->Type =3D=3D ACPI_RESOURCE_TYPE_END_TAG) { > > > + TotalSize =3D AcpiGbl_AmlResourceSizes [Resource- > >Type]; > > > + printf("TotalSize: %u\n", TotalSize); > > > + if (TotalSize !=3D 0) { > > > + printf("ACPI_RESOURCE_TYPE_END_TAG hack\n"); > > > + *SizeNeeded =3D AmlSizeNeeded + TotalSize; > > > + return_ACPI_STATUS (AE_OK); > > > + } > > > + } > > > return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); > > > } > > > > > > Index: components/resources/rslist.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 > > > --- components/resources/rslist.c (revision 249624) > > > +++ components/resources/rslist.c (working copy) > > > @@ -203,6 +203,11 @@ > > > > > > if (!Resource->Length) > > > { > > > + if (Resource->Type =3D=3D ACPI_RESOURCE_TYPE_END_TAG) { > > > + printf("ACPI_RESOURCE_TYPE_END_TAG hack 2\n"); > > > + return_ACPI_STATUS (AE_OK); > > > + } > > > + > > > ACPI_ERROR ((AE_INFO, > > > "Invalid zero length descriptor in resource > list\n")); > > > return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); > > > > > > > > > > > > -- > > > Benjamin Lee > > > http://www.b1c1l1.com/ >=20 >=20 >=20 > -- > Benjamin Lee > http://www.b1c1l1.com/