diff -Nru acpica-unix-20130117/changes.txt acpica-unix-20130214/changes.txt --- acpica-unix-20130117/changes.txt 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/changes.txt 2013-02-14 19:52:34.000000000 +0000 @@ -1,6 +1,100 @@ ---------------------------------------- -17 January 2013. Summary of changes for version 20130117: +14 February 2013. Summary of changes for version 20130214: + +1) ACPICA Kernel-resident Subsystem: +Fixed a possible regression on some hosts: Reinstated the safe return +macros (return_ACPI_STATUS, etc.) that ensure that the argument is +evaluated only once. Although these macros are not needed for the ACPICA +code itself, they are often used by ACPI-related host device drivers where +the safe feature may be necessary. + +Fixed several issues related to the ACPI 5.0 reduced hardware support +(SOC): Now ensure that if the platform declares itself as hardware-reduced +via the FADT, the following functions become NOOPs (and always return +AE_OK) because ACPI is always enabled by definition on these machines: + AcpiEnable + AcpiDisable + AcpiHwGetMode + AcpiHwSetMode + +Dynamic Object Repair: Implemented additional runtime repairs for +predefined name return values. Both of these repairs can simplify code in +the related device drivers that invoke these methods: +1) For the _STR and _MLS names, automatically repair/convert an ASCII +string to a Unicode buffer. +2) For the _CRS, _PRS, and _DMA names, return a resource descriptor with a +lone end tag descriptor in the following cases: A Return(0) was executed, +a null buffer was returned, or no object at all was returned (non-slack +mode only). Adds a new file, nsconvert.c +ACPICA BZ 998. Bob Moore, Lv Zheng. + +Resource Manager: Added additional code to prevent possible infinite loops +while traversing corrupted or ill-formed resource template buffers. Check +for zero-length resource descriptors in all code that loops through +resource templates (the length field is used to index through the +template). This change also hardens the external AcpiWalkResources and +AcpiWalkResourceBuffer interfaces. + +Local Cache Manager: Enhanced the main data structure to eliminate an +unnecessary mechanism to access the next object in the list. Actually +provides a small performance enhancement for hosts that use the local +ACPICA cache manager. Jung-uk Kim. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 94.5K Code, 25.4K Data, 119.9K Total + Debug Version: 182.3K Code, 75.0K Data, 257.3K Total + Current Release: + Non-Debug Version: 95.0K Code, 25.9K Data, 120.9K Total + Debug Version: 182.9K Code, 75.6K Data, 258.5K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Fixed several issues with the definition of the ACPI +5.0 RASF table (RAS Feature Table). This change incorporates late changes +that were made to the ACPI 5.0 specification. + +iASL/Disassembler: Added full support for the following new ACPI tables: + 1) The MTMR table (MID Timer Table) + 2) The VRTC table (Virtual Real Time Clock Table). +Includes header file, disassembler, table compiler, and template support +for both tables. + +iASL: Implemented compile-time validation of package objects returned by +predefined names. This new feature validates static package objects +returned by the various predefined names defined to return packages. Both +object types and package lengths are validated, for both parent packages +and sub-packages, if any. The code is similar in structure and behavior to +the runtime repair mechanism within the AML interpreter and uses the +existing predefined name information table. Adds a new file, aslprepkg.c. +ACPICA BZ 938. + +iASL: Implemented auto-detection of binary ACPI tables for disassembly. +This feature detects a binary file with a valid ACPI table header and +invokes the disassembler automatically. Eliminates the need to +specifically invoke the disassembler with the -d option. ACPICA BZ 862. + +iASL/Disassembler: Added several warnings for the case where there are +unresolved control methods during the disassembly. This can potentially +cause errors when the output file is compiled, because the disassembler +assumes zero method arguments in these cases (it cannot determine the +actual number of arguments without resolution/definition of the method). + +Debugger: Added support to display all resources with a single command. +Invocation of the resources command with no arguments will now display all +resources within the current namespace. + +AcpiHelp: Added descriptive text for each ACPICA exception code displayed +via the -e option. + +---------------------------------------- +17 January 2013. Summary of changes for version 20130117: 1) ACPICA Kernel-resident Subsystem: diff -Nru acpica-unix-20130117/debian/README.Debian acpica-unix-20130214/debian/README.Debian --- acpica-unix-20130117/debian/README.Debian 2013-02-01 19:00:59.000000000 +0000 +++ acpica-unix-20130214/debian/README.Debian 2013-02-22 15:45:05.000000000 +0000 @@ -48,3 +48,10 @@ The aapits tests do not currently build properly. They will be added to this package once they do. In the meantime, ASL, template and misc tests will be run as part of make check + + +Licensing +========= +The source for this package has been dual-licensed under the Intel +ACPI license or the GPLv2. Per that dual-licensing, this source package +is being redistributed under the terms of the GPLv2. diff -Nru acpica-unix-20130117/debian/acpica-tools.postinst acpica-unix-20130214/debian/acpica-tools.postinst --- acpica-unix-20130117/debian/acpica-tools.postinst 2013-02-01 19:01:17.000000000 +0000 +++ acpica-unix-20130214/debian/acpica-tools.postinst 2013-02-22 15:45:05.000000000 +0000 @@ -1,11 +1,10 @@ #!/bin/sh - set -e BINDIR=/usr/bin MANDIR=/usr/share/man/man1 - update-alternatives --install $BINDIR/acpixtract acpixtract \ $BINDIR/acpixtract-acpica 100 \ --slave $MANDIR/man1/acpixtract.1.gz acpixtract.1.gz \ $MANDIR/man1/acpixtract-acpica.1 + diff -Nru acpica-unix-20130117/debian/acpica-tools.prerm acpica-unix-20130214/debian/acpica-tools.prerm --- acpica-unix-20130117/debian/acpica-tools.prerm 2013-02-01 19:01:26.000000000 +0000 +++ acpica-unix-20130214/debian/acpica-tools.prerm 2013-02-22 15:45:05.000000000 +0000 @@ -1,9 +1,7 @@ #!/bin/sh - set -e BINDIR=/usr/bin - if [ ! -e $BINDIR/acpixtract-acpica ] then update-alternatives --remove acpixtract $BINDIR/acpixtract-acpica diff -Nru acpica-unix-20130117/debian/badcode.asl.result acpica-unix-20130214/debian/badcode.asl.result --- acpica-unix-20130117/debian/badcode.asl.result 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/badcode.asl.result 2013-02-22 15:45:05.000000000 +0000 @@ -1,5 +1,5 @@ badcode.asl 25: Mutex (MTX1, 32) -Error 4123 - ^ SyncLevel must be in the range 0-15 +Error 4124 - ^ SyncLevel must be in the range 0-15 badcode.asl 29: Name (BIG, 0x1234567887654321) Warning 1038 - ^ 64-bit integer in 32-bit table, truncating (DSDT version < 2) @@ -23,7 +23,7 @@ Error 4099 - ^ Host Operation Region requires BufferAcc access badcode.asl 67: Method (MTH1, 0, NotSerialized, 32) -Error 4123 - SyncLevel must be in the range 0-15 ^ +Error 4124 - SyncLevel must be in the range 0-15 ^ badcode.asl 71: Store (Arg3, Local0) Error 4006 - ^ Method argument is not initialized (Arg3) @@ -41,28 +41,28 @@ Error 4083 - Operand evaluates to zero ^ badcode.asl 84: Acquire (MTX1, 100) -Warning 1128 - ^ Result is not used, possible operator timeout will be missed +Warning 1129 - ^ Result is not used, possible operator timeout will be missed badcode.asl 85: Wait (EVT1, 1) -Warning 1128 - ^ Result is not used, possible operator timeout will be missed +Warning 1129 - ^ Result is not used, possible operator timeout will be missed badcode.asl 89: Add (INT1, 8) -Warning 1113 - ^ Result is not used, operator has no effect +Warning 1114 - ^ Result is not used, operator has no effect badcode.asl 94: Store (5, INT1) -Warning 1132 - ^ Statement is unreachable +Warning 1133 - ^ Statement is unreachable badcode.asl 97: Method (MTH2) -Remark 5118 - ^ Control Method marked Serialized (Due to use of Switch operator) +Remark 5119 - ^ Control Method marked Serialized (Due to use of Switch operator) badcode.asl 97: Method (MTH2) -Warning 1114 - ^ Not all control paths return a value (MTH2) +Warning 1115 - ^ Not all control paths return a value (MTH2) badcode.asl 101: Switch (ToInteger (INT1)) Error 4078 - ^ No Case statements under Switch badcode.asl 120: Store (MTH2 (), Local0) -Warning 1120 - ^ Called method may not always return a value +Warning 1121 - ^ Called method may not always return a value badcode.asl 126: Method (MTH5) {Store (MTH4(), Local0)} Error 4080 - Called method returns no value ^ @@ -89,16 +89,16 @@ Error 4091 - ^ Invalid zero-length (null) string badcode.asl 158: Name (_PRW, 4) -Error 4105 - ^ Invalid object type for reserved name (_PRW: found INTEGER, requires Package) +Error 4105 - ^ Invalid object type for reserved name (_PRW: found Integer, Package required) badcode.asl 159: Name (_FDI, Buffer () {0}) -Error 4105 - ^ Invalid object type for reserved name (_FDI: found BUFFER, requires Package) +Error 4105 - ^ Invalid object type for reserved name (_FDI: found Buffer, Package required) badcode.asl 164: Method (_OSC, 5) Warning 1101 - ^ Reserved method has too many arguments (_OSC requires 4) badcode.asl 164: Method (_OSC, 5) -Warning 1106 - ^ Reserved method must return a value (Buffer required for _OSC) +Warning 1107 - ^ Reserved method must return a value (Buffer required for _OSC) badcode.asl 170: Name (_L01, 1) Error 4103 - ^ Reserved name must be a control method (with zero arguments) @@ -152,7 +152,7 @@ Error 4042 - ^ Invalid AccessSize (Maximum is 4 - QWord access) badcode.asl 268: QWordSpace (0xB0, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5, -Error 4137 - Constant out of range ^ (0xB0, allowable: 0xC0-0xFF) +Error 4138 - Constant out of range ^ (0xB0, allowable: 0xC0-0xFF) badcode.asl 279: 0x0200, Error 4051 - ^ Address Min is greater than Address Max @@ -188,29 +188,29 @@ Error 4071 - ^ Missing StartDependentFn() macro in dependent resource list badcode.asl 388: CreateWordField (RSC3, \DWI1._LEN, LEN) -Warning 1126 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 16 bits) +Warning 1127 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 16 bits) badcode.asl 389: CreateByteField (RSC3, \DWI1._MIN, MIN) -Warning 1126 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 8 bits) +Warning 1127 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 8 bits) badcode.asl 390: CreateBitField (RSC3, \DWI1._RNG, RNG1) -Warning 1126 - ResourceTag larger than Field ^ (Size mismatch, Tag: 2 bits, Field: 1 bit) +Warning 1127 - ResourceTag larger than Field ^ (Size mismatch, Tag: 2 bits, Field: 1 bit) badcode.asl 394: CreateQWordField (RSC3, \DWI1._MAX, MAX) -Warning 1127 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 32 bits, Field: 64 bits) +Warning 1128 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 32 bits, Field: 64 bits) badcode.asl 395: CreateBitField (RSC3, \DWI1._GRA, GRA) -Warning 1126 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 1 bit) +Warning 1127 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 1 bit) badcode.asl 396: CreateField (RSC3, \DWI1._MIF, 5, MIF) -Warning 1127 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 1 bit, Field: 5 bits) +Warning 1128 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 1 bit, Field: 5 bits) badcode.asl 397: CreateField (RSC3, \DWI1._RNG, 3, RNG2) -Warning 1127 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 2 bits, Field: 3 bits) +Warning 1128 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 2 bits, Field: 3 bits) Intel ACPI Component Architecture -ASL Optimizing Compiler version 20130117-YYYY [XXXXXXXXXXX] +ASL Optimizing Compiler version VVVVVVVV-YYYY [XXXXXXXXXXX] Copyright (c) 2000 - 2013 Intel Corporation ASL Input: badcode.asl - 401 lines, 6935 bytes, 79 keywords diff -Nru acpica-unix-20130117/debian/changelog acpica-unix-20130214/debian/changelog --- acpica-unix-20130117/debian/changelog 2013-02-07 16:19:49.000000000 +0000 +++ acpica-unix-20130214/debian/changelog 2013-02-22 17:30:06.000000000 +0000 @@ -1,20 +1,34 @@ -acpica-unix (20130117-1~linaro2) quantal; urgency=low +acpica-unix (20130214-0.2) quantal; urgency=low - * Disable tests. They can't run on PPA. + * Corrected integer to pointer conversion resulting from an incorrect + patch (caused FTBFS on ARM, other 32-bit arches). + * Closes: bug#653227 -- new upstream release of ACPICA tools + * Closes: bug#588388 -- build all of the tools provided, not just iasl, + and package into a single package of executables. This will replace + the previous iasl package. - -- Fathi Boudra Thu, 07 Feb 2013 18:18:32 +0200 + -- Al Stone Fri, 22 Feb 2013 15:42:48 +0000 -acpica-unix (20130117-1~linaro1) unstable; urgency=low +acpica-unix (20130214-0.1) unstable; urgency=low + + * New maintainer upload. + * New upstream (since the last attempt at NMU). + * Clarify the licensing: this is being released under GPLv2 as allowed + under the original dual-licensing from Intel. + + -- Al Stone Mon, 18 Feb 2013 14:44:41 -0700 + +acpica-unix (20130117-0.1) unstable; urgency=low * Non-maintainer upload. - * Update to latest upstream version of ACPICA tools. - * Build all of the tools provided, not just iasl, and package into a - single package of executables. + * Instead of using the git clone from a particular day, stick to + using just the official released versions and patch as needed. + This should simplify maintenance quite a bit. * Add basic man pages for everything. * Enable some basic testing. * Update patches as needed. - -- Al Stone Sun, 27 Jan 2013 14:22:18 -0700 + -- Al Stone Wed, 06 Feb 2013 13:03:19 -0700 acpica-unix (20100528-3) unstable; urgency=low diff -Nru acpica-unix-20130117/debian/control acpica-unix-20130214/debian/control --- acpica-unix-20130117/debian/control 2013-02-01 19:02:08.000000000 +0000 +++ acpica-unix-20130214/debian/control 2013-02-22 17:28:47.000000000 +0000 @@ -2,7 +2,7 @@ Section: devel Priority: optional Maintainer: Mattia Dongili -Build-Depends: debhelper (>= 8.0.0), flex, bison +Build-Depends: bison, debhelper (>= 8), flex Standards-Version: 3.9.3 Vcs-Git: git://git.kamineko.org/acpica-unix.git Vcs-Browser: http://git.kamineko.org/cgi-bin/gitweb.cgi?p=acpica-unix.git @@ -10,7 +10,10 @@ Package: acpica-tools Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: iasl (<< 20130214-0.1) +Breaks: iasl (<< 20130214-0.1) +Provides: iasl +Depends: ${misc:Depends}, ${shlibs:Depends} Description: ACPICA tools for the development and debug of ACPI tables The ACPI Component Architecture (ACPICA) project provides an OS-independent reference implementation of the Advanced Configuration and Power Interface @@ -33,3 +36,10 @@ for specific environments -- acpixtract: extract binary ACPI tables from acpidump output (see also the pmtools package) + +Package: iasl +Depends: acpica-tools, ${misc:Depends} +Architecture: all +Section: oldlibs +Description: transitional dummy package + This is a transitional dummy package. It can safely be removed. diff -Nru acpica-unix-20130117/debian/copyright acpica-unix-20130214/debian/copyright --- acpica-unix-20130117/debian/copyright 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/copyright 2013-02-22 17:28:34.000000000 +0000 @@ -8,19 +8,11 @@ License: Dual GPLv2/ACPICA Licence -The testcase in debian/acpi-dsdt.dsl (source package only) was taken from qemu and -is Copyright (c) 2006 Fabrice Bellard. It is licensed under the GPLv2. -The file debian/acpi-dsdt.hex was produced -by running - iasl -tc -p debian/acpi-dsdt.hex debian/acpi-dsdt.dsl -and cropping off the first 12 lines. - - For the GPLv2: -------------- Copyright (C) 2000 - 2006, R. Byron Moore All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -35,11 +27,11 @@ 3. Neither the names of the above-listed copyright holders nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + Alternatively, this software may be distributed under the terms of the GNU General Public License ("GPL") version 2 as published by the Free Software Foundation. - + NO WARRANTY THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -52,114 +44,6 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - + On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. - -For the ACPICA Licence: ------------------------ - 1. Copyright Notice - - Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. - All rights reserved. - - 2. License - - 2.1. This is your license from Intel Corp. under its intellectual property - rights. You may have additional license terms from the party that provided - you this software, covering your right to use that party's intellectual - property rights. - - 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a - copy of the source code appearing in this file ("Covered Code") an - irrevocable, perpetual, worldwide license under Intel's copyrights in the - base code distributed originally by Intel ("Original Intel Code") to copy, - make derivatives, distribute, use and display any portion of the Covered - Code in any form, with the right to sublicense such rights; and - - 2.3. Intel grants Licensee a non-exclusive and non-transferable patent - license (with the right to sublicense), under only those claims of Intel - patents that are infringed by the Original Intel Code, to make, use, sell, - offer to sell, and import the Covered Code and derivative works thereof - solely to the minimum extent necessary to exercise the above copyright - license, and in no event shall the patent license extend to any additions - to or modifications of the Original Intel Code. No other license or right - is granted directly or by implication, estoppel or otherwise; - - The above copyright and patent license is granted only if the following - conditions are met: - - 3. Conditions - - 3.1. Redistribution of Source with Rights to Further Distribute Source. - Redistribution of source code of any substantial portion of the Covered - Code or modification with rights to further distribute source must include - the above Copyright Notice, the above License, this list of Conditions, - and the following Disclaimer and Export Compliance provision. In addition, - Licensee must cause all Covered Code to which Licensee contributes to - contain a file documenting the changes Licensee made to create that Covered - Code and the date of any change. Licensee must include in that file the - documentation of any changes made by any predecessor Licensee. Licensee - must include a prominent statement that the modification is derived, - directly or indirectly, from Original Intel Code. - - 3.2. Redistribution of Source with no Rights to Further Distribute Source. - Redistribution of source code of any substantial portion of the Covered - Code or modification without rights to further distribute source must - include the following Disclaimer and Export Compliance provision in the - documentation and/or other materials provided with distribution. In - addition, Licensee may not authorize further sublicense of source of any - portion of the Covered Code, and must include terms to the effect that the - license from Licensee to its licensee is limited to the intellectual - property embodied in the software Licensee provides to its licensee, and - not to intellectual property embodied in modifications its licensee may - make. - - 3.3. Redistribution of Executable. Redistribution in executable form of any - substantial portion of the Covered Code or modification must reproduce the - above Copyright Notice, and the following Disclaimer and Export Compliance - provision in the documentation and/or other materials provided with the - distribution. - - 3.4. Intel retains all right, title, and interest in and to the Original - Intel Code. - - 3.5. Neither the name Intel nor any other trademark owned or controlled by - Intel shall be used in advertising or otherwise to promote the sale, use or - other dealings in products derived from or relating to the Covered Code - without prior written authorization from Intel. - - 4. Disclaimer and Export Compliance - - 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED - HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE - IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, - INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY - UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY - IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A - PARTICULAR PURPOSE. - - 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES - OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR - COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, - SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY - CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL - HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS - SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY - LIMITED REMEDY. - - 4.3. Licensee shall not export, either directly or indirectly, any of this - software or system incorporating such software without first obtaining any - required license or other approval from the U. S. Department of Commerce or - any other agency or department of the United States Government. In the - event Licensee exports any such software from the United States or - re-exports any such software from a foreign destination, Licensee shall - ensure that the distribution and export/re-export of the software is in - compliance with all laws, regulations, orders, or other restrictions of the - U.S. Export Administration Regulations. Licensee agrees that neither it nor - any of its subsidiaries will export/re-export any technical data, process, - software, or service, directly or indirectly, to any country for which the - United States government or any agency thereof requires an export license, - other governmental approval, or letter of assurance, without first obtaining - such license, approval or letter. - diff -Nru acpica-unix-20130117/debian/grammar.asl.result acpica-unix-20130214/debian/grammar.asl.result --- acpica-unix-20130117/debian/grammar.asl.result 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/grammar.asl.result 2013-02-22 15:45:05.000000000 +0000 @@ -1,5 +1,5 @@ grammar.asl 199: Name (_NPK, Package () -Warning 1131 - ^ Unknown reserved name (_NPK) +Warning 1132 - ^ Unknown reserved name (_NPK) grammar.asl 522: NAME (ESC1, "abcdefg\x00hijklmn") Warning 1055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL @@ -20,19 +20,19 @@ Warning 1038 - ^ 64-bit integer in 32-bit table, truncating (DSDT version < 2) grammar.asl 1471: SizeOf (BUFO) -Warning 1113 - ^ Result is not used, operator has no effect +Warning 1114 - ^ Result is not used, operator has no effect grammar.asl 1497: Acquire (MTX2, 1) -Warning 1128 - ^ Result is not used, possible operator timeout will be missed +Warning 1129 - ^ Result is not used, possible operator timeout will be missed grammar.asl 1645: Add (Local0, Local1) -Warning 1113 - ^ Result is not used, operator has no effect +Warning 1114 - ^ Result is not used, operator has no effect grammar.asl 1816: Method (COND) -Warning 1114 - ^ Not all control paths return a value (COND) +Warning 1115 - ^ Not all control paths return a value (COND) grammar.asl 2990: Name (_CRS,0) -Error 4105 - ^ Invalid object type for reserved name (_CRS: found INTEGER, requires Buffer) +Error 4105 - ^ Invalid object type for reserved name (_CRS: found Integer, Buffer required) grammar.asl 6024: Name (_HID, "*PNP0A06") Error 4061 - Invalid leading asterisk ^ (*PNP0A06) @@ -54,7 +54,7 @@ Intel ACPI Component Architecture -ASL Optimizing Compiler version 20130117-YYYY [XXXXXXXXXXX] +ASL Optimizing Compiler version VVVVVVVV-YYYY [XXXXXXXXXXX] Copyright (c) 2000 - 2013 Intel Corporation Ignoring all errors, forcing AML file generation diff -Nru acpica-unix-20130117/debian/patches/acpica-tools-config.patch acpica-unix-20130214/debian/patches/acpica-tools-config.patch --- acpica-unix-20130117/debian/patches/acpica-tools-config.patch 1970-01-01 00:00:00.000000000 +0000 +++ acpica-unix-20130214/debian/patches/acpica-tools-config.patch 2013-02-22 15:45:05.000000000 +0000 @@ -0,0 +1,14 @@ +There is no need to set -m{32,64} for native building. + +diff -urN acpica-unix2-20130214/generate/unix/Makefile.config acpica-unix2-20130214-patch/generate/unix/Makefile.config +--- acpica-unix2-20130214/generate/unix/Makefile.config 2013-02-14 12:52:34.000000000 -0700 ++++ acpica-unix2-20130214-patch/generate/unix/Makefile.config 2013-02-18 16:18:37.735787496 -0700 +@@ -41,7 +41,7 @@ + # + OBJDIR = obj$(BITS) + BINDIR = bin$(BITS) +-BITSFLAG = -m$(BITS) ++#BITSFLAG = -m$(BITS) + COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $< + LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) + INSTALLDIR = /usr/bin diff -Nru acpica-unix-20130117/debian/patches/add-testing.patch acpica-unix-20130214/debian/patches/add-testing.patch --- acpica-unix-20130117/debian/patches/add-testing.patch 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/patches/add-testing.patch 2013-02-22 15:45:05.000000000 +0000 @@ -25,7 +25,7 @@ + #cd ../.. + + # misc tests -+ $(CURDIR)/debian/run-misc-tests.sh $(CURDIR) ++ $(CURDIR)/debian/run-misc-tests.sh $(CURDIR) 20130214 + + # Template tests + cd $(CURDIR)/tests/templates diff -Nru acpica-unix-20130117/debian/patches/big_endian_segfault.patch acpica-unix-20130214/debian/patches/big_endian_segfault.patch --- acpica-unix-20130117/debian/patches/big_endian_segfault.patch 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/patches/big_endian_segfault.patch 2013-02-22 15:45:05.000000000 +0000 @@ -17,26 +17,26 @@ { case PARSEOP_STRING_LITERAL: - DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value); -+ Op->Asl.Value.String = (ACPI_STRING) Value; -+ DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", (ACPI_STRING) Value); ++ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value; ++ DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Op->Asl.Value.String); break; case PARSEOP_NAMESEG: - DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value); -+ Op->Asl.Value.String = (ACPI_STRING) Value; -+ DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", (ACPI_STRING) Value); ++ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value; ++ DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Op->Asl.Value.String); break; case PARSEOP_NAMESTRING: - DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value); -+ Op->Asl.Value.String = (ACPI_STRING) Value; -+ DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", (ACPI_STRING) Value); ++ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value; ++ DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Op->Asl.Value.String); break; case PARSEOP_EISAID: - DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value); -+ Op->Asl.Value.String = (ACPI_STRING) Value; -+ DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", (ACPI_STRING) Value); ++ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value; ++ DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Op->Asl.Value.String); break; case PARSEOP_METHOD: diff -Nru acpica-unix-20130117/debian/patches/debian-unaligned.patch acpica-unix-20130214/debian/patches/debian-unaligned.patch --- acpica-unix-20130117/debian/patches/debian-unaligned.patch 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/patches/debian-unaligned.patch 2013-02-22 15:45:05.000000000 +0000 @@ -4,7 +4,6 @@ Signed-off-by: Mattia Dongili Signed-off-by: Paolo Bonzini --- - source/compiler/asltree.c | 15 ++++++++++----- source/components/executer/exoparg2.c | 12 +++++++++--- source/include/actypes.h | 26 +++++++++++++------------- 3 file modificati, 32 inserzioni(+), 21 rimozioni(-) diff -Nru acpica-unix-20130117/debian/patches/series acpica-unix-20130214/debian/patches/series --- acpica-unix-20130117/debian/patches/series 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/patches/series 2013-02-22 15:45:05.000000000 +0000 @@ -1,3 +1,4 @@ +acpica-tools-config.patch fix_ftbfs_debian-kfreebsd.patch debian-big_endian.patch big_endian_segfault.patch diff -Nru acpica-unix-20130117/debian/run-misc-tests.sh acpica-unix-20130214/debian/run-misc-tests.sh --- acpica-unix-20130117/debian/run-misc-tests.sh 2013-02-01 01:32:53.000000000 +0000 +++ acpica-unix-20130214/debian/run-misc-tests.sh 2013-02-22 15:45:05.000000000 +0000 @@ -13,6 +13,7 @@ set -x CURDIR="$1" +VERSION="$2" DEBDIR=$CURDIR/debian TSTDIR=$CURDIR/tests/misc @@ -28,12 +29,14 @@ # create files to compare against $BINDIR/iasl --help -WHEN=`date +"%b %d %Y"` +WHEN=`date +"%b %_d %Y"` sed -e "s/XXXXXXXXXXX/$WHEN/" \ -e "s/YYYY/$BITS/" \ + -e "s/VVVVVVVV/$VERSION/" \ $DEBDIR/badcode.asl.result > $TSTDIR/badcode.asl.result sed -e "s/XXXXXXXXXXX/$WHEN/" \ -e "s/YYYY/$BITS/" \ + -e "s/VVVVVVVV/$VERSION/" \ $DEBDIR/grammar.asl.result > $TSTDIR/grammar.asl.result # run the tests diff -Nru acpica-unix-20130117/generate/unix/Makefile.config acpica-unix-20130214/generate/unix/Makefile.config --- acpica-unix-20130117/generate/unix/Makefile.config 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/Makefile.config 2013-02-14 19:52:34.000000000 +0000 @@ -19,12 +19,16 @@ # # Configuration +# +# OPT_CFLAGS can be overridden on the make command line by +# adding OPT_CFLAGS="..." to the invocation. +# # Notes: # $(BITS) must be set to either 32 or 64 # gcc should be version 4 or greater, otherwise some of the options # used will not be recognized. -# Global optimization flags (such as -O2, -Os) are not used, since -# they cause issues on some compilers. +# Global optimization flags (such as -O2, -Os) may cause issues on +# some compilers. # The _GNU_SOURCE symbol is required for many hosts. # .SUFFIXES : @@ -38,7 +42,7 @@ OBJDIR = obj$(BITS) BINDIR = bin$(BITS) BITSFLAG = -m$(BITS) -COMPILEOBJ = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $< +COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $< LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) INSTALLDIR = /usr/bin INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG) @@ -100,58 +104,65 @@ $(wildcard $(ACPICA_INCLUDE)/platform/*.h) # -# Common compiler flags. The warning flags in addition to -Wall are not -# automatically included in -Wall. +# Common compiler flags # +OPT_CFLAGS ?= \ + -D_FORTIFY_SOURCE=2\ + -O2\ + $(CWARNINGFLAGS) + CFLAGS += \ - $(BITSFLAG) \ - -D$(HOST) \ - -D_GNU_SOURCE \ - -D_FORTIFY_SOURCE=2 \ + $(BITSFLAG)\ + -D$(HOST)\ + -D_GNU_SOURCE\ -I$(ACPICA_INCLUDE) LDFLAGS += $(BITSFLAG) +# +# Common compiler warning flags. The warning flags in addition +# to -Wall are not automatically included in -Wall. +# CWARNINGFLAGS = \ - -ansi \ - -Wall \ - -Wbad-function-cast \ - -Wdeclaration-after-statement \ - -Werror \ - -Wformat=2 \ - -Wmissing-declarations \ - -Wmissing-prototypes \ - -Wstrict-aliasing=0 \ - -Wstrict-prototypes \ - -Wswitch-default \ - -Wpointer-arith \ + -ansi\ + -Wall\ + -Wbad-function-cast\ + -Wdeclaration-after-statement\ + -Werror\ + -Wformat=2\ + -Wmissing-declarations\ + -Wmissing-prototypes\ + -Wstrict-aliasing=0\ + -Wstrict-prototypes\ + -Wswitch-default\ + -Wpointer-arith\ -Wundef # -# gcc 4+ flags +# Additional gcc 4+ warning flags # CWARNINGFLAGS += \ - -Waddress \ - -Waggregate-return \ - -Wchar-subscripts \ - -Wempty-body \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-field-initializers \ - -Wmissing-parameter-type \ - -Wnested-externs \ - -Wold-style-declaration \ - -Wold-style-definition \ - -Wredundant-decls \ + -Waddress\ + -Waggregate-return\ + -Wchar-subscripts\ + -Wempty-body\ + -Wlogical-op\ + -Wmissing-declarations\ + -Wmissing-field-initializers\ + -Wmissing-parameter-type\ + -Wnested-externs\ + -Wold-style-declaration\ + -Wold-style-definition\ + -Wredundant-decls\ -Wtype-limits # -# Extra warning flags (possible future use) +# Extra warning flags (for possible future use) # #CWARNINGFLAGS += \ -# -Wcast-qual \ -# -Wconversion -# -Wshadow \ +# -Wcast-qual\ +# -Wconversion\ +# -Wshadow\ # # Bison/Flex configuration diff -Nru acpica-unix-20130117/generate/unix/acpibin/Makefile acpica-unix-20130214/generate/unix/acpibin/Makefile --- acpica-unix-20130117/generate/unix/acpibin/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/acpibin/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -18,38 +18,38 @@ # Search paths for source files # vpath %.c \ - $(ACPIBIN) \ - $(ACPICA_UTILITIES) \ - $(ACPICA_COMMON) \ + $(ACPIBIN)\ + $(ACPICA_UTILITIES)\ + $(ACPICA_COMMON)\ $(ACPICA_OSL) HEADERS = \ $(wildcard $(ACPIBIN)/*.h) OBJECTS = \ - $(OBJDIR)/abcompare.o \ - $(OBJDIR)/abmain.o \ - $(OBJDIR)/utalloc.o \ - $(OBJDIR)/utcache.o \ - $(OBJDIR)/utdebug.o \ - $(OBJDIR)/utdecode.o \ - $(OBJDIR)/utexcep.o \ - $(OBJDIR)/utglobal.o \ - $(OBJDIR)/utlock.o \ - $(OBJDIR)/utmath.o \ - $(OBJDIR)/utmisc.o \ - $(OBJDIR)/utmutex.o \ - $(OBJDIR)/utstate.o \ - $(OBJDIR)/utstring.o \ - $(OBJDIR)/utxferror.o \ - $(OBJDIR)/osunixxf.o \ + $(OBJDIR)/abcompare.o\ + $(OBJDIR)/abmain.o\ + $(OBJDIR)/utalloc.o\ + $(OBJDIR)/utcache.o\ + $(OBJDIR)/utdebug.o\ + $(OBJDIR)/utdecode.o\ + $(OBJDIR)/utexcep.o\ + $(OBJDIR)/utglobal.o\ + $(OBJDIR)/utlock.o\ + $(OBJDIR)/utmath.o\ + $(OBJDIR)/utmisc.o\ + $(OBJDIR)/utmutex.o\ + $(OBJDIR)/utstate.o\ + $(OBJDIR)/utstring.o\ + $(OBJDIR)/utxferror.o\ + $(OBJDIR)/osunixxf.o\ $(OBJDIR)/getopt.o # # Flags specific to acpibin # -CFLAGS+= \ - -DACPI_BIN_APP \ +CFLAGS += \ + -DACPI_BIN_APP\ -I$(ACPIBIN) # diff -Nru acpica-unix-20130117/generate/unix/acpiexec/Makefile acpica-unix-20130214/generate/unix/acpiexec/Makefile --- acpica-unix-20130117/generate/unix/acpiexec/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/acpiexec/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -20,202 +20,204 @@ # Search paths for source files # vpath %.c \ - $(ACPIEXEC) \ - $(ACPICA_DEBUGGER) \ - $(ACPICA_DISASSEMBLER) \ - $(ACPICA_DISPATCHER) \ - $(ACPICA_EVENTS) \ - $(ACPICA_EXECUTER) \ - $(ACPICA_HARDWARE) \ - $(ACPICA_NAMESPACE) \ - $(ACPICA_PARSER) \ - $(ACPICA_RESOURCES) \ - $(ACPICA_TABLES) \ - $(ACPICA_UTILITIES) \ - $(ACPICA_COMMON) \ + $(ACPIEXEC)\ + $(ACPICA_DEBUGGER)\ + $(ACPICA_DISASSEMBLER)\ + $(ACPICA_DISPATCHER)\ + $(ACPICA_EVENTS)\ + $(ACPICA_EXECUTER)\ + $(ACPICA_HARDWARE)\ + $(ACPICA_NAMESPACE)\ + $(ACPICA_PARSER)\ + $(ACPICA_RESOURCES)\ + $(ACPICA_TABLES)\ + $(ACPICA_UTILITIES)\ + $(ACPICA_COMMON)\ $(ACPICA_OSL) HEADERS = \ $(wildcard $(ACPIEXEC)/*.h) OBJECTS = \ - $(OBJDIR)/aeexec.o \ - $(OBJDIR)/aehandlers.o \ - $(OBJDIR)/aemain.o \ - $(OBJDIR)/aetables.o \ - $(OBJDIR)/dbcmds.o \ - $(OBJDIR)/dbconvert.o \ - $(OBJDIR)/dbdisply.o \ - $(OBJDIR)/dbexec.o \ - $(OBJDIR)/dbfileio.o \ - $(OBJDIR)/dbhistry.o \ - $(OBJDIR)/dbinput.o \ - $(OBJDIR)/dbmethod.o \ - $(OBJDIR)/dbnames.o \ - $(OBJDIR)/dbstats.o \ - $(OBJDIR)/dbutils.o \ - $(OBJDIR)/dbxface.o \ - $(OBJDIR)/dmbuffer.o \ - $(OBJDIR)/dmdeferred.o \ - $(OBJDIR)/dmnames.o \ - $(OBJDIR)/dmobject.o \ - $(OBJDIR)/dmopcode.o \ - $(OBJDIR)/dmresrc.o \ - $(OBJDIR)/dmresrcl.o \ - $(OBJDIR)/dmresrcl2.o \ - $(OBJDIR)/dmresrcs.o \ - $(OBJDIR)/dmutils.o \ - $(OBJDIR)/dmwalk.o \ - $(OBJDIR)/dsargs.o \ - $(OBJDIR)/dscontrol.o \ - $(OBJDIR)/dsfield.o \ - $(OBJDIR)/dsinit.o \ - $(OBJDIR)/dsmethod.o \ - $(OBJDIR)/dsmthdat.o \ - $(OBJDIR)/dsobject.o \ - $(OBJDIR)/dsopcode.o \ - $(OBJDIR)/dsutils.o \ - $(OBJDIR)/dswexec.o \ - $(OBJDIR)/dswload.o \ - $(OBJDIR)/dswload2.o \ - $(OBJDIR)/dswscope.o \ - $(OBJDIR)/dswstate.o \ - $(OBJDIR)/evevent.o \ - $(OBJDIR)/evglock.o \ - $(OBJDIR)/evgpe.o \ - $(OBJDIR)/evgpeblk.o \ - $(OBJDIR)/evgpeinit.o \ - $(OBJDIR)/evgpeutil.o \ - $(OBJDIR)/evhandler.o \ - $(OBJDIR)/evmisc.o \ - $(OBJDIR)/evregion.o \ - $(OBJDIR)/evrgnini.o \ - $(OBJDIR)/evsci.o \ - $(OBJDIR)/evxface.o \ - $(OBJDIR)/evxfevnt.o \ - $(OBJDIR)/evxfgpe.o \ - $(OBJDIR)/evxfregn.o \ - $(OBJDIR)/exconfig.o \ - $(OBJDIR)/exconvrt.o \ - $(OBJDIR)/excreate.o \ - $(OBJDIR)/exdebug.o \ - $(OBJDIR)/exdump.o \ - $(OBJDIR)/exfield.o \ - $(OBJDIR)/exfldio.o \ - $(OBJDIR)/exmisc.o \ - $(OBJDIR)/exmutex.o \ - $(OBJDIR)/exnames.o \ - $(OBJDIR)/exoparg1.o \ - $(OBJDIR)/exoparg2.o \ - $(OBJDIR)/exoparg3.o \ - $(OBJDIR)/exoparg6.o \ - $(OBJDIR)/exprep.o \ - $(OBJDIR)/exregion.o \ - $(OBJDIR)/exresnte.o \ - $(OBJDIR)/exresolv.o \ - $(OBJDIR)/exresop.o \ - $(OBJDIR)/exstore.o \ - $(OBJDIR)/exstoren.o \ - $(OBJDIR)/exstorob.o \ - $(OBJDIR)/exsystem.o \ - $(OBJDIR)/exutils.o \ - $(OBJDIR)/getopt.o \ - $(OBJDIR)/hwacpi.o \ - $(OBJDIR)/hwesleep.o \ - $(OBJDIR)/hwgpe.o \ - $(OBJDIR)/hwpci.o \ - $(OBJDIR)/hwregs.o \ - $(OBJDIR)/hwsleep.o \ - $(OBJDIR)/hwvalid.o \ - $(OBJDIR)/hwxface.o \ - $(OBJDIR)/hwxfsleep.o \ - $(OBJDIR)/nsaccess.o \ - $(OBJDIR)/nsalloc.o \ - $(OBJDIR)/nsdump.o \ - $(OBJDIR)/nsdumpdv.o \ - $(OBJDIR)/nseval.o \ - $(OBJDIR)/nsinit.o \ - $(OBJDIR)/nsload.o \ - $(OBJDIR)/nsnames.o \ - $(OBJDIR)/nsobject.o \ - $(OBJDIR)/nsparse.o \ - $(OBJDIR)/nspredef.o \ - $(OBJDIR)/nsprepkg.o \ - $(OBJDIR)/nsrepair.o \ - $(OBJDIR)/nsrepair2.o \ - $(OBJDIR)/nssearch.o \ - $(OBJDIR)/nsutils.o \ - $(OBJDIR)/nswalk.o \ - $(OBJDIR)/nsxfeval.o \ - $(OBJDIR)/nsxfname.o \ - $(OBJDIR)/nsxfobj.o \ - $(OBJDIR)/osunixxf.o \ - $(OBJDIR)/psargs.o \ - $(OBJDIR)/psloop.o \ - $(OBJDIR)/psobject.o \ - $(OBJDIR)/psopcode.o \ - $(OBJDIR)/psopinfo.o \ - $(OBJDIR)/psparse.o \ - $(OBJDIR)/psscope.o \ - $(OBJDIR)/pstree.o \ - $(OBJDIR)/psutils.o \ - $(OBJDIR)/pswalk.o \ - $(OBJDIR)/psxface.o \ - $(OBJDIR)/rsaddr.o \ - $(OBJDIR)/rscalc.o \ - $(OBJDIR)/rscreate.o \ - $(OBJDIR)/rsdump.o \ - $(OBJDIR)/rsdumpinfo.o \ - $(OBJDIR)/rsinfo.o \ - $(OBJDIR)/rsio.o \ - $(OBJDIR)/rsirq.o \ - $(OBJDIR)/rslist.o \ - $(OBJDIR)/rsmemory.o \ - $(OBJDIR)/rsmisc.o \ - $(OBJDIR)/rsserial.o \ - $(OBJDIR)/rsutils.o \ - $(OBJDIR)/rsxface.o \ - $(OBJDIR)/tbfadt.o \ - $(OBJDIR)/tbfind.o \ - $(OBJDIR)/tbinstal.o \ - $(OBJDIR)/tbutils.o \ - $(OBJDIR)/tbxface.o \ - $(OBJDIR)/tbxfload.o \ - $(OBJDIR)/tbxfroot.o \ - $(OBJDIR)/utaddress.o \ - $(OBJDIR)/utalloc.o \ - $(OBJDIR)/utcache.o \ - $(OBJDIR)/utcopy.o \ - $(OBJDIR)/utdebug.o \ - $(OBJDIR)/utdecode.o \ - $(OBJDIR)/utdelete.o \ - $(OBJDIR)/uteval.o \ - $(OBJDIR)/utexcep.o \ - $(OBJDIR)/utglobal.o \ - $(OBJDIR)/utids.o \ - $(OBJDIR)/utinit.o \ - $(OBJDIR)/utlock.o \ - $(OBJDIR)/utmath.o \ - $(OBJDIR)/utmisc.o \ - $(OBJDIR)/utmutex.o \ - $(OBJDIR)/utobject.o \ - $(OBJDIR)/utosi.o \ - $(OBJDIR)/utownerid.o \ - $(OBJDIR)/utresrc.o \ - $(OBJDIR)/utstate.o \ - $(OBJDIR)/utstring.o \ - $(OBJDIR)/uttrack.o \ - $(OBJDIR)/utxface.o \ - $(OBJDIR)/utxferror.o \ - $(OBJDIR)/utxfinit.o \ + $(OBJDIR)/aeexec.o\ + $(OBJDIR)/aehandlers.o\ + $(OBJDIR)/aemain.o\ + $(OBJDIR)/aetables.o\ + $(OBJDIR)/dbcmds.o\ + $(OBJDIR)/dbconvert.o\ + $(OBJDIR)/dbdisply.o\ + $(OBJDIR)/dbexec.o\ + $(OBJDIR)/dbfileio.o\ + $(OBJDIR)/dbhistry.o\ + $(OBJDIR)/dbinput.o\ + $(OBJDIR)/dbmethod.o\ + $(OBJDIR)/dbnames.o\ + $(OBJDIR)/dbstats.o\ + $(OBJDIR)/dbutils.o\ + $(OBJDIR)/dbxface.o\ + $(OBJDIR)/dmbuffer.o\ + $(OBJDIR)/dmdeferred.o\ + $(OBJDIR)/dmnames.o\ + $(OBJDIR)/dmobject.o\ + $(OBJDIR)/dmopcode.o\ + $(OBJDIR)/dmresrc.o\ + $(OBJDIR)/dmresrcl.o\ + $(OBJDIR)/dmresrcl2.o\ + $(OBJDIR)/dmresrcs.o\ + $(OBJDIR)/dmutils.o\ + $(OBJDIR)/dmwalk.o\ + $(OBJDIR)/dsargs.o\ + $(OBJDIR)/dscontrol.o\ + $(OBJDIR)/dsfield.o\ + $(OBJDIR)/dsinit.o\ + $(OBJDIR)/dsmethod.o\ + $(OBJDIR)/dsmthdat.o\ + $(OBJDIR)/dsobject.o\ + $(OBJDIR)/dsopcode.o\ + $(OBJDIR)/dsutils.o\ + $(OBJDIR)/dswexec.o\ + $(OBJDIR)/dswload.o\ + $(OBJDIR)/dswload2.o\ + $(OBJDIR)/dswscope.o\ + $(OBJDIR)/dswstate.o\ + $(OBJDIR)/evevent.o\ + $(OBJDIR)/evglock.o\ + $(OBJDIR)/evgpe.o\ + $(OBJDIR)/evgpeblk.o\ + $(OBJDIR)/evgpeinit.o\ + $(OBJDIR)/evgpeutil.o\ + $(OBJDIR)/evhandler.o\ + $(OBJDIR)/evmisc.o\ + $(OBJDIR)/evregion.o\ + $(OBJDIR)/evrgnini.o\ + $(OBJDIR)/evsci.o\ + $(OBJDIR)/evxface.o\ + $(OBJDIR)/evxfevnt.o\ + $(OBJDIR)/evxfgpe.o\ + $(OBJDIR)/evxfregn.o\ + $(OBJDIR)/exconfig.o\ + $(OBJDIR)/exconvrt.o\ + $(OBJDIR)/excreate.o\ + $(OBJDIR)/exdebug.o\ + $(OBJDIR)/exdump.o\ + $(OBJDIR)/exfield.o\ + $(OBJDIR)/exfldio.o\ + $(OBJDIR)/exmisc.o\ + $(OBJDIR)/exmutex.o\ + $(OBJDIR)/exnames.o\ + $(OBJDIR)/exoparg1.o\ + $(OBJDIR)/exoparg2.o\ + $(OBJDIR)/exoparg3.o\ + $(OBJDIR)/exoparg6.o\ + $(OBJDIR)/exprep.o\ + $(OBJDIR)/exregion.o\ + $(OBJDIR)/exresnte.o\ + $(OBJDIR)/exresolv.o\ + $(OBJDIR)/exresop.o\ + $(OBJDIR)/exstore.o\ + $(OBJDIR)/exstoren.o\ + $(OBJDIR)/exstorob.o\ + $(OBJDIR)/exsystem.o\ + $(OBJDIR)/exutils.o\ + $(OBJDIR)/getopt.o\ + $(OBJDIR)/hwacpi.o\ + $(OBJDIR)/hwesleep.o\ + $(OBJDIR)/hwgpe.o\ + $(OBJDIR)/hwpci.o\ + $(OBJDIR)/hwregs.o\ + $(OBJDIR)/hwsleep.o\ + $(OBJDIR)/hwvalid.o\ + $(OBJDIR)/hwxface.o\ + $(OBJDIR)/hwxfsleep.o\ + $(OBJDIR)/nsaccess.o\ + $(OBJDIR)/nsalloc.o\ + $(OBJDIR)/nsconvert.o\ + $(OBJDIR)/nsdump.o\ + $(OBJDIR)/nsdumpdv.o\ + $(OBJDIR)/nseval.o\ + $(OBJDIR)/nsinit.o\ + $(OBJDIR)/nsload.o\ + $(OBJDIR)/nsnames.o\ + $(OBJDIR)/nsobject.o\ + $(OBJDIR)/nsparse.o\ + $(OBJDIR)/nspredef.o\ + $(OBJDIR)/nsprepkg.o\ + $(OBJDIR)/nsrepair.o\ + $(OBJDIR)/nsrepair2.o\ + $(OBJDIR)/nssearch.o\ + $(OBJDIR)/nsutils.o\ + $(OBJDIR)/nswalk.o\ + $(OBJDIR)/nsxfeval.o\ + $(OBJDIR)/nsxfname.o\ + $(OBJDIR)/nsxfobj.o\ + $(OBJDIR)/osunixxf.o\ + $(OBJDIR)/psargs.o\ + $(OBJDIR)/psloop.o\ + $(OBJDIR)/psobject.o\ + $(OBJDIR)/psopcode.o\ + $(OBJDIR)/psopinfo.o\ + $(OBJDIR)/psparse.o\ + $(OBJDIR)/psscope.o\ + $(OBJDIR)/pstree.o\ + $(OBJDIR)/psutils.o\ + $(OBJDIR)/pswalk.o\ + $(OBJDIR)/psxface.o\ + $(OBJDIR)/rsaddr.o\ + $(OBJDIR)/rscalc.o\ + $(OBJDIR)/rscreate.o\ + $(OBJDIR)/rsdump.o\ + $(OBJDIR)/rsdumpinfo.o\ + $(OBJDIR)/rsinfo.o\ + $(OBJDIR)/rsio.o\ + $(OBJDIR)/rsirq.o\ + $(OBJDIR)/rslist.o\ + $(OBJDIR)/rsmemory.o\ + $(OBJDIR)/rsmisc.o\ + $(OBJDIR)/rsserial.o\ + $(OBJDIR)/rsutils.o\ + $(OBJDIR)/rsxface.o\ + $(OBJDIR)/tbfadt.o\ + $(OBJDIR)/tbfind.o\ + $(OBJDIR)/tbinstal.o\ + $(OBJDIR)/tbutils.o\ + $(OBJDIR)/tbxface.o\ + $(OBJDIR)/tbxfload.o\ + $(OBJDIR)/tbxfroot.o\ + $(OBJDIR)/utaddress.o\ + $(OBJDIR)/utalloc.o\ + $(OBJDIR)/utcache.o\ + $(OBJDIR)/utcopy.o\ + $(OBJDIR)/utdebug.o\ + $(OBJDIR)/utdecode.o\ + $(OBJDIR)/utdelete.o\ + $(OBJDIR)/uteval.o\ + $(OBJDIR)/utexcep.o\ + $(OBJDIR)/utglobal.o\ + $(OBJDIR)/utids.o\ + $(OBJDIR)/utinit.o\ + $(OBJDIR)/utlock.o\ + $(OBJDIR)/utmath.o\ + $(OBJDIR)/utmisc.o\ + $(OBJDIR)/utmutex.o\ + $(OBJDIR)/utobject.o\ + $(OBJDIR)/utosi.o\ + $(OBJDIR)/utownerid.o\ + $(OBJDIR)/utresrc.o\ + $(OBJDIR)/utstate.o\ + $(OBJDIR)/utstring.o\ + $(OBJDIR)/uttrack.o\ + $(OBJDIR)/utxface.o\ + $(OBJDIR)/utxferror.o\ + $(OBJDIR)/utxfinit.o\ $(OBJDIR)/utxfmutex.o # # Flags specific to acpiexec utility # -CFLAGS+= \ - -DACPI_EXEC_APP \ +CFLAGS += \ + -DACPI_EXEC_APP\ -I$(ACPIEXEC) + LDFLAGS += -lpthread -lrt # diff -Nru acpica-unix-20130117/generate/unix/acpihelp/Makefile acpica-unix-20130214/generate/unix/acpihelp/Makefile --- acpica-unix-20130117/generate/unix/acpihelp/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/acpihelp/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -19,28 +19,28 @@ # Search paths for source files # vpath %.c \ - $(ACPIHELP) \ - $(ACPICA_COMMON) \ + $(ACPIHELP)\ + $(ACPICA_COMMON)\ $(ACPICA_UTILITIES) HEADERS = \ $(wildcard $(ACPIHELP)/*.h) OBJECTS = \ - $(OBJDIR)/ahamlops.o \ - $(OBJDIR)/ahaslkey.o \ - $(OBJDIR)/ahaslops.o \ - $(OBJDIR)/ahdecode.o \ - $(OBJDIR)/ahpredef.o \ - $(OBJDIR)/ahmain.o \ - $(OBJDIR)/getopt.o \ + $(OBJDIR)/ahamlops.o\ + $(OBJDIR)/ahaslkey.o\ + $(OBJDIR)/ahaslops.o\ + $(OBJDIR)/ahdecode.o\ + $(OBJDIR)/ahpredef.o\ + $(OBJDIR)/ahmain.o\ + $(OBJDIR)/getopt.o\ $(OBJDIR)/utexcep.o # # Flags specific to acpihelp # -CFLAGS+= \ - -DACPI_HELP_APP \ +CFLAGS += \ + -DACPI_HELP_APP\ -I$(ACPIHELP) # diff -Nru acpica-unix-20130117/generate/unix/acpinames/Makefile acpica-unix-20130214/generate/unix/acpinames/Makefile --- acpica-unix-20130117/generate/unix/acpinames/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/acpinames/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -20,98 +20,98 @@ # Search paths for source files # vpath %.c \ - $(ACPINAMES) \ - $(ACPICA_DEBUGGER) \ - $(ACPICA_DISPATCHER) \ - $(ACPICA_EXECUTER) \ - $(ACPICA_NAMESPACE) \ - $(ACPICA_PARSER) \ - $(ACPICA_TABLES) \ - $(ACPICA_UTILITIES) \ - $(ACPICA_COMMON) \ + $(ACPINAMES)\ + $(ACPICA_DEBUGGER)\ + $(ACPICA_DISPATCHER)\ + $(ACPICA_EXECUTER)\ + $(ACPICA_NAMESPACE)\ + $(ACPICA_PARSER)\ + $(ACPICA_TABLES)\ + $(ACPICA_UTILITIES)\ + $(ACPICA_COMMON)\ $(ACPICA_OSL) HEADERS = \ $(wildcard $(ACPINAMES)/*.h) OBJECTS = \ - $(OBJDIR)/anmain.o \ - $(OBJDIR)/anstubs.o \ - $(OBJDIR)/antables.o \ - $(OBJDIR)/dbfileio.o \ - $(OBJDIR)/dsfield.o \ - $(OBJDIR)/dsmthdat.o \ - $(OBJDIR)/dsobject.o \ - $(OBJDIR)/dsutils.o \ - $(OBJDIR)/dswload.o \ - $(OBJDIR)/dswload2.o \ - $(OBJDIR)/dswscope.o \ - $(OBJDIR)/dswstate.o \ - $(OBJDIR)/excreate.o \ - $(OBJDIR)/exnames.o \ - $(OBJDIR)/exresnte.o \ - $(OBJDIR)/exresolv.o \ - $(OBJDIR)/exutils.o \ - $(OBJDIR)/getopt.o \ - $(OBJDIR)/nsaccess.o \ - $(OBJDIR)/nsalloc.o \ - $(OBJDIR)/nsdump.o \ - $(OBJDIR)/nsinit.o \ - $(OBJDIR)/nsload.o \ - $(OBJDIR)/nsnames.o \ - $(OBJDIR)/nsobject.o \ - $(OBJDIR)/nsparse.o \ - $(OBJDIR)/nssearch.o \ - $(OBJDIR)/nsutils.o \ - $(OBJDIR)/nswalk.o \ - $(OBJDIR)/nsxfeval.o \ - $(OBJDIR)/nsxfname.o \ - $(OBJDIR)/nsxfobj.o \ - $(OBJDIR)/osunixxf.o \ - $(OBJDIR)/psargs.o \ - $(OBJDIR)/psloop.o \ - $(OBJDIR)/psobject.o \ - $(OBJDIR)/psopcode.o \ - $(OBJDIR)/psopinfo.o \ - $(OBJDIR)/psparse.o \ - $(OBJDIR)/psscope.o \ - $(OBJDIR)/pstree.o \ - $(OBJDIR)/psutils.o \ - $(OBJDIR)/pswalk.o \ - $(OBJDIR)/psxface.o \ - $(OBJDIR)/tbfadt.o \ - $(OBJDIR)/tbfind.o \ - $(OBJDIR)/tbinstal.o \ - $(OBJDIR)/tbutils.o \ - $(OBJDIR)/tbxface.o \ - $(OBJDIR)/tbxfload.o \ - $(OBJDIR)/tbxfroot.o \ - $(OBJDIR)/utaddress.o \ - $(OBJDIR)/utalloc.o \ - $(OBJDIR)/utcache.o \ - $(OBJDIR)/utdebug.o \ - $(OBJDIR)/utdecode.o \ - $(OBJDIR)/utdelete.o \ - $(OBJDIR)/utexcep.o \ - $(OBJDIR)/utglobal.o \ - $(OBJDIR)/utlock.o \ - $(OBJDIR)/utmath.o \ - $(OBJDIR)/utmisc.o \ - $(OBJDIR)/utmutex.o \ - $(OBJDIR)/utobject.o \ - $(OBJDIR)/utosi.o \ - $(OBJDIR)/utownerid.o \ - $(OBJDIR)/utstate.o \ - $(OBJDIR)/utstring.o \ - $(OBJDIR)/utxface.o \ - $(OBJDIR)/utxferror.o \ + $(OBJDIR)/anmain.o\ + $(OBJDIR)/anstubs.o\ + $(OBJDIR)/antables.o\ + $(OBJDIR)/dbfileio.o\ + $(OBJDIR)/dsfield.o\ + $(OBJDIR)/dsmthdat.o\ + $(OBJDIR)/dsobject.o\ + $(OBJDIR)/dsutils.o\ + $(OBJDIR)/dswload.o\ + $(OBJDIR)/dswload2.o\ + $(OBJDIR)/dswscope.o\ + $(OBJDIR)/dswstate.o\ + $(OBJDIR)/excreate.o\ + $(OBJDIR)/exnames.o\ + $(OBJDIR)/exresnte.o\ + $(OBJDIR)/exresolv.o\ + $(OBJDIR)/exutils.o\ + $(OBJDIR)/getopt.o\ + $(OBJDIR)/nsaccess.o\ + $(OBJDIR)/nsalloc.o\ + $(OBJDIR)/nsdump.o\ + $(OBJDIR)/nsinit.o\ + $(OBJDIR)/nsload.o\ + $(OBJDIR)/nsnames.o\ + $(OBJDIR)/nsobject.o\ + $(OBJDIR)/nsparse.o\ + $(OBJDIR)/nssearch.o\ + $(OBJDIR)/nsutils.o\ + $(OBJDIR)/nswalk.o\ + $(OBJDIR)/nsxfeval.o\ + $(OBJDIR)/nsxfname.o\ + $(OBJDIR)/nsxfobj.o\ + $(OBJDIR)/osunixxf.o\ + $(OBJDIR)/psargs.o\ + $(OBJDIR)/psloop.o\ + $(OBJDIR)/psobject.o\ + $(OBJDIR)/psopcode.o\ + $(OBJDIR)/psopinfo.o\ + $(OBJDIR)/psparse.o\ + $(OBJDIR)/psscope.o\ + $(OBJDIR)/pstree.o\ + $(OBJDIR)/psutils.o\ + $(OBJDIR)/pswalk.o\ + $(OBJDIR)/psxface.o\ + $(OBJDIR)/tbfadt.o\ + $(OBJDIR)/tbfind.o\ + $(OBJDIR)/tbinstal.o\ + $(OBJDIR)/tbutils.o\ + $(OBJDIR)/tbxface.o\ + $(OBJDIR)/tbxfload.o\ + $(OBJDIR)/tbxfroot.o\ + $(OBJDIR)/utaddress.o\ + $(OBJDIR)/utalloc.o\ + $(OBJDIR)/utcache.o\ + $(OBJDIR)/utdebug.o\ + $(OBJDIR)/utdecode.o\ + $(OBJDIR)/utdelete.o\ + $(OBJDIR)/utexcep.o\ + $(OBJDIR)/utglobal.o\ + $(OBJDIR)/utlock.o\ + $(OBJDIR)/utmath.o\ + $(OBJDIR)/utmisc.o\ + $(OBJDIR)/utmutex.o\ + $(OBJDIR)/utobject.o\ + $(OBJDIR)/utosi.o\ + $(OBJDIR)/utownerid.o\ + $(OBJDIR)/utstate.o\ + $(OBJDIR)/utstring.o\ + $(OBJDIR)/utxface.o\ + $(OBJDIR)/utxferror.o\ $(OBJDIR)/utxfinit.o # # Flags specific to acpinames utility # -CFLAGS+= \ - -DACPI_NAMES_APP \ +CFLAGS += \ + -DACPI_NAMES_APP\ -I$(ACPINAMES) # diff -Nru acpica-unix-20130117/generate/unix/acpisrc/Makefile acpica-unix-20130214/generate/unix/acpisrc/Makefile --- acpica-unix-20130117/generate/unix/acpisrc/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/acpisrc/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -18,29 +18,29 @@ # Search path for source files and individual source files # vpath %.c \ - $(ACPISRC) \ - $(ACPICA_COMMON) \ + $(ACPISRC)\ + $(ACPICA_COMMON)\ $(ACPICA_OSL) HEADERS = \ $(wildcard $(ACPISRC)/*.h) OBJECTS = \ - $(OBJDIR)/ascase.o \ - $(OBJDIR)/asconvrt.o \ - $(OBJDIR)/asfile.o \ - $(OBJDIR)/asmain.o \ - $(OBJDIR)/asremove.o \ - $(OBJDIR)/astable.o \ - $(OBJDIR)/asutils.o \ - $(OBJDIR)/osunixdir.o \ + $(OBJDIR)/ascase.o\ + $(OBJDIR)/asconvrt.o\ + $(OBJDIR)/asfile.o\ + $(OBJDIR)/asmain.o\ + $(OBJDIR)/asremove.o\ + $(OBJDIR)/astable.o\ + $(OBJDIR)/asutils.o\ + $(OBJDIR)/osunixdir.o\ $(OBJDIR)/getopt.o # # Compile flags specific to acpisrc # -CFLAGS+= \ - -DACPI_SRC_APP \ +CFLAGS += \ + -DACPI_SRC_APP\ -I$(ACPISRC) # diff -Nru acpica-unix-20130117/generate/unix/acpixtract/Makefile acpica-unix-20130214/generate/unix/acpixtract/Makefile --- acpica-unix-20130117/generate/unix/acpixtract/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/acpixtract/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -18,22 +18,22 @@ # Search paths for source files # vpath %.c \ - $(ACPIXTRACT) \ + $(ACPIXTRACT)\ $(ACPICA_COMMON) HEADERS = \ $(wildcard $(ACPIXTRACT)/*.h) OBJECTS = \ - $(OBJDIR)/acpixtract.o \ - $(OBJDIR)/axmain.o \ + $(OBJDIR)/acpixtract.o\ + $(OBJDIR)/axmain.o\ $(OBJDIR)/getopt.o # # Flags specific to acpixtract # -CFLAGS+= \ - -DACPI_XTRACT_APP \ +CFLAGS += \ + -DACPI_XTRACT_APP # # Common Rules diff -Nru acpica-unix-20130117/generate/unix/iasl/Makefile acpica-unix-20130214/generate/unix/iasl/Makefile --- acpica-unix-20130117/generate/unix/iasl/Makefile 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/generate/unix/iasl/Makefile 2013-02-14 19:52:34.000000000 +0000 @@ -18,206 +18,207 @@ # Search paths for source files # vpath %.c \ - $(ASL_COMPILER) \ - $(ACPICA_DEBUGGER) \ - $(ACPICA_DISASSEMBLER) \ - $(ACPICA_DISPATCHER) \ - $(ACPICA_EXECUTER) \ - $(ACPICA_NAMESPACE) \ - $(ACPICA_PARSER) \ - $(ACPICA_TABLES) \ - $(ACPICA_UTILITIES) \ - $(ACPICA_COMMON) \ + $(ASL_COMPILER)\ + $(ACPICA_DEBUGGER)\ + $(ACPICA_DISASSEMBLER)\ + $(ACPICA_DISPATCHER)\ + $(ACPICA_EXECUTER)\ + $(ACPICA_NAMESPACE)\ + $(ACPICA_PARSER)\ + $(ACPICA_TABLES)\ + $(ACPICA_UTILITIES)\ + $(ACPICA_COMMON)\ $(ACPICA_OSL) HEADERS = \ - $(wildcard $(ASL_COMPILER)/*.h) \ - $(OBJDIR)/aslcompiler.y.h \ - $(OBJDIR)/dtparser.y.h \ + $(wildcard $(ASL_COMPILER)/*.h)\ + $(OBJDIR)/aslcompiler.y.h\ + $(OBJDIR)/dtparser.y.h\ $(OBJDIR)/prparser.y.h OBJECTS = \ - $(OBJDIR)/aslcompilerlex.o \ - $(OBJDIR)/aslcompilerparse.o \ - $(OBJDIR)/dtparserlex.o \ - $(OBJDIR)/dtparserparse.o \ - $(OBJDIR)/prparserlex.o \ - $(OBJDIR)/prparserparse.o \ - $(OBJDIR)/adfile.o \ - $(OBJDIR)/adisasm.o \ - $(OBJDIR)/adwalk.o \ - $(OBJDIR)/ahpredef.o \ - $(OBJDIR)/aslanalyze.o \ - $(OBJDIR)/aslbtypes.o \ - $(OBJDIR)/aslcodegen.o \ - $(OBJDIR)/aslcompile.o \ - $(OBJDIR)/aslerror.o \ - $(OBJDIR)/aslfiles.o \ - $(OBJDIR)/aslfileio.o \ - $(OBJDIR)/aslfold.o \ - $(OBJDIR)/aslhex.o \ - $(OBJDIR)/asllength.o \ - $(OBJDIR)/asllisting.o \ - $(OBJDIR)/aslload.o \ - $(OBJDIR)/asllookup.o \ - $(OBJDIR)/aslmain.o \ - $(OBJDIR)/aslmap.o \ - $(OBJDIR)/aslmethod.o \ - $(OBJDIR)/aslnamesp.o \ - $(OBJDIR)/aslopcodes.o \ - $(OBJDIR)/asloperands.o \ - $(OBJDIR)/aslopt.o \ - $(OBJDIR)/aslpredef.o \ - $(OBJDIR)/aslresource.o \ - $(OBJDIR)/aslrestype1.o \ - $(OBJDIR)/aslrestype1i.o \ - $(OBJDIR)/aslrestype2.o \ - $(OBJDIR)/aslrestype2d.o \ - $(OBJDIR)/aslrestype2e.o \ - $(OBJDIR)/aslrestype2q.o \ - $(OBJDIR)/aslrestype2s.o \ - $(OBJDIR)/aslrestype2w.o \ - $(OBJDIR)/aslstartup.o \ - $(OBJDIR)/aslstubs.o \ - $(OBJDIR)/asltransform.o \ - $(OBJDIR)/asltree.o \ - $(OBJDIR)/aslutils.o \ - $(OBJDIR)/asluuid.o \ - $(OBJDIR)/aslwalks.o \ - $(OBJDIR)/aslxref.o \ - $(OBJDIR)/dtcompile.o \ - $(OBJDIR)/dtexpress.o \ - $(OBJDIR)/dtfield.o \ - $(OBJDIR)/dtio.o \ - $(OBJDIR)/dtsubtable.o \ - $(OBJDIR)/dttable.o \ - $(OBJDIR)/dttemplate.o \ - $(OBJDIR)/dtutils.o \ - $(OBJDIR)/dbfileio.o \ - $(OBJDIR)/dmbuffer.o \ - $(OBJDIR)/dmdeferred.o \ - $(OBJDIR)/dmextern.o \ - $(OBJDIR)/dmnames.o \ - $(OBJDIR)/dmobject.o \ - $(OBJDIR)/dmopcode.o \ - $(OBJDIR)/dmresrc.o \ - $(OBJDIR)/dmresrcl.o \ - $(OBJDIR)/dmresrcl2.o \ - $(OBJDIR)/dmresrcs.o \ - $(OBJDIR)/dmrestag.o \ - $(OBJDIR)/dmtable.o \ - $(OBJDIR)/dmtbdump.o \ - $(OBJDIR)/dmtbinfo.o \ - $(OBJDIR)/dmutils.o \ - $(OBJDIR)/dmwalk.o \ - $(OBJDIR)/dsargs.o \ - $(OBJDIR)/dscontrol.o \ - $(OBJDIR)/dsfield.o \ - $(OBJDIR)/dsobject.o \ - $(OBJDIR)/dsopcode.o \ - $(OBJDIR)/dsutils.o \ - $(OBJDIR)/dswexec.o \ - $(OBJDIR)/dswload.o \ - $(OBJDIR)/dswload2.o \ - $(OBJDIR)/dswscope.o \ - $(OBJDIR)/dswstate.o \ - $(OBJDIR)/exconvrt.o \ - $(OBJDIR)/excreate.o \ - $(OBJDIR)/exdump.o \ - $(OBJDIR)/exmisc.o \ - $(OBJDIR)/exmutex.o \ - $(OBJDIR)/exnames.o \ - $(OBJDIR)/exoparg1.o \ - $(OBJDIR)/exoparg2.o \ - $(OBJDIR)/exoparg3.o \ - $(OBJDIR)/exoparg6.o \ - $(OBJDIR)/exprep.o \ - $(OBJDIR)/exregion.o \ - $(OBJDIR)/exresnte.o \ - $(OBJDIR)/exresolv.o \ - $(OBJDIR)/exresop.o \ - $(OBJDIR)/exstore.o \ - $(OBJDIR)/exstoren.o \ - $(OBJDIR)/exstorob.o \ - $(OBJDIR)/exsystem.o \ - $(OBJDIR)/exutils.o \ - $(OBJDIR)/getopt.o \ - $(OBJDIR)/nsaccess.o \ - $(OBJDIR)/nsalloc.o \ - $(OBJDIR)/nsdump.o \ - $(OBJDIR)/nsnames.o \ - $(OBJDIR)/nsobject.o \ - $(OBJDIR)/nsparse.o \ - $(OBJDIR)/nssearch.o \ - $(OBJDIR)/nsutils.o \ - $(OBJDIR)/nswalk.o \ - $(OBJDIR)/nsxfobj.o \ - $(OBJDIR)/osunixxf.o \ - $(OBJDIR)/prexpress.o \ - $(OBJDIR)/prmacros.o \ - $(OBJDIR)/prscan.o \ - $(OBJDIR)/prutils.o \ - $(OBJDIR)/psargs.o \ - $(OBJDIR)/psloop.o \ - $(OBJDIR)/psobject.o \ - $(OBJDIR)/psopcode.o \ - $(OBJDIR)/psopinfo.o \ - $(OBJDIR)/psparse.o \ - $(OBJDIR)/psscope.o \ - $(OBJDIR)/pstree.o \ - $(OBJDIR)/psutils.o \ - $(OBJDIR)/pswalk.o \ - $(OBJDIR)/tbfadt.o \ - $(OBJDIR)/tbinstal.o \ - $(OBJDIR)/tbutils.o \ - $(OBJDIR)/tbxface.o \ - $(OBJDIR)/utaddress.o \ - $(OBJDIR)/utalloc.o \ - $(OBJDIR)/utcache.o \ - $(OBJDIR)/utcopy.o \ - $(OBJDIR)/utdebug.o \ - $(OBJDIR)/utdecode.o \ - $(OBJDIR)/utdelete.o \ - $(OBJDIR)/utexcep.o \ - $(OBJDIR)/utglobal.o \ - $(OBJDIR)/utinit.o \ - $(OBJDIR)/utlock.o \ - $(OBJDIR)/utmath.o \ - $(OBJDIR)/utmisc.o \ - $(OBJDIR)/utmutex.o \ - $(OBJDIR)/utobject.o \ - $(OBJDIR)/utownerid.o \ - $(OBJDIR)/utresrc.o \ - $(OBJDIR)/utstate.o \ - $(OBJDIR)/utstring.o \ - $(OBJDIR)/utxface.o \ + $(OBJDIR)/aslcompilerlex.o\ + $(OBJDIR)/aslcompilerparse.o\ + $(OBJDIR)/dtparserlex.o\ + $(OBJDIR)/dtparserparse.o\ + $(OBJDIR)/prparserlex.o\ + $(OBJDIR)/prparserparse.o\ + $(OBJDIR)/adfile.o\ + $(OBJDIR)/adisasm.o\ + $(OBJDIR)/adwalk.o\ + $(OBJDIR)/ahpredef.o\ + $(OBJDIR)/aslanalyze.o\ + $(OBJDIR)/aslbtypes.o\ + $(OBJDIR)/aslcodegen.o\ + $(OBJDIR)/aslcompile.o\ + $(OBJDIR)/aslerror.o\ + $(OBJDIR)/aslfiles.o\ + $(OBJDIR)/aslfileio.o\ + $(OBJDIR)/aslfold.o\ + $(OBJDIR)/aslhex.o\ + $(OBJDIR)/asllength.o\ + $(OBJDIR)/asllisting.o\ + $(OBJDIR)/aslload.o\ + $(OBJDIR)/asllookup.o\ + $(OBJDIR)/aslmain.o\ + $(OBJDIR)/aslmap.o\ + $(OBJDIR)/aslmethod.o\ + $(OBJDIR)/aslnamesp.o\ + $(OBJDIR)/aslopcodes.o\ + $(OBJDIR)/asloperands.o\ + $(OBJDIR)/aslopt.o\ + $(OBJDIR)/aslpredef.o\ + $(OBJDIR)/aslprepkg.o\ + $(OBJDIR)/aslresource.o\ + $(OBJDIR)/aslrestype1.o\ + $(OBJDIR)/aslrestype1i.o\ + $(OBJDIR)/aslrestype2.o\ + $(OBJDIR)/aslrestype2d.o\ + $(OBJDIR)/aslrestype2e.o\ + $(OBJDIR)/aslrestype2q.o\ + $(OBJDIR)/aslrestype2s.o\ + $(OBJDIR)/aslrestype2w.o\ + $(OBJDIR)/aslstartup.o\ + $(OBJDIR)/aslstubs.o\ + $(OBJDIR)/asltransform.o\ + $(OBJDIR)/asltree.o\ + $(OBJDIR)/aslutils.o\ + $(OBJDIR)/asluuid.o\ + $(OBJDIR)/aslwalks.o\ + $(OBJDIR)/aslxref.o\ + $(OBJDIR)/dtcompile.o\ + $(OBJDIR)/dtexpress.o\ + $(OBJDIR)/dtfield.o\ + $(OBJDIR)/dtio.o\ + $(OBJDIR)/dtsubtable.o\ + $(OBJDIR)/dttable.o\ + $(OBJDIR)/dttemplate.o\ + $(OBJDIR)/dtutils.o\ + $(OBJDIR)/dbfileio.o\ + $(OBJDIR)/dmbuffer.o\ + $(OBJDIR)/dmdeferred.o\ + $(OBJDIR)/dmextern.o\ + $(OBJDIR)/dmnames.o\ + $(OBJDIR)/dmobject.o\ + $(OBJDIR)/dmopcode.o\ + $(OBJDIR)/dmresrc.o\ + $(OBJDIR)/dmresrcl.o\ + $(OBJDIR)/dmresrcl2.o\ + $(OBJDIR)/dmresrcs.o\ + $(OBJDIR)/dmrestag.o\ + $(OBJDIR)/dmtable.o\ + $(OBJDIR)/dmtbdump.o\ + $(OBJDIR)/dmtbinfo.o\ + $(OBJDIR)/dmutils.o\ + $(OBJDIR)/dmwalk.o\ + $(OBJDIR)/dsargs.o\ + $(OBJDIR)/dscontrol.o\ + $(OBJDIR)/dsfield.o\ + $(OBJDIR)/dsobject.o\ + $(OBJDIR)/dsopcode.o\ + $(OBJDIR)/dsutils.o\ + $(OBJDIR)/dswexec.o\ + $(OBJDIR)/dswload.o\ + $(OBJDIR)/dswload2.o\ + $(OBJDIR)/dswscope.o\ + $(OBJDIR)/dswstate.o\ + $(OBJDIR)/exconvrt.o\ + $(OBJDIR)/excreate.o\ + $(OBJDIR)/exdump.o\ + $(OBJDIR)/exmisc.o\ + $(OBJDIR)/exmutex.o\ + $(OBJDIR)/exnames.o\ + $(OBJDIR)/exoparg1.o\ + $(OBJDIR)/exoparg2.o\ + $(OBJDIR)/exoparg3.o\ + $(OBJDIR)/exoparg6.o\ + $(OBJDIR)/exprep.o\ + $(OBJDIR)/exregion.o\ + $(OBJDIR)/exresnte.o\ + $(OBJDIR)/exresolv.o\ + $(OBJDIR)/exresop.o\ + $(OBJDIR)/exstore.o\ + $(OBJDIR)/exstoren.o\ + $(OBJDIR)/exstorob.o\ + $(OBJDIR)/exsystem.o\ + $(OBJDIR)/exutils.o\ + $(OBJDIR)/getopt.o\ + $(OBJDIR)/nsaccess.o\ + $(OBJDIR)/nsalloc.o\ + $(OBJDIR)/nsdump.o\ + $(OBJDIR)/nsnames.o\ + $(OBJDIR)/nsobject.o\ + $(OBJDIR)/nsparse.o\ + $(OBJDIR)/nssearch.o\ + $(OBJDIR)/nsutils.o\ + $(OBJDIR)/nswalk.o\ + $(OBJDIR)/nsxfobj.o\ + $(OBJDIR)/osunixxf.o\ + $(OBJDIR)/prexpress.o\ + $(OBJDIR)/prmacros.o\ + $(OBJDIR)/prscan.o\ + $(OBJDIR)/prutils.o\ + $(OBJDIR)/psargs.o\ + $(OBJDIR)/psloop.o\ + $(OBJDIR)/psobject.o\ + $(OBJDIR)/psopcode.o\ + $(OBJDIR)/psopinfo.o\ + $(OBJDIR)/psparse.o\ + $(OBJDIR)/psscope.o\ + $(OBJDIR)/pstree.o\ + $(OBJDIR)/psutils.o\ + $(OBJDIR)/pswalk.o\ + $(OBJDIR)/tbfadt.o\ + $(OBJDIR)/tbinstal.o\ + $(OBJDIR)/tbutils.o\ + $(OBJDIR)/tbxface.o\ + $(OBJDIR)/utaddress.o\ + $(OBJDIR)/utalloc.o\ + $(OBJDIR)/utcache.o\ + $(OBJDIR)/utcopy.o\ + $(OBJDIR)/utdebug.o\ + $(OBJDIR)/utdecode.o\ + $(OBJDIR)/utdelete.o\ + $(OBJDIR)/utexcep.o\ + $(OBJDIR)/utglobal.o\ + $(OBJDIR)/utinit.o\ + $(OBJDIR)/utlock.o\ + $(OBJDIR)/utmath.o\ + $(OBJDIR)/utmisc.o\ + $(OBJDIR)/utmutex.o\ + $(OBJDIR)/utobject.o\ + $(OBJDIR)/utownerid.o\ + $(OBJDIR)/utresrc.o\ + $(OBJDIR)/utstate.o\ + $(OBJDIR)/utstring.o\ + $(OBJDIR)/utxface.o\ $(OBJDIR)/utxferror.o INTERMEDIATES = \ - $(OBJDIR)/aslcompilerlex.c \ - $(OBJDIR)/aslcompilerparse.c \ - $(OBJDIR)/dtparserlex.c \ - $(OBJDIR)/dtparserparse.c \ - $(OBJDIR)/prparserlex.c \ + $(OBJDIR)/aslcompilerlex.c\ + $(OBJDIR)/aslcompilerparse.c\ + $(OBJDIR)/dtparserlex.c\ + $(OBJDIR)/dtparserparse.c\ + $(OBJDIR)/prparserlex.c\ $(OBJDIR)/prparserparse.c MISC = \ - $(OBJDIR)/aslcompilerparse.h \ - $(OBJDIR)/aslcompiler.y.h \ - $(OBJDIR)/aslcompilerparse.output \ - $(OBJDIR)/dtparserparse.h \ - $(OBJDIR)/dtparser.y.h \ - $(OBJDIR)/dtparserparse.output \ - $(OBJDIR)/prparserparse.h \ - $(OBJDIR)/prparser.y.h \ + $(OBJDIR)/aslcompilerparse.h\ + $(OBJDIR)/aslcompiler.y.h\ + $(OBJDIR)/aslcompilerparse.output\ + $(OBJDIR)/dtparserparse.h\ + $(OBJDIR)/dtparser.y.h\ + $(OBJDIR)/dtparserparse.output\ + $(OBJDIR)/prparserparse.h\ + $(OBJDIR)/prparser.y.h\ $(OBJDIR)/prparserparse.output # # Flags specific to iASL compiler # -CFLAGS+= \ - -DACPI_ASL_COMPILER \ - -I$(ASL_COMPILER) \ +CFLAGS += \ + -DACPI_ASL_COMPILER\ + -I$(ASL_COMPILER)\ -I$(OBJDIR) # diff -Nru acpica-unix-20130117/source/common/adisasm.c acpica-unix-20130214/source/common/adisasm.c --- acpica-unix-20130117/source/common/adisasm.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/common/adisasm.c 2013-02-14 19:52:34.000000000 +0000 @@ -372,7 +372,7 @@ } /* - * Output: ASL code. Redirect to a file if requested + * Output: ASL code. Redirect to a file if requested */ if (OutToFile) { @@ -540,11 +540,6 @@ ACPI_FREE (Table); } - if (DisasmFilename) - { - ACPI_FREE (DisasmFilename); - } - if (OutToFile && File) { if (AslCompilerdebug) /* Display final namespace, with transforms */ @@ -667,7 +662,7 @@ AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision); AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId); AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision); - AcpiOsPrintf (" */\n\n"); + AcpiOsPrintf (" */\n"); /* Create AML output filename based on input filename */ diff -Nru acpica-unix-20130117/source/common/adwalk.c acpica-unix-20130214/source/common/adwalk.c --- acpica-unix-20130117/source/common/adwalk.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/common/adwalk.c 2013-02-14 19:52:34.000000000 +0000 @@ -837,7 +837,7 @@ } } - AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount); + AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount | 0x80); Op->Common.Node = Node; } else diff -Nru acpica-unix-20130117/source/common/dmextern.c acpica-unix-20130214/source/common/dmextern.c --- acpica-unix-20130117/source/common/dmextern.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/common/dmextern.c 2013-02-14 19:52:34.000000000 +0000 @@ -46,6 +46,7 @@ #include "amlcode.h" #include "acnamesp.h" #include "acdisasm.h" +#include /* @@ -373,6 +374,7 @@ ACPI_EXTERNAL_LIST *NextExternal; ACPI_EXTERNAL_LIST *PrevExternal = NULL; ACPI_STATUS Status; + BOOLEAN Resolved = FALSE; if (!Path) @@ -380,6 +382,15 @@ return; } + if (Type == ACPI_TYPE_METHOD) + { + if (Value & 0x80) + { + Resolved = TRUE; + } + Value &= 0x07; + } + /* * We don't want External() statements to contain a leading '\'. * This prevents duplicate external statements of the form: @@ -464,6 +475,7 @@ NewExternal->Path = ExternalPath; NewExternal->Type = Type; NewExternal->Value = Value; + NewExternal->Resolved = Resolved; NewExternal->Length = (UINT16) ACPI_STRLEN (ExternalPath); /* Was the external path with parent prefix normalized to a fullpath? */ @@ -684,6 +696,29 @@ } /* + * Determine the number of control methods in the external list, and + * also how many of those externals were resolved via the namespace. + */ + NextExternal = AcpiGbl_ExternalList; + while (NextExternal) + { + if (NextExternal->Type == ACPI_TYPE_METHOD) + { + AcpiGbl_NumExternalMethods++; + if (NextExternal->Resolved) + { + AcpiGbl_ResolvedExternalMethods++; + } + } + + NextExternal = NextExternal->Next; + } + + /* Check if any control methods were unresolved */ + + AcpiDmUnresolvedWarning (1); + + /* * Walk the list of externals (unresolved references) * found during the AML parsing */ @@ -695,8 +730,17 @@ if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD) { - AcpiOsPrintf (") // %u Arguments\n", - AcpiGbl_ExternalList->Value); + if (AcpiGbl_ExternalList->Resolved) + { + AcpiOsPrintf (") // %u Arguments\n", + AcpiGbl_ExternalList->Value); + } + else + { + AcpiOsPrintf (") // Warning: unresolved Method, " + "assuming %u arguments (may be incorrect, see warning above)\n", + AcpiGbl_ExternalList->Value); + } } else { @@ -718,3 +762,173 @@ AcpiOsPrintf ("\n"); } + + +/******************************************************************************* + * + * FUNCTION: AcpiDmUnresolvedWarning + * + * PARAMETERS: Type - Where to output the warning. + * 0 means write to stderr + * 1 means write to AcpiOsPrintf + * + * RETURN: None + * + * DESCRIPTION: Issue warning message if there are unresolved external control + * methods within the disassembly. + * + ******************************************************************************/ + +#if 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 invocations. + +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. +#endif + +void +AcpiDmUnresolvedWarning ( + UINT8 Type) +{ + + if (!AcpiGbl_NumExternalMethods) + { + return; + } + + if (Type) + { + if (!AcpiGbl_ExternalFileList) + { + /* The -e option was not specified */ + + AcpiOsPrintf (" /*\n" + " * iASL Warning: There were %u external control methods found during\n" + " * disassembly, but additional ACPI tables to resolve these externals\n" + " * were not specified. This resulting disassembler output file may not\n" + " * compile because the disassembler did not know how many arguments\n" + " * to assign to these methods. To specify the tables needed to resolve\n" + " * external control method references, use the one of the following\n" + " * example iASL invocations:\n" + " * iasl -e -d \n" + " * iasl -e -d \n" + " */\n", + AcpiGbl_NumExternalMethods); + } + else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) + { + /* The -e option was specified, but there are still some unresolved externals */ + + AcpiOsPrintf (" /*\n" + " * iASL Warning: There were %u external control methods found during\n" + " * disassembly, but only %u %s resolved (%u unresolved). Additional\n" + " * ACPI tables are required to properly disassemble the code. This\n" + " * resulting disassembler output file may not compile because the\n" + " * disassembler did not know how many arguments to assign to the\n" + " * unresolved methods.\n" + " */\n", + AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, + (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), + (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); + } + } + else + { + if (!AcpiGbl_ExternalFileList) + { + /* The -e option was not specified */ + + fprintf (stderr, "\n" + "iASL Warning: There were %u external control methods found during\n" + "disassembly, but additional ACPI tables to resolve these externals\n" + "were not specified. The resulting disassembler output file may not\n" + "compile because the disassembler did not know how many arguments\n" + "to assign to these methods. To specify the tables needed to resolve\n" + "external control method references, use the one of the following\n" + "example iASL invocations:\n" + " iasl -e -d \n" + " iasl -e -d \n", + AcpiGbl_NumExternalMethods); + } + else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) + { + /* The -e option was specified, but there are still some unresolved externals */ + + fprintf (stderr, "\n" + "iASL Warning: There were %u external control methods found during\n" + "disassembly, but only %u %s resolved (%u unresolved). Additional\n" + "ACPI tables are required to properly disassemble the code. The\n" + "resulting disassembler output file may not compile because the\n" + "disassembler did not know how many arguments to assign to the\n" + "unresolved methods.\n", + AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, + (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), + (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); + } + } + +} diff -Nru acpica-unix-20130117/source/common/dmtable.c acpica-unix-20130214/source/common/dmtable.c --- acpica-unix-20130117/source/common/dmtable.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/common/dmtable.c 2013-02-14 19:52:34.000000000 +0000 @@ -299,6 +299,7 @@ {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"}, {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"}, {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"}, + {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr, "MID Timer Table"}, {ACPI_SIG_PCCT, NULL, AcpiDmDumpPcct, NULL, NULL, "Platform Communications Channel Table"}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt, "Root System Description Table"}, @@ -312,6 +313,7 @@ {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa, "Trusted Computing Platform Alliance table"}, {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2, "Trusted Platform Module hardware interface table"}, {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi, "UEFI Boot Optimization Table"}, + {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc, AcpiDmDumpVrtc, DtCompileVrtc, TemplateVrtc, "Virtual Real-Time Clock Table"}, {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet, "Windows ACPI Emulated Devices Table"}, {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat, "Watchdog Action Table"}, {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt, "Watchdog Description Table"}, @@ -475,6 +477,8 @@ { AcpiOsPrintf ("\n**** Unknown ACPI table type [%4.4s]\n\n", Table->Signature); + fprintf (stderr, "Unknown ACPI table signature [%4.4s], decoding header only\n", + Table->Signature); } } else if (TableData->TableHandler) diff -Nru acpica-unix-20130117/source/common/dmtbdump.c acpica-unix-20130214/source/common/dmtbdump.c --- acpica-unix-20130117/source/common/dmtbdump.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/common/dmtbdump.c 2013-02-14 19:52:34.000000000 +0000 @@ -1796,6 +1796,58 @@ /******************************************************************************* * + * FUNCTION: AcpiDmDumpMtmr + * + * PARAMETERS: Table - A MTMR table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a MTMR + * + ******************************************************************************/ + +void +AcpiDmDumpMtmr ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + UINT32 Offset = sizeof (ACPI_TABLE_MTMR); + ACPI_MTMR_ENTRY *SubTable; + + + /* Main table */ + + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMtmr); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Sub-tables */ + + SubTable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Table, Offset); + while (Offset < Table->Length) + { + /* Common sub-table header */ + + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, + sizeof (ACPI_MTMR_ENTRY), AcpiDmTableInfoMtmr0); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Point to next sub-table */ + + Offset += sizeof (ACPI_MTMR_ENTRY); + SubTable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, SubTable, sizeof (ACPI_MTMR_ENTRY)); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpPcct * * PARAMETERS: Table - A PCCT table @@ -2378,6 +2430,58 @@ /******************************************************************************* * + * FUNCTION: AcpiDmDumpVrtc + * + * PARAMETERS: Table - A VRTC table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a VRTC + * + ******************************************************************************/ + +void +AcpiDmDumpVrtc ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + UINT32 Offset = sizeof (ACPI_TABLE_VRTC); + ACPI_VRTC_ENTRY *SubTable; + + + /* Main table */ + + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoVrtc); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Sub-tables */ + + SubTable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, Table, Offset); + while (Offset < Table->Length) + { + /* Common sub-table header */ + + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, + sizeof (ACPI_VRTC_ENTRY), AcpiDmTableInfoVrtc0); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Point to next sub-table */ + + Offset += sizeof (ACPI_VRTC_ENTRY); + SubTable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, SubTable, sizeof (ACPI_VRTC_ENTRY)); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpWdat * * PARAMETERS: Table - A WDAT table diff -Nru acpica-unix-20130117/source/common/dmtbinfo.c acpica-unix-20130214/source/common/dmtbinfo.c --- acpica-unix-20130117/source/common/dmtbinfo.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/common/dmtbinfo.c 2013-02-14 19:52:34.000000000 +0000 @@ -179,6 +179,7 @@ #define ACPI_MPST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f) #define ACPI_MPST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f) #define ACPI_MSCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f) +#define ACPI_MTMR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MTMR_ENTRY,f) #define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f) #define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f) #define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f) @@ -195,6 +196,7 @@ #define ACPI_SRAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f) #define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f) #define ACPI_SRAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f) +#define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f) #define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f) /* @@ -1644,6 +1646,28 @@ /******************************************************************************* * + * MTMR - MID Timer Table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[] = +{ + ACPI_DMT_TERMINATOR +}; + +/* MTMR Subtables - MTMR Entry */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[] = +{ + {ACPI_DMT_GAS, ACPI_MTMR0_OFFSET (PhysicalAddress), "PhysicalAddress", 0}, + {ACPI_DMT_UINT32, ACPI_MTMR0_OFFSET (Frequency), "Frequency", 0}, + {ACPI_DMT_UINT32, ACPI_MTMR0_OFFSET (Irq), "IRQ", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * PCCT - Platform Communications Channel Table (ACPI 5.0) * ******************************************************************************/ @@ -2035,6 +2059,27 @@ /******************************************************************************* * + * VRTC - Virtual Real Time Clock Table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[] = +{ + ACPI_DMT_TERMINATOR +}; + +/* VRTC Subtables - VRTC Entry */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[] = +{ + {ACPI_DMT_GAS, ACPI_VRTC0_OFFSET (PhysicalAddress), "PhysicalAddress", 0}, + {ACPI_DMT_UINT32, ACPI_VRTC0_OFFSET (Irq), "IRQ", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * WAET - Windows ACPI Emulated devices Table * ******************************************************************************/ diff -Nru acpica-unix-20130117/source/compiler/aslcompile.c acpica-unix-20130214/source/compiler/aslcompile.c --- acpica-unix-20130117/source/compiler/aslcompile.c 2013-01-17 19:47:44.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslcompile.c 2013-02-14 19:52:34.000000000 +0000 @@ -42,6 +42,7 @@ */ #include "aslcompiler.h" +#include "dtcompiler.h" #include #include @@ -343,6 +344,89 @@ /******************************************************************************* * + * FUNCTION: FlCheckForAcpiTable + * + * PARAMETERS: Handle - Open input file + * + * RETURN: Status + * + * DESCRIPTION: Determine if a file seems to be a binary ACPI table, via the + * following checks on what would be the table header: + * 0) File must be at least as long as an ACPI_TABLE_HEADER + * 1) The header length field must match the file size + * 2) Signature, OemId, OemTableId, AslCompilerId must be ASCII + * + ******************************************************************************/ + +ACPI_STATUS +FlCheckForAcpiTable ( + FILE *Handle) +{ + ACPI_TABLE_HEADER Table; + UINT32 FileSize; + size_t Actual; + UINT32 i; + + + /* Read a potential table header */ + + Actual = fread (&Table, 1, sizeof (ACPI_TABLE_HEADER), Handle); + fseek (Handle, 0, SEEK_SET); + + if (Actual < sizeof (ACPI_TABLE_HEADER)) + { + return (AE_ERROR); + } + + /* Header length field must match the file size */ + + FileSize = DtGetFileSize (Handle); + if (Table.Length != FileSize) + { + return (AE_ERROR); + } + + /* + * These fields must be ASCII: + * Signature, OemId, OemTableId, AslCompilerId. + * We allow a NULL terminator in OemId and OemTableId. + */ + for (i = 0; i < ACPI_NAME_SIZE; i++) + { + if (!ACPI_IS_ASCII ((UINT8) Table.Signature[i])) + { + return (AE_ERROR); + } + + if (!ACPI_IS_ASCII ((UINT8) Table.AslCompilerId[i])) + { + return (AE_ERROR); + } + } + + for (i = 0; (i < ACPI_OEM_ID_SIZE) && (Table.OemId[i]); i++) + { + if (!ACPI_IS_ASCII ((UINT8) Table.OemId[i])) + { + return (AE_ERROR); + } + } + + for (i = 0; (i < ACPI_OEM_TABLE_ID_SIZE) && (Table.OemTableId[i]); i++) + { + if (!ACPI_IS_ASCII ((UINT8) Table.OemTableId[i])) + { + return (AE_ERROR); + } + } + + printf ("Binary file appears to be a valid ACPI table, disassembling\n"); + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: FlCheckForAscii * * PARAMETERS: Handle - Open input file diff -Nru acpica-unix-20130117/source/compiler/aslcompiler.h acpica-unix-20130214/source/compiler/aslcompiler.h --- acpica-unix-20130117/source/compiler/aslcompiler.h 2013-01-17 19:47:45.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslcompiler.h 2013-02-14 19:52:34.000000000 +0000 @@ -160,6 +160,10 @@ void); ACPI_STATUS +FlCheckForAcpiTable ( + FILE *Handle); + +ACPI_STATUS FlCheckForAscii ( FILE *Handle, char *Filename, @@ -509,12 +513,28 @@ ACPI_PARSE_OBJECT *Op, char *Name); +ACPI_STATUS +ApCheckObjectType ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT32 ExpectedBtypes, + UINT32 PackageIndex); + void ApDisplayReservedNames ( void); /* + * aslprepkg - ACPI predefined names support for packages + */ +void +ApCheckPackage ( + ACPI_PARSE_OBJECT *ParentOp, + const ACPI_PREDEFINED_INFO *Predefined); + + +/* * asltransform - parse tree transformations */ ACPI_STATUS diff -Nru acpica-unix-20130117/source/compiler/asldefine.h acpica-unix-20130214/source/compiler/asldefine.h --- acpica-unix-20130117/source/compiler/asldefine.h 2013-01-17 19:47:45.000000000 +0000 +++ acpica-unix-20130214/source/compiler/asldefine.h 2013-02-14 19:52:35.000000000 +0000 @@ -125,8 +125,9 @@ /* Types for input files */ #define ASL_INPUT_TYPE_BINARY 0 -#define ASL_INPUT_TYPE_ASCII_ASL 1 -#define ASL_INPUT_TYPE_ASCII_DATA 2 +#define ASL_INPUT_TYPE_ACPI_TABLE 1 +#define ASL_INPUT_TYPE_ASCII_ASL 2 +#define ASL_INPUT_TYPE_ASCII_DATA 3 /* Misc */ diff -Nru acpica-unix-20130117/source/compiler/aslfiles.c acpica-unix-20130214/source/compiler/aslfiles.c --- acpica-unix-20130117/source/compiler/aslfiles.c 2013-01-17 19:47:45.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslfiles.c 2013-02-14 19:52:35.000000000 +0000 @@ -513,6 +513,13 @@ char *Filename; + /* All done for disassembler */ + + if (Gbl_FileType == ASL_INPUT_TYPE_ACPI_TABLE) + { + return (AE_OK); + } + /* Create/Open a hex output file if asked */ if (Gbl_HexOutputFlag) diff -Nru acpica-unix-20130117/source/compiler/aslmain.c acpica-unix-20130214/source/compiler/aslmain.c --- acpica-unix-20130117/source/compiler/aslmain.c 2013-01-17 19:47:45.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslmain.c 2013-02-14 19:52:35.000000000 +0000 @@ -111,7 +111,8 @@ * * RETURN: None * - * DESCRIPTION: Display option help message + * DESCRIPTION: Display option help message. + * Optional items in square brackets. * ******************************************************************************/ @@ -132,7 +133,7 @@ ACPI_OPTION ("-P", "Preprocess only and create preprocessor output file (*.i)"); ACPI_OPTION ("-Pn", "Disable preprocessor"); - printf ("\nGeneral Output:\n"); + printf ("\nGeneral Processing:\n"); ACPI_OPTION ("-p ", "Specify path/filename prefix for all output files"); ACPI_OPTION ("-va", "Disable all errors and warnings (summary only)"); ACPI_OPTION ("-vi", "Less verbose errors and warnings for use with IDEs"); @@ -142,12 +143,7 @@ ACPI_OPTION ("-w1 -w2 -w3", "Set warning reporting level"); ACPI_OPTION ("-we", "Report warnings as errors"); - printf ("\nAML and Data Output Files:\n"); - ACPI_OPTION ("-sa -sc", "Create assembler or C source file (*.asm or *.c)"); - ACPI_OPTION ("-ia -ic", "Create assembler or C include file (*.inc or *.h)"); - ACPI_OPTION ("-ta -tc -ts", "Create assembler, C, or ASL hex table (*.hex)"); - - printf ("\nAML Code Generation:\n"); + printf ("\nAML Code Generation (*.aml):\n"); ACPI_OPTION ("-oa", "Disable all optimizations (compatibility mode)"); ACPI_OPTION ("-of", "Disable constant folding"); ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones"); @@ -156,22 +152,28 @@ ACPI_OPTION ("-in", "Ignore NoOp operators"); ACPI_OPTION ("-r ", "Override table header Revision (1-255)"); - printf ("\nASL Listing Files:\n"); + printf ("\nOptional Source Code Output Files:\n"); + ACPI_OPTION ("-sc -sa", "Create source file in C or assembler (*.c or *.asm)"); + ACPI_OPTION ("-ic -ia", "Create include file in C or assembler (*.h or *.inc)"); + ACPI_OPTION ("-tc -ta -ts", "Create hex AML table in C, assembler, or ASL (*.hex)"); + + printf ("\nOptional Listing Files:\n"); ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)"); ACPI_OPTION ("-ln", "Create namespace file (*.nsp)"); ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)"); - printf ("\nACPI Data Tables:\n"); - ACPI_OPTION ("-G", "Compile custom table containing generic operators"); - ACPI_OPTION ("-vt", "Create verbose templates (full disassembly)"); + printf ("\nData Table Compiler:\n"); + ACPI_OPTION ("-G", "Compile custom table that contains generic operators"); + ACPI_OPTION ("-vt", "Create verbose template files (full disassembly)"); printf ("\nAML Disassembler:\n"); - ACPI_OPTION ("-d [file]", "Disassemble or decode binary ACPI table to file (*.dsl)"); - ACPI_OPTION ("-da [f1,f2]", "Disassemble multiple tables from single namespace"); + ACPI_OPTION ("-d ", "Disassemble or decode binary ACPI tables to file (*.dsl)"); + ACPI_OPTION ("", " (Optional, file type is automatically detected)"); + ACPI_OPTION ("-da ", "Disassemble multiple tables from single namespace"); ACPI_OPTION ("-db", "Do not translate Buffers to Resource Templates"); - ACPI_OPTION ("-dc [file]", "Disassemble AML and immediately compile it"); - ACPI_OPTION ("", "(Obtain DSDT from current system if no input file)"); - ACPI_OPTION ("-e [f1,f2]", "Include ACPI table(s) for external symbol resolution"); + ACPI_OPTION ("-dc ", "Disassemble AML and immediately compile it"); + ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); + ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); ACPI_OPTION ("-in", "Ignore NoOp opcodes"); ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); @@ -186,6 +188,7 @@ printf ("\nDebug Options:\n"); ACPI_OPTION ("-bf -bt", "Create debug file (full or parse tree only) (*.txt)"); ACPI_OPTION ("-f", "Ignore errors, force creation of AML output file(s)"); + ACPI_OPTION ("-m ", "Set internal line buffer size (in Kbytes)"); ACPI_OPTION ("-n", "Parse only, no output generation"); ACPI_OPTION ("-ot", "Display compile times and statistics"); ACPI_OPTION ("-x ", "Set debug level for trace output"); diff -Nru acpica-unix-20130117/source/compiler/aslmessages.h acpica-unix-20130214/source/compiler/aslmessages.h --- acpica-unix-20130117/source/compiler/aslmessages.h 2013-01-17 19:47:45.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslmessages.h 2013-02-14 19:52:35.000000000 +0000 @@ -166,6 +166,7 @@ ASL_MSG_RESERVED_METHOD, ASL_MSG_RESERVED_NO_RETURN_VAL, ASL_MSG_RESERVED_OPERAND_TYPE, + ASL_MSG_RESERVED_PACKAGE_LENGTH, ASL_MSG_RESERVED_RETURN_VALUE, ASL_MSG_RESERVED_USE, ASL_MSG_RESERVED_WORD, @@ -343,6 +344,7 @@ /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", /* ASL_MSG_RESERVED_NO_RETURN_VAL */ "Reserved method should not return a value", /* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", +/* ASL_MSG_RESERVED_PACKAGE_LENGTH */ "Invalid package length for reserved name", /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", /* ASL_MSG_RESERVED_WORD */ "Use of reserved name", diff -Nru acpica-unix-20130117/source/compiler/aslpredef.c acpica-unix-20130214/source/compiler/aslpredef.c --- acpica-unix-20130117/source/compiler/aslpredef.c 2013-01-17 19:47:45.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslpredef.c 2013-02-14 19:52:35.000000000 +0000 @@ -46,6 +46,7 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" #include "acpredef.h" +#include "acnamesp.h" #define _COMPONENT ACPI_COMPILER @@ -65,12 +66,6 @@ char *Name); static void -ApCheckObjectType ( - const char *PredefinedName, - ACPI_PARSE_OBJECT *Op, - UINT32 ExpectedBtypes); - -static void ApGetExpectedTypes ( char *Buffer, UINT32 ExpectedBtypes); @@ -386,7 +381,15 @@ ApCheckObjectType (PredefinedNames[Index].Info.Name, ReturnValueOp, - PredefinedNames[Index].Info.ExpectedBtypes); + PredefinedNames[Index].Info.ExpectedBtypes, + ACPI_NOT_PACKAGE_ELEMENT); + + /* For packages, check the individual package elements */ + + if (ReturnValueOp->Asl.ParseOpcode == PARSEOP_PACKAGE) + { + ApCheckPackage (ReturnValueOp, &PredefinedNames[Index]); + } break; default: @@ -428,6 +431,7 @@ char *Name) { UINT32 Index; + ACPI_PARSE_OBJECT *ObjectOp; /* @@ -456,39 +460,50 @@ "with zero arguments"); return; - default: /* A standard predefined ACPI name */ - - /* - * If this predefined name requires input arguments, then - * it must be implemented as a control method - */ - if (PredefinedNames[Index].Info.ParamCount > 0) - { - AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op, - "with arguments"); - return; - } + default: + break; + } - /* - * If no return value is expected from this predefined name, then - * it follows that it must be implemented as a control method - * (with zero args, because the args > 0 case was handled above) - * Examples are: _DIS, _INI, _IRC, _OFF, _ON, _PSx - */ - if (!PredefinedNames[Index].Info.ExpectedBtypes) - { - AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op, - "with zero arguments"); - return; - } + /* A standard predefined ACPI name */ - /* Typecheck the actual object, it is the next argument */ + /* + * If this predefined name requires input arguments, then + * it must be implemented as a control method + */ + if (PredefinedNames[Index].Info.ParamCount > 0) + { + AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op, + "with arguments"); + return; + } - ApCheckObjectType (PredefinedNames[Index].Info.Name, - Op->Asl.Child->Asl.Next, - PredefinedNames[Index].Info.ExpectedBtypes); + /* + * If no return value is expected from this predefined name, then + * it follows that it must be implemented as a control method + * (with zero args, because the args > 0 case was handled above) + * Examples are: _DIS, _INI, _IRC, _OFF, _ON, _PSx + */ + if (!PredefinedNames[Index].Info.ExpectedBtypes) + { + AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op, + "with zero arguments"); return; } + + /* Typecheck the actual object, it is the next argument */ + + ObjectOp = Op->Asl.Child->Asl.Next; + ApCheckObjectType (PredefinedNames[Index].Info.Name, + Op->Asl.Child->Asl.Next, + PredefinedNames[Index].Info.ExpectedBtypes, + ACPI_NOT_PACKAGE_ELEMENT); + + /* For packages, check the individual package elements */ + + if (ObjectOp->Asl.ParseOpcode == PARSEOP_PACKAGE) + { + ApCheckPackage (ObjectOp, &PredefinedNames[Index]); + } } @@ -646,6 +661,9 @@ * PARAMETERS: PredefinedName - Name of the predefined object we are checking * Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) + * PackageIndex - Index of object within parent package (if + * applicable - ACPI_NOT_PACKAGE_ELEMENT + * otherwise) * * RETURN: None * @@ -655,14 +673,23 @@ * ******************************************************************************/ -static void +ACPI_STATUS ApCheckObjectType ( const char *PredefinedName, ACPI_PARSE_OBJECT *Op, - UINT32 ExpectedBtypes) + UINT32 ExpectedBtypes, + UINT32 PackageIndex) { UINT32 ReturnBtype; + char *TypeName; + + + if (!Op) + { + return (AE_TYPE); + } + /* Map the parse opcode to a bitmapped return type (RTYPE) */ switch (Op->Asl.ParseOpcode) { @@ -671,24 +698,35 @@ case PARSEOP_ONES: case PARSEOP_INTEGER: ReturnBtype = ACPI_RTYPE_INTEGER; - break; - - case PARSEOP_BUFFER: - ReturnBtype = ACPI_RTYPE_BUFFER; + TypeName = "Integer"; break; case PARSEOP_STRING_LITERAL: ReturnBtype = ACPI_RTYPE_STRING; + TypeName = "String"; + break; + + case PARSEOP_BUFFER: + ReturnBtype = ACPI_RTYPE_BUFFER; + TypeName = "Buffer"; break; case PARSEOP_PACKAGE: case PARSEOP_VAR_PACKAGE: ReturnBtype = ACPI_RTYPE_PACKAGE; + TypeName = "Package"; + break; + + case PARSEOP_NAMESEG: + case PARSEOP_NAMESTRING: + ReturnBtype = ACPI_RTYPE_REFERENCE; + TypeName = "Reference"; break; default: /* Not one of the supported object types */ + TypeName = UtGetOpName (Op->Asl.ParseOpcode); goto TypeErrorExit; } @@ -696,7 +734,7 @@ if (ReturnBtype & ExpectedBtypes) { - return; + return (AE_OK); } @@ -706,11 +744,19 @@ ApGetExpectedTypes (StringBuffer, ExpectedBtypes); - sprintf (MsgBuffer, "%s: found %s, requires %s", - PredefinedName, UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); + if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT) + { + sprintf (MsgBuffer, "%s: found %s, %s required", + PredefinedName, TypeName, StringBuffer); + } + else + { + sprintf (MsgBuffer, "%s: found %s at index %u, %s required", + PredefinedName, TypeName, PackageIndex, StringBuffer); + } - AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, - MsgBuffer); + AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer); + return (AE_TYPE); } diff -Nru acpica-unix-20130117/source/compiler/aslprepkg.c acpica-unix-20130214/source/compiler/aslprepkg.c --- acpica-unix-20130117/source/compiler/aslprepkg.c 1970-01-01 00:00:00.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslprepkg.c 2013-02-14 19:52:35.000000000 +0000 @@ -0,0 +1,661 @@ +/****************************************************************************** + * + * Module Name: aslprepkg - support for ACPI predefined name package objects + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2013, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#include "aslcompiler.h" +#include "aslcompiler.y.h" +#include "acpredef.h" + + +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("aslprepkg") + + +/* Local prototypes */ + +static void +ApCheckPackageElements ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT8 Type1, + UINT32 Count1, + UINT8 Type2, + UINT32 Count2); + +static void +ApCheckPackageList ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *ParentOp, + const ACPI_PREDEFINED_INFO *Package, + UINT32 StartIndex, + UINT32 Count); + +static void +ApPackageTooSmall ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT32 Count, + UINT32 ExpectedCount); + +static void +ApZeroLengthPackage ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op); + +static void +ApPackageTooLarge ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT32 Count, + UINT32 ExpectedCount); + + +/******************************************************************************* + * + * FUNCTION: ApCheckPackage + * + * PARAMETERS: ParentOp - Parser op for the package + * Predefined - Pointer to package-specific info for method + * + * RETURN: None + * + * DESCRIPTION: Top-level validation for predefined name return package + * objects. + * + ******************************************************************************/ + +void +ApCheckPackage ( + ACPI_PARSE_OBJECT *ParentOp, + const ACPI_PREDEFINED_INFO *Predefined) +{ + ACPI_PARSE_OBJECT *Op; + const ACPI_PREDEFINED_INFO *Package; + ACPI_STATUS Status; + UINT32 ExpectedCount; + UINT32 Count; + UINT32 i; + + + /* The package info for this name is in the next table entry */ + + Package = Predefined + 1; + + /* First child is the package length */ + + Op = ParentOp->Asl.Child; + Count = (UINT32) Op->Asl.Value.Integer; + + /* + * Most packages must have at least one element. The only exception + * is the variable-length package (ACPI_PTYPE1_VAR). + */ + if (!Count) + { + if (Package->RetInfo.Type != ACPI_PTYPE1_VAR) + { + ApZeroLengthPackage (Predefined->Info.Name, ParentOp); + } + return; + } + + /* Get the first element of the package */ + + Op = Op->Asl.Next; + + /* Decode the package type */ + + switch (Package->RetInfo.Type) + { + case ACPI_PTYPE1_FIXED: + /* + * The package count is fixed and there are no sub-packages + * + * If package is too small, exit. + * If package is larger than expected, issue warning but continue + */ + ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2; + if (Count < ExpectedCount) + { + goto PackageTooSmall; + } + else if (Count > ExpectedCount) + { + ApPackageTooLarge (Predefined->Info.Name, ParentOp, + Count, ExpectedCount); + } + + /* Validate all elements of the package */ + + ApCheckPackageElements (Predefined->Info.Name, Op, + Package->RetInfo.ObjectType1, Package->RetInfo.Count1, + Package->RetInfo.ObjectType2, Package->RetInfo.Count2); + break; + + case ACPI_PTYPE1_VAR: + /* + * The package count is variable, there are no sub-packages, and all + * elements must be of the same type + */ + for (i = 0; i < Count; i++) + { + ApCheckObjectType (Predefined->Info.Name, Op, + Package->RetInfo.ObjectType1, i); + Op = Op->Asl.Next; + } + break; + + case ACPI_PTYPE1_OPTION: + /* + * The package count is variable, there are no sub-packages. There are + * a fixed number of required elements, and a variable number of + * optional elements. + * + * Check if package is at least as large as the minimum required + */ + ExpectedCount = Package->RetInfo3.Count; + if (Count < ExpectedCount) + { + goto PackageTooSmall; + } + + /* Variable number of sub-objects */ + + for (i = 0; i < Count; i++) + { + if (i < Package->RetInfo3.Count) + { + /* These are the required package elements (0, 1, or 2) */ + + ApCheckObjectType (Predefined->Info.Name, Op, + Package->RetInfo3.ObjectType[i], i); + } + else + { + /* These are the optional package elements */ + + ApCheckObjectType (Predefined->Info.Name, Op, + Package->RetInfo3.TailObjectType, i); + } + Op = Op->Asl.Next; + } + break; + + case ACPI_PTYPE2_REV_FIXED: + + /* First element is the (Integer) revision */ + + ApCheckObjectType (Predefined->Info.Name, Op, + ACPI_RTYPE_INTEGER, 0); + + Op = Op->Asl.Next; + Count--; + + /* Examine the sub-packages */ + + ApCheckPackageList (Predefined->Info.Name, Op, + Package, 1, Count); + break; + + case ACPI_PTYPE2_PKG_COUNT: + + /* First element is the (Integer) count of sub-packages to follow */ + + Status = ApCheckObjectType (Predefined->Info.Name, Op, + ACPI_RTYPE_INTEGER, 0); + + /* We must have an integer count from above (otherwise, use Count) */ + + if (ACPI_SUCCESS (Status)) + { + /* + * Count cannot be larger than the parent package length, but allow it + * to be smaller. The >= accounts for the Integer above. + */ + ExpectedCount = (UINT32) Op->Asl.Value.Integer; + if (ExpectedCount >= Count) + { + goto PackageTooSmall; + } + + Count = ExpectedCount; + } + + Op = Op->Asl.Next; + + /* Examine the sub-packages */ + + ApCheckPackageList (Predefined->Info.Name, Op, + Package, 1, Count); + break; + + case ACPI_PTYPE2: + case ACPI_PTYPE2_FIXED: + case ACPI_PTYPE2_MIN: + case ACPI_PTYPE2_COUNT: + case ACPI_PTYPE2_FIX_VAR: + /* + * These types all return a single Package that consists of a + * variable number of sub-Packages. + */ + + /* Examine the sub-packages */ + + ApCheckPackageList (Predefined->Info.Name, Op, + Package, 0, Count); + break; + + default: + return; + } + + return; + +PackageTooSmall: + ApPackageTooSmall (Predefined->Info.Name, ParentOp, + Count, ExpectedCount); +} + + +/******************************************************************************* + * + * FUNCTION: ApCheckPackageElements + * + * PARAMETERS: PredefinedName - Pointer to validation data structure + * Op - Parser op for the package + * Type1 - Object type for first group + * Count1 - Count for first group + * Type2 - Object type for second group + * Count2 - Count for second group + * + * RETURN: None + * + * DESCRIPTION: Validate all elements of a package. Works with packages that + * are defined to contain up to two groups of different object + * types. + * + ******************************************************************************/ + +static void +ApCheckPackageElements ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT8 Type1, + UINT32 Count1, + UINT8 Type2, + UINT32 Count2) +{ + UINT32 i; + + + /* + * Up to two groups of package elements are supported by the data + * structure. All elements in each group must be of the same type. + * The second group can have a count of zero. + * + * Aborts check upon a NULL package element, as this means (at compile + * time) that the remainder of the package elements are also NULL + * (This is the only way to create NULL package elements.) + */ + for (i = 0; (i < Count1) && Op; i++) + { + ApCheckObjectType (PredefinedName, Op, Type1, i); + Op = Op->Asl.Next; + } + + for (i = 0; (i < Count2) && Op; i++) + { + ApCheckObjectType (PredefinedName, Op, Type2, (i + Count1)); + Op = Op->Asl.Next; + } +} + + +/******************************************************************************* + * + * FUNCTION: ApCheckPackageList + * + * PARAMETERS: PredefinedName - Name of the predefined object + * ParentOp - Parser op of the parent package + * Package - Package info for this predefined name + * StartIndex - Index in parent package where list begins + * ParentCount - Element count of parent package + * + * RETURN: None + * + * DESCRIPTION: Validate the individual package elements for a predefined name. + * Handles the cases where the predefined name is defined as a + * Package of Packages (subpackages). These are the types: + * + * ACPI_PTYPE2 + * ACPI_PTYPE2_FIXED + * ACPI_PTYPE2_MIN + * ACPI_PTYPE2_COUNT + * ACPI_PTYPE2_FIX_VAR + * + ******************************************************************************/ + +static void +ApCheckPackageList ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *ParentOp, + const ACPI_PREDEFINED_INFO *Package, + UINT32 StartIndex, + UINT32 ParentCount) +{ + ACPI_PARSE_OBJECT *SubPackageOp = ParentOp; + ACPI_PARSE_OBJECT *Op; + ACPI_STATUS Status; + UINT32 Count; + UINT32 ExpectedCount; + UINT32 i; + UINT32 j; + + + /* + * Validate each subpackage in the parent Package + * + * Note: We ignore NULL package elements on the assumption that + * they will be initialized by the BIOS or other ASL code. + */ + for (i = 0; (i < ParentCount) && SubPackageOp; i++) + { + /* Each object in the list must be of type Package */ + + Status = ApCheckObjectType (PredefinedName, SubPackageOp, + ACPI_RTYPE_PACKAGE, i + StartIndex); + if (ACPI_FAILURE (Status)) + { + goto NextSubpackage; + } + + /* Examine the different types of expected subpackages */ + + Op = SubPackageOp->Asl.Child; + + /* First child is the package length */ + + Count = (UINT32) Op->Asl.Value.Integer; + Op = Op->Asl.Next; + + /* The subpackage must have at least one element */ + + if (!Count) + { + ApZeroLengthPackage (PredefinedName, SubPackageOp); + goto NextSubpackage; + } + + /* + * Decode the package type. + * PTYPE2 indicates that a "package of packages" is expected for + * this name. The various flavors of PTYPE2 indicate the number + * and format of the subpackages. + */ + switch (Package->RetInfo.Type) + { + case ACPI_PTYPE2: + case ACPI_PTYPE2_PKG_COUNT: + case ACPI_PTYPE2_REV_FIXED: + + /* Each subpackage has a fixed number of elements */ + + ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2; + if (Count < ExpectedCount) + { + ApPackageTooSmall (PredefinedName, SubPackageOp, + Count, ExpectedCount); + break; + } + + ApCheckPackageElements (PredefinedName, Op, + Package->RetInfo.ObjectType1, Package->RetInfo.Count1, + Package->RetInfo.ObjectType2, Package->RetInfo.Count2); + break; + + case ACPI_PTYPE2_FIX_VAR: + /* + * Each subpackage has a fixed number of elements and an + * optional element + */ + ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2; + if (Count < ExpectedCount) + { + ApPackageTooSmall (PredefinedName, SubPackageOp, + Count, ExpectedCount); + break; + } + + ApCheckPackageElements (PredefinedName, Op, + Package->RetInfo.ObjectType1, Package->RetInfo.Count1, + Package->RetInfo.ObjectType2, + Count - Package->RetInfo.Count1); + break; + + case ACPI_PTYPE2_FIXED: + + /* Each sub-package has a fixed length */ + + ExpectedCount = Package->RetInfo2.Count; + if (Count < ExpectedCount) + { + ApPackageTooSmall (PredefinedName, SubPackageOp, + Count, ExpectedCount); + break; + } + + /* Check each object/type combination */ + + for (j = 0; j < ExpectedCount; j++) + { + ApCheckObjectType (PredefinedName, Op, + Package->RetInfo2.ObjectType[j], j); + + Op = Op->Asl.Next; + } + break; + + case ACPI_PTYPE2_MIN: + + /* Each sub-package has a variable but minimum length */ + + ExpectedCount = Package->RetInfo.Count1; + if (Count < ExpectedCount) + { + ApPackageTooSmall (PredefinedName, SubPackageOp, + Count, ExpectedCount); + break; + } + + /* Check the type of each sub-package element */ + + ApCheckPackageElements (PredefinedName, Op, + Package->RetInfo.ObjectType1, Count, 0, 0); + break; + + case ACPI_PTYPE2_COUNT: + /* + * First element is the (Integer) count of elements, including + * the count field (the ACPI name is NumElements) + */ + Status = ApCheckObjectType (PredefinedName, Op, + ACPI_RTYPE_INTEGER, 0); + + /* We must have an integer count from above (otherwise, use Count) */ + + if (ACPI_SUCCESS (Status)) + { + /* + * Make sure package is large enough for the Count and is + * is as large as the minimum size + */ + ExpectedCount = (UINT32) Op->Asl.Value.Integer; + + if (Count < ExpectedCount) + { + ApPackageTooSmall (PredefinedName, SubPackageOp, + Count, ExpectedCount); + break; + } + else if (Count > ExpectedCount) + { + ApPackageTooLarge (PredefinedName, SubPackageOp, + Count, ExpectedCount); + } + + /* Some names of this type have a minimum length */ + + if (Count < Package->RetInfo.Count1) + { + ExpectedCount = Package->RetInfo.Count1; + ApPackageTooSmall (PredefinedName, SubPackageOp, + Count, ExpectedCount); + break; + } + + Count = ExpectedCount; + } + + /* Check the type of each sub-package element */ + + Op = Op->Asl.Next; + ApCheckPackageElements (PredefinedName, Op, + Package->RetInfo.ObjectType1, (Count - 1), 0, 0); + break; + + default: + break; + } + +NextSubpackage: + SubPackageOp = SubPackageOp->Asl.Next; + } +} + + +/******************************************************************************* + * + * FUNCTION: ApPackageTooSmall + * + * PARAMETERS: PredefinedName - Name of the predefined object + * Op - Current parser op + * Count - Actual package element count + * ExpectedCount - Expected package element count + * + * RETURN: None + * + * DESCRIPTION: Issue error message for a package that is smaller than + * required. + * + ******************************************************************************/ + +static void +ApPackageTooSmall ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT32 Count, + UINT32 ExpectedCount) +{ + + sprintf (MsgBuffer, "%s: length %u, required minimum is %u", + PredefinedName, Count, ExpectedCount); + + AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, MsgBuffer); +} + + +/******************************************************************************* + * + * FUNCTION: ApZeroLengthPackage + * + * PARAMETERS: PredefinedName - Name of the predefined object + * Op - Current parser op + * + * RETURN: None + * + * DESCRIPTION: Issue error message for a zero-length package (a package that + * is required to have a non-zero length). Variable length + * packages seem to be allowed to have zero length, however. + * Even if not allowed, BIOS code does it. + * + ******************************************************************************/ + +static void +ApZeroLengthPackage ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op) +{ + + sprintf (MsgBuffer, "%s: length is zero", PredefinedName); + + AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, MsgBuffer); +} + + +/******************************************************************************* + * + * FUNCTION: ApPackageTooLarge + * + * PARAMETERS: PredefinedName - Name of the predefined object + * Op - Current parser op + * Count - Actual package element count + * ExpectedCount - Expected package element count + * + * RETURN: None + * + * DESCRIPTION: Issue a remark for a package that is larger than expected. + * + ******************************************************************************/ + +static void +ApPackageTooLarge ( + const char *PredefinedName, + ACPI_PARSE_OBJECT *Op, + UINT32 Count, + UINT32 ExpectedCount) +{ + + sprintf (MsgBuffer, "%s: length is %u, only %u required", + PredefinedName, Count, ExpectedCount); + + AslError (ASL_REMARK, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, MsgBuffer); +} diff -Nru acpica-unix-20130117/source/compiler/aslstartup.c acpica-unix-20130214/source/compiler/aslstartup.c --- acpica-unix-20130117/source/compiler/aslstartup.c 2013-01-17 19:47:46.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslstartup.c 2013-02-14 19:52:35.000000000 +0000 @@ -44,6 +44,7 @@ #include "aslcompiler.h" #include "actables.h" +#include "acdisasm.h" #include "acapps.h" #define _COMPONENT ACPI_COMPILER @@ -66,6 +67,10 @@ AslDetectSourceFileType ( ASL_FILE_INFO *Info); +static ACPI_STATUS +AslDoDisassembly ( + void); + /******************************************************************************* * @@ -224,6 +229,15 @@ ACPI_STATUS Status; + /* Check for a valid binary ACPI table */ + + Status = FlCheckForAcpiTable (Info->Handle); + if (ACPI_SUCCESS (Status)) + { + Type = ASL_INPUT_TYPE_ACPI_TABLE; + goto Cleanup; + } + /* Check for 100% ASCII source file (comments are ignored) */ Status = FlCheckForAscii (Info->Handle, Info->Filename, TRUE); @@ -279,6 +293,86 @@ /******************************************************************************* * + * FUNCTION: AslDoDisassembly + * + * PARAMETERS: None + * + * RETURN: Status + * + * DESCRIPTION: Initiate AML file disassembly. Uses ACPICA subsystem to build + * namespace. + * + ******************************************************************************/ + +static ACPI_STATUS +AslDoDisassembly ( + void) +{ + ACPI_STATUS Status; + + + /* ACPICA subsystem initialization */ + + Status = AdInitialize (); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + Status = AcpiAllocateRootTable (4); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not initialize ACPI Table Manager, %s\n", + AcpiFormatException (Status)); + return (Status); + } + + /* This is where the disassembly happens */ + + AcpiGbl_DbOpt_disasm = TRUE; + Status = AdAmlDisassemble (AslToFile, + Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix, + &Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_GetAllTables); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Check if any control methods were unresolved */ + + AcpiDmUnresolvedWarning (0); + +#if 0 + /* TBD: Handle additional output files for disassembler */ + + Status = FlOpenMiscOutputFiles (Gbl_OutputFilenamePrefix); + NsDisplayNamespace (); +#endif + + /* Shutdown compiler and ACPICA subsystem */ + + AeClearErrorLog (); + (void) AcpiTerminate (); + + /* + * Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the + * .DSL disassembly file, which can now be compiled if requested + */ + if (Gbl_DoCompile) + { + AcpiOsPrintf ("\nCompiling \"%s\"\n", + Gbl_Files[ASL_FILE_INPUT].Filename); + return (AE_CTRL_CONTINUE); + } + + ACPI_FREE (Gbl_Files[ASL_FILE_INPUT].Filename); + Gbl_Files[ASL_FILE_INPUT].Filename = NULL; + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AslDoOneFile * * PARAMETERS: Filename - Name of the file @@ -308,61 +402,11 @@ */ if (Gbl_DisasmFlag || Gbl_GetAllTables) { - /* ACPICA subsystem initialization */ - - Status = AdInitialize (); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - - Status = AcpiAllocateRootTable (4); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("Could not initialize ACPI Table Manager, %s\n", - AcpiFormatException (Status)); - return (Status); - } - - /* This is where the disassembly happens */ - - AcpiGbl_DbOpt_disasm = TRUE; - Status = AdAmlDisassemble (AslToFile, - Gbl_Files[ASL_FILE_INPUT].Filename, - Gbl_OutputFilenamePrefix, - &Gbl_Files[ASL_FILE_INPUT].Filename, - Gbl_GetAllTables); - if (ACPI_FAILURE (Status)) + Status = AslDoDisassembly (); + if (Status != AE_CTRL_CONTINUE) { return (Status); } - -#if 0 - /* TBD: Handle additional output files for disassembler */ - - Status = FlOpenMiscOutputFiles (Gbl_OutputFilenamePrefix); - NsDisplayNamespace (); -#endif - - /* Shutdown compiler and ACPICA subsystem */ - - AeClearErrorLog (); - (void) AcpiTerminate (); - - /* - * Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the - * .DSL disassembly file, which can now be compiled if requested - */ - if (Gbl_DoCompile) - { - AcpiOsPrintf ("\nCompiling \"%s\"\n", - Gbl_Files[ASL_FILE_INPUT].Filename); - } - else - { - Gbl_Files[ASL_FILE_INPUT].Filename = NULL; - return (AE_OK); - } } /* @@ -469,6 +513,21 @@ PrTerminatePreprocessor (); return (AE_OK); + /* + * Binary ACPI table was auto-detected, disassemble it + */ + case ASL_INPUT_TYPE_ACPI_TABLE: + + /* We have what appears to be an ACPI table, disassemble it */ + + FlCloseFile (ASL_FILE_INPUT); + Gbl_DoCompile = FALSE; + Gbl_DisasmFlag = TRUE; + Status = AslDoDisassembly (); + return (Status); + + /* Unknown binary table */ + case ASL_INPUT_TYPE_BINARY: AePrintErrorLog (ASL_FILE_STDERR); diff -Nru acpica-unix-20130117/source/compiler/aslsupport.l acpica-unix-20130214/source/compiler/aslsupport.l --- acpica-unix-20130117/source/compiler/aslsupport.l 2013-01-17 19:47:46.000000000 +0000 +++ acpica-unix-20130214/source/compiler/aslsupport.l 2013-02-14 19:52:36.000000000 +0000 @@ -403,6 +403,9 @@ TotalKeywords++; TotalExecutableOpcodes++; break; + + default: + break; } for (i = 0; (yytext[i] != 0) && (yytext[i] != EOF); i++) @@ -570,7 +573,6 @@ AslInsertLineBuffer (StringChar); DoCharacter: - switch (State) { case ASL_NORMAL_CHAR: @@ -590,6 +592,9 @@ /* String terminator */ goto CompletedString; + + default: + break; } break; @@ -748,6 +753,9 @@ ConvertBuffer[i] = StringChar; i++; continue; + + default: + break; } /* Save the finished character */ diff -Nru acpica-unix-20130117/source/compiler/dtcompiler.h acpica-unix-20130214/source/compiler/dtcompiler.h --- acpica-unix-20130117/source/compiler/dtcompiler.h 2013-01-17 19:47:46.000000000 +0000 +++ acpica-unix-20130214/source/compiler/dtcompiler.h 2013-02-14 19:52:36.000000000 +0000 @@ -444,6 +444,10 @@ void **PFieldList); ACPI_STATUS +DtCompileMtmr ( + void **PFieldList); + +ACPI_STATUS DtCompilePmtt ( void **PFieldList); @@ -472,6 +476,10 @@ void **PFieldList); ACPI_STATUS +DtCompileVrtc ( + void **PFieldList); + +ACPI_STATUS DtCompileWdat ( void **PFieldList); @@ -511,6 +519,7 @@ extern const unsigned char TemplateMchi[]; extern const unsigned char TemplateMpst[]; extern const unsigned char TemplateMsct[]; +extern const unsigned char TemplateMtmr[]; extern const unsigned char TemplatePmtt[]; extern const unsigned char TemplateRsdt[]; extern const unsigned char TemplateS3pt[]; @@ -523,6 +532,7 @@ extern const unsigned char TemplateTcpa[]; extern const unsigned char TemplateTpm2[]; extern const unsigned char TemplateUefi[]; +extern const unsigned char TemplateVrtc[]; extern const unsigned char TemplateWaet[]; extern const unsigned char TemplateWdat[]; extern const unsigned char TemplateWddt[]; diff -Nru acpica-unix-20130117/source/compiler/dttable.c acpica-unix-20130214/source/compiler/dttable.c --- acpica-unix-20130117/source/compiler/dttable.c 2013-01-17 19:47:46.000000000 +0000 +++ acpica-unix-20130214/source/compiler/dttable.c 2013-02-14 19:52:36.000000000 +0000 @@ -1412,6 +1412,31 @@ /****************************************************************************** * + * FUNCTION: DtCompileMtmr + * + * PARAMETERS: List - Current field list pointer + * + * RETURN: Status + * + * DESCRIPTION: Compile MTMR. + * + *****************************************************************************/ + +ACPI_STATUS +DtCompileMtmr ( + void **List) +{ + ACPI_STATUS Status; + + + Status = DtCompileTwoSubtables (List, + AcpiDmTableInfoMtmr, AcpiDmTableInfoMtmr0); + return (Status); +} + + +/****************************************************************************** + * * FUNCTION: DtCompilePmtt * * PARAMETERS: List - Current field list pointer @@ -1974,6 +1999,31 @@ /****************************************************************************** * + * FUNCTION: DtCompileVrtc + * + * PARAMETERS: List - Current field list pointer + * + * RETURN: Status + * + * DESCRIPTION: Compile VRTC. + * + *****************************************************************************/ + +ACPI_STATUS +DtCompileVrtc ( + void **List) +{ + ACPI_STATUS Status; + + + Status = DtCompileTwoSubtables (List, + AcpiDmTableInfoVrtc, AcpiDmTableInfoVrtc0); + return (Status); +} + + +/****************************************************************************** + * * FUNCTION: DtCompileWdat * * PARAMETERS: List - Current field list pointer diff -Nru acpica-unix-20130117/source/compiler/dttemplate.h acpica-unix-20130214/source/compiler/dttemplate.h --- acpica-unix-20130117/source/compiler/dttemplate.h 2013-01-17 19:47:46.000000000 +0000 +++ acpica-unix-20130214/source/compiler/dttemplate.h 2013-02-14 19:52:36.000000000 +0000 @@ -632,6 +632,20 @@ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000088 "........" */ }; +const unsigned char TemplateMtmr[] = +{ + 0x4D,0x54,0x4D,0x52,0x4C,0x00,0x00,0x00, /* 00000000 "MTMRL..." */ + 0x01,0xB0,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */ + 0x03,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x17,0x01,0x13,0x20,0x00,0x20,0x00,0x03, /* 00000020 "... . .." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */ + 0x00,0x20,0x00,0x03,0x00,0x00,0x00,0x00, /* 00000038 ". ......" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */ + 0x00,0x00,0x00,0x00 /* 00000048 "...." */ +}; + const unsigned char TemplatePmtt[] = { 0x50,0x4D,0x54,0x54,0xB4,0x00,0x00,0x00, /* 00000000 "PMTT...." */ @@ -893,6 +907,19 @@ 0x0C,0x0D,0x0E,0x0F,0x00,0x00 /* 00000030 "......" */ }; +const unsigned char TemplateVrtc[] = +{ + 0x56,0x52,0x54,0x43,0x44,0x00,0x00,0x00, /* 00000000 "VRTCD..." */ + 0x01,0xEF,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */ + 0x03,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x17,0x01,0x13,0x20,0x00,0x08,0x00,0x00, /* 00000020 "... ...." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00, /* 00000030 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */ + 0x00,0x00,0x00,0x00 /* 00000040 "...." */ +}; + const unsigned char TemplateWaet[] = { 0x57,0x41,0x45,0x54,0x28,0x00,0x00,0x00, /* 00000000 "WAET(..." */ diff -Nru acpica-unix-20130117/source/components/debugger/dbcmds.c acpica-unix-20130214/source/components/debugger/dbcmds.c --- acpica-unix-20130117/source/components/debugger/dbcmds.c 2013-01-17 19:47:46.000000000 +0000 +++ acpica-unix-20130214/source/components/debugger/dbcmds.c 2013-02-14 19:52:36.000000000 +0000 @@ -1024,6 +1024,8 @@ /* Execute _SRS with the resource list */ + AcpiOsPrintf ("Evaluating _SRS\n"); + Status = AcpiSetCurrentResources (Node, &ReturnBuffer); if (ACPI_FAILURE (Status)) { @@ -1114,8 +1116,8 @@ * FUNCTION: AcpiDbDisplayResources * * PARAMETERS: ObjectArg - String object name or object pointer. - * "*" means "display resources for all - * devices" + * NULL or "*" means "display resources for + * all devices" * * RETURN: None * @@ -1135,7 +1137,7 @@ /* Asterisk means "display resources for all devices" */ - if (!ACPI_STRCMP (ObjectArg, "*")) + if (!ObjectArg || (!ACPI_STRCMP (ObjectArg, "*"))) { (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, AcpiDbDeviceResources, NULL, NULL, NULL); diff -Nru acpica-unix-20130117/source/components/debugger/dbinput.c acpica-unix-20130214/source/components/debugger/dbinput.c --- acpica-unix-20130117/source/components/debugger/dbinput.c 2013-01-17 19:47:47.000000000 +0000 +++ acpica-unix-20130214/source/components/debugger/dbinput.c 2013-02-14 19:52:36.000000000 +0000 @@ -207,7 +207,7 @@ {"PREFIX", 0}, {"QUIT", 0}, {"REFERENCES", 1}, - {"RESOURCES", 1}, + {"RESOURCES", 0}, {"RESULTS", 0}, {"SET", 3}, {"SLEEP", 0}, @@ -272,7 +272,7 @@ {1, " Predefined", "Check all predefined names\n"}, {1, " Prefix []", "Set or Get current execution prefix\n"}, {1, " References ", "Find all references to object at addr\n"}, - {1, " Resources ", "Display Device resources (* = all devices)\n"}, + {1, " Resources [DeviceName]", "Display Device resources (no arg = all devices)\n"}, {1, " Set N ", "Set value for named integer\n"}, {1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"}, {1, " Template ", "Format/dump a Buffer/ResourceTemplate\n"}, diff -Nru acpica-unix-20130117/source/components/disassembler/dmresrc.c acpica-unix-20130214/source/components/disassembler/dmresrc.c --- acpica-unix-20130117/source/components/disassembler/dmresrc.c 2013-01-17 19:47:47.000000000 +0000 +++ acpica-unix-20130214/source/components/disassembler/dmresrc.c 2013-02-14 19:52:37.000000000 +0000 @@ -416,7 +416,7 @@ /* Walk the byte list, abort on any invalid descriptor type or length */ Status = AcpiUtWalkAmlResources (WalkState, Aml, Length, - NULL, (void **) &EndAml); + NULL, ACPI_CAST_INDIRECT_PTR (void, &EndAml)); if (ACPI_FAILURE (Status)) { return (AE_TYPE); diff -Nru acpica-unix-20130117/source/components/dispatcher/dsutils.c acpica-unix-20130214/source/components/dispatcher/dsutils.c --- acpica-unix-20130117/source/components/dispatcher/dsutils.c 2013-01-17 19:47:47.000000000 +0000 +++ acpica-unix-20130214/source/components/dispatcher/dsutils.c 2013-02-14 19:52:37.000000000 +0000 @@ -201,7 +201,7 @@ if (!Op) { ACPI_ERROR ((AE_INFO, "Null Op")); - return_VALUE (TRUE); + return_UINT8 (TRUE); } /* @@ -231,7 +231,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "At Method level, result of [%s] not used\n", AcpiPsGetOpcodeName (Op->Common.AmlOpcode))); - return_VALUE (FALSE); + return_UINT8 (FALSE); } /* Get info on the parent. The RootOp is AML_SCOPE */ @@ -241,7 +241,7 @@ { ACPI_ERROR ((AE_INFO, "Unknown parent opcode Op=%p", Op)); - return_VALUE (FALSE); + return_UINT8 (FALSE); } /* @@ -331,7 +331,7 @@ AcpiPsGetOpcodeName (Op->Common.AmlOpcode), AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op)); - return_VALUE (TRUE); + return_UINT8 (TRUE); ResultNotUsed: @@ -340,7 +340,7 @@ AcpiPsGetOpcodeName (Op->Common.AmlOpcode), AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op)); - return_VALUE (FALSE); + return_UINT8 (FALSE); } diff -Nru acpica-unix-20130117/source/components/events/evevent.c acpica-unix-20130214/source/components/events/evevent.c --- acpica-unix-20130117/source/components/events/evevent.c 2013-01-17 19:47:47.000000000 +0000 +++ acpica-unix-20130214/source/components/events/evevent.c 2013-02-14 19:52:37.000000000 +0000 @@ -291,6 +291,8 @@ * * DESCRIPTION: Clears the status bit for the requested event, calls the * handler that previously registered for the event. + * NOTE: If there is no handler for the event, the event is + * disabled to prevent futher interrupts. * ******************************************************************************/ @@ -309,18 +311,18 @@ ACPI_CLEAR_STATUS); /* - * Make sure we've got a handler. If not, report an error. The event is - * disabled to prevent further interrupts. + * Make sure that a handler exists. If not, report an error + * and disable the event to prevent further interrupts. */ - if (NULL == AcpiGbl_FixedEventHandlers[Event].Handler) + if (!AcpiGbl_FixedEventHandlers[Event].Handler) { (void) AcpiWriteBitRegister ( AcpiGbl_FixedEventInfo[Event].EnableRegisterId, ACPI_DISABLE_EVENT); ACPI_ERROR ((AE_INFO, - "No installed handler for fixed event [0x%08X]", - Event)); + "No installed handler for fixed event - %s (%u), disabling", + AcpiUtGetEventName (Event), Event)); return (ACPI_INTERRUPT_NOT_HANDLED); } diff -Nru acpica-unix-20130117/source/components/events/evgpe.c acpica-unix-20130214/source/components/events/evgpe.c --- acpica-unix-20130117/source/components/events/evgpe.c 2013-01-17 19:47:47.000000000 +0000 +++ acpica-unix-20130214/source/components/events/evgpe.c 2013-02-14 19:52:37.000000000 +0000 @@ -770,7 +770,7 @@ { ACPI_EXCEPTION ((AE_INFO, Status, "Unable to clear GPE%02X", GpeNumber)); - return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); + return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED); } } @@ -788,7 +788,7 @@ { ACPI_EXCEPTION ((AE_INFO, Status, "Unable to disable GPE%02X", GpeNumber)); - return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); + return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED); } /* @@ -846,7 +846,7 @@ break; } - return_VALUE (ACPI_INTERRUPT_HANDLED); + return_UINT32 (ACPI_INTERRUPT_HANDLED); } #endif /* !ACPI_REDUCED_HARDWARE */ diff -Nru acpica-unix-20130117/source/components/events/evsci.c acpica-unix-20130214/source/components/events/evsci.c --- acpica-unix-20130117/source/components/events/evsci.c 2013-01-17 19:47:48.000000000 +0000 +++ acpica-unix-20130214/source/components/events/evsci.c 2013-02-14 19:52:38.000000000 +0000 @@ -101,7 +101,7 @@ InterruptHandled |= AcpiEvGpeDetect (GpeXruptList); AcpiSciCount++; - return_VALUE (InterruptHandled); + return_UINT32 (InterruptHandled); } @@ -137,7 +137,7 @@ InterruptHandled |= AcpiEvGpeDetect (GpeXruptList); - return_VALUE (InterruptHandled); + return_UINT32 (InterruptHandled); } diff -Nru acpica-unix-20130117/source/components/events/evxface.c acpica-unix-20130214/source/components/events/evxface.c --- acpica-unix-20130117/source/components/events/evxface.c 2013-01-17 19:47:48.000000000 +0000 +++ acpica-unix-20130214/source/components/events/evxface.c 2013-02-14 19:52:38.000000000 +0000 @@ -534,9 +534,9 @@ return_ACPI_STATUS (Status); } - /* Don't allow two handlers. */ + /* Do not allow multiple handlers */ - if (NULL != AcpiGbl_FixedEventHandlers[Event].Handler) + if (AcpiGbl_FixedEventHandlers[Event].Handler) { Status = AE_ALREADY_EXISTS; goto Cleanup; @@ -550,7 +550,9 @@ Status = AcpiEnableEvent (Event, 0); if (ACPI_FAILURE (Status)) { - ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event)); + ACPI_WARNING ((AE_INFO, + "Could not enable fixed event - %s (%u)", + AcpiUtGetEventName (Event), Event)); /* Remove the handler */ @@ -560,7 +562,8 @@ else { ACPI_DEBUG_PRINT ((ACPI_DB_INFO, - "Enabled fixed event %X, Handler=%p\n", Event, Handler)); + "Enabled fixed event %s (%X), Handler=%p\n", + AcpiUtGetEventName (Event), Event, Handler)); } @@ -621,11 +624,14 @@ if (ACPI_FAILURE (Status)) { ACPI_WARNING ((AE_INFO, - "Could not write to fixed event enable register 0x%X", Event)); + "Could not disable fixed event - %s (%u)", + AcpiUtGetEventName (Event), Event)); } else { - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Disabled fixed event %X\n", Event)); + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, + "Disabled fixed event - %s (%X)\n", + AcpiUtGetEventName (Event), Event)); } (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS); diff -Nru acpica-unix-20130117/source/components/events/evxfevnt.c acpica-unix-20130214/source/components/events/evxfevnt.c --- acpica-unix-20130117/source/components/events/evxfevnt.c 2013-01-17 19:47:48.000000000 +0000 +++ acpica-unix-20130214/source/components/events/evxfevnt.c 2013-02-14 19:52:38.000000000 +0000 @@ -82,6 +82,13 @@ return_ACPI_STATUS (AE_NO_ACPI_TABLES); } + /* If the Hardware Reduced flag is set, machine is always in acpi mode */ + + if (AcpiGbl_ReducedHardware) + { + return_ACPI_STATUS (AE_OK); + } + /* Check current mode */ if (AcpiHwGetMode() == ACPI_SYS_MODE_ACPI) @@ -131,6 +138,13 @@ ACPI_FUNCTION_TRACE (AcpiDisable); + /* If the Hardware Reduced flag is set, machine is always in acpi mode */ + + if (AcpiGbl_ReducedHardware) + { + return_ACPI_STATUS (AE_OK); + } + if (AcpiHwGetMode() == ACPI_SYS_MODE_LEGACY) { ACPI_DEBUG_PRINT ((ACPI_DB_INIT, diff -Nru acpica-unix-20130117/source/components/executer/exprep.c acpica-unix-20130214/source/components/executer/exprep.c --- acpica-unix-20130117/source/components/executer/exprep.c 2013-01-17 19:47:48.000000000 +0000 +++ acpica-unix-20130214/source/components/executer/exprep.c 2013-02-14 19:52:38.000000000 +0000 @@ -292,7 +292,7 @@ ACPI_ERROR ((AE_INFO, "Unknown field access type 0x%X", Access)); - return_VALUE (0); + return_UINT32 (0); } if (ObjDesc->Common.Type == ACPI_TYPE_BUFFER_FIELD) @@ -306,7 +306,7 @@ } *ReturnByteAlignment = ByteAlignment; - return_VALUE (BitLength); + return_UINT32 (BitLength); } diff -Nru acpica-unix-20130117/source/components/executer/exutils.c acpica-unix-20130214/source/components/executer/exutils.c --- acpica-unix-20130117/source/components/executer/exutils.c 2013-01-17 19:47:48.000000000 +0000 +++ acpica-unix-20130214/source/components/executer/exutils.c 2013-02-14 19:52:38.000000000 +0000 @@ -391,7 +391,7 @@ if (Value == 0) { - return_VALUE (1); + return_UINT32 (1); } CurrentValue = Value; @@ -405,7 +405,7 @@ NumDigits++; } - return_VALUE (NumDigits); + return_UINT32 (NumDigits); } diff -Nru acpica-unix-20130117/source/components/hardware/hwacpi.c acpica-unix-20130214/source/components/hardware/hwacpi.c --- acpica-unix-20130117/source/components/hardware/hwacpi.c 2013-01-17 19:47:48.000000000 +0000 +++ acpica-unix-20130214/source/components/hardware/hwacpi.c 2013-02-14 19:52:38.000000000 +0000 @@ -75,6 +75,14 @@ ACPI_FUNCTION_TRACE (HwSetMode); + + /* If the Hardware Reduced flag is set, machine is always in acpi mode */ + + if (AcpiGbl_ReducedHardware) + { + return_ACPI_STATUS (AE_OK); + } + /* * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, * system does not support mode transition. @@ -180,28 +188,35 @@ ACPI_FUNCTION_TRACE (HwGetMode); + /* If the Hardware Reduced flag is set, machine is always in acpi mode */ + + if (AcpiGbl_ReducedHardware) + { + return_UINT32 (ACPI_SYS_MODE_ACPI); + } + /* * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, * system does not support mode transition. */ if (!AcpiGbl_FADT.SmiCommand) { - return_VALUE (ACPI_SYS_MODE_ACPI); + return_UINT32 (ACPI_SYS_MODE_ACPI); } Status = AcpiReadBitRegister (ACPI_BITREG_SCI_ENABLE, &Value); if (ACPI_FAILURE (Status)) { - return_VALUE (ACPI_SYS_MODE_LEGACY); + return_UINT32 (ACPI_SYS_MODE_LEGACY); } if (Value) { - return_VALUE (ACPI_SYS_MODE_ACPI); + return_UINT32 (ACPI_SYS_MODE_ACPI); } else { - return_VALUE (ACPI_SYS_MODE_LEGACY); + return_UINT32 (ACPI_SYS_MODE_LEGACY); } } diff -Nru acpica-unix-20130117/source/components/namespace/nsconvert.c acpica-unix-20130214/source/components/namespace/nsconvert.c --- acpica-unix-20130117/source/components/namespace/nsconvert.c 1970-01-01 00:00:00.000000000 +0000 +++ acpica-unix-20130214/source/components/namespace/nsconvert.c 2013-02-14 19:52:39.000000000 +0000 @@ -0,0 +1,481 @@ +/****************************************************************************** + * + * Module Name: nsconvert - Object conversions for objects returned by + * predefined methods + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2013, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#define __NSCONVERT_C__ + +#include "acpi.h" +#include "accommon.h" +#include "acnamesp.h" +#include "acinterp.h" +#include "acpredef.h" +#include "amlresrc.h" + +#define _COMPONENT ACPI_NAMESPACE + ACPI_MODULE_NAME ("nsconvert") + + +/******************************************************************************* + * + * FUNCTION: AcpiNsConvertToInteger + * + * PARAMETERS: OriginalObject - Object to be converted + * ReturnObject - Where the new converted object is returned + * + * RETURN: Status. AE_OK if conversion was successful. + * + * DESCRIPTION: Attempt to convert a String/Buffer object to an Integer. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsConvertToInteger ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject) +{ + ACPI_OPERAND_OBJECT *NewObject; + ACPI_STATUS Status; + UINT64 Value = 0; + UINT32 i; + + + switch (OriginalObject->Common.Type) + { + case ACPI_TYPE_STRING: + + /* String-to-Integer conversion */ + + Status = AcpiUtStrtoul64 (OriginalObject->String.Pointer, + ACPI_ANY_BASE, &Value); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + break; + + case ACPI_TYPE_BUFFER: + + /* Buffer-to-Integer conversion. Max buffer size is 64 bits. */ + + if (OriginalObject->Buffer.Length > 8) + { + return (AE_AML_OPERAND_TYPE); + } + + /* Extract each buffer byte to create the integer */ + + for (i = 0; i < OriginalObject->Buffer.Length; i++) + { + Value |= ((UINT64) OriginalObject->Buffer.Pointer[i] << (i * 8)); + } + break; + + default: + return (AE_AML_OPERAND_TYPE); + } + + NewObject = AcpiUtCreateIntegerObject (Value); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + + *ReturnObject = NewObject; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiNsConvertToString + * + * PARAMETERS: OriginalObject - Object to be converted + * ReturnObject - Where the new converted object is returned + * + * RETURN: Status. AE_OK if conversion was successful. + * + * DESCRIPTION: Attempt to convert a Integer/Buffer object to a String. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsConvertToString ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject) +{ + ACPI_OPERAND_OBJECT *NewObject; + ACPI_SIZE Length; + ACPI_STATUS Status; + + + switch (OriginalObject->Common.Type) + { + case ACPI_TYPE_INTEGER: + /* + * Integer-to-String conversion. Commonly, convert + * an integer of value 0 to a NULL string. The last element of + * _BIF and _BIX packages occasionally need this fix. + */ + if (OriginalObject->Integer.Value == 0) + { + /* Allocate a new NULL string object */ + + NewObject = AcpiUtCreateStringObject (0); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + } + else + { + Status = AcpiExConvertToString (OriginalObject, &NewObject, + ACPI_IMPLICIT_CONVERT_HEX); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + break; + + case ACPI_TYPE_BUFFER: + /* + * Buffer-to-String conversion. Use a ToString + * conversion, no transform performed on the buffer data. The best + * example of this is the _BIF method, where the string data from + * the battery is often (incorrectly) returned as buffer object(s). + */ + Length = 0; + while ((Length < OriginalObject->Buffer.Length) && + (OriginalObject->Buffer.Pointer[Length])) + { + Length++; + } + + /* Allocate a new string object */ + + NewObject = AcpiUtCreateStringObject (Length); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + + /* + * Copy the raw buffer data with no transform. String is already NULL + * terminated at Length+1. + */ + ACPI_MEMCPY (NewObject->String.Pointer, + OriginalObject->Buffer.Pointer, Length); + break; + + default: + return (AE_AML_OPERAND_TYPE); + } + + *ReturnObject = NewObject; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiNsConvertToBuffer + * + * PARAMETERS: OriginalObject - Object to be converted + * ReturnObject - Where the new converted object is returned + * + * RETURN: Status. AE_OK if conversion was successful. + * + * DESCRIPTION: Attempt to convert a Integer/String/Package object to a Buffer. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsConvertToBuffer ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject) +{ + ACPI_OPERAND_OBJECT *NewObject; + ACPI_STATUS Status; + ACPI_OPERAND_OBJECT **Elements; + UINT32 *DwordBuffer; + UINT32 Count; + UINT32 i; + + + switch (OriginalObject->Common.Type) + { + case ACPI_TYPE_INTEGER: + /* + * Integer-to-Buffer conversion. + * Convert the Integer to a packed-byte buffer. _MAT and other + * objects need this sometimes, if a read has been performed on a + * Field object that is less than or equal to the global integer + * size (32 or 64 bits). + */ + Status = AcpiExConvertToBuffer (OriginalObject, &NewObject); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + break; + + case ACPI_TYPE_STRING: + + /* String-to-Buffer conversion. Simple data copy */ + + NewObject = AcpiUtCreateBufferObject (OriginalObject->String.Length); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + + ACPI_MEMCPY (NewObject->Buffer.Pointer, + OriginalObject->String.Pointer, OriginalObject->String.Length); + break; + + case ACPI_TYPE_PACKAGE: + /* + * This case is often seen for predefined names that must return a + * Buffer object with multiple DWORD integers within. For example, + * _FDE and _GTM. The Package can be converted to a Buffer. + */ + + /* All elements of the Package must be integers */ + + Elements = OriginalObject->Package.Elements; + Count = OriginalObject->Package.Count; + + for (i = 0; i < Count; i++) + { + if ((!*Elements) || + ((*Elements)->Common.Type != ACPI_TYPE_INTEGER)) + { + return (AE_AML_OPERAND_TYPE); + } + Elements++; + } + + /* Create the new buffer object to replace the Package */ + + NewObject = AcpiUtCreateBufferObject (ACPI_MUL_4 (Count)); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + + /* Copy the package elements (integers) to the buffer as DWORDs */ + + Elements = OriginalObject->Package.Elements; + DwordBuffer = ACPI_CAST_PTR (UINT32, NewObject->Buffer.Pointer); + + for (i = 0; i < Count; i++) + { + *DwordBuffer = (UINT32) (*Elements)->Integer.Value; + DwordBuffer++; + Elements++; + } + break; + + default: + return (AE_AML_OPERAND_TYPE); + } + + *ReturnObject = NewObject; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiNsConvertToUnicode + * + * PARAMETERS: OriginalObject - ASCII String Object to be converted + * ReturnObject - Where the new converted object is returned + * + * RETURN: Status. AE_OK if conversion was successful. + * + * DESCRIPTION: Attempt to convert a String object to a Unicode string Buffer. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsConvertToUnicode ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject) +{ + ACPI_OPERAND_OBJECT *NewObject; + char *AsciiString; + UINT16 *UnicodeBuffer; + UINT32 UnicodeLength; + UINT32 i; + + + if (!OriginalObject) + { + return (AE_OK); + } + + /* If a Buffer was returned, it must be at least two bytes long */ + + if (OriginalObject->Common.Type == ACPI_TYPE_BUFFER) + { + if (OriginalObject->Buffer.Length < 2) + { + return (AE_AML_OPERAND_VALUE); + } + + *ReturnObject = NULL; + return (AE_OK); + } + + /* + * The original object is an ASCII string. Convert this string to + * a unicode buffer. + */ + AsciiString = OriginalObject->String.Pointer; + UnicodeLength = (OriginalObject->String.Length * 2) + 2; + + /* Create a new buffer object for the Unicode data */ + + NewObject = AcpiUtCreateBufferObject (UnicodeLength); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + + UnicodeBuffer = ACPI_CAST_PTR (UINT16, NewObject->Buffer.Pointer); + + /* Convert ASCII to Unicode */ + + for (i = 0; i < OriginalObject->String.Length; i++) + { + UnicodeBuffer[i] = (UINT16) AsciiString[i]; + } + + *ReturnObject = NewObject; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiNsConvertToResource + * + * PARAMETERS: OriginalObject - Object to be converted + * ReturnObject - Where the new converted object is returned + * + * RETURN: Status. AE_OK if conversion was successful + * + * DESCRIPTION: Attempt to convert a Integer object to a ResourceTemplate + * Buffer. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsConvertToResource ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject) +{ + ACPI_OPERAND_OBJECT *NewObject; + UINT8 *Buffer; + + + /* + * We can fix the following cases for an expected resource template: + * 1. No return value (interpreter slack mode is disabled) + * 2. A "Return (Zero)" statement + * 3. A "Return empty buffer" statement + * + * We will return a buffer containing a single EndTag + * resource descriptor. + */ + if (OriginalObject) + { + switch (OriginalObject->Common.Type) + { + case ACPI_TYPE_INTEGER: + + /* We can only repair an Integer==0 */ + + if (OriginalObject->Integer.Value) + { + return (AE_AML_OPERAND_TYPE); + } + break; + + case ACPI_TYPE_BUFFER: + + if (OriginalObject->Buffer.Length) + { + /* Additional checks can be added in the future */ + + *ReturnObject = NULL; + return (AE_OK); + } + break; + + case ACPI_TYPE_STRING: + default: + + return (AE_AML_OPERAND_TYPE); + } + } + + /* Create the new buffer object for the resource descriptor */ + + NewObject = AcpiUtCreateBufferObject (2); + if (!NewObject) + { + return (AE_NO_MEMORY); + } + + Buffer = ACPI_CAST_PTR (UINT8, NewObject->Buffer.Pointer); + + /* Initialize the Buffer with a single EndTag descriptor */ + + Buffer[0] = (ACPI_RESOURCE_NAME_END_TAG | ASL_RDESC_END_TAG_SIZE); + Buffer[1] = 0x00; + + *ReturnObject = NewObject; + return (AE_OK); +} diff -Nru acpica-unix-20130117/source/components/namespace/nspredef.c acpica-unix-20130214/source/components/namespace/nspredef.c --- acpica-unix-20130117/source/components/namespace/nspredef.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/namespace/nspredef.c 2013-02-14 19:52:39.000000000 +0000 @@ -87,6 +87,11 @@ char *Buffer, UINT32 ExpectedBtypes); +static UINT32 +AcpiNsGetBitmappedType ( + ACPI_OPERAND_OBJECT *ReturnObject); + + /* * Names for the types that can be returned by the predefined objects. * Used for warning messages. Must be in the same order as the ACPI_RTYPEs @@ -124,7 +129,6 @@ ACPI_STATUS ReturnStatus, ACPI_OPERAND_OBJECT **ReturnObjectPtr) { - ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr; ACPI_STATUS Status = AE_OK; const ACPI_PREDEFINED_INFO *Predefined; char *Pathname; @@ -167,26 +171,6 @@ } /* - * If there is no return value, check if we require a return value for - * this predefined name. Either one return value is expected, or none, - * for both methods and other objects. - * - * Exit now if there is no return object. Warning if one was expected. - */ - if (!ReturnObject) - { - if ((Predefined->Info.ExpectedBtypes) && - (!(Predefined->Info.ExpectedBtypes & ACPI_RTYPE_NONE))) - { - ACPI_WARN_PREDEFINED ((AE_INFO, Pathname, ACPI_WARN_ALWAYS, - "Missing expected return value")); - - Status = AE_AML_NO_RETURN_VALUE; - } - goto Cleanup; - } - - /* * Return value validation and possible repair. * * 1) Don't perform return value validation/repair if this feature @@ -447,30 +431,13 @@ { ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr; ACPI_STATUS Status = AE_OK; - UINT32 ReturnBtype; char TypeBuffer[48]; /* Room for 5 types */ - /* - * If we get a NULL ReturnObject here, it is a NULL package element. - * Since all extraneous NULL package elements were removed earlier by a - * call to AcpiNsRemoveNullElements, this is an unexpected NULL element. - * We will attempt to repair it. - */ - if (!ReturnObject) - { - Status = AcpiNsRepairNullElement (Data, ExpectedBtypes, - PackageIndex, ReturnObjectPtr); - if (ACPI_SUCCESS (Status)) - { - return (AE_OK); /* Repair was successful */ - } - goto TypeErrorExit; - } - /* A Namespace node should not get here, but make sure */ - if (ACPI_GET_DESCRIPTOR_TYPE (ReturnObject) == ACPI_DESC_TYPE_NAMED) + if (ReturnObject && + ACPI_GET_DESCRIPTOR_TYPE (ReturnObject) == ACPI_DESC_TYPE_NAMED) { ACPI_WARN_PREDEFINED ((AE_INFO, Data->Pathname, Data->NodeFlags, "Invalid return type - Found a Namespace node [%4.4s] type %s", @@ -487,56 +454,26 @@ * from all of the predefined names (including elements of returned * packages) */ - switch (ReturnObject->Common.Type) + Data->ReturnBtype = AcpiNsGetBitmappedType (ReturnObject); + if (Data->ReturnBtype == ACPI_RTYPE_ANY) { - case ACPI_TYPE_INTEGER: - ReturnBtype = ACPI_RTYPE_INTEGER; - break; - - case ACPI_TYPE_BUFFER: - ReturnBtype = ACPI_RTYPE_BUFFER; - break; - - case ACPI_TYPE_STRING: - ReturnBtype = ACPI_RTYPE_STRING; - break; - - case ACPI_TYPE_PACKAGE: - ReturnBtype = ACPI_RTYPE_PACKAGE; - break; - - case ACPI_TYPE_LOCAL_REFERENCE: - ReturnBtype = ACPI_RTYPE_REFERENCE; - break; - - default: /* Not one of the supported objects, must be incorrect */ - goto TypeErrorExit; } - /* Is the object one of the expected types? */ + /* For reference objects, check that the reference type is correct */ - if (ReturnBtype & ExpectedBtypes) + if ((Data->ReturnBtype & ExpectedBtypes) == ACPI_RTYPE_REFERENCE) { - /* For reference objects, check that the reference type is correct */ - - if (ReturnObject->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) - { - Status = AcpiNsCheckReference (Data, ReturnObject); - } - + Status = AcpiNsCheckReference (Data, ReturnObject); return (Status); } - /* Type mismatch -- attempt repair of the returned object */ + /* Attempt simple repair of the returned object if necessary */ - Status = AcpiNsRepairObject (Data, ExpectedBtypes, + Status = AcpiNsSimpleRepair (Data, ExpectedBtypes, PackageIndex, ReturnObjectPtr); - if (ACPI_SUCCESS (Status)) - { - return (AE_OK); /* Repair was successful */ - } + return (Status); TypeErrorExit: @@ -606,6 +543,67 @@ /******************************************************************************* * + * FUNCTION: AcpiNsGetBitmappedType + * + * PARAMETERS: ReturnObject - Object returned from method/obj evaluation + * + * RETURN: Object return type. ACPI_RTYPE_ANY indicates that the object + * type is not supported. ACPI_RTYPE_NONE indicates that no + * object was returned (ReturnObject is NULL). + * + * DESCRIPTION: Convert object type into a bitmapped object return type. + * + ******************************************************************************/ + +static UINT32 +AcpiNsGetBitmappedType ( + ACPI_OPERAND_OBJECT *ReturnObject) +{ + UINT32 ReturnBtype; + + + if (!ReturnObject) + { + return (ACPI_RTYPE_NONE); + } + + /* Map ACPI_OBJECT_TYPE to internal bitmapped type */ + + switch (ReturnObject->Common.Type) + { + case ACPI_TYPE_INTEGER: + ReturnBtype = ACPI_RTYPE_INTEGER; + break; + + case ACPI_TYPE_BUFFER: + ReturnBtype = ACPI_RTYPE_BUFFER; + break; + + case ACPI_TYPE_STRING: + ReturnBtype = ACPI_RTYPE_STRING; + break; + + case ACPI_TYPE_PACKAGE: + ReturnBtype = ACPI_RTYPE_PACKAGE; + break; + + case ACPI_TYPE_LOCAL_REFERENCE: + ReturnBtype = ACPI_RTYPE_REFERENCE; + break; + + default: + /* Not one of the supported objects, must be incorrect */ + + ReturnBtype = ACPI_RTYPE_ANY; + break; + } + + return (ReturnBtype); +} + + +/******************************************************************************* + * * FUNCTION: AcpiNsGetExpectedTypes * * PARAMETERS: Buffer - Pointer to where the string is returned diff -Nru acpica-unix-20130117/source/components/namespace/nsprepkg.c acpica-unix-20130214/source/components/namespace/nsprepkg.c --- acpica-unix-20130117/source/components/namespace/nsprepkg.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/namespace/nsprepkg.c 2013-02-14 19:52:39.000000000 +0000 @@ -122,10 +122,17 @@ Elements = ReturnObject->Package.Elements; Count = ReturnObject->Package.Count; - /* The package must have at least one element, else invalid */ - + /* + * Most packages must have at least one element. The only exception + * is the variable-length package (ACPI_PTYPE1_VAR). + */ if (!Count) { + if (Package->RetInfo.Type == ACPI_PTYPE1_VAR) + { + return (AE_OK); + } + ACPI_WARN_PREDEFINED ((AE_INFO, Data->Pathname, Data->NodeFlags, "Return Package has no elements (empty)")); diff -Nru acpica-unix-20130117/source/components/namespace/nsrepair.c acpica-unix-20130214/source/components/namespace/nsrepair.c --- acpica-unix-20130117/source/components/namespace/nsrepair.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/namespace/nsrepair.c 2013-02-14 19:52:39.000000000 +0000 @@ -48,6 +48,7 @@ #include "acnamesp.h" #include "acinterp.h" #include "acpredef.h" +#include "amlresrc.h" #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME ("nsrepair") @@ -74,6 +75,11 @@ * Buffer -> String * Buffer -> Package of Integers * Package -> Package of one Package + * + * Additional conversions that are available: + * Convert a null return or zero return value to an EndTag descriptor + * Convert an ASCII string to a Unicode buffer + * * An incorrect standalone object is wrapped with required outer package * * Additional possible repairs: @@ -84,25 +90,46 @@ /* Local prototypes */ -static ACPI_STATUS -AcpiNsConvertToInteger ( - ACPI_OPERAND_OBJECT *OriginalObject, - ACPI_OPERAND_OBJECT **ReturnObject); +static const ACPI_SIMPLE_REPAIR_INFO * +AcpiNsMatchSimpleRepair ( + ACPI_NAMESPACE_NODE *Node, + UINT32 ReturnBtype, + UINT32 PackageIndex); -static ACPI_STATUS -AcpiNsConvertToString ( - ACPI_OPERAND_OBJECT *OriginalObject, - ACPI_OPERAND_OBJECT **ReturnObject); -static ACPI_STATUS -AcpiNsConvertToBuffer ( - ACPI_OPERAND_OBJECT *OriginalObject, - ACPI_OPERAND_OBJECT **ReturnObject); +/* + * Special but simple repairs for some names. + * + * 2nd argument: Unexpected types that can be repaired + */ +static const ACPI_SIMPLE_REPAIR_INFO AcpiObjectRepairInfo[] = +{ + /* Resource descriptor conversions */ + + { "_CRS", ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER | ACPI_RTYPE_NONE, + ACPI_NOT_PACKAGE_ELEMENT, + AcpiNsConvertToResource }, + { "_DMA", ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER | ACPI_RTYPE_NONE, + ACPI_NOT_PACKAGE_ELEMENT, + AcpiNsConvertToResource }, + { "_PRS", ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER | ACPI_RTYPE_NONE, + ACPI_NOT_PACKAGE_ELEMENT, + AcpiNsConvertToResource }, + + /* Unicode conversions */ + + { "_MLS", ACPI_RTYPE_STRING, 1, + AcpiNsConvertToUnicode }, + { "_STR", ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER, + ACPI_NOT_PACKAGE_ELEMENT, + AcpiNsConvertToUnicode }, + { {0,0,0,0}, 0, 0, NULL } /* Table terminator */ +}; /******************************************************************************* * - * FUNCTION: AcpiNsRepairObject + * FUNCTION: AcpiNsSimpleRepair * * PARAMETERS: Data - Pointer to validation data structure * ExpectedBtypes - Object types expected @@ -120,26 +147,84 @@ ******************************************************************************/ ACPI_STATUS -AcpiNsRepairObject ( +AcpiNsSimpleRepair ( ACPI_PREDEFINED_DATA *Data, UINT32 ExpectedBtypes, UINT32 PackageIndex, ACPI_OPERAND_OBJECT **ReturnObjectPtr) { ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr; - ACPI_OPERAND_OBJECT *NewObject; + ACPI_OPERAND_OBJECT *NewObject = NULL; ACPI_STATUS Status; + const ACPI_SIMPLE_REPAIR_INFO *Predefined; - ACPI_FUNCTION_NAME (NsRepairObject); + ACPI_FUNCTION_NAME (NsSimpleRepair); /* + * Special repairs for certain names that are in the repair table. + * Check if this name is in the list of repairable names. + */ + Predefined = AcpiNsMatchSimpleRepair (Data->Node, + Data->ReturnBtype, PackageIndex); + if (Predefined) + { + if (!ReturnObject) + { + ACPI_WARN_PREDEFINED ((AE_INFO, Data->Pathname, + ACPI_WARN_ALWAYS, "Missing expected return value")); + } + + Status = Predefined->ObjectConverter (ReturnObject, &NewObject); + if (ACPI_FAILURE (Status)) + { + /* A fatal error occurred during a conversion */ + + ACPI_EXCEPTION ((AE_INFO, Status, + "During return object analysis")); + return (Status); + } + if (NewObject) + { + goto ObjectRepaired; + } + } + + /* + * Do not perform simple object repair unless the return type is not + * expected. + */ + if (Data->ReturnBtype & ExpectedBtypes) + { + return (AE_OK); + } + + /* * At this point, we know that the type of the returned object was not * one of the expected types for this predefined name. Attempt to * repair the object by converting it to one of the expected object * types for this predefined name. */ + + /* + * If there is no return value, check if we require a return value for + * this predefined name. Either one return value is expected, or none, + * for both methods and other objects. + * + * Exit now if there is no return object. Warning if one was expected. + */ + if (!ReturnObject) + { + if (ExpectedBtypes && (!(ExpectedBtypes & ACPI_RTYPE_NONE))) + { + ACPI_WARN_PREDEFINED ((AE_INFO, Data->Pathname, + ACPI_WARN_ALWAYS, "Missing expected return value")); + + return (AE_AML_NO_RETURN_VALUE); + } + } + if (ExpectedBtypes & ACPI_RTYPE_INTEGER) { Status = AcpiNsConvertToInteger (ReturnObject, &NewObject); @@ -240,273 +325,52 @@ } -/******************************************************************************* - * - * FUNCTION: AcpiNsConvertToInteger - * - * PARAMETERS: OriginalObject - Object to be converted - * ReturnObject - Where the new converted object is returned - * - * RETURN: Status. AE_OK if conversion was successful. - * - * DESCRIPTION: Attempt to convert a String/Buffer object to an Integer. - * - ******************************************************************************/ - -static ACPI_STATUS -AcpiNsConvertToInteger ( - ACPI_OPERAND_OBJECT *OriginalObject, - ACPI_OPERAND_OBJECT **ReturnObject) -{ - ACPI_OPERAND_OBJECT *NewObject; - ACPI_STATUS Status; - UINT64 Value = 0; - UINT32 i; - - - switch (OriginalObject->Common.Type) - { - case ACPI_TYPE_STRING: - - /* String-to-Integer conversion */ - - Status = AcpiUtStrtoul64 (OriginalObject->String.Pointer, - ACPI_ANY_BASE, &Value); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - break; - - case ACPI_TYPE_BUFFER: - - /* Buffer-to-Integer conversion. Max buffer size is 64 bits. */ - - if (OriginalObject->Buffer.Length > 8) - { - return (AE_AML_OPERAND_TYPE); - } - - /* Extract each buffer byte to create the integer */ - - for (i = 0; i < OriginalObject->Buffer.Length; i++) - { - Value |= ((UINT64) OriginalObject->Buffer.Pointer[i] << (i * 8)); - } - break; - - default: - return (AE_AML_OPERAND_TYPE); - } - - NewObject = AcpiUtCreateIntegerObject (Value); - if (!NewObject) - { - return (AE_NO_MEMORY); - } - - *ReturnObject = NewObject; - return (AE_OK); -} - - -/******************************************************************************* +/****************************************************************************** * - * FUNCTION: AcpiNsConvertToString + * FUNCTION: AcpiNsMatchSimpleRepair * - * PARAMETERS: OriginalObject - Object to be converted - * ReturnObject - Where the new converted object is returned + * PARAMETERS: Node - Namespace node for the method/object + * ReturnBtype - Object type that was returned + * PackageIndex - Index of object within parent package (if + * applicable - ACPI_NOT_PACKAGE_ELEMENT + * otherwise) * - * RETURN: Status. AE_OK if conversion was successful. + * RETURN: Pointer to entry in repair table. NULL indicates not found. * - * DESCRIPTION: Attempt to convert a Integer/Buffer object to a String. + * DESCRIPTION: Check an object name against the repairable object list. * - ******************************************************************************/ + *****************************************************************************/ -static ACPI_STATUS -AcpiNsConvertToString ( - ACPI_OPERAND_OBJECT *OriginalObject, - ACPI_OPERAND_OBJECT **ReturnObject) +static const ACPI_SIMPLE_REPAIR_INFO * +AcpiNsMatchSimpleRepair ( + ACPI_NAMESPACE_NODE *Node, + UINT32 ReturnBtype, + UINT32 PackageIndex) { - ACPI_OPERAND_OBJECT *NewObject; - ACPI_SIZE Length; - ACPI_STATUS Status; + const ACPI_SIMPLE_REPAIR_INFO *ThisName; - switch (OriginalObject->Common.Type) - { - case ACPI_TYPE_INTEGER: - /* - * Integer-to-String conversion. Commonly, convert - * an integer of value 0 to a NULL string. The last element of - * _BIF and _BIX packages occasionally need this fix. - */ - if (OriginalObject->Integer.Value == 0) - { - /* Allocate a new NULL string object */ + /* Search info table for a repairable predefined method/object name */ - NewObject = AcpiUtCreateStringObject (0); - if (!NewObject) - { - return (AE_NO_MEMORY); - } - } - else - { - Status = AcpiExConvertToString (OriginalObject, &NewObject, - ACPI_IMPLICIT_CONVERT_HEX); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - } - break; - - case ACPI_TYPE_BUFFER: - /* - * Buffer-to-String conversion. Use a ToString - * conversion, no transform performed on the buffer data. The best - * example of this is the _BIF method, where the string data from - * the battery is often (incorrectly) returned as buffer object(s). - */ - Length = 0; - while ((Length < OriginalObject->Buffer.Length) && - (OriginalObject->Buffer.Pointer[Length])) - { - Length++; - } - - /* Allocate a new string object */ - - NewObject = AcpiUtCreateStringObject (Length); - if (!NewObject) - { - return (AE_NO_MEMORY); - } - - /* - * Copy the raw buffer data with no transform. String is already NULL - * terminated at Length+1. - */ - ACPI_MEMCPY (NewObject->String.Pointer, - OriginalObject->Buffer.Pointer, Length); - break; - - default: - return (AE_AML_OPERAND_TYPE); - } - - *ReturnObject = NewObject; - return (AE_OK); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiNsConvertToBuffer - * - * PARAMETERS: OriginalObject - Object to be converted - * ReturnObject - Where the new converted object is returned - * - * RETURN: Status. AE_OK if conversion was successful. - * - * DESCRIPTION: Attempt to convert a Integer/String/Package object to a Buffer. - * - ******************************************************************************/ - -static ACPI_STATUS -AcpiNsConvertToBuffer ( - ACPI_OPERAND_OBJECT *OriginalObject, - ACPI_OPERAND_OBJECT **ReturnObject) -{ - ACPI_OPERAND_OBJECT *NewObject; - ACPI_STATUS Status; - ACPI_OPERAND_OBJECT **Elements; - UINT32 *DwordBuffer; - UINT32 Count; - UINT32 i; - - - switch (OriginalObject->Common.Type) + ThisName = AcpiObjectRepairInfo; + while (ThisName->ObjectConverter) { - case ACPI_TYPE_INTEGER: - /* - * Integer-to-Buffer conversion. - * Convert the Integer to a packed-byte buffer. _MAT and other - * objects need this sometimes, if a read has been performed on a - * Field object that is less than or equal to the global integer - * size (32 or 64 bits). - */ - Status = AcpiExConvertToBuffer (OriginalObject, &NewObject); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - break; - - case ACPI_TYPE_STRING: - - /* String-to-Buffer conversion. Simple data copy */ - - NewObject = AcpiUtCreateBufferObject (OriginalObject->String.Length); - if (!NewObject) + if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) { - return (AE_NO_MEMORY); - } - - ACPI_MEMCPY (NewObject->Buffer.Pointer, - OriginalObject->String.Pointer, OriginalObject->String.Length); - break; - - case ACPI_TYPE_PACKAGE: - /* - * This case is often seen for predefined names that must return a - * Buffer object with multiple DWORD integers within. For example, - * _FDE and _GTM. The Package can be converted to a Buffer. - */ + /* Check if we can actually repair this name/type combination */ - /* All elements of the Package must be integers */ - - Elements = OriginalObject->Package.Elements; - Count = OriginalObject->Package.Count; - - for (i = 0; i < Count; i++) - { - if ((!*Elements) || - ((*Elements)->Common.Type != ACPI_TYPE_INTEGER)) + if ((ReturnBtype & ThisName->UnexpectedBtypes) && + (PackageIndex == ThisName->PackageIndex)) { - return (AE_AML_OPERAND_TYPE); + return (ThisName); } - Elements++; - } - - /* Create the new buffer object to replace the Package */ - NewObject = AcpiUtCreateBufferObject (ACPI_MUL_4 (Count)); - if (!NewObject) - { - return (AE_NO_MEMORY); - } - - /* Copy the package elements (integers) to the buffer as DWORDs */ - - Elements = OriginalObject->Package.Elements; - DwordBuffer = ACPI_CAST_PTR (UINT32, NewObject->Buffer.Pointer); - - for (i = 0; i < Count; i++) - { - *DwordBuffer = (UINT32) (*Elements)->Integer.Value; - DwordBuffer++; - Elements++; + return (NULL); } - break; - - default: - return (AE_AML_OPERAND_TYPE); + ThisName++; } - *ReturnObject = NewObject; - return (AE_OK); + return (NULL); /* Name was not found in the repair table */ } diff -Nru acpica-unix-20130117/source/components/namespace/nsrepair2.c acpica-unix-20130214/source/components/namespace/nsrepair2.c --- acpica-unix-20130117/source/components/namespace/nsrepair2.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/namespace/nsrepair2.c 2013-02-14 19:52:39.000000000 +0000 @@ -72,7 +72,7 @@ /* Local prototypes */ static const ACPI_REPAIR_INFO * -AcpiNsMatchRepairableName ( +AcpiNsMatchComplexRepair ( ACPI_NAMESPACE_NODE *Node); static ACPI_STATUS @@ -197,7 +197,7 @@ /* Check if this name is in the list of repairable names */ - Predefined = AcpiNsMatchRepairableName (Node); + Predefined = AcpiNsMatchComplexRepair (Node); if (!Predefined) { return (ValidateStatus); @@ -210,7 +210,7 @@ /****************************************************************************** * - * FUNCTION: AcpiNsMatchRepairableName + * FUNCTION: AcpiNsMatchComplexRepair * * PARAMETERS: Node - Namespace node for the method/object * @@ -221,7 +221,7 @@ *****************************************************************************/ static const ACPI_REPAIR_INFO * -AcpiNsMatchRepairableName ( +AcpiNsMatchComplexRepair ( ACPI_NAMESPACE_NODE *Node) { const ACPI_REPAIR_INFO *ThisName; diff -Nru acpica-unix-20130117/source/components/namespace/nsutils.c acpica-unix-20130214/source/components/namespace/nsutils.c --- acpica-unix-20130117/source/components/namespace/nsutils.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/namespace/nsutils.c 2013-02-14 19:52:39.000000000 +0000 @@ -128,10 +128,10 @@ if (!Node) { ACPI_WARNING ((AE_INFO, "Null Node parameter")); - return_VALUE (ACPI_TYPE_ANY); + return_UINT8 (ACPI_TYPE_ANY); } - return_VALUE (Node->Type); + return_UINT8 (Node->Type); } @@ -160,10 +160,10 @@ /* Type code out of range */ ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type)); - return_VALUE (ACPI_NS_NORMAL); + return_UINT32 (ACPI_NS_NORMAL); } - return_VALUE (AcpiGbl_NsProperties[Type] & ACPI_NS_LOCAL); + return_UINT32 (AcpiGbl_NsProperties[Type] & ACPI_NS_LOCAL); } diff -Nru acpica-unix-20130117/source/components/parser/psargs.c acpica-unix-20130214/source/components/parser/psargs.c --- acpica-unix-20130117/source/components/parser/psargs.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/parser/psargs.c 2013-02-14 19:52:39.000000000 +0000 @@ -118,7 +118,7 @@ /* Byte 0 is a special case, either bits [0:3] or [0:5] are used */ PackageLength |= (Aml[0] & ByteZeroMask); - return_VALUE (PackageLength); + return_UINT32 (PackageLength); } diff -Nru acpica-unix-20130117/source/components/resources/rscalc.c acpica-unix-20130214/source/components/resources/rscalc.c --- acpica-unix-20130117/source/components/resources/rscalc.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/resources/rscalc.c 2013-02-14 19:52:39.000000000 +0000 @@ -230,6 +230,13 @@ return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); } + /* Sanity check the length. It must not be zero, or we loop forever */ + + if (!Resource->Length) + { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + /* Get the base size of the (external stream) resource descriptor */ TotalSize = AcpiGbl_AmlResourceSizes [Resource->Type]; diff -Nru acpica-unix-20130117/source/components/resources/rsdump.c acpica-unix-20130214/source/components/resources/rsdump.c --- acpica-unix-20130117/source/components/resources/rsdump.c 2013-01-17 19:47:49.000000000 +0000 +++ acpica-unix-20130214/source/components/resources/rsdump.c 2013-02-14 19:52:39.000000000 +0000 @@ -438,6 +438,15 @@ return; } + /* Sanity check the length. It must not be zero, or we loop forever */ + + if (!ResourceList->Length) + { + AcpiOsPrintf ( + "Invalid zero length descriptor in resource list\n"); + return; + } + /* Dump the resource descriptor */ if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS) diff -Nru acpica-unix-20130117/source/components/resources/rslist.c acpica-unix-20130214/source/components/resources/rslist.c --- acpica-unix-20130117/source/components/resources/rslist.c 2013-01-17 19:47:50.000000000 +0000 +++ acpica-unix-20130214/source/components/resources/rslist.c 2013-02-14 19:52:40.000000000 +0000 @@ -199,6 +199,15 @@ return_ACPI_STATUS (AE_BAD_DATA); } + /* Sanity check the length. It must not be zero, or we loop forever */ + + if (!Resource->Length) + { + ACPI_ERROR ((AE_INFO, + "Invalid zero length descriptor in resource list\n")); + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + /* Perform the conversion */ if (Resource->Type == ACPI_RESOURCE_TYPE_SERIAL_BUS) diff -Nru acpica-unix-20130117/source/components/resources/rsxface.c acpica-unix-20130214/source/components/resources/rsxface.c --- acpica-unix-20130117/source/components/resources/rsxface.c 2013-01-17 19:47:50.000000000 +0000 +++ acpica-unix-20130214/source/components/resources/rsxface.c 2013-02-14 19:52:40.000000000 +0000 @@ -630,7 +630,7 @@ while (Resource < ResourceEnd) { - /* Sanity check the resource */ + /* Sanity check the resource type */ if (Resource->Type > ACPI_RESOURCE_TYPE_MAX) { @@ -638,6 +638,13 @@ break; } + /* Sanity check the length. It must not be zero, or we loop forever */ + + if (!Resource->Length) + { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + /* Invoke the user function, abort on any error returned */ Status = UserFunction (Resource, Context); diff -Nru acpica-unix-20130117/source/components/utilities/utaddress.c acpica-unix-20130214/source/components/utilities/utaddress.c --- acpica-unix-20130117/source/components/utilities/utaddress.c 2013-01-17 19:47:50.000000000 +0000 +++ acpica-unix-20130214/source/components/utilities/utaddress.c 2013-02-14 19:52:40.000000000 +0000 @@ -237,7 +237,7 @@ if ((SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) && (SpaceId != ACPI_ADR_SPACE_SYSTEM_IO)) { - return_VALUE (0); + return_UINT32 (0); } RangeInfo = AcpiGbl_AddressRangeList[SpaceId]; @@ -278,7 +278,7 @@ RangeInfo = RangeInfo->Next; } - return_VALUE (OverlapCount); + return_UINT32 (OverlapCount); } diff -Nru acpica-unix-20130117/source/components/utilities/utcache.c acpica-unix-20130214/source/components/utilities/utcache.c --- acpica-unix-20130117/source/components/utilities/utcache.c 2013-01-17 19:47:50.000000000 +0000 +++ acpica-unix-20130214/source/components/utilities/utcache.c 2013-02-14 19:52:40.000000000 +0000 @@ -95,7 +95,6 @@ /* Populate the cache object and return it */ ACPI_MEMSET (Cache, 0, sizeof (ACPI_MEMORY_LIST)); - Cache->LinkOffset = 8; Cache->ListName = CacheName; Cache->ObjectSize = ObjectSize; Cache->MaxDepth = MaxDepth; @@ -121,7 +120,7 @@ AcpiOsPurgeCache ( ACPI_MEMORY_LIST *Cache) { - char *Next; + void *Next; ACPI_STATUS Status; @@ -145,8 +144,7 @@ { /* Delete and unlink one cached state object */ - Next = *(ACPI_CAST_INDIRECT_PTR (char, - &(((char *) Cache->ListHead)[Cache->LinkOffset]))); + Next = ACPI_GET_DESCRIPTOR_PTR (Cache->ListHead); ACPI_FREE (Cache->ListHead); Cache->ListHead = Next; @@ -251,8 +249,7 @@ /* Put the object at the head of the cache list */ - * (ACPI_CAST_INDIRECT_PTR (char, - &(((char *) Object)[Cache->LinkOffset]))) = Cache->ListHead; + ACPI_SET_DESCRIPTOR_PTR (Object, Cache->ListHead); Cache->ListHead = Object; Cache->CurrentDepth++; @@ -307,8 +304,7 @@ /* There is an object available, use it */ Object = Cache->ListHead; - Cache->ListHead = *(ACPI_CAST_INDIRECT_PTR (char, - &(((char *) Object)[Cache->LinkOffset]))); + Cache->ListHead = ACPI_GET_DESCRIPTOR_PTR (Object); Cache->CurrentDepth--; diff -Nru acpica-unix-20130117/source/components/utilities/utexcep.c acpica-unix-20130214/source/components/utilities/utexcep.c --- acpica-unix-20130117/source/components/utilities/utexcep.c 2013-01-17 19:47:50.000000000 +0000 +++ acpica-unix-20130214/source/components/utilities/utexcep.c 2013-02-14 19:52:40.000000000 +0000 @@ -71,7 +71,7 @@ AcpiFormatException ( ACPI_STATUS Status) { - const char *Exception = NULL; + const ACPI_EXCEPTION_INFO *Exception; ACPI_FUNCTION_ENTRY (); @@ -85,10 +85,10 @@ ACPI_ERROR ((AE_INFO, "Unknown exception code: 0x%8.8X", Status)); - Exception = "UNKNOWN_STATUS_CODE"; + return ("UNKNOWN_STATUS_CODE"); } - return (ACPI_CAST_PTR (const char, Exception)); + return (Exception->Name); } ACPI_EXPORT_SYMBOL (AcpiFormatException) @@ -108,12 +108,12 @@ * ******************************************************************************/ -const char * +const ACPI_EXCEPTION_INFO * AcpiUtValidateException ( ACPI_STATUS Status) { - UINT32 SubStatus; - const char *Exception = NULL; + UINT32 SubStatus; + const ACPI_EXCEPTION_INFO *Exception = NULL; ACPI_FUNCTION_ENTRY (); @@ -130,7 +130,7 @@ if (SubStatus <= AE_CODE_ENV_MAX) { - Exception = AcpiGbl_ExceptionNames_Env [SubStatus]; + Exception = &AcpiGbl_ExceptionNames_Env [SubStatus]; } break; @@ -138,7 +138,7 @@ if (SubStatus <= AE_CODE_PGM_MAX) { - Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus]; + Exception = &AcpiGbl_ExceptionNames_Pgm [SubStatus]; } break; @@ -146,7 +146,7 @@ if (SubStatus <= AE_CODE_TBL_MAX) { - Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus]; + Exception = &AcpiGbl_ExceptionNames_Tbl [SubStatus]; } break; @@ -154,7 +154,7 @@ if (SubStatus <= AE_CODE_AML_MAX) { - Exception = AcpiGbl_ExceptionNames_Aml [SubStatus]; + Exception = &AcpiGbl_ExceptionNames_Aml [SubStatus]; } break; @@ -162,7 +162,7 @@ if (SubStatus <= AE_CODE_CTRL_MAX) { - Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus]; + Exception = &AcpiGbl_ExceptionNames_Ctrl [SubStatus]; } break; @@ -170,5 +170,10 @@ break; } - return (ACPI_CAST_PTR (const char, Exception)); + if (!Exception || !Exception->Name) + { + return (NULL); + } + + return (Exception); } diff -Nru acpica-unix-20130117/source/components/utilities/utglobal.c acpica-unix-20130214/source/components/utilities/utglobal.c --- acpica-unix-20130117/source/components/utilities/utglobal.c 2013-01-17 19:47:50.000000000 +0000 +++ acpica-unix-20130214/source/components/utilities/utglobal.c 2013-02-14 19:52:40.000000000 +0000 @@ -343,6 +343,8 @@ #ifdef ACPI_DISASSEMBLER AcpiGbl_ExternalList = NULL; + AcpiGbl_NumExternalMethods = 0; + AcpiGbl_ResolvedExternalMethods = 0; #endif #ifdef ACPI_DEBUG_OUTPUT diff -Nru acpica-unix-20130117/source/include/acdisasm.h acpica-unix-20130214/source/include/acdisasm.h --- acpica-unix-20130117/source/include/acdisasm.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acdisasm.h 2013-02-14 19:52:41.000000000 +0000 @@ -314,6 +314,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[]; @@ -343,6 +345,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpa[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoWaet[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[]; @@ -457,6 +461,10 @@ ACPI_TABLE_HEADER *Table); void +AcpiDmDumpMtmr ( + ACPI_TABLE_HEADER *Table); + +void AcpiDmDumpPcct ( ACPI_TABLE_HEADER *Table); @@ -489,6 +497,10 @@ ACPI_TABLE_HEADER *Table); void +AcpiDmDumpVrtc ( + ACPI_TABLE_HEADER *Table); + +void AcpiDmDumpWdat ( ACPI_TABLE_HEADER *Table); @@ -677,6 +689,10 @@ AcpiDmEmitExternals ( void); +void +AcpiDmUnresolvedWarning ( + UINT8 Type); + /* * dmresrc diff -Nru acpica-unix-20130117/source/include/acexcep.h acpica-unix-20130214/source/include/acexcep.h --- acpica-unix-20130117/source/include/acexcep.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acexcep.h 2013-02-14 19:52:41.000000000 +0000 @@ -45,55 +45,88 @@ #define __ACEXCEP_H__ +/* This module contains all possible exception codes for ACPI_STATUS */ + /* - * Exceptions returned by external ACPI interfaces + * Exception code classes */ -#define AE_CODE_ENVIRONMENTAL 0x0000 -#define AE_CODE_PROGRAMMER 0x1000 -#define AE_CODE_ACPI_TABLES 0x2000 -#define AE_CODE_AML 0x3000 -#define AE_CODE_CONTROL 0x4000 +#define AE_CODE_ENVIRONMENTAL 0x0000 /* General ACPICA environment */ +#define AE_CODE_PROGRAMMER 0x1000 /* External ACPICA interface caller */ +#define AE_CODE_ACPI_TABLES 0x2000 /* ACPI tables */ +#define AE_CODE_AML 0x3000 /* From executing AML code */ +#define AE_CODE_CONTROL 0x4000 /* Internal control codes */ + #define AE_CODE_MAX 0x4000 #define AE_CODE_MASK 0xF000 +/* + * Macros to insert the exception code classes + */ +#define EXCEP_ENV(code) ((ACPI_STATUS) (code | AE_CODE_ENVIRONMENTAL)) +#define EXCEP_PGM(code) ((ACPI_STATUS) (code | AE_CODE_PROGRAMMER)) +#define EXCEP_TBL(code) ((ACPI_STATUS) (code | AE_CODE_ACPI_TABLES)) +#define EXCEP_AML(code) ((ACPI_STATUS) (code | AE_CODE_AML)) +#define EXCEP_CTL(code) ((ACPI_STATUS) (code | AE_CODE_CONTROL)) +/* + * Exception info table. The "Description" field is used only by the + * ACPICA help application (acpihelp). + */ +typedef struct acpi_exception_info +{ + char *Name; + +#ifdef ACPI_HELP_APP + char *Description; +#endif +} ACPI_EXCEPTION_INFO; + +#ifdef ACPI_HELP_APP +#define EXCEP_TXT(Name,Description) {Name, Description} +#else +#define EXCEP_TXT(Name,Description) {Name} +#endif + + +/* + * Success is always zero, failure is non-zero + */ #define ACPI_SUCCESS(a) (!(a)) #define ACPI_FAILURE(a) (a) - #define AE_OK (ACPI_STATUS) 0x0000 /* * Environmental exceptions */ -#define AE_ERROR (ACPI_STATUS) (0x0001 | AE_CODE_ENVIRONMENTAL) -#define AE_NO_ACPI_TABLES (ACPI_STATUS) (0x0002 | AE_CODE_ENVIRONMENTAL) -#define AE_NO_NAMESPACE (ACPI_STATUS) (0x0003 | AE_CODE_ENVIRONMENTAL) -#define AE_NO_MEMORY (ACPI_STATUS) (0x0004 | AE_CODE_ENVIRONMENTAL) -#define AE_NOT_FOUND (ACPI_STATUS) (0x0005 | AE_CODE_ENVIRONMENTAL) -#define AE_NOT_EXIST (ACPI_STATUS) (0x0006 | AE_CODE_ENVIRONMENTAL) -#define AE_ALREADY_EXISTS (ACPI_STATUS) (0x0007 | AE_CODE_ENVIRONMENTAL) -#define AE_TYPE (ACPI_STATUS) (0x0008 | AE_CODE_ENVIRONMENTAL) -#define AE_NULL_OBJECT (ACPI_STATUS) (0x0009 | AE_CODE_ENVIRONMENTAL) -#define AE_NULL_ENTRY (ACPI_STATUS) (0x000A | AE_CODE_ENVIRONMENTAL) -#define AE_BUFFER_OVERFLOW (ACPI_STATUS) (0x000B | AE_CODE_ENVIRONMENTAL) -#define AE_STACK_OVERFLOW (ACPI_STATUS) (0x000C | AE_CODE_ENVIRONMENTAL) -#define AE_STACK_UNDERFLOW (ACPI_STATUS) (0x000D | AE_CODE_ENVIRONMENTAL) -#define AE_NOT_IMPLEMENTED (ACPI_STATUS) (0x000E | AE_CODE_ENVIRONMENTAL) -#define AE_SUPPORT (ACPI_STATUS) (0x000F | AE_CODE_ENVIRONMENTAL) -#define AE_LIMIT (ACPI_STATUS) (0x0010 | AE_CODE_ENVIRONMENTAL) -#define AE_TIME (ACPI_STATUS) (0x0011 | AE_CODE_ENVIRONMENTAL) -#define AE_ACQUIRE_DEADLOCK (ACPI_STATUS) (0x0012 | AE_CODE_ENVIRONMENTAL) -#define AE_RELEASE_DEADLOCK (ACPI_STATUS) (0x0013 | AE_CODE_ENVIRONMENTAL) -#define AE_NOT_ACQUIRED (ACPI_STATUS) (0x0014 | AE_CODE_ENVIRONMENTAL) -#define AE_ALREADY_ACQUIRED (ACPI_STATUS) (0x0015 | AE_CODE_ENVIRONMENTAL) -#define AE_NO_HARDWARE_RESPONSE (ACPI_STATUS) (0x0016 | AE_CODE_ENVIRONMENTAL) -#define AE_NO_GLOBAL_LOCK (ACPI_STATUS) (0x0017 | AE_CODE_ENVIRONMENTAL) -#define AE_ABORT_METHOD (ACPI_STATUS) (0x0018 | AE_CODE_ENVIRONMENTAL) -#define AE_SAME_HANDLER (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL) -#define AE_NO_HANDLER (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL) -#define AE_OWNER_ID_LIMIT (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL) -#define AE_NOT_CONFIGURED (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL) +#define AE_ERROR EXCEP_ENV (0x0001) +#define AE_NO_ACPI_TABLES EXCEP_ENV (0x0002) +#define AE_NO_NAMESPACE EXCEP_ENV (0x0003) +#define AE_NO_MEMORY EXCEP_ENV (0x0004) +#define AE_NOT_FOUND EXCEP_ENV (0x0005) +#define AE_NOT_EXIST EXCEP_ENV (0x0006) +#define AE_ALREADY_EXISTS EXCEP_ENV (0x0007) +#define AE_TYPE EXCEP_ENV (0x0008) +#define AE_NULL_OBJECT EXCEP_ENV (0x0009) +#define AE_NULL_ENTRY EXCEP_ENV (0x000A) +#define AE_BUFFER_OVERFLOW EXCEP_ENV (0x000B) +#define AE_STACK_OVERFLOW EXCEP_ENV (0x000C) +#define AE_STACK_UNDERFLOW EXCEP_ENV (0x000D) +#define AE_NOT_IMPLEMENTED EXCEP_ENV (0x000E) +#define AE_SUPPORT EXCEP_ENV (0x000F) +#define AE_LIMIT EXCEP_ENV (0x0010) +#define AE_TIME EXCEP_ENV (0x0011) +#define AE_ACQUIRE_DEADLOCK EXCEP_ENV (0x0012) +#define AE_RELEASE_DEADLOCK EXCEP_ENV (0x0013) +#define AE_NOT_ACQUIRED EXCEP_ENV (0x0014) +#define AE_ALREADY_ACQUIRED EXCEP_ENV (0x0015) +#define AE_NO_HARDWARE_RESPONSE EXCEP_ENV (0x0016) +#define AE_NO_GLOBAL_LOCK EXCEP_ENV (0x0017) +#define AE_ABORT_METHOD EXCEP_ENV (0x0018) +#define AE_SAME_HANDLER EXCEP_ENV (0x0019) +#define AE_NO_HANDLER EXCEP_ENV (0x001A) +#define AE_OWNER_ID_LIMIT EXCEP_ENV (0x001B) +#define AE_NOT_CONFIGURED EXCEP_ENV (0x001C) #define AE_CODE_ENV_MAX 0x001C @@ -101,15 +134,15 @@ /* * Programmer exceptions */ -#define AE_BAD_PARAMETER (ACPI_STATUS) (0x0001 | AE_CODE_PROGRAMMER) -#define AE_BAD_CHARACTER (ACPI_STATUS) (0x0002 | AE_CODE_PROGRAMMER) -#define AE_BAD_PATHNAME (ACPI_STATUS) (0x0003 | AE_CODE_PROGRAMMER) -#define AE_BAD_DATA (ACPI_STATUS) (0x0004 | AE_CODE_PROGRAMMER) -#define AE_BAD_HEX_CONSTANT (ACPI_STATUS) (0x0005 | AE_CODE_PROGRAMMER) -#define AE_BAD_OCTAL_CONSTANT (ACPI_STATUS) (0x0006 | AE_CODE_PROGRAMMER) -#define AE_BAD_DECIMAL_CONSTANT (ACPI_STATUS) (0x0007 | AE_CODE_PROGRAMMER) -#define AE_MISSING_ARGUMENTS (ACPI_STATUS) (0x0008 | AE_CODE_PROGRAMMER) -#define AE_BAD_ADDRESS (ACPI_STATUS) (0x0009 | AE_CODE_PROGRAMMER) +#define AE_BAD_PARAMETER EXCEP_PGM (0x0001) +#define AE_BAD_CHARACTER EXCEP_PGM (0x0002) +#define AE_BAD_PATHNAME EXCEP_PGM (0x0003) +#define AE_BAD_DATA EXCEP_PGM (0x0004) +#define AE_BAD_HEX_CONSTANT EXCEP_PGM (0x0005) +#define AE_BAD_OCTAL_CONSTANT EXCEP_PGM (0x0006) +#define AE_BAD_DECIMAL_CONSTANT EXCEP_PGM (0x0007) +#define AE_MISSING_ARGUMENTS EXCEP_PGM (0x0008) +#define AE_BAD_ADDRESS EXCEP_PGM (0x0009) #define AE_CODE_PGM_MAX 0x0009 @@ -117,11 +150,11 @@ /* * Acpi table exceptions */ -#define AE_BAD_SIGNATURE (ACPI_STATUS) (0x0001 | AE_CODE_ACPI_TABLES) -#define AE_BAD_HEADER (ACPI_STATUS) (0x0002 | AE_CODE_ACPI_TABLES) -#define AE_BAD_CHECKSUM (ACPI_STATUS) (0x0003 | AE_CODE_ACPI_TABLES) -#define AE_BAD_VALUE (ACPI_STATUS) (0x0004 | AE_CODE_ACPI_TABLES) -#define AE_INVALID_TABLE_LENGTH (ACPI_STATUS) (0x0005 | AE_CODE_ACPI_TABLES) +#define AE_BAD_SIGNATURE EXCEP_TBL (0x0001) +#define AE_BAD_HEADER EXCEP_TBL (0x0002) +#define AE_BAD_CHECKSUM EXCEP_TBL (0x0003) +#define AE_BAD_VALUE EXCEP_TBL (0x0004) +#define AE_INVALID_TABLE_LENGTH EXCEP_TBL (0x0005) #define AE_CODE_TBL_MAX 0x0005 @@ -130,39 +163,39 @@ * AML exceptions. These are caused by problems with * the actual AML byte stream */ -#define AE_AML_BAD_OPCODE (ACPI_STATUS) (0x0001 | AE_CODE_AML) -#define AE_AML_NO_OPERAND (ACPI_STATUS) (0x0002 | AE_CODE_AML) -#define AE_AML_OPERAND_TYPE (ACPI_STATUS) (0x0003 | AE_CODE_AML) -#define AE_AML_OPERAND_VALUE (ACPI_STATUS) (0x0004 | AE_CODE_AML) -#define AE_AML_UNINITIALIZED_LOCAL (ACPI_STATUS) (0x0005 | AE_CODE_AML) -#define AE_AML_UNINITIALIZED_ARG (ACPI_STATUS) (0x0006 | AE_CODE_AML) -#define AE_AML_UNINITIALIZED_ELEMENT (ACPI_STATUS) (0x0007 | AE_CODE_AML) -#define AE_AML_NUMERIC_OVERFLOW (ACPI_STATUS) (0x0008 | AE_CODE_AML) -#define AE_AML_REGION_LIMIT (ACPI_STATUS) (0x0009 | AE_CODE_AML) -#define AE_AML_BUFFER_LIMIT (ACPI_STATUS) (0x000A | AE_CODE_AML) -#define AE_AML_PACKAGE_LIMIT (ACPI_STATUS) (0x000B | AE_CODE_AML) -#define AE_AML_DIVIDE_BY_ZERO (ACPI_STATUS) (0x000C | AE_CODE_AML) -#define AE_AML_BAD_NAME (ACPI_STATUS) (0x000D | AE_CODE_AML) -#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x000E | AE_CODE_AML) -#define AE_AML_INTERNAL (ACPI_STATUS) (0x000F | AE_CODE_AML) -#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0010 | AE_CODE_AML) -#define AE_AML_STRING_LIMIT (ACPI_STATUS) (0x0011 | AE_CODE_AML) -#define AE_AML_NO_RETURN_VALUE (ACPI_STATUS) (0x0012 | AE_CODE_AML) -#define AE_AML_METHOD_LIMIT (ACPI_STATUS) (0x0013 | AE_CODE_AML) -#define AE_AML_NOT_OWNER (ACPI_STATUS) (0x0014 | AE_CODE_AML) -#define AE_AML_MUTEX_ORDER (ACPI_STATUS) (0x0015 | AE_CODE_AML) -#define AE_AML_MUTEX_NOT_ACQUIRED (ACPI_STATUS) (0x0016 | AE_CODE_AML) -#define AE_AML_INVALID_RESOURCE_TYPE (ACPI_STATUS) (0x0017 | AE_CODE_AML) -#define AE_AML_INVALID_INDEX (ACPI_STATUS) (0x0018 | AE_CODE_AML) -#define AE_AML_REGISTER_LIMIT (ACPI_STATUS) (0x0019 | AE_CODE_AML) -#define AE_AML_NO_WHILE (ACPI_STATUS) (0x001A | AE_CODE_AML) -#define AE_AML_ALIGNMENT (ACPI_STATUS) (0x001B | AE_CODE_AML) -#define AE_AML_NO_RESOURCE_END_TAG (ACPI_STATUS) (0x001C | AE_CODE_AML) -#define AE_AML_BAD_RESOURCE_VALUE (ACPI_STATUS) (0x001D | AE_CODE_AML) -#define AE_AML_CIRCULAR_REFERENCE (ACPI_STATUS) (0x001E | AE_CODE_AML) -#define AE_AML_BAD_RESOURCE_LENGTH (ACPI_STATUS) (0x001F | AE_CODE_AML) -#define AE_AML_ILLEGAL_ADDRESS (ACPI_STATUS) (0x0020 | AE_CODE_AML) -#define AE_AML_INFINITE_LOOP (ACPI_STATUS) (0x0021 | AE_CODE_AML) +#define AE_AML_BAD_OPCODE EXCEP_AML (0x0001) +#define AE_AML_NO_OPERAND EXCEP_AML (0x0002) +#define AE_AML_OPERAND_TYPE EXCEP_AML (0x0003) +#define AE_AML_OPERAND_VALUE EXCEP_AML (0x0004) +#define AE_AML_UNINITIALIZED_LOCAL EXCEP_AML (0x0005) +#define AE_AML_UNINITIALIZED_ARG EXCEP_AML (0x0006) +#define AE_AML_UNINITIALIZED_ELEMENT EXCEP_AML (0x0007) +#define AE_AML_NUMERIC_OVERFLOW EXCEP_AML (0x0008) +#define AE_AML_REGION_LIMIT EXCEP_AML (0x0009) +#define AE_AML_BUFFER_LIMIT EXCEP_AML (0x000A) +#define AE_AML_PACKAGE_LIMIT EXCEP_AML (0x000B) +#define AE_AML_DIVIDE_BY_ZERO EXCEP_AML (0x000C) +#define AE_AML_BAD_NAME EXCEP_AML (0x000D) +#define AE_AML_NAME_NOT_FOUND EXCEP_AML (0x000E) +#define AE_AML_INTERNAL EXCEP_AML (0x000F) +#define AE_AML_INVALID_SPACE_ID EXCEP_AML (0x0010) +#define AE_AML_STRING_LIMIT EXCEP_AML (0x0011) +#define AE_AML_NO_RETURN_VALUE EXCEP_AML (0x0012) +#define AE_AML_METHOD_LIMIT EXCEP_AML (0x0013) +#define AE_AML_NOT_OWNER EXCEP_AML (0x0014) +#define AE_AML_MUTEX_ORDER EXCEP_AML (0x0015) +#define AE_AML_MUTEX_NOT_ACQUIRED EXCEP_AML (0x0016) +#define AE_AML_INVALID_RESOURCE_TYPE EXCEP_AML (0x0017) +#define AE_AML_INVALID_INDEX EXCEP_AML (0x0018) +#define AE_AML_REGISTER_LIMIT EXCEP_AML (0x0019) +#define AE_AML_NO_WHILE EXCEP_AML (0x001A) +#define AE_AML_ALIGNMENT EXCEP_AML (0x001B) +#define AE_AML_NO_RESOURCE_END_TAG EXCEP_AML (0x001C) +#define AE_AML_BAD_RESOURCE_VALUE EXCEP_AML (0x001D) +#define AE_AML_CIRCULAR_REFERENCE EXCEP_AML (0x001E) +#define AE_AML_BAD_RESOURCE_LENGTH EXCEP_AML (0x001F) +#define AE_AML_ILLEGAL_ADDRESS EXCEP_AML (0x0020) +#define AE_AML_INFINITE_LOOP EXCEP_AML (0x0021) #define AE_CODE_AML_MAX 0x0021 @@ -170,19 +203,19 @@ /* * Internal exceptions used for control */ -#define AE_CTRL_RETURN_VALUE (ACPI_STATUS) (0x0001 | AE_CODE_CONTROL) -#define AE_CTRL_PENDING (ACPI_STATUS) (0x0002 | AE_CODE_CONTROL) -#define AE_CTRL_TERMINATE (ACPI_STATUS) (0x0003 | AE_CODE_CONTROL) -#define AE_CTRL_TRUE (ACPI_STATUS) (0x0004 | AE_CODE_CONTROL) -#define AE_CTRL_FALSE (ACPI_STATUS) (0x0005 | AE_CODE_CONTROL) -#define AE_CTRL_DEPTH (ACPI_STATUS) (0x0006 | AE_CODE_CONTROL) -#define AE_CTRL_END (ACPI_STATUS) (0x0007 | AE_CODE_CONTROL) -#define AE_CTRL_TRANSFER (ACPI_STATUS) (0x0008 | AE_CODE_CONTROL) -#define AE_CTRL_BREAK (ACPI_STATUS) (0x0009 | AE_CODE_CONTROL) -#define AE_CTRL_CONTINUE (ACPI_STATUS) (0x000A | AE_CODE_CONTROL) -#define AE_CTRL_SKIP (ACPI_STATUS) (0x000B | AE_CODE_CONTROL) -#define AE_CTRL_PARSE_CONTINUE (ACPI_STATUS) (0x000C | AE_CODE_CONTROL) -#define AE_CTRL_PARSE_PENDING (ACPI_STATUS) (0x000D | AE_CODE_CONTROL) +#define AE_CTRL_RETURN_VALUE EXCEP_CTL (0x0001) +#define AE_CTRL_PENDING EXCEP_CTL (0x0002) +#define AE_CTRL_TERMINATE EXCEP_CTL (0x0003) +#define AE_CTRL_TRUE EXCEP_CTL (0x0004) +#define AE_CTRL_FALSE EXCEP_CTL (0x0005) +#define AE_CTRL_DEPTH EXCEP_CTL (0x0006) +#define AE_CTRL_END EXCEP_CTL (0x0007) +#define AE_CTRL_TRANSFER EXCEP_CTL (0x0008) +#define AE_CTRL_BREAK EXCEP_CTL (0x0009) +#define AE_CTRL_CONTINUE EXCEP_CTL (0x000A) +#define AE_CTRL_SKIP EXCEP_CTL (0x000B) +#define AE_CTRL_PARSE_CONTINUE EXCEP_CTL (0x000C) +#define AE_CTRL_PARSE_PENDING EXCEP_CTL (0x000D) #define AE_CODE_CTRL_MAX 0x000D @@ -195,117 +228,117 @@ * String versions of the exception codes above * These strings must match the corresponding defines exactly */ -char const *AcpiGbl_ExceptionNames_Env[] = +static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Env[] = { - "AE_OK", - "AE_ERROR", - "AE_NO_ACPI_TABLES", - "AE_NO_NAMESPACE", - "AE_NO_MEMORY", - "AE_NOT_FOUND", - "AE_NOT_EXIST", - "AE_ALREADY_EXISTS", - "AE_TYPE", - "AE_NULL_OBJECT", - "AE_NULL_ENTRY", - "AE_BUFFER_OVERFLOW", - "AE_STACK_OVERFLOW", - "AE_STACK_UNDERFLOW", - "AE_NOT_IMPLEMENTED", - "AE_SUPPORT", - "AE_LIMIT", - "AE_TIME", - "AE_ACQUIRE_DEADLOCK", - "AE_RELEASE_DEADLOCK", - "AE_NOT_ACQUIRED", - "AE_ALREADY_ACQUIRED", - "AE_NO_HARDWARE_RESPONSE", - "AE_NO_GLOBAL_LOCK", - "AE_ABORT_METHOD", - "AE_SAME_HANDLER", - "AE_NO_HANDLER", - "AE_OWNER_ID_LIMIT", - "AE_NOT_CONFIGURED" + EXCEP_TXT ("AE_OK", "No error"), + EXCEP_TXT ("AE_ERROR", "Unspecified error"), + EXCEP_TXT ("AE_NO_ACPI_TABLES", "ACPI tables could not be found"), + EXCEP_TXT ("AE_NO_NAMESPACE", "A namespace has not been loaded"), + EXCEP_TXT ("AE_NO_MEMORY", "Insufficient dynamic memory"), + EXCEP_TXT ("AE_NOT_FOUND", "The name was not found in the namespace"), + EXCEP_TXT ("AE_NOT_EXIST", "A required entity does not exist"), + EXCEP_TXT ("AE_ALREADY_EXISTS", "An entity already exists"), + EXCEP_TXT ("AE_TYPE", "The object type is incorrect"), + EXCEP_TXT ("AE_NULL_OBJECT", "A required object was missing"), + EXCEP_TXT ("AE_NULL_ENTRY", "The requested object does not exist"), + EXCEP_TXT ("AE_BUFFER_OVERFLOW", "The buffer provided is too small"), + EXCEP_TXT ("AE_STACK_OVERFLOW", "An internal stack overflowed"), + EXCEP_TXT ("AE_STACK_UNDERFLOW", "An internal stack underflowed"), + EXCEP_TXT ("AE_NOT_IMPLEMENTED", "The feature is not implemented"), + EXCEP_TXT ("AE_SUPPORT", "The feature is not supported"), + EXCEP_TXT ("AE_LIMIT", "A predefined limit was exceeded"), + EXCEP_TXT ("AE_TIME", "A time limit or timeout expired"), + EXCEP_TXT ("AE_ACQUIRE_DEADLOCK", "Internal error, attempt was made to acquire a mutex in improper order"), + EXCEP_TXT ("AE_RELEASE_DEADLOCK", "Internal error, attempt was made to release a mutex in improper order"), + EXCEP_TXT ("AE_NOT_ACQUIRED", "An attempt to release a mutex or Global Lock without a previous acquire"), + EXCEP_TXT ("AE_ALREADY_ACQUIRED", "Internal error, attempt was made to acquire a mutex twice"), + EXCEP_TXT ("AE_NO_HARDWARE_RESPONSE", "Hardware did not respond after an I/O operation"), + EXCEP_TXT ("AE_NO_GLOBAL_LOCK", "There is no FACS Global Lock"), + EXCEP_TXT ("AE_ABORT_METHOD", "A control method was aborted"), + EXCEP_TXT ("AE_SAME_HANDLER", "Attempt was made to install the same handler that is already installed"), + EXCEP_TXT ("AE_NO_HANDLER", "A handler for the operation is not installed"), + EXCEP_TXT ("AE_OWNER_ID_LIMIT", "There are no more Owner IDs available for ACPI tables or control methods"), + EXCEP_TXT ("AE_NOT_CONFIGURED", "The interface is not part of the current subsystem configuration") }; -char const *AcpiGbl_ExceptionNames_Pgm[] = +static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Pgm[] = { - NULL, - "AE_BAD_PARAMETER", - "AE_BAD_CHARACTER", - "AE_BAD_PATHNAME", - "AE_BAD_DATA", - "AE_BAD_HEX_CONSTANT", - "AE_BAD_OCTAL_CONSTANT", - "AE_BAD_DECIMAL_CONSTANT", - "AE_MISSING_ARGUMENTS", - "AE_BAD_ADDRESS" + EXCEP_TXT (NULL, NULL), + EXCEP_TXT ("AE_BAD_PARAMETER", "A parameter is out of range or invalid"), + EXCEP_TXT ("AE_BAD_CHARACTER", "An invalid character was found in a name"), + EXCEP_TXT ("AE_BAD_PATHNAME", "An invalid character was found in a pathname"), + EXCEP_TXT ("AE_BAD_DATA", "A package or buffer contained incorrect data"), + EXCEP_TXT ("AE_BAD_HEX_CONSTANT", "Invalid character in a Hex constant"), + EXCEP_TXT ("AE_BAD_OCTAL_CONSTANT", "Invalid character in an Octal constant"), + EXCEP_TXT ("AE_BAD_DECIMAL_CONSTANT", "Invalid character in a Decimal constant"), + EXCEP_TXT ("AE_MISSING_ARGUMENTS", "Too few arguments were passed to a control method"), + EXCEP_TXT ("AE_BAD_ADDRESS", "An illegal null I/O address") }; -char const *AcpiGbl_ExceptionNames_Tbl[] = +static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Tbl[] = { - NULL, - "AE_BAD_SIGNATURE", - "AE_BAD_HEADER", - "AE_BAD_CHECKSUM", - "AE_BAD_VALUE", - "AE_INVALID_TABLE_LENGTH" + EXCEP_TXT (NULL, NULL), + EXCEP_TXT ("AE_BAD_SIGNATURE", "An ACPI table has an invalid signature"), + EXCEP_TXT ("AE_BAD_HEADER", "Invalid field in an ACPI table header"), + EXCEP_TXT ("AE_BAD_CHECKSUM", "An ACPI table checksum is not correct"), + EXCEP_TXT ("AE_BAD_VALUE", "An invalid value was found in a table"), + EXCEP_TXT ("AE_INVALID_TABLE_LENGTH", "The FADT or FACS has improper length") }; -char const *AcpiGbl_ExceptionNames_Aml[] = +static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] = { - NULL, - "AE_AML_BAD_OPCODE", - "AE_AML_NO_OPERAND", - "AE_AML_OPERAND_TYPE", - "AE_AML_OPERAND_VALUE", - "AE_AML_UNINITIALIZED_LOCAL", - "AE_AML_UNINITIALIZED_ARG", - "AE_AML_UNINITIALIZED_ELEMENT", - "AE_AML_NUMERIC_OVERFLOW", - "AE_AML_REGION_LIMIT", - "AE_AML_BUFFER_LIMIT", - "AE_AML_PACKAGE_LIMIT", - "AE_AML_DIVIDE_BY_ZERO", - "AE_AML_BAD_NAME", - "AE_AML_NAME_NOT_FOUND", - "AE_AML_INTERNAL", - "AE_AML_INVALID_SPACE_ID", - "AE_AML_STRING_LIMIT", - "AE_AML_NO_RETURN_VALUE", - "AE_AML_METHOD_LIMIT", - "AE_AML_NOT_OWNER", - "AE_AML_MUTEX_ORDER", - "AE_AML_MUTEX_NOT_ACQUIRED", - "AE_AML_INVALID_RESOURCE_TYPE", - "AE_AML_INVALID_INDEX", - "AE_AML_REGISTER_LIMIT", - "AE_AML_NO_WHILE", - "AE_AML_ALIGNMENT", - "AE_AML_NO_RESOURCE_END_TAG", - "AE_AML_BAD_RESOURCE_VALUE", - "AE_AML_CIRCULAR_REFERENCE", - "AE_AML_BAD_RESOURCE_LENGTH", - "AE_AML_ILLEGAL_ADDRESS", - "AE_AML_INFINITE_LOOP" + EXCEP_TXT (NULL, NULL), + EXCEP_TXT ("AE_AML_BAD_OPCODE", "Invalid AML opcode encountered"), + EXCEP_TXT ("AE_AML_NO_OPERAND", "A required operand is missing"), + EXCEP_TXT ("AE_AML_OPERAND_TYPE", "An operand of an incorrect type was encountered"), + EXCEP_TXT ("AE_AML_OPERAND_VALUE", "The operand had an inappropriate or invalid value"), + EXCEP_TXT ("AE_AML_UNINITIALIZED_LOCAL", "Method tried to use an uninitialized local variable"), + EXCEP_TXT ("AE_AML_UNINITIALIZED_ARG", "Method tried to use an uninitialized argument"), + EXCEP_TXT ("AE_AML_UNINITIALIZED_ELEMENT", "Method tried to use an empty package element"), + EXCEP_TXT ("AE_AML_NUMERIC_OVERFLOW", "Overflow during BCD conversion or other"), + EXCEP_TXT ("AE_AML_REGION_LIMIT", "Tried to access beyond the end of an Operation Region"), + EXCEP_TXT ("AE_AML_BUFFER_LIMIT", "Tried to access beyond the end of a buffer"), + EXCEP_TXT ("AE_AML_PACKAGE_LIMIT", "Tried to access beyond the end of a package"), + EXCEP_TXT ("AE_AML_DIVIDE_BY_ZERO", "During execution of AML Divide operator"), + EXCEP_TXT ("AE_AML_BAD_NAME", "An ACPI name contains invalid character(s)"), + EXCEP_TXT ("AE_AML_NAME_NOT_FOUND", "Could not resolve a named reference"), + EXCEP_TXT ("AE_AML_INTERNAL", "An internal error within the interprete"), + EXCEP_TXT ("AE_AML_INVALID_SPACE_ID", "An Operation Region SpaceID is invalid"), + EXCEP_TXT ("AE_AML_STRING_LIMIT", "String is longer than 200 characters"), + EXCEP_TXT ("AE_AML_NO_RETURN_VALUE", "A method did not return a required value"), + EXCEP_TXT ("AE_AML_METHOD_LIMIT", "A control method reached the maximum reentrancy limit of 255"), + EXCEP_TXT ("AE_AML_NOT_OWNER", "A thread tried to release a mutex that it does not own"), + EXCEP_TXT ("AE_AML_MUTEX_ORDER", "Mutex SyncLevel release mismatch"), + EXCEP_TXT ("AE_AML_MUTEX_NOT_ACQUIRED", "Attempt to release a mutex that was not previously acquired"), + EXCEP_TXT ("AE_AML_INVALID_RESOURCE_TYPE", "Invalid resource type in resource list"), + EXCEP_TXT ("AE_AML_INVALID_INDEX", "Invalid Argx or Localx (x too large)"), + EXCEP_TXT ("AE_AML_REGISTER_LIMIT", "Bank value or Index value beyond range of register"), + EXCEP_TXT ("AE_AML_NO_WHILE", "Break or Continue without a While"), + EXCEP_TXT ("AE_AML_ALIGNMENT", "Non-aligned memory transfer on platform that does not support this"), + EXCEP_TXT ("AE_AML_NO_RESOURCE_END_TAG", "No End Tag in a resource list"), + EXCEP_TXT ("AE_AML_BAD_RESOURCE_VALUE", "Invalid value of a resource element"), + EXCEP_TXT ("AE_AML_CIRCULAR_REFERENCE", "Two references refer to each other"), + EXCEP_TXT ("AE_AML_BAD_RESOURCE_LENGTH", "The length of a Resource Descriptor in the AML is incorrect"), + EXCEP_TXT ("AE_AML_ILLEGAL_ADDRESS", "A memory, I/O, or PCI configuration address is invalid"), + EXCEP_TXT ("AE_AML_INFINITE_LOOP", "An apparent infinite AML While loop, method was aborted") }; -char const *AcpiGbl_ExceptionNames_Ctrl[] = +static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] = { - NULL, - "AE_CTRL_RETURN_VALUE", - "AE_CTRL_PENDING", - "AE_CTRL_TERMINATE", - "AE_CTRL_TRUE", - "AE_CTRL_FALSE", - "AE_CTRL_DEPTH", - "AE_CTRL_END", - "AE_CTRL_TRANSFER", - "AE_CTRL_BREAK", - "AE_CTRL_CONTINUE", - "AE_CTRL_SKIP", - "AE_CTRL_PARSE_CONTINUE", - "AE_CTRL_PARSE_PENDING" + EXCEP_TXT (NULL, NULL), + EXCEP_TXT ("AE_CTRL_RETURN_VALUE", "A Method returned a value"), + EXCEP_TXT ("AE_CTRL_PENDING", "Method is calling another method"), + EXCEP_TXT ("AE_CTRL_TERMINATE", "Terminate the executing method"), + EXCEP_TXT ("AE_CTRL_TRUE", "An If or While predicate result"), + EXCEP_TXT ("AE_CTRL_FALSE", "An If or While predicate result"), + EXCEP_TXT ("AE_CTRL_DEPTH", "Maximum search depth has been reached"), + EXCEP_TXT ("AE_CTRL_END", "An If or While predicate is false"), + EXCEP_TXT ("AE_CTRL_TRANSFER", "Transfer control to called method"), + EXCEP_TXT ("AE_CTRL_BREAK", "A Break has been executed"), + EXCEP_TXT ("AE_CTRL_CONTINUE", "A Continue has been executed"), + EXCEP_TXT ("AE_CTRL_SKIP", "Not currently used"), + EXCEP_TXT ("AE_CTRL_PARSE_CONTINUE", "Used to skip over bad opcodes"), + EXCEP_TXT ("AE_CTRL_PARSE_PENDING", "Used to implement AML While loops") }; #endif /* EXCEPTION_TABLE */ diff -Nru acpica-unix-20130117/source/include/acglobal.h acpica-unix-20130214/source/include/acglobal.h --- acpica-unix-20130117/source/include/acglobal.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acglobal.h 2013-02-14 19:52:41.000000000 +0000 @@ -420,10 +420,12 @@ #ifdef ACPI_DISASSEMBLER -BOOLEAN ACPI_INIT_GLOBAL (AcpiGbl_IgnoreNoopOperator, FALSE); +ACPI_EXTERN BOOLEAN ACPI_INIT_GLOBAL (AcpiGbl_IgnoreNoopOperator, FALSE); ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_disasm; ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_verbose; +ACPI_EXTERN BOOLEAN AcpiGbl_NumExternalMethods; +ACPI_EXTERN UINT32 AcpiGbl_ResolvedExternalMethods; ACPI_EXTERN ACPI_EXTERNAL_LIST *AcpiGbl_ExternalList; ACPI_EXTERN ACPI_EXTERNAL_FILE *AcpiGbl_ExternalFileList; #endif diff -Nru acpica-unix-20130117/source/include/aclocal.h acpica-unix-20130214/source/include/aclocal.h --- acpica-unix-20130117/source/include/aclocal.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/aclocal.h 2013-02-14 19:52:41.000000000 +0000 @@ -417,6 +417,7 @@ union acpi_operand_object *ParentPackage; ACPI_NAMESPACE_NODE *Node; UINT32 Flags; + UINT32 ReturnBtype; UINT8 NodeFlags; } ACPI_PREDEFINED_DATA; @@ -427,6 +428,22 @@ #define ACPI_OBJECT_WRAPPED 2 +/* Return object auto-repair info */ + +typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) ( + union acpi_operand_object *OriginalObject, + union acpi_operand_object **ConvertedObject); + +typedef struct acpi_simple_repair_info +{ + char Name[ACPI_NAME_SIZE]; + UINT32 UnexpectedBtypes; + UINT32 PackageIndex; + ACPI_OBJECT_CONVERTER ObjectConverter; + +} ACPI_SIMPLE_REPAIR_INFO; + + /* * Bitmapped return value types * Note: the actual data types must be contiguous, a loop in nspredef.c @@ -1217,6 +1234,7 @@ UINT16 Length; UINT8 Type; UINT8 Flags; + BOOLEAN Resolved; } ACPI_EXTERNAL_LIST; diff -Nru acpica-unix-20130117/source/include/acmacros.h acpica-unix-20130214/source/include/acmacros.h --- acpica-unix-20130117/source/include/acmacros.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acmacros.h 2013-02-14 19:52:41.000000000 +0000 @@ -325,10 +325,12 @@ * where a pointer to an object of type ACPI_OPERAND_OBJECT can also * appear. This macro is used to distinguish them. * - * The "Descriptor" field is the first field in both structures. + * The "DescriptorType" field is the second field in both structures. */ +#define ACPI_GET_DESCRIPTOR_PTR(d) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.CommonPointer) +#define ACPI_SET_DESCRIPTOR_PTR(d, p) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.CommonPointer = (p)) #define ACPI_GET_DESCRIPTOR_TYPE(d) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType) -#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType = t) +#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType = (t)) /* * Macros for the master AML opcode table diff -Nru acpica-unix-20130117/source/include/acnamesp.h acpica-unix-20130214/source/include/acnamesp.h --- acpica-unix-20130117/source/include/acnamesp.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acnamesp.h 2013-02-14 19:52:41.000000000 +0000 @@ -204,6 +204,35 @@ /* + * nsconvert - Dynamic object conversion routines + */ +ACPI_STATUS +AcpiNsConvertToInteger ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject); + +ACPI_STATUS +AcpiNsConvertToString ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject); + +ACPI_STATUS +AcpiNsConvertToBuffer ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject); + +ACPI_STATUS +AcpiNsConvertToUnicode ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject); + +ACPI_STATUS +AcpiNsConvertToResource ( + ACPI_OPERAND_OBJECT *OriginalObject, + ACPI_OPERAND_OBJECT **ReturnObject); + + +/* * nsdump - Namespace dump/print utilities */ void @@ -377,7 +406,7 @@ * predefined methods/objects */ ACPI_STATUS -AcpiNsRepairObject ( +AcpiNsSimpleRepair ( ACPI_PREDEFINED_DATA *Data, UINT32 ExpectedBtypes, UINT32 PackageIndex, diff -Nru acpica-unix-20130117/source/include/acoutput.h acpica-unix-20130214/source/include/acoutput.h --- acpica-unix-20130117/source/include/acoutput.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acoutput.h 2013-02-14 19:52:41.000000000 +0000 @@ -329,9 +329,9 @@ /* Helper macro */ -#define ACPI_TRACE_ENTRY(Name, Function, Cast, Param) \ +#define ACPI_TRACE_ENTRY(Name, Function, Type, Param) \ ACPI_FUNCTION_NAME (Name) \ - Function (ACPI_DEBUG_PARAMETERS, Cast (Param)) + Function (ACPI_DEBUG_PARAMETERS, (Type) (Param)) /* The actual entry trace macros */ @@ -340,13 +340,13 @@ AcpiUtTrace (ACPI_DEBUG_PARAMETERS) #define ACPI_FUNCTION_TRACE_PTR(Name, Pointer) \ - ACPI_TRACE_ENTRY (Name, AcpiUtTracePtr, (void *), Pointer) + ACPI_TRACE_ENTRY (Name, AcpiUtTracePtr, void *, Pointer) #define ACPI_FUNCTION_TRACE_U32(Name, Value) \ - ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, (UINT32), Value) + ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, UINT32, Value) #define ACPI_FUNCTION_TRACE_STR(Name, String) \ - ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, (char *), String) + ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, char *, String) #define ACPI_FUNCTION_ENTRY() \ AcpiUtTrackStackPtr() @@ -361,16 +361,37 @@ * * One of the FUNCTION_TRACE macros above must be used in conjunction * with these macros so that "_AcpiFunctionName" is defined. + * + * There are two versions of most of the return macros. The default version is + * safer, since it avoids side-effects by guaranteeing that the argument will + * not be evaluated twice. + * + * A less-safe version of the macros is provided for optional use if the + * compiler uses excessive CPU stack (for example, this may happen in the + * debug case if code optimzation is disabled.) */ /* Exit trace helper macro */ -#define ACPI_TRACE_EXIT(Function, Cast, Param) \ +#ifndef ACPI_SIMPLE_RETURN_MACROS + +#define ACPI_TRACE_EXIT(Function, Type, Param) \ ACPI_DO_WHILE0 ({ \ - Function (ACPI_DEBUG_PARAMETERS, Cast (Param)); \ - return ((Param)); \ + register Type _Param = (Type) (Param); \ + Function (ACPI_DEBUG_PARAMETERS, _Param); \ + return (_Param); \ }) +#else /* Use original less-safe macros */ + +#define ACPI_TRACE_EXIT(Function, Type, Param) \ + ACPI_DO_WHILE0 ({ \ + Function (ACPI_DEBUG_PARAMETERS, (Type) (Param)); \ + return (Param); \ + }) + +#endif /* ACPI_SIMPLE_RETURN_MACROS */ + /* The actual exit macros */ #define return_VOID \ @@ -380,14 +401,19 @@ }) #define return_ACPI_STATUS(Status) \ - ACPI_TRACE_EXIT (AcpiUtStatusExit, (ACPI_STATUS), Status) + ACPI_TRACE_EXIT (AcpiUtStatusExit, ACPI_STATUS, Status) #define return_PTR(Pointer) \ - ACPI_TRACE_EXIT (AcpiUtPtrExit, (UINT8 *), Pointer) + ACPI_TRACE_EXIT (AcpiUtPtrExit, void *, Pointer) #define return_VALUE(Value) \ - ACPI_TRACE_EXIT (AcpiUtValueExit, (UINT64), Value) + ACPI_TRACE_EXIT (AcpiUtValueExit, UINT64, Value) + +#define return_UINT32(Value) \ + ACPI_TRACE_EXIT (AcpiUtValueExit, UINT32, Value) +#define return_UINT8(Value) \ + ACPI_TRACE_EXIT (AcpiUtValueExit, UINT8, Value) /* Conditional execution */ @@ -436,8 +462,10 @@ #define return_VOID return #define return_ACPI_STATUS(s) return(s) -#define return_VALUE(s) return(s) #define return_PTR(s) return(s) +#define return_VALUE(s) return(s) +#define return_UINT8(s) return(s) +#define return_UINT32(s) return(s) #endif /* ACPI_DEBUG_OUTPUT */ diff -Nru acpica-unix-20130117/source/include/acpixf.h acpica-unix-20130214/source/include/acpixf.h --- acpica-unix-20130117/source/include/acpixf.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acpixf.h 2013-02-14 19:52:41.000000000 +0000 @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20130117 +#define ACPI_CA_VERSION 0x20130214 #include "acconfig.h" #include "actypes.h" diff -Nru acpica-unix-20130117/source/include/actbl2.h acpica-unix-20130214/source/include/actbl2.h --- acpica-unix-20130117/source/include/actbl2.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/actbl2.h 2013-02-14 19:52:41.000000000 +0000 @@ -74,11 +74,13 @@ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ +#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ +#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ @@ -983,6 +985,34 @@ /******************************************************************************* * + * MTMR - MID Timer Table + * Version 1 + * + * Conforms to "Simple Firmware Interface Specification", + * Draft 0.8.2, Oct 19, 2010 + * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table. + * + ******************************************************************************/ + +typedef struct acpi_table_mtmr +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_MTMR; + +/* MTMR entry */ + +typedef struct acpi_mtmr_entry +{ + ACPI_GENERIC_ADDRESS PhysicalAddress; + UINT32 Frequency; + UINT32 Irq; + +} ACPI_MTMR_ENTRY; + + +/******************************************************************************* + * * SLIC - Software Licensing Description Table * Version 1 * @@ -1182,6 +1212,33 @@ /******************************************************************************* * + * VRTC - Virtual Real Time Clock Table + * Version 1 + * + * Conforms to "Simple Firmware Interface Specification", + * Draft 0.8.2, Oct 19, 2010 + * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. + * + ******************************************************************************/ + +typedef struct acpi_table_vrtc +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_VRTC; + +/* VRTC entry */ + +typedef struct acpi_vrtc_entry +{ + ACPI_GENERIC_ADDRESS PhysicalAddress; + UINT32 Irq; + +} ACPI_VRTC_ENTRY; + + +/******************************************************************************* + * * WAET - Windows ACPI Emulated devices Table * Version 1 * diff -Nru acpica-unix-20130117/source/include/actbl3.h acpica-unix-20130214/source/include/actbl3.h --- acpica-unix-20130117/source/include/actbl3.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/actbl3.h 2013-02-14 19:52:41.000000000 +0000 @@ -195,7 +195,7 @@ enum AcpiFpdtType { ACPI_FPDT_TYPE_BOOT = 0, - ACPI_FPDT_TYPE_S3PERF = 1, + ACPI_FPDT_TYPE_S3PERF = 1 }; @@ -257,7 +257,7 @@ enum AcpiS3ptType { ACPI_S3PT_TYPE_RESUME = 0, - ACPI_S3PT_TYPE_SUSPEND = 1, + ACPI_S3PT_TYPE_SUSPEND = 1 }; typedef struct acpi_s3pt_resume @@ -599,28 +599,67 @@ UINT32 Signature; UINT16 Command; UINT16 Status; - UINT64 RequestedAddress; - UINT64 RequestedLength; - UINT64 ActualAddress; - UINT64 ActualLength; - UINT16 Flags; - UINT8 Speed; + UINT16 Version; + UINT8 Capabilities[16]; + UINT8 SetCapabilities[16]; + UINT16 NumParameterBlocks; + UINT32 SetCapabilitiesStatus; } ACPI_RASF_SHARED_MEMORY; +/* RASF Parameter Block Structure Header */ + +typedef struct acpi_rasf_parameter_block +{ + UINT16 Type; + UINT16 Version; + UINT16 Length; + +} ACPI_RASF_PARAMETER_BLOCK; + +/* RASF Parameter Block Structure for PATROL_SCRUB */ + +typedef struct acpi_rasf_patrol_scrub_parameter +{ + ACPI_RASF_PARAMETER_BLOCK Header; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; + +} ACPI_RASF_PATROL_SCRUB_PARAMETER; + /* Masks for Flags and Speed fields above */ #define ACPI_RASF_SCRUBBER_RUNNING 1 #define ACPI_RASF_SPEED (7<<1) +#define ACPI_RASF_SPEED_SLOW (0<<1) +#define ACPI_RASF_SPEED_MEDIUM (4<<1) +#define ACPI_RASF_SPEED_FAST (7<<1) /* Channel Commands */ enum AcpiRasfCommands { - ACPI_RASF_GET_RAS_CAPABILITIES = 1, - ACPI_RASF_GET_PATROL_PARAMETERS = 2, - ACPI_RASF_START_PATROL_SCRUBBER = 3, - ACPI_RASF_STOP_PATROL_SCRUBBER = 4 + ACPI_RASF_EXECUTE_RASF_COMMAND = 1 +}; + +/* Platform RAS Capabilities */ + +enum AcpiRasfCapabiliities +{ + ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, + ACPI_SW_PATROL_SCRUB_EXPOSED = 1 +}; + +/* Patrol Scrub Commands */ + +enum AcpiRasfPatrolScrubCommands +{ + ACPI_RASF_GET_PATROL_PARAMETERS = 1, + ACPI_RASF_START_PATROL_SCRUBBER = 2, + ACPI_RASF_STOP_PATROL_SCRUBBER = 3 }; /* Channel Command flags */ diff -Nru acpica-unix-20130117/source/include/actypes.h acpica-unix-20130214/source/include/actypes.h --- acpica-unix-20130117/source/include/actypes.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/actypes.h 2013-02-14 19:52:41.000000000 +0000 @@ -1226,7 +1226,6 @@ UINT16 ObjectSize; UINT16 MaxDepth; UINT16 CurrentDepth; - UINT16 LinkOffset; #ifdef ACPI_DBG_TRACK_ALLOCATIONS diff -Nru acpica-unix-20130117/source/include/acutils.h acpica-unix-20130214/source/include/acutils.h --- acpica-unix-20130117/source/include/acutils.h 2013-01-17 19:47:51.000000000 +0000 +++ acpica-unix-20130214/source/include/acutils.h 2013-02-14 19:52:42.000000000 +0000 @@ -706,10 +706,11 @@ UINT64 *OutQuotient, UINT32 *OutRemainder); + /* * utmisc */ -const char * +const ACPI_EXCEPTION_INFO * AcpiUtValidateException ( ACPI_STATUS Status); diff -Nru acpica-unix-20130117/source/tools/acpihelp/ahdecode.c acpica-unix-20130214/source/tools/acpihelp/ahdecode.c --- acpica-unix-20130117/source/tools/acpihelp/ahdecode.c 2013-01-17 19:47:52.000000000 +0000 +++ acpica-unix-20130214/source/tools/acpihelp/ahdecode.c 2013-02-14 19:52:42.000000000 +0000 @@ -85,6 +85,9 @@ #define AH_DISPLAY_EXCEPTION(Status, Name) \ printf ("%.4X: %s\n", Status, Name) +#define AH_DISPLAY_EXCEPTION_TEXT(Status, Exception) \ + printf ("%.4X: %-28s (%s)\n", Status, Exception->Name, Exception->Description) + #define BUFFER_LENGTH 128 #define LINE_BUFFER_LENGTH 512 @@ -878,9 +881,9 @@ AhDecodeException ( char *HexString) { - const char *ExceptionName; - UINT32 Status; - UINT32 i; + const ACPI_EXCEPTION_INFO *ExceptionInfo; + UINT32 Status; + UINT32 i; /* @@ -889,8 +892,8 @@ */ if (!HexString) { - printf ("All defined ACPI exception codes:\n\n"); - AH_DISPLAY_EXCEPTION (0, "AE_OK"); + printf ("All defined ACPICA exception codes:\n\n"); + AH_DISPLAY_EXCEPTION (0, "AE_OK (No error occurred)"); /* Display codes in each block of exception types */ @@ -899,14 +902,14 @@ Status = i; do { - ExceptionName = AcpiUtValidateException ((ACPI_STATUS) Status); - if (ExceptionName) + ExceptionInfo = AcpiUtValidateException ((ACPI_STATUS) Status); + if (ExceptionInfo) { - AH_DISPLAY_EXCEPTION (Status, ExceptionName); + AH_DISPLAY_EXCEPTION_TEXT (Status, ExceptionInfo); } Status++; - } while (ExceptionName); + } while (ExceptionInfo); } return; } @@ -916,7 +919,7 @@ Status = ACPI_STRTOUL (HexString, NULL, 16); if (!Status) { - printf ("%s: Invalid hexadecimal exception code\n", HexString); + printf ("%s: Invalid hexadecimal exception code value\n", HexString); return; } @@ -926,12 +929,12 @@ return; } - ExceptionName = AcpiUtValidateException ((ACPI_STATUS) Status); - if (!ExceptionName) + ExceptionInfo = AcpiUtValidateException ((ACPI_STATUS) Status); + if (!ExceptionInfo) { AH_DISPLAY_EXCEPTION (Status, "Unknown exception code"); return; } - AH_DISPLAY_EXCEPTION (Status, ExceptionName); + AH_DISPLAY_EXCEPTION_TEXT (Status, ExceptionInfo); } diff -Nru acpica-unix-20130117/source/tools/acpisrc/astable.c acpica-unix-20130214/source/tools/acpisrc/astable.c --- acpica-unix-20130117/source/tools/acpisrc/astable.c 2013-01-17 19:47:53.000000000 +0000 +++ acpica-unix-20130214/source/tools/acpisrc/astable.c 2013-02-14 19:52:43.000000000 +0000 @@ -215,6 +215,7 @@ {"ACPI_EVENT_STATUS", SRC_TYPE_SIMPLE}, {"ACPI_EVENT_TYPE", SRC_TYPE_SIMPLE}, {"ACPI_EXCEPTION_HANDLER", SRC_TYPE_SIMPLE}, + {"ACPI_EXCEPTION_INFO", SRC_TYPE_STRUCT}, {"ACPI_EXDUMP_INFO", SRC_TYPE_STRUCT}, {"ACPI_EXECUTE_OP", SRC_TYPE_SIMPLE}, {"ACPI_EXECUTE_TYPE", SRC_TYPE_SIMPLE}, @@ -259,6 +260,7 @@ {"ACPI_MEM_SPACE_CONTEXT", SRC_TYPE_STRUCT}, {"ACPI_MEMORY_ATTRIBUTE", SRC_TYPE_STRUCT}, {"ACPI_MEMORY_LIST", SRC_TYPE_STRUCT}, + {"ACPI_MTMR_ENTRY", SRC_TYPE_STRUCT}, {"ACPI_MUTEX", SRC_TYPE_SIMPLE}, {"ACPI_MUTEX_HANDLE", SRC_TYPE_SIMPLE}, {"ACPI_MUTEX_INFO", SRC_TYPE_STRUCT}, @@ -337,6 +339,9 @@ {"ACPI_PREDEFINED_INFO", SRC_TYPE_UNION}, {"ACPI_PREDEFINED_NAMES", SRC_TYPE_STRUCT}, {"ACPI_PSCOPE_STATE", SRC_TYPE_STRUCT}, + {"ACPI_RASF_PARAMETER_BLOCK", SRC_TYPE_STRUCT}, + {"ACPI_RASF_PATROL_SCRUB_PARAMETER", SRC_TYPE_STRUCT}, + {"ACPI_RASF_SHARED_MEMORY", SRC_TYPE_STRUCT}, {"ACPI_REPAIR_FUNCTION", SRC_TYPE_SIMPLE}, {"ACPI_REPAIR_INFO", SRC_TYPE_STRUCT}, {"ACPI_RESOURCE", SRC_TYPE_STRUCT}, @@ -380,6 +385,7 @@ {"ACPI_SCOPE_STATE", SRC_TYPE_STRUCT}, {"ACPI_SEMAPHORE", SRC_TYPE_SIMPLE}, {"ACPI_SIGNAL_FATAL_INFO", SRC_TYPE_STRUCT}, + {"ACPI_SIMPLE_REPAIR_INFO", SRC_TYPE_STRUCT}, {"ACPI_SIZE", SRC_TYPE_SIMPLE}, {"ACPI_SLEEP_FUNCTION", SRC_TYPE_SIMPLE}, {"ACPI_SLEEP_FUNCTIONS", SRC_TYPE_STRUCT}, @@ -395,8 +401,10 @@ {"ACPI_TABLE_HEADER", SRC_TYPE_STRUCT}, {"ACPI_TABLE_INFO", SRC_TYPE_STRUCT}, {"ACPI_TABLE_LIST", SRC_TYPE_STRUCT}, + {"ACPI_TABLE_MTMR", SRC_TYPE_STRUCT}, {"ACPI_TABLE_SUPPORT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_TYPE", SRC_TYPE_SIMPLE}, + {"ACPI_TABLE_VRTC", SRC_TYPE_STRUCT}, {"ACPI_TAG_INFO", SRC_TYPE_STRUCT}, {"ACPI_THREAD_ID", SRC_TYPE_SIMPLE}, {"ACPI_THREAD_STATE", SRC_TYPE_STRUCT}, @@ -406,6 +414,7 @@ {"ACPI_UUID", SRC_TYPE_STRUCT}, {"ACPI_VENDOR_UUID", SRC_TYPE_STRUCT}, {"ACPI_VENDOR_WALK_INFO", SRC_TYPE_STRUCT}, + {"ACPI_VRTC_ENTRY", SRC_TYPE_STRUCT}, {"ACPI_WALK_AML_CALLBACK", SRC_TYPE_SIMPLE}, {"ACPI_WALK_CALLBACK", SRC_TYPE_SIMPLE}, {"ACPI_WALK_RESOURCE_CALLBACK", SRC_TYPE_SIMPLE}, diff -Nru acpica-unix-20130117/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl acpica-unix-20130214/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl --- acpica-unix-20130117/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl 2013-01-17 19:48:49.000000000 +0000 +++ acpica-unix-20130214/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl 2013-02-14 19:53:40.000000000 +0000 @@ -419,7 +419,18 @@ Method(m14b) { m149(100) - m14a(101) + /* + * We are forced by Windows and BIOS code to increase the maximum stall + * time to 255, this is in violation of the ACPI specification. + * ACPI specification requires that Stall() does not relinquish the + * processor, and delays longer than 100 usec should use Sleep() + * instead. We allow stall up to 255 usec for compatibility with other + * interpreters and existing BIOS. + * + * So we remove this test from test suite. + * + * m14a(101) + */ } // Concatenate() when the number of result characters in string exceeds 200 @@ -707,8 +718,14 @@ ConcatenateResTemplate(RT00, Local2) + /* + * Note: As for there is not a separate type for ResourceTemplate, + * ResourceTemplate is in fact a buffer but interpreted as + * ResourceTemplate. If the buffer has no complete END_TAG descriptor, + * we get AE_AML_NO_RESOURCE_END_TAG instead of AE_AML_OPERAND_TYPE. + */ if (EXCV) { - CH04(ts, 0, 47, z058, 100, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 71, z058, 100, 0, 0) // AE_AML_NO_RESOURCE_END_TAG } else { CH04(ts, 0, 0xff, z058, 100, 0, 0) } @@ -720,7 +737,7 @@ ConcatenateResTemplate(RT00, Local2) // Bug 189. - CH04(ts, 0, 47, z058, 101, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 71, z058, 101, 0, 0) // AE_AML_NO_RESOURCE_END_TAG // Not resource template buffer @@ -729,7 +746,7 @@ ConcatenateResTemplate(RT00, Local2) if (EXCV) { - CH04(ts, 0, 47, z058, 102, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 71, z058, 102, 0, 0) // AE_AML_NO_RESOURCE_END_TAG } else { CH04(ts, 0, 0xff, z058, 102, 0, 0) } @@ -741,7 +758,7 @@ ConcatenateResTemplate(RT00, Local2) // Bug 190. - CH04(ts, 0, 47, z058, 103, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 71, z058, 103, 0, 0) // AE_AML_NO_RESOURCE_END_TAG // Like resource template buffer @@ -750,7 +767,7 @@ ConcatenateResTemplate(RT00, Local2) if (EXCV) { - CH04(ts, 0, 47, z058, 104, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 71, z058, 104, 0, 0) // AE_AML_NO_RESOURCE_END_TAG } else { CH04(ts, 0, 0xff, z058, 104, 0, 0) } @@ -1292,14 +1309,22 @@ OperationRegion(OPR0, SystemMemory, off0, len0) + //17+1 > 17. Field(OPR0, AnyAcc, NoLock, Preserve) { - Offset(0x10), FU00, 8} - - Store(0x12, FU00) + Offset(0x11), FU00, 8} + //16+2 > 17. + Field(OPR0, WordAcc, NoLock, Preserve) { + Offset(0x10), FU01, 8} CH03(ts, z058, 191, 0, 0) + Store(0x12, FU00) + CH04(ts, 0, 53, z058, 192, 0, 0) // AE_AML_REGION_LIMIT + + Store(0x12, FU01) + + CH04(ts, 0, 53, z058, 193, 0, 0) // AE_AML_REGION_LIMIT } // Attempt to write into DataTableRegion @@ -1314,11 +1339,11 @@ Store(FU00, Local0) - CH03(ts, z058, 193, 0, 0) + CH03(ts, z058, 194, 0, 0) Store(0, FU00) - CH04(ts, 0, 16, z058, 194, 0, 0) // AE_SUPPORT + CH04(ts, 0, 16, z058, 195, 0, 0) // AE_SUPPORT } // Check non-String DataTableRegion *String arguments @@ -1333,31 +1358,31 @@ CH03(ts, z058, 193, 0, 0) DataTableRegion (DR00, b000, "", "") - CH04(ts, 0, 5, z058, 195, 0, 0) // AE_NOT_FOUND + CH04(ts, 0, 5, z058, 196, 0, 0) // AE_NOT_FOUND DataTableRegion (DR01, "SSDT", b000, "") - CH04(ts, 0, 5, z058, 196, 0, 0) // AE_NOT_FOUND + CH04(ts, 0, 5, z058, 197, 0, 0) // AE_NOT_FOUND DataTableRegion (DR02, "SSDT", "", b000) - CH04(ts, 0, 5, z058, 197, 0, 0) // AE_NOT_FOUND + CH04(ts, 0, 5, z058, 198, 0, 0) // AE_NOT_FOUND DataTableRegion (DR03, i000, "", "") - CH04(ts, 0, 5, z058, 198, 0, 0) // AE_NOT_FOUND + CH04(ts, 0, 5, z058, 199, 0, 0) // AE_NOT_FOUND DataTableRegion (DR04, "SSDT", i000, "") - CH04(ts, 0, 5, z058, 199, 0, 0) // AE_NOT_FOUND + CH04(ts, 0, 5, z058, 200, 0, 0) // AE_NOT_FOUND DataTableRegion (DR05, "SSDT", "", i000) - CH04(ts, 0, 5, z058, 200, 0, 0) // AE_NOT_FOUND + CH04(ts, 0, 5, z058, 201, 0, 0) // AE_NOT_FOUND DataTableRegion (DR06, p000, "", i000) - CH04(ts, 0, 47, z058, 201, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 47, z058, 202, 0, 0) // AE_AML_OPERAND_TYPE DataTableRegion (DR07, "SSDT", p000, "") - CH04(ts, 0, 47, z058, 202, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 47, z058, 203, 0, 0) // AE_AML_OPERAND_TYPE DataTableRegion (DR08, "SSDT", "", p000) - CH04(ts, 0, 47, z058, 203, 0, 0) // AE_AML_OPERAND_TYPE + CH04(ts, 0, 47, z058, 204, 0, 0) // AE_AML_OPERAND_TYPE } // Check SMBus OpRegion restictions @@ -1375,12 +1400,12 @@ // Create improper SMBus data buffer Name(BUFF, Buffer(33){}) - CH03(ts, z058, 204, 0, 0) + CH03(ts, z058, 205, 0, 0) // Invoke Write Quick transaction Store(BUFF, FLD0) - CH04(ts, 0, 54, z058, 205, 0, 0) // AE_AML_BUFFER_LIMIT + CH04(ts, 0, 54, z058, 206, 0, 0) // AE_AML_BUFFER_LIMIT } /* Name space issues */ diff -Nru acpica-unix-20130117/tests/aslts/src/runtime/collections/functional/reference/ref71.asl acpica-unix-20130214/tests/aslts/src/runtime/collections/functional/reference/ref71.asl --- acpica-unix-20130117/tests/aslts/src/runtime/collections/functional/reference/ref71.asl 2013-01-17 19:48:54.000000000 +0000 +++ acpica-unix-20130214/tests/aslts/src/runtime/collections/functional/reference/ref71.asl 2013-02-14 19:53:44.000000000 +0000 @@ -50,7 +50,10 @@ } CH03(ts, z109, 0, 0, 0) Store(Local7, Local0) - CH04(ts, 0, 0xff, z109, 1, 0, 0) + if (LNot(SLCK)) + { + CH04(ts, 0, 0xff, z109, 1, 0, 0) + } } Method(m901) { return (0xabc0012) } @@ -89,42 +92,60 @@ CH03(ts, z109, 7, 0, 0) Store(d900, Local0) - CH04(ts, 0, 0xff, z109, 8, 0, 0) + if (LNot(SLCK)){ + CH04(ts, 0, 0xff, z109, 8, 0, 0) + } CH03(ts, z109, 9, 0, 0) Store(e900, Local0) - CH04(ts, 0, 0xff, z109, 10, 0, 0) + if (LNot(SLCK)){ + CH04(ts, 0, 0xff, z109, 10, 0, 0) + } /* * 21.12.2005. * No exception now. * Bug 114: could work improperly by the same reason as Bug 114. + * MS compiler allow this situation, iASL compiler just allows this + * for compatibility, iASL assume this is compiled to a method + * invacation. */ if (X114) { CH03(ts, z109, 11, 0, 0) Store(m901, Local0) - CH04(ts, 0, 0xff, z109, 12, 0, 0) + //CH04(ts, 0, 0xff, z109, 12, 0, 0) } CH03(ts, z109, 13, 0, 0) Store(mx90, Local0) - CH04(ts, 0, 0xff, z109, 14, 0, 0) + if (LNot(SLCK)){ + CH04(ts, 0, 0xff, z109, 14, 0, 0) + } CH03(ts, z109, 15, 0, 0) Store(r900, Local0) - CH04(ts, 0, 0xff, z109, 16, 0, 0) + if (LNot(SLCK)){ + CH04(ts, 0, 0xff, z109, 16, 0, 0) + } CH03(ts, z109, 17, 0, 0) Store(pw90, Local0) - CH04(ts, 0, 0xff, z109, 18, 0, 0) + if (LNot(SLCK)){ + CH04(ts, 0, 0xff, z109, 18, 0, 0) + } CH03(ts, z109, 19, 0, 0) Store(pr90, Local0) - CH04(ts, 0, 0xff, z109, 20, 0, 0) + if (LNot(SLCK)){ + CH04(ts, 0, 0xff, z109, 20, 0, 0) + } CH03(ts, z109, 21, 0, 0) Store(tz90, Local0) - CH04(ts, 0, 0xff, z109, 22, 0, 0) + if (LNot(SLCK)) + { + CH04(ts, 0, 0xff, z109, 22, 0, 0) + } Store(bf90, Local0) Store(ObjectType(Local0), Local7) diff -Nru acpica-unix-20130117/tests/aslts/src/runtime/collections/functional/region/regionfield.asl acpica-unix-20130214/tests/aslts/src/runtime/collections/functional/region/regionfield.asl --- acpica-unix-20130117/tests/aslts/src/runtime/collections/functional/region/regionfield.asl 2013-01-17 19:48:55.000000000 +0000 +++ acpica-unix-20130214/tests/aslts/src/runtime/collections/functional/region/regionfield.asl 2013-02-14 19:53:45.000000000 +0000 @@ -1599,7 +1599,7 @@ OperationRegion (GPO2, GeneralPurposeIO, 0, 64) Method(_REG,2) {} - Name(_DEP, Package() {"\\_SB.GPI2"}) + Name(_DEP, Package() {\_SB}) // Update rule must be Preserve Binary files /tmp/5MHwkP4zu5/acpica-unix-20130117/tests/misc/grammar.aml and /tmp/m4JSiHxM4m/acpica-unix-20130214/tests/misc/grammar.aml differ