From owner-freebsd-acpi@freebsd.org Wed Mar 2 17:24:37 2016 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C942BAC18BE for ; Wed, 2 Mar 2016 17:24:37 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx1.freebsd.org (Postfix) with ESMTP id A6BC21B12; Wed, 2 Mar 2016 17:24:37 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 02 Mar 2016 09:24:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,529,1449561600"; d="scan'208";a="756847195" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga003.jf.intel.com with ESMTP; 02 Mar 2016 09:24:31 -0800 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 2 Mar 2016 09:24:30 -0800 Received: from orsmsx110.amr.corp.intel.com ([169.254.10.233]) by ORSMSX116.amr.corp.intel.com ([169.254.7.137]) with mapi id 14.03.0248.002; Wed, 2 Mar 2016 09:24:30 -0800 From: "Moore, Robert" To: Jung-uk Kim , Larry Rosenman , "freebsd-acpi@freebsd.org" CC: "Box, David E" Subject: RE: DSDT/AML/Etc Inspiron 5748 Thread-Topic: DSDT/AML/Etc Inspiron 5748 Thread-Index: AQHRdBYpgKiGCxZd2km3kHZ5ZNBy259GQx1AgACl/YD//38xUA== Date: Wed, 2 Mar 2016 17:24:29 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37E44DF29@ORSMSX110.amr.corp.intel.com> References: <20160301235729.GA1345@trivet.lerctr.org> <94F2FBAB4432B54E8AACC7DFDE6C92E37E44DE10@ORSMSX110.amr.corp.intel.com> <56D71D1D.1030305@FreeBSD.org> In-Reply-To: <56D71D1D.1030305@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGE2YmQwN2MtMTJiZS00MjIyLWJmODAtNjc5MmU4ZjlhNjU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkduS0g4ZDNZRVVoaHpnQkFQR2ZnQVJmUkcrSTNHRmpUcko0MDZxdndnS0k9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 17:24:37 -0000 Sounds like a good time to post our summary of the "external control method= " problem. (To be solved by the External AML opcode in ACPI 6.0) Summary of the external control method problem: When the -e option is used with disassembly, the various SSDTs are simply loaded into a global namespace for the disassembler to use in order to resolve control method references (invocations). The disassembler tracks any such references, and will emit an External() statement for these types of methods, with the proper number of arguments . Without the SSDTs, the AML does not contain enough information to properly disassemble the control method invocation -- because the disassembler does not know how many arguments to parse. An example: Assume we have two control methods. ABCD has one argument, and EFGH has zero arguments. Further, we have two additional control methods that invoke ABCD and EFGH, named T1 and T2: Method (ABCD, 1) { } Method (EFGH, 0) { } Method (T1) { ABCD (Add (2, 7, Local0)) } Method (T2) { EFGH () Add (2, 7, Local0) } Here is the AML code that is generated for T1 and T2: 185: Method (T1) 0000034C: 14 10 54 31 5F 5F 00 ... "..T1__." 186: { 187: ABCD (Add (2, 7, Local0)) 00000353: 41 42 43 44 ............ "ABCD" 00000357: 72 0A 02 0A 07 60 ...... "r....`" 188: } 190: Method (T2) 0000035D: 14 10 54 32 5F 5F 00 ... "..T2__." 191: { 192: EFGH () 00000364: 45 46 47 48 ............ "EFGH" 193: Add (2, 7, Local0) 00000368: 72 0A 02 0A 07 60 ...... "r....`" 194: } Note that the AML code for T1 and T2 is essentially identical. When disassembling this code, the methods ABCD and EFGH must be known to the disassembler, otherwise it does not know how to handle the method invocatio= ns. In other words, if ABCD and EFGH are actually external control methods appearing in an SSDT, the disassembler does not know what to do unless the owning SSDT has been loaded via the -e option. > -----Original Message----- > From: Jung-uk Kim [mailto:jkim@FreeBSD.org] > Sent: Wednesday, March 02, 2016 9:04 AM > To: Larry Rosenman; freebsd-acpi@freebsd.org > Cc: Box, David E; Moore, Robert > Subject: Re: DSDT/AML/Etc Inspiron 5748 >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > On 03/ 2/16 10:11 AM, Moore, Robert wrote: > > This is probably because of external references that cannot be > > resolved. > > > > Try : iasl -e ssdt* -d dsdt.dat >=20 > Please note it is /usr/local/bin/iasl (i.e., sysutils/acpica-tools from > the ports tree), not /usr/sbin/iasl from the base. >=20 > Jung-uk Kim >=20 > >> -----Original Message----- From: owner-freebsd-acpi@freebsd.org > >> [mailto:owner-freebsd- acpi@freebsd.org] On Behalf Of Larry Rosenman > >> Sent: Tuesday, March 01, 2016 3:57 PM To: > >> freebsd-acpi@freebsd.org Subject: DSDT/AML/Etc Inspiron 5748 > >> > >> I have a Dell Inspiron 5748, and it's DSDT has the mouse (0x66) in > >> the keyboard resources. > >> > >> I was trying to recompile it, but even dumping the DSDT and > >> recompiling it with no changes garners syntax errors from iasl. > >> > >> I've posted the DSDT at: > >> http://www.lerctr.org/~ler/FreeBSD/acpi/my.asl > >> > >> and the errors: > >> http://www.lerctr.org/~ler/FreeBSD/acpi/my.asl.err > >> > >> Can someone help me? > >> > >> System is at: > >> > >> FreeBSD trivet 11.0-CURRENT FreeBSD 11.0-CURRENT #2 r296241: Mon Feb > >> 29 18:02:55 CST 2016 root@trivet:/usr/obj/usr/src/sys/GENERIC amd64 > >> 1100100 >=20 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 >=20 > iQEcBAEBCAAGBQJW1x0YAAoJEHyflib82/FGERAH+wagXCh2KTFmoTB7UfON1r19 > 6FkMEyZBvJxPG5SPQ/NpUgk/TQvCt7ta911xavVGH5xOgCajPgbjZ1VRJ8Bb6L5h > sdgBSZSbfELXSKIlPjUJEOuCnSj2/rFVkxrtC7S09khCEdJrsV5diAx/8I+rCqeC > 8+ZIpOqLWrBcHtdzLusAcglxBQdbuLqo1ZKOgAohRQtq/Z7qt1t0c2IqpcsDfM7+ > 87cuUAt4XUAqIpff54msm13Dpw8cqm2ujXzA7xT30+8jev75T80qabjH2oK3kdml > fXnULEKql+M4eYLvOnIOLbfo8LXK861uqHQVwTjWQzJNm5cMH+H4e2azrW/DpE8=3D > =3D9HhI > -----END PGP SIGNATURE-----