Date: Tue, 22 Sep 2009 11:24:58 -0400 From: John Baldwin <jhb@freebsd.org> To: Olivier Smedts <olivier@gid0.org> Cc: freebsd-current <freebsd-current@freebsd.org> 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) Message-ID: <200909221124.58475.jhb@freebsd.org> In-Reply-To: <367b2c980909191009x1df7456bx10f97f25fc990a35@mail.gmail.com> References: <367b2c980909191009x1df7456bx10f97f25fc990a35@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 19 September 2009 1:09:19 pm Olivier Smedts wrote: > 2009/8/24 John Baldwin <jhb@freebsd.org> > > > > On Monday 24 August 2009 4:54:13 pm Olivier Smedts wrote: > > > 2009/8/24 John Baldwin <jhb@freebsd.org>: > > > > 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: <High Precision Event Timer> 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: <ASUStek AIBOOSTER> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909221124.58475.jhb>