From owner-freebsd-current@FreeBSD.ORG Tue Sep 22 16:52:02 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE9731065692 for ; Tue, 22 Sep 2009 16:52:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 69F878FC0A for ; Tue, 22 Sep 2009 16:52:02 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EFEC746B09; Tue, 22 Sep 2009 12:52:01 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2306C8A025; Tue, 22 Sep 2009 12:52:01 -0400 (EDT) From: John Baldwin To: Olivier Smedts Date: Tue, 22 Sep 2009 11:24:58 -0400 User-Agent: KMail/1.9.7 References: <367b2c980909191009x1df7456bx10f97f25fc990a35@mail.gmail.com> In-Reply-To: <367b2c980909191009x1df7456bx10f97f25fc990a35@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200909221124.58475.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 22 Sep 2009 12:52:01 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-current Subject: Re: [regression]: acpi_aiboost fails to attach on Asus P5Q3 Deluxe in 8.0 (Was: [regression] : 8.0-BETA3 (and BETA2?) acpi_hpet0 fails on TYAN H2000M) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 16:52:02 -0000 On Saturday 19 September 2009 1:09:19 pm Olivier Smedts wrote: > 2009/8/24 John Baldwin > > > > On Monday 24 August 2009 4:54:13 pm Olivier Smedts wrote: > > > 2009/8/24 John Baldwin : > > > > On Saturday 22 August 2009 1:20:18 pm Arno J. Klaassen wrote: > > > >> > > > >> Hello, > > > >> > > > >> I have a regression with acpi_hpet on a Tyan H2000M MB : > > > >> > > > >> =A0 acpi_hpet0: iomem 0xfed00000-0xfe= d03fff on > > acpi0 > > > >> =A0 acpi_hpet0: HPET never increments, disabling > > > >> =A0 device_attach: acpi_hpet0 attach returned 6 > > > >> =A0 [twice] > > > >> > > > >> it exists at least since Aug16 sources (I just looked at > > > >> the 'netif' problems on this board which BTW are indeed fixed > > > >> by recent flowtable init changes) > > > > > > > > Perhaps the recent ACPI-CA update is when this broke? > > > > > > Sorry for hijacking the thread (and not reporting this before) but > > > maybe my issues with acpi_aiboost are related. It won't attach on my > > > ASUS P5Q3 Deluxe (latest BIOS) since the ACPICA update (which also > > > made "est" attach successfully on this ASUS board) : > > > > > > acpi_aiboost0: on acpi0 > > > NOREF > > > BAD DATA > > > device_attach: acpi_aiboost0 attach returned 22 > > > > I would figure out what function in it's attach routine is failing with= EINVAL > > and drill down from there. =A0It looks like it is dying trying to > > evaluate "TSIF", "VSIF", or "FSIF". =A0Maybe add some printfs to see wh= ich one > > and print out the 'elem->Type' in the "NOREF" error message. =A0You cou= ld also > > just print the 'name' there as well which would help perhaps. > > > > -- > > John Baldwin Ok, try this. I believe that the newer ACPI-CA is expanding the package inline and there is no reason the subpackages have to be external references rather than inline. Index: acpi_aiboost.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 =2D-- acpi_aiboost.c (revision 197402) +++ acpi_aiboost.c (working copy) @@ -46,7 +46,6 @@ =20 #define DESCSTRLEN 32 struct acpi_aiboost_element{ =2D ACPI_HANDLE h; uint32_t id; char desc[DESCSTRLEN]; }; @@ -127,22 +126,23 @@ =09 for(i =3D 1 ; i < o->Package.Count; i++){ elem =3D &o->Package.Elements[i]; =2D if(elem->Type !=3D ACPI_TYPE_ANY){ =2D printf("NOREF\n"); =2D goto error; =2D } =2D c->elem[ i - 1].h =3D elem->Reference.Handle; + if (elem->type =3D=3D ACPI_TYPE_ANY) { + buf2.Pointer =3D NULL; + buf2.Length =3D ACPI_ALLOCATE_BUFFER; =20 =2D buf2.Pointer =3D NULL; =2D buf2.Length =3D ACPI_ALLOCATE_BUFFER; =2D =09 =2D status =3D AcpiEvaluateObject(c->elem[i - 1].h, NULL, NULL, =2D &buf2); =2D if(ACPI_FAILURE(status)){ =2D printf("FETCH OBJECT\n"); + status =3D AcpiEvaluateObject(elem->Reference.Handle, + NULL, NULL, &buf2); + if (ACPI_FAILURE(status)){ + printf("FETCH OBJECT\n"); + goto error; + } + subobj =3D buf2.Pointer; + } else if (elem->type =3D=3D ACPI_TYPE_PACKAGE) + subobj =3D elem; + else { + printf("NO PACKAGE\n"); goto error; } =2D subobj =3D buf2.Pointer; if(ACPI_FAILURE(acpi_PkgInt32(subobj,0, &c->elem[i -1].id))){ printf("ID FAILED\n"); goto error; @@ -151,15 +151,17 @@ sizeof(c->elem[i - 1].desc)); if(ACPI_FAILURE(status)){ if(status =3D=3D E2BIG){ =2D c->elem[i-1].desc[DESCSTRLEN-1] =3D 0; + c->elem[i - 1].desc[DESCSTRLEN-1] =3D 0; }else{ printf("DESC FAILED %d\n", i-1); goto error; } } =09 =2D if(buf2.Pointer) =2D AcpiOsFree(buf2.Pointer); + if (buf2.Pointer) { + AcpiOsFree(buf2.Pointer); + buf2.Pointer =3D NULL; + } } =20 if(buf.Pointer) =2D-=20 John Baldwin