From owner-freebsd-current@FreeBSD.ORG Tue Sep 22 18:14:04 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 879C61065694; Tue, 22 Sep 2009 18:14:04 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id DD1E48FC27; Tue, 22 Sep 2009 18:14:03 +0000 (UTC) Received: by ewy5 with SMTP id 5so671633ewy.36 for ; Tue, 22 Sep 2009 11:14:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.30.135 with SMTP id k7mr310371wea.82.1253643242765; Tue, 22 Sep 2009 11:14:02 -0700 (PDT) In-Reply-To: <200909221124.58475.jhb@freebsd.org> References: <367b2c980909191009x1df7456bx10f97f25fc990a35@mail.gmail.com> <200909221124.58475.jhb@freebsd.org> Date: Tue, 22 Sep 2009 20:14:02 +0200 Message-ID: <367b2c980909221114m7d68abc9t209b8db3195c3018@mail.gmail.com> From: Olivier Smedts To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 18:14:04 -0000 2009/9/22 John Baldwin : > 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-0xf= ed03fff 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 wit= h 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 w= hich one >> > and print out the 'elem->Type' in the "NOREF" error message. =A0You co= uld also >> > just print the 'name' there as well which would help perhaps. >> > >> > -- >> > John Baldwin > > Ok, try this. =A0I believe that the newer ACPI-CA is expanding the packag= e > inline and there is no reason the subpackages have to be external > references rather than inline. Well, simply said : it works ! I only had to sed 's/type/Type/'. I still have the debugging 'printf("%s : %i\n", name, elem->Type);' in the 'for(i =3D 1 ; i < o->Package.Count; i++)' loop and here are the results : # dmesg | tail -n 12 acpi_aiboost0: on acpi0 TSIF : 4 TSIF : 4 VSIF : 4 VSIF : 4 VSIF : 4 VSIF : 4 FSIF : 4 FSIF : 4 FSIF : 4 FSIF : 4 FSIF : 4 # sysctl dev.acpi_aiboost dev.acpi_aiboost.0.%desc: ASUStek AIBOOSTER dev.acpi_aiboost.0.%driver: acpi_aiboost dev.acpi_aiboost.0.%location: handle=3D\_SB_.PCI0.SBRG.ASOC dev.acpi_aiboost.0.%pnpinfo: _HID=3DATK0110 _UID=3D16843024 dev.acpi_aiboost.0.%parent: acpi0 dev.acpi_aiboost.0.temp0: 335 dev.acpi_aiboost.0.temp1: 410 dev.acpi_aiboost.0.volt0: 1080 dev.acpi_aiboost.0.volt1: 3296 dev.acpi_aiboost.0.volt2: 4944 dev.acpi_aiboost.0.volt3: 12208 dev.acpi_aiboost.0.fan0: 1506 dev.acpi_aiboost.0.fan1: 784 dev.acpi_aiboost.0.fan2: 847 dev.acpi_aiboost.0.fan3: 756 dev.acpi_aiboost.0.fan4: 0 Thanks ! > > 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 > --- acpi_aiboost.c =A0 =A0 =A0(revision 197402) > +++ acpi_aiboost.c =A0 =A0 =A0(working copy) > @@ -46,7 +46,6 @@ > > =A0#define DESCSTRLEN 32 > =A0struct acpi_aiboost_element{ > - =A0 =A0 =A0 ACPI_HANDLE h; > =A0 =A0 =A0 =A0uint32_t id; > =A0 =A0 =A0 =A0char desc[DESCSTRLEN]; > =A0}; > @@ -127,22 +126,23 @@ > > =A0 =A0 =A0 =A0for(i =3D 1 ; i < o->Package.Count; i++){ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0elem =3D &o->Package.Elements[i]; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if(elem->Type !=3D ACPI_TYPE_ANY){ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("NOREF\n"); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto error; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 c->elem[ i - 1].h =3D elem->Reference.Handl= e; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (elem->type =3D=3D ACPI_TYPE_ANY) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf2.Pointer =3D NULL; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf2.Length =3D ACPI_ALLOCA= TE_BUFFER; > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf2.Pointer =3D NULL; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf2.Length =3D ACPI_ALLOCATE_BUFFER; > - > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 status =3D AcpiEvaluateObject(c->elem[i - 1= ].h, NULL, NULL, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 &buf2); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if(ACPI_FAILURE(status)){ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("FETCH OBJECT\n"); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 status =3D AcpiEvaluateObje= ct(elem->Reference.Handle, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 NULL, NULL, &buf2); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ACPI_FAILURE(status)){ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("FET= CH OBJECT\n"); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto error; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 subobj =3D buf2.Pointer; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } else if (elem->type =3D=3D ACPI_TYPE_PACK= AGE) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 subobj =3D elem; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 else { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("NO PACKAGE\n"); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto error; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 subobj =3D buf2.Pointer; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if(ACPI_FAILURE(acpi_PkgInt32(subobj,0, &c= ->elem[i -1].id))){ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("ID FAILED\n"); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto error; > @@ -151,15 +151,17 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 s= izeof(c->elem[i - 1].desc)); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if(ACPI_FAILURE(status)){ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if(status =3D=3D E2BIG){ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 c->elem[i-1= ].desc[DESCSTRLEN-1] =3D 0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 c->elem[i -= 1].desc[DESCSTRLEN-1] =3D 0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}else{ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("DE= SC FAILED %d\n", i-1); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto error= ; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if(buf2.Pointer) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 AcpiOsFree(buf2.Pointer); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (buf2.Pointer) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 AcpiOsFree(buf2.Pointer); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf2.Pointer =3D NULL; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0if(buf.Pointer) > > -- > John Baldwin > --=20 Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas."