diff options
author | Erik Schmauss <erik.schmauss@intel.com> | 2017-09-11 13:27:53 -0700 |
---|---|---|
committer | Erik Schmauss <erik.schmauss@intel.com> | 2017-11-10 14:36:41 -0800 |
commit | 407244a52d8242871952b5d682c363b3a797734f (patch) | |
tree | 8420d9b9ff9a9bddddaa18b6995d28e0c6622ded /tests/aslts/src/runtime/collections/functional/table | |
parent | fe4aa377eb9786a47e23614576cb1e513dd59bba (diff) | |
download | acpica-407244a52d8242871952b5d682c363b3a797734f.tar.gz |
ASLTS: converting files to ASL plus with converter
functional/control test case has been left unconverted for
readability of deeply nested control statements (if, switch, while)
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Diffstat (limited to 'tests/aslts/src/runtime/collections/functional/table')
6 files changed, 5996 insertions, 5385 deletions
diff --git a/tests/aslts/src/runtime/collections/functional/table/DECL.asl b/tests/aslts/src/runtime/collections/functional/table/DECL.asl index eec10dcdf..b0d544dc2 100644 --- a/tests/aslts/src/runtime/collections/functional/table/DECL.asl +++ b/tests/aslts/src/runtime/collections/functional/table/DECL.asl @@ -1,32 +1,30 @@ -/* - * Some or all of this work - Copyright (c) 2006 - 2017, 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: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. - */ - - -Include("../../../../runtime/collections/functional/table/load.asl") -Include("../../../../runtime/collections/functional/table/unload.asl") -Include("../../../../runtime/collections/functional/table/loadtable.asl") + /* + * Some or all of this work - Copyright (c) 2006 - 2017, 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: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + Include ("../../../../runtime/collections/functional/table/load.asl") + Include ("../../../../runtime/collections/functional/table/unload.asl") + Include ("../../../../runtime/collections/functional/table/loadtable.asl") diff --git a/tests/aslts/src/runtime/collections/functional/table/MAIN.asl b/tests/aslts/src/runtime/collections/functional/table/MAIN.asl index c370acb40..5a705b1ec 100644 --- a/tests/aslts/src/runtime/collections/functional/table/MAIN.asl +++ b/tests/aslts/src/runtime/collections/functional/table/MAIN.asl @@ -25,32 +25,23 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +DefinitionBlock ("table", "DSDT", 2, "Intel", "Many", 0x00000001) +{ + /* All declarations */ + Include ("../../../../runtime/cntl/DECL.asl") + Include ("../../../../runtime/collections/functional/table/DECL.asl") + Method (MAIN, 0, NotSerialized) + { + /* Initialization */ -DefinitionBlock( - "table.aml", // Output filename - "DSDT", // Signature - 0x02, // DSDT Revision - "Intel", // OEMID - "Many", // TABLE ID - 0x00000001 // OEM Revision - ) { + STRT (0x00) + /* Run verification methods */ + Include ("../../../../runtime/collections/functional/table/RUN.asl") + /* Final actions */ - // All declarations - Include("../../../../runtime/cntl/DECL.asl") - Include("../../../../runtime/collections/functional/table/DECL.asl") - - Method(MAIN) { - - // Initialization - STRT(0) - - // Run verification methods - Include("../../../../runtime/collections/functional/table/RUN.asl") - - // Final actions - Store(FNSH(), Local7) - Store(0, Local7) - - return (Local7) - } + Store (FNSH (), Local7) + Local7 = 0x00 + Return (Local7) + } } + diff --git a/tests/aslts/src/runtime/collections/functional/table/RUN.asl b/tests/aslts/src/runtime/collections/functional/table/RUN.asl index 99384255b..437d11abf 100644 --- a/tests/aslts/src/runtime/collections/functional/table/RUN.asl +++ b/tests/aslts/src/runtime/collections/functional/table/RUN.asl @@ -1,35 +1,35 @@ -/* - * Some or all of this work - Copyright (c) 2006 - 2017, 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: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. - */ + /* + * Some or all of this work - Copyright (c) 2006 - 2017, 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: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + If (STTT ("Table management: Load, Unload and LoadTable", TCLF, 0x0D, W00D)) + { + TLD0 () + TUL0 () + TLT0 () + } - -if (STTT("Table management: Load, Unload and LoadTable", TCLF, 13, W00d)) { - TLD0() - TUL0() - TLT0() -} -FTTT() + FTTT () diff --git a/tests/aslts/src/runtime/collections/functional/table/load.asl b/tests/aslts/src/runtime/collections/functional/table/load.asl index c5908564b..2fed3d2c3 100644 --- a/tests/aslts/src/runtime/collections/functional/table/load.asl +++ b/tests/aslts/src/runtime/collections/functional/table/load.asl @@ -1,2273 +1,2579 @@ -/* - * Some or all of this work - Copyright (c) 2006 - 2017, 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: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. - */ - -/* - * Load ASL operator functionality - */ - -/* - * This sub-test is intended to comprehensively verify - * the Load ASL operator functionality. - * - * Performs a run-time load of a Definition Block. - * - * 17.5.67 Load (Load Definition Block) - * Syntax - * Load (Object, DDBHandle) - * - * On testing the following issues should be covered: - * - * - loading SSDT from a SystemMemory OpRegion, - * - * - loading SSDT from a Region Field in a OpRegion of any type, - * - * - "namespace location to load the Definition Block is relative - * to the current namespace" scope, - * - * - loading a number of different SSDTs, - * - * - global and dynamic declarations of OpRegions and the appropriate - * _REG Methods invocation for the loaded SSDT, - * - * - global and dynamic declarations of OpRegions and Region Fields, - * containing the loaded SSDT, - * - * - an Object of any type can be used as the DDBHandle argument, - * - * - the DDBHandle argument of the Load operator becames an Object - * of the DDBHandle type, - * - * - the DDBHandle Object returned from the Load operator can be used - * to unload the SSDT, - * - * - exceptional conditions caused by inappropriate data: - * = the Object argument does not refer to an operation region field - * or an operation region, - * = an OpRegion passed as the Object argument is not of SystemMemory type, - * = the table contained in an OpRegion (Field) is not an SSDT, - * = the length of the supplied SSDT is greater than the length of the - * respective OpRegion or Region Field, - * = the length of the supplied SSDT is less than the length the Header - * = the checksum of the supplied SSDT is invalid, - * = AE_OWNER_ID_LIMIT exception when too many Tables loaded, - * = the specified SSDT is already loaded, - * = there already is an previously loaded Object referred by the path - * in the Namespace. - * - * Can not be tested following issues: - * - providing of the table referenced by Load to be "in memory marked by - * AddressRangeReserved or AddressRangeNVS", - * - overriding the supplied SSDT with "a newer revision Definition Block - * of the same OEM Table ID" by the OS, - * - loading a SSDT to be a synchronous operation ("the control methods - * defined in the Definition Block are not executed during load time") - */ - - // Integer - External(\AUXD.INT0) - // String - External(\AUXD.STR0) - // Buffer - External(\AUXD.BUF0) - // Package - External(\AUXD.PAC0) - // Device - External(\AUXD.DEV0) - // Event - External(\AUXD.EVE0) - // Method - External(\AUXD.MMM0) - // Mutex - External(\AUXD.MTX0) - // Power Resource - External(\AUXD.PWR0) - // Processor - External(\AUXD.CPU0) - // Thermal Zone - External(\AUXD.TZN0) - // Buffer Field - External(\AUXD.BFL0) - // Field Unit - External(\AUXD.FLU0) - // OpRegion - External(\AUXD.OPR0) - -Name(z174, 174) - -Device(DTM0) { - - // Originated from ssdt0.asl: iasl -tc ssdt0.asl - Name(BUF0, Buffer() { - 0x53,0x53,0x44,0x54,0x34,0x00,0x00,0x00, /* 00000000 "SSDT4..." */ - 0x02,0x98,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */ - 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x15,0x12,0x06,0x20,0x14,0x0F,0x5C,0x53, /* 00000020 "... ..\S" */ - 0x53,0x53,0x30,0x00,0xA4,0x0D,0x5C,0x53, /* 00000028 "SS0...\S" */ - 0x53,0x53,0x30,0x00, - }) - - Name (SNML, "0123456789ABCDEF") - Name (NNML, 16) // <= sizeof (SNML) - - // Take into account AE_OWNER_ID_LIMIT - Name (HI0M, 256) // <= (NNML * NNML) - - Name (HI0P, Package(HI0M){}) - Name (HI0N, 0) - Name (INIF, 0x00) - - OperationRegion (IST0, SystemMemory, 0, 0x34) - - Field(IST0, ByteAcc, NoLock, Preserve) { - RFU0, 0x1a0, - } - - Field(IST0, ByteAcc, NoLock, Preserve) { - SIG, 32, - LENG, 32, - REV, 8, - SUM, 8, - OID, 48, - OTID, 64, - OREV, 32, - CID, 32, - CREV, 32, - Offset(39), - SSNM, 32 - } - - // components/utilities/utmisc.c AcpiUtGenerateChecksum() analog - Method(CHSM, 2, Serialized) // buf, len - { - Name(lpN0, 0) - Name(lpC0, 0) - - Store(0, Local0) // sum - - Store(arg1, lpN0) - Store(0, lpC0) - - While(lpN0) { - Store(DeRefOf(Index(arg0, lpC0)), Local1) - Add(Local0, Local1, Local0) - Mod(Local0, 0x100, Local0) - Decrement(lpN0) - Increment(lpC0) - } - - Subtract(0, Local0, Local0) - Mod(Local0, 0x100, Local0) - - Store("checksum", Debug) - Store(Local0, Debug) - - return (Local0) - } - - // Initializes multiple Tables Load test - Method(INIT) - { - Store(Sizeof(SNML), Local0) - if (LGreater(NNML, Local0)) { - Store(Concatenate("INIT: test error, check NNML <= Sizeof(SNML):", - ToDecimalString(Local0)), Debug) - Return (1) - } - Multiply(Local0, Local0, Local0) - if (LGreater(HI0M, Local0)) { - Store(Concatenate("INIT: test error, check HI0M <= 0x", - Local0), Debug) - Return (1) - } - - if (INIF) { - Store("INIT: OpRegion has been initialized previously", Debug) - Return (1) - } - - Store(BUF0, RFU0) - Store(1, INIF) - Store("INIT: OpRegion initialized with SSDT", Debug) - - Return (0) - } - - // Prepares and Loads the next Table of multiple Tables Load test - Method(LD,, Serialized) - { - if (LNot(LLess(HI0N, HI0M))) { - Store("LD: too many tables loaded", Debug) - Return (1) - } - - Multiply(HI0N, 0x30, Local2) - - OperationRegion (IST0, SystemMemory, Local2, 0x34) - - Field(IST0, ByteAcc, NoLock, Preserve) { - RFU0, 0x1a0, - } - - Field(IST0, ByteAcc, NoLock, Preserve) { - SIG, 32, - LENG, 32, - REV, 8, - SUM, 8, - OID, 48, - OTID, 64, - OREV, 32, - CID, 32, - CREV, 32, - Offset(39), - SSNM, 32, - Offset(47), - SSRT, 32 - } - - Store(BUF0, RFU0) - - // Modify Revision field of SSDT - Store(Add(CREV, 1), CREV) - - // Modify SSNM Object Name - Divide(HI0N, NNML, Local0, Local1) - Store(Derefof(Index(SNML, Local1)), Local1) - ShiftLeft(Local1, 16, Local1) - Store(Derefof(Index(SNML, Local0)), Local0) - ShiftLeft(Local0, 24, Local0) - Add(Local0, Local1, Local0) - Add(Local0, 0x5353, Local0) - Store(Local0, SSNM) - Store(SSNM, Debug) - - // Modify SSNM Method Return String - Store(Local0, SSRT) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - Load(RFU0, Index(HI0P, HI0N)) - Increment(HI0N) - Store("LD: SSDT Loaded", Debug) - - Return (0) - } - - // UnLoads the last Table of multiple Tables Load test - Method(UNLD) - { - if (LEqual(HI0N, 0)) { - Store("UNLD: there are no SSDT loaded", Debug) - Return (1) - } - Decrement(HI0N) - - UnLoad(DerefOf(Index(HI0P, HI0N))) - Store("UNLD: SSDT UnLoaded", Debug) - - Return (0) - } - - External(\SSS0, MethodObj) - - Name(HI0, 0) - - // Simple Load test auxiliary method - // Arg1: DDBH, 0 - Local Named, 1 - Global Named, - // 2 - LocalX, 3 - element of Package - Method(m000, 2, Serialized) - { - Name(HI0, 0) - Name(PHI0, Package(1){}) - - Concatenate(arg0, "-m000", arg0) - - Store(BUF0, RFU0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - - // Modify Revision field of SSDT - Store(Add(CREV, 1), CREV) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x001, __LINE__, 0)) { - return - } - - // Load operator execution - switch (ToInteger (arg1)) { - case (0) {Load(RFU0, HI0)} - case (1) {Load(RFU0, \DTM0.HI0)} - case (2) {Load(RFU0, Local2)} - case (3) {Load(RFU0, Index(PHI0, 0))} - default { - Store("Unexpected parameter of the test", Debug) - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - } - - if (CH03(arg0, z174, 0x003, __LINE__, 0)) { - return - } - - Store("Table Loaded", Debug) - - // Check DDBHandle ObjectType - switch (ToInteger (arg1)) { - case (0) {Store(ObjectType(HI0), Local1)} - case (1) {Store(ObjectType(\DTM0.HI0), Local1)} - case (2) {Store(ObjectType(Local2), Local1)} - case (3) {Store(ObjectType(Index(PHI0, 0)), Local1)} - } - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z174, __LINE__, 0, 0, Local1, c017) - } - - // Check the new Object appears - - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 0) - } - - Store(ObjectType(Local0), Local1) - if (LNotEqual(Local1, c010)) { // Method - err(arg0, z174, __LINE__, 0, 0, Local1, c010) - } else { - Store(\SSS0(), Local0) - if (CH03(arg0, z174, 0x007, __LINE__, 1)) { - return - } - if (LNotEqual("\\SSS0", Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, "\\SSS0") - } - } - - // UnLoad operator execution - switch (ToInteger (arg1)) { - case (0) {UnLoad(HI0)} - case (1) {UnLoad(\DTM0.HI0)} - case (2) {UnLoad(Local2)} - case (3) {UnLoad(DeRefof(Index(PHI0, 0)))} - } - - if (CH03(arg0, z174, 0x009, __LINE__, 0)) { - return - } - - Store("Table Unloaded", Debug) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - } - - return - } - - // Simple Load test auxiliary method for ArgX, part1 - // Arg1 - reference to store the DDBHandle - Method(m001, 2) - { - Concatenate(arg0, "-m001", arg0) - - Store(BUF0, RFU0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - // Modify Revision field of SSDT - Store(Add(CREV, 1), CREV) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x00c, __LINE__, 0)) { - return (1) - } - - // Load operator execution - Load(RFU0, Arg1) - - if (CH03(arg0, z174, 0x00d, __LINE__, 0)) { - return (1) - } - - Store("SSDT Loaded", Debug) - - return (0) - } - - // Simple Load test auxiliary method for ArgX, part2 - // Arg1 - DDBHandle - Method(m002, 2) - { - Concatenate(arg0, "-m002", arg0) - - // Check DDBHandle ObjectType - Store(ObjectType(Arg1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z174, __LINE__, 0, 0, Local1, c017) - } - - // Check the new Object appears - - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 0) - } - - Store(ObjectType(Local0), Local1) - if (LNotEqual(Local1, c010)) { // Method - err(arg0, z174, __LINE__, 0, 0, Local1, c010) - } else { - Store(\SSS0(), Local0) - if (CH03(arg0, z174, 0x011, __LINE__, 1)) { - return - } - if (LNotEqual("\\SSS0", Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, "\\SSS0") - } - } - - UnLoad(Arg1) - - if (CH03(arg0, z174, 0x013, __LINE__, 0)) { - return - } - - Store("SSDT Unloaded", Debug) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - } - - return - } - - // Loading SSDT from a SystemMemory OpRegion, - // different targets for DDBHandle. - // Check DDBHandle storing into different Object locations: - - // DDBHandle storing into Named Integer - Method(tst0, 1) - { - Concatenate(arg0, "-tst0", arg0) - - // Local Named Integer - m000(arg0, 0) - - // Global Named Integer - m000(arg0, 1) - } - - // DDBHandle storing into LocalX - Method(tst1, 1) - { - Concatenate(arg0, "-tst1", arg0) - - // LocalX - m000(arg0, 2) - } - - // DDBHandle storing into Package element - Method(tst2, 1) - { - Concatenate(arg0, "-tst2", arg0) - - // Package element - // Crash on copying the specific reference Object - if (y261) { - m000(arg0, 3) - } - } - - // DDBHandle storing into an Object by Reference in Argx - Method(tst3, 1, Serialized) - { - Name(HI0, 0) - - Concatenate(arg0, "-tst3", arg0) - - // Named by Reference in ArgX - if (m001(arg0, Refof(HI0))) { - return - } - m002(arg0, HI0) - - // LocalX by Reference in ArgX - if (m001(arg0, Refof(Local2))) { - return - } - m002(arg0, Local2) - - // Package element by Reference in ArgX - if (y133) { - Name(PHI0, Package(1){0}) - Store(Index(PHI0, 0), Local0) - if (m001(arg0, Local0)) { - return - } - m002(arg0, DeRefof(Local0)) - } - return - } - - // Combination of the OperationRegion operator arguments - - OperationRegion(RGN0, SystemMemory, 0x00, 0x201) - OperationRegion(RGN1, SystemIO, 0x200, 0x203) - OperationRegion(RGN2, PCI_Config, 0x400, 0x205) - OperationRegion(RGN3, EmbeddedControl, 0x600, 0x207) - OperationRegion(RGN4, SMBus, 0x800, 0x209) - OperationRegion(RGN5, SystemCMOS, 0xa00, 0x20b) - OperationRegion(RGN6, PciBarTarget, 0xc00, 0x20d) - - // UserDefRegionSpace - OperationRegion(RGN7, 0x80, 0xd00, 0x217) - OperationRegion(RGN8, 0xcf, 0xe00, 0x218) - OperationRegion(RGN9, 0xff, 0xf00, 0x219) - - // Loading SSDT from a Field of an OpRegion of any type, - // different targets for DDBHandle. - - // Check DDBHandle storing into different Object locations: - // Named Integer, LocalX, by Reference in Argx, etc. - // m003(CallChain, Index, Region) - Method(m003, 3) - { - Concatenate(arg0, "-m003", arg0) - - // Auxiliary method: - // Arg1 - choice of a target - // Arg2 - OpRegion Object of a specified type - Method(m000, 3, Serialized) - { - Name(HI0, 0) - Name(PHI0, Package(1){}) - - OperationRegion(OPRm, 0xff, 0, 0x1000) - - Concatenate(arg0, "-m000", arg0) - - CopyObject(arg2, OPRm) - - Field(OPRm, ByteAcc, NoLock, Preserve) { - RFU0, 0x1a0, - } - - Field(OPRm, ByteAcc, NoLock, Preserve) { - SIG, 32, - LENG, 32, - REV, 8, - SUM, 8, - OID, 48, - OTID, 64, - OREV, 32, - CID, 32, - CREV, 32, - Offset(39), - SSNM, 32 - } - - Store(BUF0, RFU0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - - // Modify Revision field of SSDT - Store(Add(CREV, 1), CREV) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x016, __LINE__, 0)) { - return - } - - // Load operator execution - switch (ToInteger (arg1)) { - case (0) {Load(RFU0, HI0)} - case (1) {Load(RFU0, \DTM0.HI0)} - case (2) {Load(RFU0, Local2)} - case (3) {Load(RFU0, Index(PHI0, 0))} - default { - Store("Unexpected parameter of the test", Debug) - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - } - - if (CH03(arg0, z174, 0x018, __LINE__, 0)) { - return - } - - Store("SSDT Loaded", Debug) - - // Check DDBHandle ObjectType - switch (ToInteger (arg1)) { - case (0) {Store(ObjectType(HI0), Local1)} - case (1) {Store(ObjectType(\DTM0.HI0), Local1)} - case (2) {Store(ObjectType(Local2), Local1)} - case (3) {Store(ObjectType(Index(PHI0, 0)), Local1)} - } - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z174, __LINE__, 0, 0, Local1, c017) - } - - // Check the new Object appears - - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 0) - } - - Store(ObjectType(Local0), Local1) - if (LNotEqual(Local1, c010)) { // Method - err(arg0, z174, __LINE__, 0, 0, Local1, c010) - } else { - Store(\SSS0(), Local0) - if (CH03(arg0, z174, 0x01c, __LINE__, 1)) { - return - } - if (LNotEqual("\\SSS0", Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, "\\SSS0") - } - } - - // UnLoad operator execution - switch (ToInteger (arg1)) { - case (0) {UnLoad(HI0)} - case (1) {UnLoad(\DTM0.HI0)} - case (2) {UnLoad(Local2)} - case (3) {UnLoad(DeRefof(Index(PHI0, 0)))} - } - - if (CH03(arg0, z174, 0x01e, __LINE__, 0)) { - return - } - - Store("SSDT Unloaded", Debug) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - } - - return - } - - // Auxiliary method for ArgX, part1 - // Arg1 - reference to store the DDBHandle - // Arg2 - OpRegion Object of a specified type - Method(m001, 3, Serialized) - { - OperationRegion(OPRm, 0xff, 0, 0x1000) - - Concatenate(arg0, "-m001", arg0) - - CopyObject(arg2, OPRm) - - Field(OPRm, ByteAcc, NoLock, Preserve) { - RFU0, 0x1a0, - } - - Field(OPRm, ByteAcc, NoLock, Preserve) { - SIG, 32, - LENG, 32, - REV, 8, - SUM, 8, - OID, 48, - OTID, 64, - OREV, 32, - CID, 32, - CREV, 32, - Offset(39), - SSNM, 32 - } - - Store(BUF0, RFU0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - // Modify Revision field of SSDT - Store(Add(CREV, 1), CREV) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x021, __LINE__, 0)) { - return (1) - } - - // Load operator execution - Load(RFU0, Arg1) - - if (CH03(arg0, z174, 0x022, __LINE__, 0)) { - return (1) - } - - Store("SSDT Loaded", Debug) - - return (0) - } - - // Arg1 - OpRegion Object of a specified type - Method(m003, 2, Serialized) - { - Concatenate(arg0, "-m003", arg0) - - // Local Named Integer - m000(arg0, 0, arg1) - - // Global Named Integer - m000(arg0, 1, arg1) - - // LocalX - m000(arg0, 2, arg1) - - // Package element - // Crash on copying the specific reference Object - if (y261) { - m000(arg0, 3, arg1) - } - - // ArgX - if (m001(arg0, Refof(Local2), arg1)) { - return - } - m002(arg0, Local2) - - // Package element as ArgX - if (y133) { - Name(PHI0, Package(1){0}) - Store(Index(PHI0, 0), Local0) - if (m001(arg0, Local0, arg1)) { - return - } - m002(arg0, DeRefof(Local0)) - } - return - } - - // Region type's Address Space Handler installed flags, - // only those types' OpRegion can be tested. - Store( - Buffer(10){ - 1, - 1, - 0, /* 0x02 - PCI_Config */ - 1, - 0, /* 0x04 - SMBus */ - 0, /* 0x05 - SystemCMOS */ - 0, /* 0x06 - PciBarTarget */ - 1, - 0, /* 0xcf - UserDefRegionSpace */ - 0},/* 0xff - UserDefRegionSpace */ - Local2) - - Store(Derefof(Index(Local2, Arg1)), Local3) - if (Local3) { - Concatenate(arg0, "-0x", Local4) - Concatenate(Local4, - Mid(ToHexString(Arg1), Add(6, Multiply(F64, 8)), 2), - Local4) - Store(Local4, Debug) - m003(Local4, Arg2) - } else { - Store("This Region type's AddrSpace Handler not installed", Debug) - err(arg0, z174, __LINE__, 0, 0, Local2, Arg1) - } - } - - // SystemMemory Region - Method(tst4, 1) - { - Concatenate(arg0, "-tst4", arg0) - - m003(Arg0, 0, RGN0) - } - - // SystemIO Region - Method(tst5, 1) - { - Concatenate(arg0, "-tst5", arg0) - - m003(Arg0, 1, RGN1) - } - - // EmbeddedControl Region - Method(tst6, 1) - { - Concatenate(arg0, "-tst6", arg0) - - m003(Arg0, 3, RGN3) - } - - // User defined Region - Method(tst7, 1) - { - Concatenate(arg0, "-tst7", arg0) - - m003(Arg0, 7, RGN7) - } - - // Note: We load the table objects relative to the root of the namespace. - // This appears to go against the ACPI specification, but we do it for - // compatibility with other ACPI implementations. - - // Originated from ssdt1.asl: iasl -tc ssdt1.asl - Name(BUF1, Buffer(){ - 0x53,0x53,0x44,0x54,0x5F,0x00,0x00,0x00, /* 00000000 "SSDT_..." */ - 0x02,0x33,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".3Intel." */ - 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x15,0x12,0x06,0x20,0x10,0x1F,0x5C,0x00, /* 00000020 "... ..\." */ - 0x08,0x4E,0x41,0x42,0x53,0x0D,0x61,0x62, /* 00000028 ".NABS.ab" */ - 0x73,0x6F,0x6C,0x75,0x74,0x65,0x20,0x6C, /* 00000030 "solute l" */ - 0x6F,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20, /* 00000038 "ocation " */ - 0x6F,0x62,0x6A,0x00,0x08,0x4E,0x43,0x52, /* 00000040 "obj..NCR" */ - 0x52,0x0D,0x63,0x75,0x72,0x72,0x65,0x6E, /* 00000048 "R.curren" */ - 0x74,0x20,0x6C,0x6F,0x63,0x61,0x74,0x69, /* 00000050 "t locati" */ - 0x6F,0x6E,0x20,0x6F,0x62,0x6A,0x00, - }) - - OperationRegion (IST1, SystemMemory, 0x100, 0x5f) - - Field(IST1, ByteAcc, NoLock, Preserve) { - RFU1, 0x2f8, - } - - Method(tst8, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst8", arg0) - - // Check absence - if (CondRefof(NABS, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "NABS", 1) - } - if (CondRefof(NCRR, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "NCRR", 1) - } - - Store(BUF1, RFU1) - Load(RFU1, DDBH) - Store("SSDT loaded", Debug) - - // Check existence - if (CondRefof(NABS, Local0)) { - if (LNotEqual("absolute location obj", Derefof(Local0))) { - err(arg0, z174, __LINE__, 0, 0, Derefof(Local0), - "absolute location obj") - } - } else { - err(arg0, z174, __LINE__, 0, 0, "NABS", 0) - } - if (CondRefof(NCRR, Local0)) { - if (LNotEqual("current location obj", Derefof(Local0))) { - err(arg0, z174, __LINE__, 0, 0, Derefof(Local0), - "current location obj") - } - } else { - err(arg0, z174, __LINE__, 0, 0, "NCRR", 0) - } - - // Check location - if (CondRefof(\NABS, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "NABS", 0) - } - //Note: We load the table objects relative to the root of the namespace. - if (CondRefof(\NCRR, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\NCRR", 1) - } - if (CondRefof(\DTM0.NCRR, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\DTM0.NCRR", 1) - } - if (CondRefof(\DTM0.TST8.NCRR, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\DTM0.TST8.NCRR", 0) - } - - UnLoad(DDBH) - Store("SSDT unloaded", Debug) - - // Check absence - if (CondRefof(NABS, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "NABS", 1) - } - if (CondRefof(NCRR, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "NCRR", 1) - } - } - - // Check global and dynamic declarations of OpRegions - // and the appropriate _REG Methods invocation for the - // loaded SSDT - - // Originated from ssdt2.asl: iasl -tc ssdt2.asl - Name(BUF2, Buffer(){ - 0x53,0x53,0x44,0x54,0x17,0x01,0x00,0x00, /* 00000000 "SSDT...." */ - 0x02,0x7B,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".{Intel." */ - 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x15,0x12,0x06,0x20,0x5B,0x82,0x41,0x0F, /* 00000020 "... [.A." */ - 0x41,0x55,0x58,0x44,0x5B,0x80,0x4F,0x50, /* 00000028 "AUXD[.OP" */ - 0x52,0x30,0x80,0x0C,0x00,0x00,0x00,0x01, /* 00000030 "R0......" */ - 0x0A,0x04,0x5B,0x81,0x0B,0x4F,0x50,0x52, /* 00000038 "..[..OPR" */ - 0x30,0x03,0x52,0x46,0x30,0x30,0x20,0x08, /* 00000040 "0.RF00 ." */ - 0x52,0x45,0x47,0x43,0x0C,0xFF,0xFF,0xFF, /* 00000048 "REGC...." */ - 0xFF,0x08,0x52,0x45,0x47,0x50,0x0A,0x00, /* 00000050 "..REGP.." */ - 0x08,0x52,0x45,0x47,0x44,0x0C,0xFF,0xFF, /* 00000058 ".REGD..." */ - 0xFF,0xFF,0x08,0x52,0x45,0x47,0x52,0x0A, /* 00000060 "...REGR." */ - 0x00,0x14,0x33,0x5F,0x52,0x45,0x47,0x02, /* 00000068 "..3_REG." */ - 0x70,0x0D,0x5C,0x41,0x55,0x58,0x44,0x2E, /* 00000070 "p.\AUXD." */ - 0x5F,0x52,0x45,0x47,0x3A,0x00,0x5B,0x31, /* 00000078 "_REG:.[1" */ - 0x70,0x68,0x5B,0x31,0x70,0x69,0x5B,0x31, /* 00000080 "ph[1pi[1" */ - 0xA0,0x14,0x93,0x68,0x0A,0x80,0x70,0x52, /* 00000088 "...h..pR" */ - 0x45,0x47,0x43,0x52,0x45,0x47,0x50,0x70, /* 00000090 "EGCREGPp" */ - 0x69,0x52,0x45,0x47,0x43,0x14,0x49,0x07, /* 00000098 "iREGC.I." */ - 0x4D,0x30,0x30,0x30,0x00,0x14,0x38,0x5F, /* 000000A0 "M000..8_" */ - 0x52,0x45,0x47,0x02,0x70,0x0D,0x5C,0x41, /* 000000A8 "REG.p.\A" */ - 0x55,0x58,0x44,0x2E,0x4D,0x30,0x30,0x30, /* 000000B0 "UXD.M000" */ - 0x2E,0x5F,0x52,0x45,0x47,0x3A,0x00,0x5B, /* 000000B8 "._REG:.[" */ - 0x31,0x70,0x68,0x5B,0x31,0x70,0x69,0x5B, /* 000000C0 "1ph[1pi[" */ - 0x31,0xA0,0x14,0x93,0x68,0x0A,0x80,0x70, /* 000000C8 "1...h..p" */ - 0x52,0x45,0x47,0x44,0x52,0x45,0x47,0x52, /* 000000D0 "REGDREGR" */ - 0x70,0x69,0x52,0x45,0x47,0x44,0x5B,0x80, /* 000000D8 "piREGD[." */ - 0x4F,0x50,0x52,0x31,0x80,0x0C,0x10,0x00, /* 000000E0 "OPR1...." */ - 0x00,0x01,0x0A,0x04,0x5B,0x81,0x0B,0x4F, /* 000000E8 "....[..O" */ - 0x50,0x52,0x31,0x03,0x52,0x46,0x30,0x31, /* 000000F0 "PR1.RF01" */ - 0x20,0x70,0x0D,0x5C,0x41,0x55,0x58,0x44, /* 000000F8 " p.\AUXD" */ - 0x2E,0x4D,0x30,0x30,0x30,0x3A,0x00,0x5B, /* 00000100 ".M000:.[" */ - 0x31,0x70,0x52,0x46,0x30,0x31,0x5B,0x31, /* 00000108 "1pRF01[1" */ - 0x70,0x52,0x45,0x47,0x52,0x5B,0x31, - }) - - OperationRegion (IST2, SystemMemory, 0x200, 0x117) - - Field(IST2, ByteAcc, NoLock, Preserve) { - RFU2, 0x8b8, - } - - External(\AUXD.M000, MethodObj) - - Method(tst9, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst9", arg0) - - Store(BUF2, RFU2) - - if (CondRefof(\AUXD, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\AUXD", 1) - return - } - - if (CH03(arg0, 0, 0x031, __LINE__, 0)) { - return - } - - Load(RFU2, DDBH) - - if (CH03(arg0, 0, 0x032, __LINE__, 0)) { - return - } - - if (CondRefof(\AUXD, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\AUXD", 0) - return - } - - Store (ObjectType(Local0), Local1) - - if (LNotEqual(Local1, 6)) { - err(arg0, z174, __LINE__, 0, 0, Local1, 6) - return - } - - if (CondRefof(\AUXD.REGC, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\AUXD.REGC", 0) - return - } - - Store(Derefof(Local0), Local1) - - if (LNotEqual(1, Local1)) { - err(arg0, z174, __LINE__, 0, 0, Local1, 1) - } - - if (CondRefof(\AUXD.REGD, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\AUXD.REGD", 0) - return - } - - Store(Derefof(Local0), Local1) - - if (LNotEqual(0xFFFFFFFF, Local1)) { - err(arg0, z174, __LINE__, 0, 0, Local1, 0xFFFFFFFF) - } elseif (CondRefof(\AUXD.M000, Local2)) { - - \AUXD.M000() - - Store(Derefof(Local0), Local1) - - if (LNotEqual(1, Local1)) { - err(arg0, z174, __LINE__, 0, 0, Local1, 1) - } - } else { - err(arg0, z174, __LINE__, 0, 0, "\\AUXD.M000", 0) - } - - UnLoad(DDBH) - - if (CondRefof(\AUXD, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\AUXD", 1) - } - return - } - - // Checks that only specified Tables objects present in the NS - Method(LDCH, 1) - { - Method(MAUX) {Return ("MAUX")} - - Concatenate(arg0, "-LDCH", arg0) - - if (CH03(arg0, z174, 0x040, __LINE__, 0)) { - return (1) - } - - // Specify to check up to 3 successive \SSxx names - Store(1, Local0) - if (HI0N) { - Subtract(HI0N, 1, Local1) - if (Local1) { - Decrement(Local1) - } - } else { - Store(0, Local1) - } - if (LLess(Add(Local1, 1), HI0M)) { - Increment(Local0) - if (LLess(Add(Local1, 2), HI0M)) { - Increment(Local0) - } - } - - while (Local0) { - Divide(Local1, NNML, Local3, Local4) - Store("\\SSS0", Local5) - Store(Derefof(Index(SNML, Local4)), Index(Local5, 3)) - Store(Derefof(Index(SNML, Local3)), Index(Local5, 4)) - - Store(Local5, Debug) - - // Access the next \SSxx Object - CopyObject(Derefof(Local5), MAUX) - - if (LLess(Local1, HI0N)) { - if (CH03(arg0, z174, 0x041, __LINE__, 0)) { - return (2) - } - Store(MAUX(), Local2) - if (CH03(arg0, z174, 0x042, __LINE__, 0)) { - return (3) - } - if (LNotEqual(Local5, Local2)) { - err(arg0, z174, __LINE__, 0, 0, Local2, Local5) - } - } else { - if (CH04(arg0, 0, 0xff, z174, __LINE__, 0, 0)) { // AE_NOT_FOUND - return (4) - } - } - Increment(Local1) - Decrement(Local0) - } - - Return (0) - } - - // Loading a number of different SSDTs - // Arg1: the number of SSDT to load - Method(tsta, 2) - { - Concatenate(arg0, "-tsta", arg0) - - if (INIT()) { - err(arg0, z174, __LINE__, 0, 0, "INIT", 1) - return (1) - } - if (CH03(arg0, z174, 0x046, __LINE__, 0)) { - return (1) - } - - Store(arg1, Local0) - while (Local0) { - if (LD()) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - if (CH03(arg0, z174, 0x048, __LINE__, 0)) { - return (1) - } - Decrement(Local0) - - if (LDCH(arg0)) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - } - - Store(arg1, Local0) - while (Local0) { - if (UNLD()) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - if (CH03(arg0, z174, 0x04b, __LINE__, 0)) { - return (1) - } - Decrement(Local0) - - if (LDCH(arg0)) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - } - - return (0) - } - - // Exceptions when the Object argument does not refer to - // an operation region field or an operation region - - // Originated from ssdt3.asl: iasl -tc ssdt3.asl - Name(BUF3, Buffer(){ - 0x53,0x53,0x44,0x54,0x1D,0x01,0x00,0x00, /* 00000000 "SSDT...." */ - 0x02,0x4F,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".OIntel." */ - 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x31,0x08,0x16,0x20,0x5B,0x82,0x47,0x0F, /* 00000020 "1.. [.G." */ - 0x41,0x55,0x58,0x44,0x08,0x49,0x4E,0x54, /* 00000028 "AUXD.INT" */ - 0x30,0x0E,0x10,0x32,0x54,0x76,0x98,0xBA, /* 00000030 "0..2Tv.." */ - 0xDC,0xFE,0x08,0x53,0x54,0x52,0x30,0x0D, /* 00000038 "...STR0." */ - 0x73,0x6F,0x75,0x72,0x63,0x65,0x20,0x73, /* 00000040 "source s" */ - 0x74,0x72,0x69,0x6E,0x67,0x30,0x00,0x08, /* 00000048 "tring0.." */ - 0x42,0x55,0x46,0x30,0x11,0x0C,0x0A,0x09, /* 00000050 "BUF0...." */ - 0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02, /* 00000058 "........" */ - 0x01,0x08,0x50,0x41,0x43,0x30,0x12,0x27, /* 00000060 "..PAC0.'" */ - 0x03,0x0E,0x1F,0x32,0x54,0x76,0x98,0xBA, /* 00000068 "...2Tv.." */ - 0xDC,0xFE,0x0D,0x74,0x65,0x73,0x74,0x20, /* 00000070 "...test " */ - 0x70,0x61,0x63,0x6B,0x61,0x67,0x65,0x30, /* 00000078 "package0" */ - 0x00,0x11,0x0C,0x0A,0x09,0x13,0x12,0x11, /* 00000080 "........" */ - 0x10,0x0F,0x0E,0x0D,0x0C,0x0B,0x5B,0x80, /* 00000088 "......[." */ - 0x4F,0x50,0x52,0x30,0x00,0x0C,0x21,0x43, /* 00000090 "OPR0..!C" */ - 0x65,0x07,0x0A,0x98,0x5B,0x81,0x0B,0x4F, /* 00000098 "e...[..O" */ - 0x50,0x52,0x30,0x01,0x46,0x4C,0x55,0x30, /* 000000A0 "PR0.FLU0" */ - 0x20,0x5B,0x82,0x10,0x44,0x45,0x56,0x30, /* 000000A8 " [..DEV0" */ - 0x08,0x53,0x30,0x30,0x30,0x0D,0x44,0x45, /* 000000B0 ".S000.DE" */ - 0x56,0x30,0x00,0x5B,0x02,0x45,0x56,0x45, /* 000000B8 "V0.[.EVE" */ - 0x30,0x14,0x08,0x4D,0x4D,0x4D,0x30,0x00, /* 000000C0 "0..MMM0." */ - 0xA4,0x00,0x5B,0x01,0x4D,0x54,0x58,0x30, /* 000000C8 "..[.MTX0" */ - 0x00,0x5B,0x84,0x13,0x50,0x57,0x52,0x30, /* 000000D0 ".[..PWR0" */ - 0x00,0x00,0x00,0x08,0x53,0x30,0x30,0x30, /* 000000D8 "....S000" */ - 0x0D,0x50,0x57,0x52,0x30,0x00,0x5B,0x83, /* 000000E0 ".PWR0.[." */ - 0x16,0x43,0x50,0x55,0x30,0x00,0xFF,0xFF, /* 000000E8 ".CPU0..." */ - 0xFF,0xFF,0x00,0x08,0x53,0x30,0x30,0x30, /* 000000F0 "....S000" */ - 0x0D,0x43,0x50,0x55,0x30,0x00,0x5B,0x85, /* 000000F8 ".CPU0.[." */ - 0x10,0x54,0x5A,0x4E,0x30,0x08,0x53,0x30, /* 00000100 ".TZN0.S0" */ - 0x30,0x30,0x0D,0x54,0x5A,0x4E,0x30,0x00, /* 00000108 "00.TZN0." */ - 0x5B,0x13,0x42,0x55,0x46,0x30,0x00,0x0A, /* 00000110 "[.BUF0.." */ - 0x45,0x42,0x46,0x4C,0x30 /* 00000118 "EBFL0" */ - }) - - OperationRegion (IST3, SystemMemory, 0x400, 0x11f) - - Field(IST3, ByteAcc, NoLock, Preserve) { - RFU3, 0x8f8, - } - - Method(tstb, 1, Serialized) - { - Name(DDB0, 0) - Name(DDBH, 0) - - Concatenate(arg0, "-tstb", arg0) - - Store(BUF3, RFU3) - Load(RFU3, DDB0) - - if (CH03(arg0, z174, 0x050, __LINE__, 0)) { - return (1) - } - - // Uninitialized: it can not be aplied to Load which - // allows NameString only to be used as Object parameter - - // Integer - Load(\AUXD.INT0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.INT0), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c009) - } - - // String - Load(\AUXD.STR0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.STR0), Local0) - if (LNotEqual(c00a, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c00a) - } - - // Buffer - if (y282) { - // TBD: LBZ480 update allows Buffer to be Source of Load - Load(\AUXD.BUF0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.BUF0), Local0) - if (LNotEqual(c00b, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c00b) - } - } - - // Package - Load(\AUXD.PAC0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.PAC0), Local0) - if (LNotEqual(c00c, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c00c) - } - - // Field Unit - - // Device - Load(\AUXD.DEV0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.DEV0), Local0) - if (LNotEqual(c00e, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c00e) - } - - // Event - Load(\AUXD.EVE0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.EVE0), Local0) - if (LNotEqual(c00f, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c00f) - } - - // Method - Load(\AUXD.MMM0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.MMM0), Local0) - if (LNotEqual(c010, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c010) - } - - // Mutex - Load(\AUXD.MTX0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.MTX0), Local0) - if (LNotEqual(c011, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c011) - } - - // OpRegion - - // Power Resource - Load(\AUXD.PWR0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.PWR0), Local0) - if (LNotEqual(c013, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c013) - } - - // Processor - Load(\AUXD.CPU0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.CPU0), Local0) - if (LNotEqual(c014, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c014) - } - - // Thermal Zone - Load(\AUXD.TZN0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.TZN0), Local0) - if (LNotEqual(c015, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c015) - } - - // Buffer Field - if (y282) { - // TBD: LBZ480 update allows Buffer Field to be Source of Load - Load(\AUXD.BFL0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.BFL0), Local0) - if (LNotEqual(c016, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c016) - } - } - - // DDB Handle - Load(DDB0, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(DDB0), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c017) - } - - UnLoad(DDB0) - - return (0) - } - - // Exceptions when an OpRegion passed as the Object - // parameter of Load is not of SystemMemory type - Method(tstc, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tstc", arg0) - - OperationRegion(RGN1, SystemIO, 0x280, 0x123) - OperationRegion(RGN2, PCI_Config, 0x480, 0x125) - OperationRegion(RGN3, EmbeddedControl, 0x680, 0x127) - OperationRegion(RGN4, SMBus, 0x880, 0x109) - OperationRegion(RGN5, SystemCMOS, 0xa80, 0x12b) - OperationRegion(RGN6, PciBarTarget, 0xc80, 0x12d) - - // UserDefRegionSpace - OperationRegion(RGN7, 0x80, 0xd80, 0x137) - OperationRegion(RGN8, 0xcf, 0xe80, 0x138) - OperationRegion(RGN9, 0xff, 0xf80, 0x139) - - if (CH03(arg0, z174, 0x06f, __LINE__, 0)) { - return (1) - } - - // SystemIO - Load(RGN1, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN1), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // PCI_Config - Load(RGN2, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN2), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // EmbeddedControl - Load(RGN3, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN3), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // SMBus - Load(RGN4, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN4), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // SystemCMOS - Load(RGN5, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN5), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // PciBarTarget - Load(RGN6, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN6), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // UserDefRegionSpace 0x80 - Load(RGN7, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN7), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // UserDefRegionSpace 0xcf - Load(RGN8, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN8), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - // UserDefRegionSpace 0xff - Load(RGN9, DDBH) - CH04(arg0, 0, 47, z174, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(RGN9), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c012) - } - - return (0) - } - - // Exceptions when the table contained in an OpRegion - // (Field) is not an SSDT - Method(tstd, 1, Serialized) - { - Name(HI0, 0) - - Concatenate(arg0, "-tstd", arg0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - Store(BUF0, RFU0) - - // Modify the Signature field of the Table Header - Store(SIG, Local0) - Increment(Local0) - Store(Local0, SIG) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x083, __LINE__, 0)) { - return (1) - } - - // Load operator execution, OpRegion case - if (y290) { - Load(IST0, HI0) - CH04(arg0, 0, 37, z174, __LINE__, 0, 0) // AE_BAD_SIGNATURE - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - } - - // Load operator execution, OpRegion Field case - Load(RFU0, HI0) - CH04(arg0, 0, 37, z174, __LINE__, 0, 0) // AE_BAD_SIGNATURE - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - } - - return (0) - } - - // Exceptions when the length of the supplied SSDT is greater - // than the length of the respective OpRegion or Region Field, - // or less than the length of the Table Header - // Arg1: 0 - the 'greater' case, 1 - the 'less' case - Method(tste, 2, Serialized) - { - Name(HI0, 0) - - Concatenate(arg0, "-tste", arg0) - - if (Arg1) { - Concatenate(arg0, ".less", arg0) - } - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - Store(BUF0, RFU0) - - // Modify the Length field of the Table Header - if (Arg1) { - Store(35, Local0) - } else { - Store(Sizeof(BUF0), Local0) - Increment(Local0) - } - Store(Local0, LENG) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x091, __LINE__, 0)) { - return (1) - } - - // Load operator execution, OpRegion case - if (y290) { - Load(IST0, HI0) - CH04(arg0, 0, 42, z174, __LINE__, 0, 0) // AE_INVALID_TABLE_LENGTH - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - - // CleanUp - UnLoad(HI0) - if (CH03(arg0, z174, 0x094, __LINE__, 0)) { - return (1) - } - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - } - } - - // Load operator execution, OpRegion Field case - Load(RFU0, HI0) - if(LNot(arg1)){ - // If the table length in the header is larger than the buffer. - CH04(arg0, 0, 54, z174, __LINE__, 0, 0) // AE_AML_BUFFER_LIMIT - } else { - // If the table length is smaller than an ACPI table header. - CH04(arg0, 0, 42, z174, __LINE__, 0, 0) // AE_INVALID_TABLE_LENGTH - } - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - UnLoad(HI0) - if (CH03(arg0, z174, 0x098, __LINE__, 0)) { - return (1) - } - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - } - - return (0) - } - - // Exceptions when the checksum of the supplied SSDT is invalid - Method(tstf, 1, Serialized) - { - Name(HI0, 0) - - Concatenate(arg0, "-tstf", arg0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - Store(BUF0, RFU0) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - // Spoil the CheckSum - Store(Add(SUM, 1), SUM) - - if (CH03(arg0, z174, 0x0a1, __LINE__, 0)) { - return (1) - } - - // Load operator execution, OpRegion case - if (y290) { - Load(IST0, HI0) - CH04(arg0, 0, 39, z174, __LINE__, 0, 0) // AE_BAD_CHECKSUM - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - - //Cleanup - UnLoad(HI0) - if (CH03(arg0, z174, 0x0a4, __LINE__, 0)) { - return (1) - } - Store(Add(SUM, 1), SUM) - } - } - - // Load operator execution, OpRegion Field case - Load(RFU0, HI0) - CH04(arg0, 0, 39, z174, __LINE__, 0, 0) // AE_BAD_CHECKSUM - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - - //Cleanup - UnLoad(HI0) - if (CH03(arg0, z174, 0x0a7, __LINE__, 0)) { - return (1) - } - if (CH03(arg0, z174, 0x0a8, __LINE__, 0)) { - return (1) - } - } - - return (0) - } - - // Object of any type (expect Field Units and Buffer Fields) - // can be used as the DDBHandle argument - Method(tstg, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - Name(DDBH, 0) - - Method(m000, 4) - { - Concatenate(arg0, "-m000.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - Load(RFU0, arg2) - if (CH03(arg0, z174, 0x0b2, __LINE__, 0)) { - return (1) - } - Store(ObjectType(arg2), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c017) - } - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 0) - return (1) - } - - UnLoad(Derefof(arg2)) - if (CH03(arg0, z174, 0x0b5, __LINE__, 0)) { - return (1) - } - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - return (0) - } - - Concatenate(arg0, "-tstg", arg0) - - // Load Auxiliry table - Store(BUF3, RFU3) - Load(RFU3, DDB0) - - Store(BUF0, RFU0) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - if (CH03(arg0, z174, 0x0b7, __LINE__, 0)) { - return (1) - } - - // Uninitialized - m000(arg0, "uni", Refof(Local1), c008) - - // Integer - m000(arg0, "int", Refof(\AUXD.INT0), c009) - - // String - m000(arg0, "str", Refof(\AUXD.STR0), c00a) - - // Buffer - m000(arg0, "buf", Refof(\AUXD.BUF0), c00b) - - // Writing NewObj to ArgX which is a RefOf(OldObj), should - // result in RefOf(NewObj), but this is currently not - // working. - if (y260) { - // Package - m000(arg0, "pac", Refof(\AUXD.PAC0), c00c) - - // Field Unit - m000(arg0, "flu", Refof(\AUXD.FLU0), c00d) - - // Device - m000(arg0, "dev", Refof(\AUXD.DEV0), c00e) - - // Event - m000(arg0, "evt", Refof(\AUXD.EVE0), c00f) - - // Method - m000(arg0, "met", Refof(\AUXD.MMM0), c010) - - // Mutex - m000(arg0, "mtx", Refof(\AUXD.MTX0), c011) - - // OpRegion - m000(arg0, "opr", Refof(\AUXD.OPR0), c012) - - // Power Resource - m000(arg0, "pwr", Refof(\AUXD.PWR0), c013) - - // Processor - m000(arg0, "cpu", Refof(\AUXD.CPU0), c014) - - // Thermal Zone - m000(arg0, "tzn", Refof(\AUXD.TZN0), c015) - - // Buffer Field - m000(arg0, "bfl", Refof(\AUXD.BFL0), c016) - - // DDB Handle - CopyObject(DDB0, DDB1) - m000(arg0, "ddb", Refof(DDB1), c017) - } - - UnLoad(DDB0) - - CH03(arg0, z174, 0x0b8, __LINE__, 0) - - return (0) - } - - // AE_OWNER_ID_LIMIT exception when too many Tables loaded, - // Arg1: 0 - Load case, 1 - LoadTable case - Method(tsth, 2, Serialized) - { - Name(MAXT, 0xf6) - Name(DDB1, 0) - Name(DDB3, 0) - - Concatenate(arg0, "-tsth", arg0) - - if (INIT()) { - err(arg0, z174, __LINE__, 0, 0, "INIT", 1) - return (1) - } - if (CH03(arg0, z174, 0x0c1, __LINE__, 0)) { - return (1) - } - Store(BUF1, RFU1) - Store(BUF3, RFU3) - - Store(MAXT, Local0) - while (Local0) { - Store(HI0N, Debug) - if (LD()) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - if (CH03(arg0, z174, 0x0c3, __LINE__, 0)) { - return (1) - } - Decrement(Local0) - } - - // Methods can not be called after the following Load - // (OWNER_ID is exhausted) - Load(RFU1, DDB1) - - // The following Load should cause AE_OWNER_ID_LIMIT - if (Arg1) { - LoadTable("OEM1", "", "", , , ) - } else { - Load(RFU3, DDB3) - } - - // Futher 1 Method can be called - UnLoad(DDB1) - - CH04(arg0, 0, 86, z174, __LINE__, 0, 0) // AE_OWNER_ID_LIMIT - - Store(MAXT, Local0) - while (Local0) { - if (UNLD()) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - if (CH03(arg0, z174, 0x0c6, __LINE__, 0)) { - return (1) - } - Decrement(Local0) - } - - if (LDCH(0)) { - err(arg0, z174, __LINE__, 0, 0, "HI0N", HI0N) - return (1) - } - - return (0) - } - - // Exception when SSDT specified as the Object parameter - // of the Load operator is already loaded - Method(tsti, 1, Serialized) - { - Name(HI0, 0) - Name(HI1, 0) - - Concatenate(arg0, "-tsti", arg0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - Store(BUF0, RFU0) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - if (CH03(arg0, z174, 0x0d1, __LINE__, 0)) { - return (1) - } - - // Load operator execution - Load(RFU0, HI0) - if (CH03(arg0, z174, 0x0d2, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(HI0), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c017) - } - - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 0) - return (1) - } - - Store(5, Local1) - - while (Local1) { - // Repeated Load operator execution - Load(RFU0, HI1) - CH04(arg0, 0, 7, z174, __LINE__, 5, Local1) // AE_ALREADY_EXISTS - - Store(ObjectType(HI1), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c009) - } - - Decrement(Local1) - } - - UnLoad(HI0) - - if (CH03(arg0, z174, 0x0d7, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - } - - return (0) - } - - // Exception when there already is an previously created Object - // referred by the namepath of the new Object in the Table loaded - Method(tstj, 1, Serialized) - { - Name(HI0, 0) - Name(HI1, 0) - - Concatenate(arg0, "-tstj", arg0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return (1) - } - - Store(BUF0, ^RFU0) - - // Recalculate and save CheckSum - Store(^RFU0, Local0) - Store(Add(^SUM, CHSM(Local0, SizeOf (Local0))), ^SUM) - - if (CH03(arg0, z174, 0x0e1, __LINE__, 0)) { - return (1) - } - - // Load operator execution - Load(^RFU0, HI0) - if (CH03(arg0, z174, 0x0e2, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(HI0), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c017) - } - - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 0) - return (1) - } - - // Load another table, containing declaration of \SSS0 - - OperationRegion (IST0, SystemMemory, 0x80000000, 0x34) - - Field(IST0, ByteAcc, NoLock, Preserve) { - RFU0, 0x1a0, - } - - Field(IST0, ByteAcc, NoLock, Preserve) { - SIG, 32, - LENG, 32, - REV, 8, - SUM, 8, - OID, 48, - OTID, 64, - OREV, 32, - CID, 32, - CREV, 32, - Offset(39), - SSNM, 32, - Offset(47), - SSRT, 32 - } - - Store(BUF0, RFU0) - - // Modify Revision field of SSDT - Store(Add(CREV, 1), CREV) - - // Recalculate and save CheckSum - Store(RFU0, Local0) - Store(Add(SUM, CHSM(Local0, SizeOf (Local0))), SUM) - - Store(5, Local1) - - while (Local1) { - // Any next Load - Load(RFU0, HI1) - CH04(arg0, 0, 7, z174, __LINE__, 5, Local1) // AE_ALREADY_EXISTS - - Store(ObjectType(HI1), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z174, __LINE__, 0, 0, Local0, c009) - } - - Decrement(Local1) - } - - UnLoad(HI0) - - if (CH03(arg0, z174, 0x0e7, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - } - - return (0) - } - - // Originated from ssdt5.asl: iasl -tc ssdt5.asl - Name(BUF5, Buffer(){ - 0x53,0x53,0x44,0x54,0x92,0x00,0x00,0x00, /* 00000000 "SSDT...." */ - 0x02,0xBA,0x69,0x41,0x53,0x4C,0x54,0x53, /* 00000008 "..iASLTS" */ - 0x4C,0x54,0x42,0x4C,0x30,0x30,0x30,0x35, /* 00000010 "LTBL0005" */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x31,0x08,0x16,0x20,0x08,0x44,0x44,0x42, /* 00000020 "1.. .DDB" */ - 0x58,0x00,0x08,0x42,0x55,0x46,0x58,0x11, /* 00000028 "X..BUFX." */ - 0x37,0x0A,0x34,0x53,0x53,0x44,0x54,0x34, /* 00000030 "7.4SSDT4" */ - 0x00,0x00,0x00,0x02,0x98,0x49,0x6E,0x74, /* 00000038 ".....Int" */ - 0x65,0x6C,0x00,0x4D,0x61,0x6E,0x79,0x00, /* 00000040 "el.Many." */ - 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x49, /* 00000048 ".......I" */ - 0x4E,0x54,0x4C,0x15,0x12,0x06,0x20,0x14, /* 00000050 "NTL... ." */ - 0x0F,0x5C,0x53,0x53,0x53,0x30,0x00,0xA4, /* 00000058 ".\SSS0.." */ - 0x0D,0x5C,0x53,0x53,0x53,0x30,0x00,0x5B, /* 00000060 ".\SSS0.[" */ - 0x80,0x49,0x53,0x54,0x58,0x00,0x00,0x0A, /* 00000068 ".ISTX..." */ - 0x34,0x5B,0x81,0x0C,0x49,0x53,0x54,0x58, /* 00000070 "4[..ISTX" */ - 0x01,0x52,0x46,0x55,0x58,0x40,0x1A,0x70, /* 00000078 ".RFUX@.p" */ - 0x42,0x55,0x46,0x58,0x52,0x46,0x55,0x58, /* 00000080 "BUFXRFUX" */ - 0x5B,0x20,0x52,0x46,0x55,0x58,0x44,0x44, /* 00000088 "[ RFUXDD" */ - 0x42,0x58 /* 00000090 "BX" */ - }) - OperationRegion (IST5, SystemMemory, 0x600, 0x92) - Field(IST5, ByteAcc, NoLock, Preserve) { - RFU5, 0x490, - } - // DDB Handle - External(\DDBX) - - // Recursive Load in module level code - Method(tstk, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tstk", arg0) - - if (CondRefof(\DDBX, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\DDBX", 1) - return - } - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - - Store(BUF5, RFU5) - Load(RFU5, DDBH) - if (CH03(arg0, z174, 0x0f2, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\DDBX, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\DDBX", 1) - return - } - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - - Unload(DDBX) - if (CH03(arg0, z174, 0x0f5, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\SSS0", 1) - return - } - - UnLoad(DDBH) - if (CH03(arg0, z174, 0x0f7, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\DDBX, Local0)) { - err(arg0, z174, __LINE__, 0, 0, "\\DDBX", 1) - return - } - } -} - -Method(TLD0,, Serialized) -{ - Name(ts, "TLD0") - - // Loading SSDT from a SystemMemory OpRegion, - // different targets for DDBHandle - - CH03(ts, z174, 0x200, __LINE__, 0) - - // Named Objects - SRMT("TLD0.tst0") - \DTM0.tst0(ts) - - CH03(ts, z174, 0x201, __LINE__, 0) - - // LocalX Object - SRMT("TLD0.tst1") - \DTM0.tst1(ts) - - CH03(ts, z174, 0x202, __LINE__, 0) - - // Package element - SRMT("TLD0.tst2") - \DTM0.tst2(ts) - - CH03(ts, z174, 0x203, __LINE__, 0) - - // By Reference in ArgX - SRMT("TLD0.tst3") - \DTM0.tst3(ts) - - // Loading SSDT from a Field of an OpRegion of any type, - // different targets for DDBHandle - - CH03(ts, z174, 0x204, __LINE__, 0) - - // SystemMemory Region - SRMT("TLD0.tst4") - \DTM0.tst4(ts) - - CH03(ts, z174, 0x205, __LINE__, 0) - - // SystemIO Region - SRMT("TLD0.tst5") - \DTM0.tst5(ts) - - CH03(ts, z174, 0x206, __LINE__, 0) - - // EmbeddedControl Region - SRMT("TLD0.tst6") - \DTM0.tst6(ts) - - CH03(ts, z174, 0x207, __LINE__, 0) - - // User defined Region - SRMT("TLD0.tst7") - \DTM0.tst7(ts) - - CH03(ts, z174, 0x208, __LINE__, 0) - - // Check that "namespace location to load the Definition Block - // is relative to the current namespace" scope, - SRMT("TLD0.tst8") - \DTM0.tst8(ts) - - CH03(ts, z174, 0x209, __LINE__, 0) - - // Check global and dynamic declarations of OpRegions - // and the appropriate _REG Methods invocation for the - // loaded SSDT - SRMT("TLD0.tst9") - \DTM0.tst9(ts) - - CH03(ts, z174, 0x20a, __LINE__, 0) - - // Object of any type can be used as the DDBHandle argument - SRMT("TLD0.tstg") - \DTM0.tstg(ts) - - CH03(ts, z174, 0x20b, __LINE__, 0) + /* + * Some or all of this work - Copyright (c) 2006 - 2017, 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: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + /* + * Load ASL operator functionality + */ + /* + * This sub-test is intended to comprehensively verify + * the Load ASL operator functionality. + * + * Performs a run-time load of a Definition Block. + * + * 17.5.67 Load (Load Definition Block) + * Syntax + * Load (Object, DDBHandle) + * + * On testing the following issues should be covered: + * + * - loading SSDT from a SystemMemory OpRegion, + * + * - loading SSDT from a Region Field in a OpRegion of any type, + * + * - "namespace location to load the Definition Block is relative + * to the current namespace" scope, + * + * - loading a number of different SSDTs, + * + * - global and dynamic declarations of OpRegions and the appropriate + * _REG Methods invocation for the loaded SSDT, + * + * - global and dynamic declarations of OpRegions and Region Fields, + * containing the loaded SSDT, + * + * - an Object of any type can be used as the DDBHandle argument, + * + * - the DDBHandle argument of the Load operator becames an Object + * of the DDBHandle type, + * + * - the DDBHandle Object returned from the Load operator can be used + * to unload the SSDT, + * + * - exceptional conditions caused by inappropriate data: + * = the Object argument does not refer to an operation region field + * or an operation region, + * = an OpRegion passed as the Object argument is not of SystemMemory type, + * = the table contained in an OpRegion (Field) is not an SSDT, + * = the length of the supplied SSDT is greater than the length of the + * respective OpRegion or Region Field, + * = the length of the supplied SSDT is less than the length the Header + * = the checksum of the supplied SSDT is invalid, + * = AE_OWNER_ID_LIMIT exception when too many Tables loaded, + * = the specified SSDT is already loaded, + * = there already is an previously loaded Object referred by the path + * in the Namespace. + * + * Can not be tested following issues: + * - providing of the table referenced by Load to be "in memory marked by + * AddressRangeReserved or AddressRangeNVS", + * - overriding the supplied SSDT with "a newer revision Definition Block + * of the same OEM Table ID" by the OS, + * - loading a SSDT to be a synchronous operation ("the control methods + * defined in the Definition Block are not executed during load time") + */ + /* Integer */ + External (\AUXD.INT0, UnknownObj) + /* String */ + + External (\AUXD.STR0, UnknownObj) + /* Buffer */ + + External (\AUXD.BUF0, UnknownObj) + /* Package */ + + External (\AUXD.PAC0, UnknownObj) + /* Device */ + + External (\AUXD.DEV0, UnknownObj) + /* Event */ + + External (\AUXD.EVE0, UnknownObj) + /* Method */ + + External (\AUXD.MMM0, UnknownObj) + /* Mutex */ + + External (\AUXD.MTX0, UnknownObj) + /* Power Resource */ + + External (\AUXD.PWR0, UnknownObj) + /* Processor */ + + External (\AUXD.CPU0, UnknownObj) + /* Thermal Zone */ + + External (\AUXD.TZN0, UnknownObj) + /* Buffer Field */ + + External (\AUXD.BFL0, UnknownObj) + /* Field Unit */ + + External (\AUXD.FLU0, UnknownObj) + /* OpRegion */ + + External (\AUXD.OPR0, UnknownObj) + Name (Z174, 0xAE) + Device (DTM0) + { + /* Originated from ssdt0.asl: iasl -tc ssdt0.asl */ + + Name (BUF0, Buffer (0x34) + { + /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x34, 0x00, 0x00, 0x00, // SSDT4... + /* 0008 */ 0x02, 0x98, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // ..Intel. + /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x14, 0x0F, 0x5C, 0x53, // ... ..\S + /* 0028 */ 0x53, 0x53, 0x30, 0x00, 0xA4, 0x0D, 0x5C, 0x53, // SS0...\S + /* 0030 */ 0x53, 0x53, 0x30, 0x00 // SS0. + }) + Name (SNML, "0123456789ABCDEF") + Name (NNML, 0x10) /* <= sizeof (SNML) */ + /* Take into account AE_OWNER_ID_LIMIT */ + + Name (HI0M, 0x0100) /* <= (NNML * NNML) */ + Name (HI0P, Package (HI0M){}) + Name (HI0N, 0x00) + Name (INIF, 0x00) + OperationRegion (IST0, SystemMemory, 0x00, 0x34) + Field (IST0, ByteAcc, NoLock, Preserve) + { + RFU0, 416 + } + + Field (IST0, ByteAcc, NoLock, Preserve) + { + SIG, 32, + LENG, 32, + REV, 8, + SUM, 8, + OID, 48, + OTID, 64, + OREV, 32, + CID, 32, + CREV, 32, + Offset (0x27), + SSNM, 32 + } + + /* components/utilities/utmisc.c AcpiUtGenerateChecksum() analog */ + + Method (CHSM, 2, Serialized) + { + Name (LPN0, 0x00) + Name (LPC0, 0x00) + Local0 = 0x00 /* sum */ + LPN0 = Arg1 + LPC0 = 0x00 + While (LPN0) + { + Local1 = DerefOf (Arg0 [LPC0]) + Local0 += Local1 + Local0 %= 0x0100 + LPN0-- + LPC0++ + } + + Local0 = (0x00 - Local0) + Local0 %= 0x0100 + Debug = "checksum" + Debug = Local0 + Return (Local0) + } + + /* Initializes multiple Tables Load test */ + + Method (INIT, 0, NotSerialized) + { + Local0 = SizeOf (SNML) + If ((NNML > Local0)) + { + Debug = Concatenate ("INIT: test error, check NNML <= Sizeof(SNML):", ToDecimalString (Local0)) + Return (0x01) + } + + Local0 *= Local0 + If ((HI0M > Local0)) + { + Debug = Concatenate ("INIT: test error, check HI0M <= 0x", Local0) + Return (0x01) + } + + If (INIF) + { + Debug = "INIT: OpRegion has been initialized previously" + Return (0x01) + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + INIF = 0x01 + Debug = "INIT: OpRegion initialized with SSDT" + Return (0x00) + } + + /* Prepares and Loads the next Table of multiple Tables Load test */ + + Method (LD, 0, Serialized) + { + If ((HI0N >= HI0M)) + { + Debug = "LD: too many tables loaded" + Return (0x01) + } + + Local2 = (HI0N * 0x30) + OperationRegion (IST0, SystemMemory, Local2, 0x34) + Field (IST0, ByteAcc, NoLock, Preserve) + { + RFU0, 416 + } + + Field (IST0, ByteAcc, NoLock, Preserve) + { + SIG, 32, + LENG, 32, + REV, 8, + SUM, 8, + OID, 48, + OTID, 64, + OREV, 32, + CID, 32, + CREV, 32, + Offset (0x27), + SSNM, 32, + Offset (0x2F), + SSRT, 32 + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Modify Revision field of SSDT */ + + Store ((CREV + 0x01), CREV) /* \DTM0.LD__.CREV */ + /* Modify SSNM Object Name */ + + Divide (HI0N, NNML, Local0, Local1) + Local1 = DerefOf (SNML [Local1]) + Local1 <<= 0x10 + Local0 = DerefOf (SNML [Local0]) + Local0 <<= 0x18 + Local0 += Local1 + Local0 += 0x5353 + SSNM = Local0 + Debug = SSNM /* \DTM0.LD__.SSNM */ + /* Modify SSNM Method Return String */ + + SSRT = Local0 + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.LD__.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.LD__.SUM_ */ + Load (RFU0, HI0P [HI0N]) + HI0N++ + Debug = "LD: SSDT Loaded" + Return (0x00) + } + + /* UnLoads the last Table of multiple Tables Load test */ + + Method (UNLD, 0, NotSerialized) + { + If ((HI0N == 0x00)) + { + Debug = "UNLD: there are no SSDT loaded" + Return (0x01) + } + + HI0N-- + Unload (DerefOf (HI0P [HI0N])) + Debug = "UNLD: SSDT UnLoaded" + Return (0x00) + } + + External (\SSS0, MethodObj) + Name (HI0, 0x00) + /* Simple Load test auxiliary method */ + /* Arg1: DDBH, 0 - Local Named, 1 - Global Named, */ + /* 2 - LocalX, 3 - element of Package */ + Method (M000, 2, Serialized) + { + Name (HI0, 0x00) + Name (PHI0, Package (0x01){}) + Concatenate (Arg0, "-m000", Arg0) + RFU0 = BUF0 /* \DTM0.BUF0 */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x013B, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + /* Modify Revision field of SSDT */ + + Store ((CREV + 0x01), CREV) /* \DTM0.CREV */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0x01, 0x0146, 0x00)) + { + Return (Zero) + } + + /* Load operator execution */ + + Switch (ToInteger (Arg1)) + { + Case (0x00) + { + Load (RFU0, HI0) /* \DTM0.M000.HI0_ */ + } + Case (0x01) + { + Load (RFU0, \DTM0.HI0) + } + Case (0x02) + { + Load (RFU0, Local2) + } + Case (0x03) + { + Load (RFU0, PHI0 [0x00]) + } + Default + { + Debug = "Unexpected parameter of the test" + ERR (Arg0, Z174, 0x0152, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + } + + If (CH03 (Arg0, Z174, 0x03, 0x0157, 0x00)) + { + Return (Zero) + } + + Debug = "Table Loaded" + /* Check DDBHandle ObjectType */ + + Switch (ToInteger (Arg1)) + { + Case (0x00) + { + Local1 = ObjectType (HI0) + } + Case (0x01) + { + Local1 = ObjectType (\DTM0.HI0) + } + Case (0x02) + { + Local1 = ObjectType (Local2) + } + Case (0x03) + { + Local1 = ObjectType (PHI0 [0x00]) + } + + } + + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z174, 0x0165, 0x00, 0x00, Local1, C017) + } + + /* Check the new Object appears */ + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x016C, 0x00, 0x00, "\\SSS0", 0x00) + } + + Local1 = ObjectType (Local0) + If ((Local1 != C010)) + { + /* Method */ + + ERR (Arg0, Z174, 0x0171, 0x00, 0x00, Local1, C010) + } + Else + { + Local0 = \SSS0 () + If (CH03 (Arg0, Z174, 0x07, 0x0174, 0x01)) + { + Return (Zero) + } + + If (("\\SSS0" != Local0)) + { + ERR (Arg0, Z174, 0x0178, 0x00, 0x00, Local0, "\\SSS0") + } + } + + /* UnLoad operator execution */ + + Switch (ToInteger (Arg1)) + { + Case (0x00) + { + Unload (HI0) + } + Case (0x01) + { + Unload (\DTM0.HI0) + } + Case (0x02) + { + Unload (Local2) + } + Case (0x03) + { + Unload (DerefOf (PHI0 [0x00])) + } + + } + + If (CH03 (Arg0, Z174, 0x09, 0x0184, 0x00)) + { + Return (Zero) + } + + Debug = "Table Unloaded" + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x018B, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (Zero) + } + + /* Simple Load test auxiliary method for ArgX, part1 */ + /* Arg1 - reference to store the DDBHandle */ + Method (M001, 2, NotSerialized) + { + Concatenate (Arg0, "-m001", Arg0) + RFU0 = BUF0 /* \DTM0.BUF0 */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x019A, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + /* Modify Revision field of SSDT */ + + Store ((CREV + 0x01), CREV) /* \DTM0.CREV */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0x0C, 0x01A5, 0x00)) + { + Return (0x01) + } + + /* Load operator execution */ + + Load (RFU0, Arg1) + If (CH03 (Arg0, Z174, 0x0D, 0x01AC, 0x00)) + { + Return (0x01) + } + + Debug = "SSDT Loaded" + Return (0x00) + } + + /* Simple Load test auxiliary method for ArgX, part2 */ + /* Arg1 - DDBHandle */ + Method (M002, 2, NotSerialized) + { + Concatenate (Arg0, "-m002", Arg0) + /* Check DDBHandle ObjectType */ + + Local1 = ObjectType (Arg1) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z174, 0x01BE, 0x00, 0x00, Local1, C017) + } + + /* Check the new Object appears */ + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x01C5, 0x00, 0x00, "\\SSS0", 0x00) + } + + Local1 = ObjectType (Local0) + If ((Local1 != C010)) + { + /* Method */ + + ERR (Arg0, Z174, 0x01CA, 0x00, 0x00, Local1, C010) + } + Else + { + Local0 = \SSS0 () + If (CH03 (Arg0, Z174, 0x11, 0x01CD, 0x01)) + { + Return (Zero) + } + + If (("\\SSS0" != Local0)) + { + ERR (Arg0, Z174, 0x01D1, 0x00, 0x00, Local0, "\\SSS0") + } + } + + Unload (Arg1) + If (CH03 (Arg0, Z174, 0x13, 0x01D7, 0x00)) + { + Return (Zero) + } + + Debug = "SSDT Unloaded" + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x01DE, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (Zero) + } + + /* Loading SSDT from a SystemMemory OpRegion, */ + /* different targets for DDBHandle. */ + /* Check DDBHandle storing into different Object locations: */ + /* DDBHandle storing into Named Integer */ + Method (TST0, 1, NotSerialized) + { + Concatenate (Arg0, "-tst0", Arg0) + /* Local Named Integer */ + + M000 (Arg0, 0x00) + /* Global Named Integer */ + + M000 (Arg0, 0x01) + } + + /* DDBHandle storing into LocalX */ + + Method (TST1, 1, NotSerialized) + { + Concatenate (Arg0, "-tst1", Arg0) + /* LocalX */ + + M000 (Arg0, 0x02) + } + + /* DDBHandle storing into Package element */ + + Method (TST2, 1, NotSerialized) + { + Concatenate (Arg0, "-tst2", Arg0) + /* Package element */ + /* Crash on copying the specific reference Object */ + If (Y261) + { + M000 (Arg0, 0x03) + } + } + + /* DDBHandle storing into an Object by Reference in Argx */ + + Method (TST3, 1, Serialized) + { + Name (HI0, 0x00) + Concatenate (Arg0, "-tst3", Arg0) + /* Named by Reference in ArgX */ + + If (M001 (Arg0, RefOf (HI0))) + { + Return (Zero) + } + + M002 (Arg0, HI0) + /* LocalX by Reference in ArgX */ + + If (M001 (Arg0, RefOf (Local2))) + { + Return (Zero) + } + + M002 (Arg0, Local2) + /* Package element by Reference in ArgX */ + + If (Y133) + { + Name (PHI0, Package (0x01) + { + 0x00 + }) + Store (PHI0 [0x00], Local0) + If (M001 (Arg0, Local0)) + { + Return (Zero) + } + + M002 (Arg0, DerefOf (Local0)) + } + + Return (Zero) + } + + /* Combination of the OperationRegion operator arguments */ + + OperationRegion (RGN0, SystemMemory, 0x00, 0x0201) + OperationRegion (RGN1, SystemIO, 0x0200, 0x0203) + OperationRegion (RGN2, PCI_Config, 0x0400, 0x0205) + OperationRegion (RGN3, EmbeddedControl, 0x0600, 0x0207) + OperationRegion (RGN4, SMBus, 0x0800, 0x0209) + OperationRegion (RGN5, SystemCMOS, 0x0A00, 0x020B) + OperationRegion (RGN6, PCIBARTarget, 0x0C00, 0x020D) + /* UserDefRegionSpace */ + + OperationRegion (RGN7, 0x80, 0x0D00, 0x0217) + OperationRegion (RGN8, 0xCF, 0x0E00, 0x0218) + OperationRegion (RGN9, 0xFF, 0x0F00, 0x0219) + /* Loading SSDT from a Field of an OpRegion of any type, */ + /* different targets for DDBHandle. */ + /* Check DDBHandle storing into different Object locations: */ + /* Named Integer, LocalX, by Reference in Argx, etc. */ + /* m003(CallChain, Index, Region) */ + Method (M003, 3, NotSerialized) + { + Concatenate (Arg0, "-m003", Arg0) + /* Auxiliary method: */ + /* Arg1 - choice of a target */ + /* Arg2 - OpRegion Object of a specified type */ + Method (M000, 3, Serialized) + { + Name (HI0, 0x00) + Name (PHI0, Package (0x01){}) + OperationRegion (OPRM, 0xFF, 0x00, 0x1000) + Concatenate (Arg0, "-m000", Arg0) + CopyObject (Arg2, OPRM) /* \DTM0.M003.M000.OPRM */ + Field (OPRM, ByteAcc, NoLock, Preserve) + { + RFU0, 416 + } + + Field (OPRM, ByteAcc, NoLock, Preserve) + { + SIG, 32, + LENG, 32, + REV, 8, + SUM, 8, + OID, 48, + OTID, 64, + OREV, 32, + CID, 32, + CREV, 32, + Offset (0x27), + SSNM, 32 + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0264, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + /* Modify Revision field of SSDT */ + + Store ((CREV + 0x01), CREV) /* \DTM0.M003.M000.CREV */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.M003.M000.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.M003.M000.SUM_ */ + If (CH03 (Arg0, Z174, 0x16, 0x026F, 0x00)) + { + Return (Zero) + } + + /* Load operator execution */ + + Switch (ToInteger (Arg1)) + { + Case (0x00) + { + Load (RFU0, HI0) /* \DTM0.M003.M000.HI0_ */ + } + Case (0x01) + { + Load (RFU0, \DTM0.HI0) + } + Case (0x02) + { + Load (RFU0, Local2) + } + Case (0x03) + { + Load (RFU0, PHI0 [0x00]) + } + Default + { + Debug = "Unexpected parameter of the test" + ERR (Arg0, Z174, 0x027B, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + } + + If (CH03 (Arg0, Z174, 0x18, 0x0280, 0x00)) + { + Return (Zero) + } + + Debug = "SSDT Loaded" + /* Check DDBHandle ObjectType */ + + Switch (ToInteger (Arg1)) + { + Case (0x00) + { + Local1 = ObjectType (HI0) + } + Case (0x01) + { + Local1 = ObjectType (\DTM0.HI0) + } + Case (0x02) + { + Local1 = ObjectType (Local2) + } + Case (0x03) + { + Local1 = ObjectType (PHI0 [0x00]) + } + + } + + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z174, 0x028E, 0x00, 0x00, Local1, C017) + } + + /* Check the new Object appears */ + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x0295, 0x00, 0x00, "\\SSS0", 0x00) + } + + Local1 = ObjectType (Local0) + If ((Local1 != C010)) + { + /* Method */ + + ERR (Arg0, Z174, 0x029A, 0x00, 0x00, Local1, C010) + } + Else + { + Local0 = \SSS0 () + If (CH03 (Arg0, Z174, 0x1C, 0x029D, 0x01)) + { + Return (Zero) + } + + If (("\\SSS0" != Local0)) + { + ERR (Arg0, Z174, 0x02A1, 0x00, 0x00, Local0, "\\SSS0") + } + } + + /* UnLoad operator execution */ + + Switch (ToInteger (Arg1)) + { + Case (0x00) + { + Unload (HI0) + } + Case (0x01) + { + Unload (\DTM0.HI0) + } + Case (0x02) + { + Unload (Local2) + } + Case (0x03) + { + Unload (DerefOf (PHI0 [0x00])) + } + + } + + If (CH03 (Arg0, Z174, 0x1E, 0x02AD, 0x00)) + { + Return (Zero) + } + + Debug = "SSDT Unloaded" + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x02B4, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (Zero) + } + + /* Auxiliary method for ArgX, part1 */ + /* Arg1 - reference to store the DDBHandle */ + /* Arg2 - OpRegion Object of a specified type */ + Method (M001, 3, Serialized) + { + OperationRegion (OPRM, 0xFF, 0x00, 0x1000) + Concatenate (Arg0, "-m001", Arg0) + CopyObject (Arg2, OPRM) /* \DTM0.M003.M001.OPRM */ + Field (OPRM, ByteAcc, NoLock, Preserve) + { + RFU0, 416 + } + + Field (OPRM, ByteAcc, NoLock, Preserve) + { + SIG, 32, + LENG, 32, + REV, 8, + SUM, 8, + OID, 48, + OTID, 64, + OREV, 32, + CID, 32, + CREV, 32, + Offset (0x27), + SSNM, 32 + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x02DA, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + /* Modify Revision field of SSDT */ + + Store ((CREV + 0x01), CREV) /* \DTM0.M003.M001.CREV */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.M003.M001.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.M003.M001.SUM_ */ + If (CH03 (Arg0, Z174, 0x21, 0x02E5, 0x00)) + { + Return (0x01) + } + + /* Load operator execution */ + + Load (RFU0, Arg1) + If (CH03 (Arg0, Z174, 0x22, 0x02EC, 0x00)) + { + Return (0x01) + } + + Debug = "SSDT Loaded" + Return (0x00) + } + + /* Arg1 - OpRegion Object of a specified type */ + + Method (M003, 2, Serialized) + { + Concatenate (Arg0, "-m003", Arg0) + /* Local Named Integer */ + + M000 (Arg0, 0x00, Arg1) + /* Global Named Integer */ + + M000 (Arg0, 0x01, Arg1) + /* LocalX */ + + M000 (Arg0, 0x02, Arg1) + /* Package element */ + /* Crash on copying the specific reference Object */ + If (Y261) + { + M000 (Arg0, 0x03, Arg1) + } + + /* ArgX */ + + If (M001 (Arg0, RefOf (Local2), Arg1)) + { + Return (Zero) + } + + M002 (Arg0, Local2) + /* Package element as ArgX */ + + If (Y133) + { + Name (PHI0, Package (0x01) + { + 0x00 + }) + Store (PHI0 [0x00], Local0) + If (M001 (Arg0, Local0, Arg1)) + { + Return (Zero) + } + + M002 (Arg0, DerefOf (Local0)) + } + + Return (Zero) + } + + /* Region type's Address Space Handler installed flags, */ + /* only those types' OpRegion can be tested. */ + /* 0xff - UserDefRegionSpace */ + +Local2 = Buffer (0x0A) + { + /* 0000 */ 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, // ........ + /* 0008 */ 0x00, 0x00 // .. + } + Local3 = DerefOf (Local2 [Arg1]) + If (Local3) + { + Concatenate (Arg0, "-0x", Local4) + Concatenate (Local4, Mid (ToHexString (Arg1), (0x06 + (F64 * 0x08) + ), 0x02), Local4) + Debug = Local4 + M003 (Local4, Arg2) + } + Else + { + Debug = "This Region type\'s AddrSpace Handler not installed" + ERR (Arg0, Z174, 0x0335, 0x00, 0x00, Local2, Arg1) + } + } + + /* SystemMemory Region */ + + Method (TST4, 1, NotSerialized) + { + Concatenate (Arg0, "-tst4", Arg0) + M003 (Arg0, 0x00, RGN0) + } + + /* SystemIO Region */ + + Method (TST5, 1, NotSerialized) + { + Concatenate (Arg0, "-tst5", Arg0) + M003 (Arg0, 0x01, RGN1) + } + + /* EmbeddedControl Region */ + + Method (TST6, 1, NotSerialized) + { + Concatenate (Arg0, "-tst6", Arg0) + M003 (Arg0, 0x03, RGN3) + } + + /* User defined Region */ + + Method (TST7, 1, NotSerialized) + { + Concatenate (Arg0, "-tst7", Arg0) + M003 (Arg0, 0x07, RGN7) + } + + /* Note: We load the table objects relative to the root of the namespace. */ + /* This appears to go against the ACPI specification, but we do it for */ + /* compatibility with other ACPI implementations. */ + /* Originated from ssdt1.asl: iasl -tc ssdt1.asl */ + Name (BUF1, Buffer (0x5F) + { + /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x5F, 0x00, 0x00, 0x00, // SSDT_... + /* 0008 */ 0x02, 0x33, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .3Intel. + /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x10, 0x1F, 0x5C, 0x00, // ... ..\. + /* 0028 */ 0x08, 0x4E, 0x41, 0x42, 0x53, 0x0D, 0x61, 0x62, // .NABS.ab + /* 0030 */ 0x73, 0x6F, 0x6C, 0x75, 0x74, 0x65, 0x20, 0x6C, // solute l + /* 0038 */ 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, // ocation + /* 0040 */ 0x6F, 0x62, 0x6A, 0x00, 0x08, 0x4E, 0x43, 0x52, // obj..NCR + /* 0048 */ 0x52, 0x0D, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6E, // R.curren + /* 0050 */ 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, // t locati + /* 0058 */ 0x6F, 0x6E, 0x20, 0x6F, 0x62, 0x6A, 0x00 // on obj. + }) + OperationRegion (IST1, SystemMemory, 0x0100, 0x5F) + Field (IST1, ByteAcc, NoLock, Preserve) + { + RFU1, 760 + } + + Method (TST8, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst8", Arg0) + /* Check absence */ + + If (CondRefOf (NABS, Local0)) + { + ERR (Arg0, Z174, 0x037B, 0x00, 0x00, "NABS", 0x01) + } + + If (CondRefOf (NCRR, Local0)) + { + ERR (Arg0, Z174, 0x037E, 0x00, 0x00, "NCRR", 0x01) + } + + RFU1 = BUF1 /* \DTM0.BUF1 */ + Load (RFU1, DDBH) /* \DTM0.TST8.DDBH */ + Debug = "SSDT loaded" + /* Check existence */ + + If (CondRefOf (NABS, Local0)) + { + If (("absolute location obj" != DerefOf (Local0))) + { + ERR (Arg0, Z174, 0x0388, 0x00, 0x00, DerefOf (Local0), "absolute location obj") + } + } + Else + { + ERR (Arg0, Z174, 0x038C, 0x00, 0x00, "NABS", 0x00) + } + + If (CondRefOf (NCRR, Local0)) + { + If (("current location obj" != DerefOf (Local0))) + { + ERR (Arg0, Z174, 0x0390, 0x00, 0x00, DerefOf (Local0), "current location obj") + } + } + Else + { + ERR (Arg0, Z174, 0x0394, 0x00, 0x00, "NCRR", 0x00) + } + + /* Check location */ + + If (CondRefOf (\NABS, Local0)){} + Else + { + ERR (Arg0, Z174, 0x039A, 0x00, 0x00, "NABS", 0x00) + } + + /*Note: We load the table objects relative to the root of the namespace. */ + + If (CondRefOf (\NCRR, Local0)){} + Else + { + ERR (Arg0, Z174, 0x039F, 0x00, 0x00, "\\NCRR", 0x01) + } + + If (CondRefOf (\DTM0.NCRR, Local0)) + { + ERR (Arg0, Z174, 0x03A2, 0x00, 0x00, "\\DTM0.NCRR", 0x01) + } + + If (CondRefOf (\DTM0.TST8.NCRR, Local0)) + { + ERR (Arg0, Z174, 0x03A5, 0x00, 0x00, "\\DTM0.TST8.NCRR", 0x00) + } + + Unload (DDBH) + Debug = "SSDT unloaded" + /* Check absence */ + + If (CondRefOf (NABS, Local0)) + { + ERR (Arg0, Z174, 0x03AD, 0x00, 0x00, "NABS", 0x01) + } + + If (CondRefOf (NCRR, Local0)) + { + ERR (Arg0, Z174, 0x03B0, 0x00, 0x00, "NCRR", 0x01) + } + } + + /* Check global and dynamic declarations of OpRegions */ + /* and the appropriate _REG Methods invocation for the */ + /* loaded SSDT */ + /* Originated from ssdt2.asl: iasl -tc ssdt2.asl */ + Name (BUF2, Buffer (0x0117) + { + /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x17, 0x01, 0x00, 0x00, // SSDT.... + /* 0008 */ 0x02, 0x7B, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .{Intel. + /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x5B, 0x82, 0x41, 0x0F, // ... [.A. + /* 0028 */ 0x41, 0x55, 0x58, 0x44, 0x5B, 0x80, 0x4F, 0x50, // AUXD[.OP + /* 0030 */ 0x52, 0x30, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x01, // R0...... + /* 0038 */ 0x0A, 0x04, 0x5B, 0x81, 0x0B, 0x4F, 0x50, 0x52, // ..[..OPR + /* 0040 */ 0x30, 0x03, 0x52, 0x46, 0x30, 0x30, 0x20, 0x08, // 0.RF00 . + /* 0048 */ 0x52, 0x45, 0x47, 0x43, 0x0C, 0xFF, 0xFF, 0xFF, // REGC.... + /* 0050 */ 0xFF, 0x08, 0x52, 0x45, 0x47, 0x50, 0x0A, 0x00, // ..REGP.. + /* 0058 */ 0x08, 0x52, 0x45, 0x47, 0x44, 0x0C, 0xFF, 0xFF, // .REGD... + /* 0060 */ 0xFF, 0xFF, 0x08, 0x52, 0x45, 0x47, 0x52, 0x0A, // ...REGR. + /* 0068 */ 0x00, 0x14, 0x33, 0x5F, 0x52, 0x45, 0x47, 0x02, // ..3_REG. + /* 0070 */ 0x70, 0x0D, 0x5C, 0x41, 0x55, 0x58, 0x44, 0x2E, // p.\AUXD. + /* 0078 */ 0x5F, 0x52, 0x45, 0x47, 0x3A, 0x00, 0x5B, 0x31, // _REG:.[1 + /* 0080 */ 0x70, 0x68, 0x5B, 0x31, 0x70, 0x69, 0x5B, 0x31, // ph[1pi[1 + /* 0088 */ 0xA0, 0x14, 0x93, 0x68, 0x0A, 0x80, 0x70, 0x52, // ...h..pR + /* 0090 */ 0x45, 0x47, 0x43, 0x52, 0x45, 0x47, 0x50, 0x70, // EGCREGPp + /* 0098 */ 0x69, 0x52, 0x45, 0x47, 0x43, 0x14, 0x49, 0x07, // iREGC.I. + /* 00A0 */ 0x4D, 0x30, 0x30, 0x30, 0x00, 0x14, 0x38, 0x5F, // M000..8_ + /* 00A8 */ 0x52, 0x45, 0x47, 0x02, 0x70, 0x0D, 0x5C, 0x41, // REG.p.\A + /* 00B0 */ 0x55, 0x58, 0x44, 0x2E, 0x4D, 0x30, 0x30, 0x30, // UXD.M000 + /* 00B8 */ 0x2E, 0x5F, 0x52, 0x45, 0x47, 0x3A, 0x00, 0x5B, // ._REG:.[ + /* 00C0 */ 0x31, 0x70, 0x68, 0x5B, 0x31, 0x70, 0x69, 0x5B, // 1ph[1pi[ + /* 00C8 */ 0x31, 0xA0, 0x14, 0x93, 0x68, 0x0A, 0x80, 0x70, // 1...h..p + /* 00D0 */ 0x52, 0x45, 0x47, 0x44, 0x52, 0x45, 0x47, 0x52, // REGDREGR + /* 00D8 */ 0x70, 0x69, 0x52, 0x45, 0x47, 0x44, 0x5B, 0x80, // piREGD[. + /* 00E0 */ 0x4F, 0x50, 0x52, 0x31, 0x80, 0x0C, 0x10, 0x00, // OPR1.... + /* 00E8 */ 0x00, 0x01, 0x0A, 0x04, 0x5B, 0x81, 0x0B, 0x4F, // ....[..O + /* 00F0 */ 0x50, 0x52, 0x31, 0x03, 0x52, 0x46, 0x30, 0x31, // PR1.RF01 + /* 00F8 */ 0x20, 0x70, 0x0D, 0x5C, 0x41, 0x55, 0x58, 0x44, // p.\AUXD + /* 0100 */ 0x2E, 0x4D, 0x30, 0x30, 0x30, 0x3A, 0x00, 0x5B, // .M000:.[ + /* 0108 */ 0x31, 0x70, 0x52, 0x46, 0x30, 0x31, 0x5B, 0x31, // 1pRF01[1 + /* 0110 */ 0x70, 0x52, 0x45, 0x47, 0x52, 0x5B, 0x31 // pREGR[1 + }) + OperationRegion (IST2, SystemMemory, 0x0200, 0x0117) + Field (IST2, ByteAcc, NoLock, Preserve) + { + RFU2, 2232 + } + + External (\AUXD.M000, MethodObj) + Method (TST9, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst9", Arg0) + RFU2 = BUF2 /* \DTM0.BUF2 */ + If (CondRefOf (\AUXD, Local0)) + { + ERR (Arg0, Z174, 0x03F0, 0x00, 0x00, "\\AUXD", 0x01) + Return (Zero) + } + + If (CH03 (Arg0, 0x00, 0x31, 0x03F4, 0x00)) + { + Return (Zero) + } + + Load (RFU2, DDBH) /* \DTM0.TST9.DDBH */ + If (CH03 (Arg0, 0x00, 0x32, 0x03FA, 0x00)) + { + Return (Zero) + } + + If (CondRefOf (\AUXD, Local0)){} + Else + { + ERR (Arg0, Z174, 0x0400, 0x00, 0x00, "\\AUXD", 0x00) + Return (Zero) + } + + Local1 = ObjectType (Local0) + If ((Local1 != 0x06)) + { + ERR (Arg0, Z174, 0x0407, 0x00, 0x00, Local1, 0x06) + Return (Zero) + } + + If (CondRefOf (\AUXD.REGC, Local0)){} + Else + { + ERR (Arg0, Z174, 0x040D, 0x00, 0x00, "\\AUXD.REGC", 0x00) + Return (Zero) + } + + Local1 = DerefOf (Local0) + If ((0x01 != Local1)) + { + ERR (Arg0, Z174, 0x0414, 0x00, 0x00, Local1, 0x01) + } + + If (CondRefOf (\AUXD.REGD, Local0)){} + Else + { + ERR (Arg0, Z174, 0x0419, 0x00, 0x00, "\\AUXD.REGD", 0x00) + Return (Zero) + } + + Local1 = DerefOf (Local0) + If ((0xFFFFFFFF != Local1)) + { + ERR (Arg0, Z174, 0x0420, 0x00, 0x00, Local1, 0xFFFFFFFF) + } + ElseIf (CondRefOf (\AUXD.M000, Local2)) + { + \AUXD.M000 () + Local1 = DerefOf (Local0) + If ((0x01 != Local1)) + { + ERR (Arg0, Z174, 0x0428, 0x00, 0x00, Local1, 0x01) + } + } + Else + { + ERR (Arg0, Z174, 0x042B, 0x00, 0x00, "\\AUXD.M000", 0x00) + } + + Unload (DDBH) + If (CondRefOf (\AUXD, Local0)) + { + ERR (Arg0, Z174, 0x0431, 0x00, 0x00, "\\AUXD", 0x01) + } + + Return (Zero) + } + + /* Checks that only specified Tables objects present in the NS */ + + Method (LDCH, 1, NotSerialized) + { + Method (MAUX, 0, NotSerialized) + { + Return ("MAUX") + } + + Concatenate (Arg0, "-LDCH", Arg0) + If (CH03 (Arg0, Z174, 0x40, 0x043D, 0x00)) + { + Return (0x01) + } + + /* Specify to check up to 3 successive \SSxx names */ + + Local0 = 0x01 + If (HI0N) + { + Local1 = (HI0N - 0x01) + If (Local1) + { + Local1-- + } + } + Else + { + Local1 = 0x00 + } + + If (((Local1 + 0x01) < HI0M)) + { + Local0++ + If (((Local1 + 0x02) < HI0M)) + { + Local0++ + } + } + + While (Local0) + { + Divide (Local1, NNML, Local3, Local4) + Local5 = "\\SSS0" + Local5 [0x03] = DerefOf (SNML [Local4]) + Local5 [0x04] = DerefOf (SNML [Local3]) + Debug = Local5 + /* Access the next \SSxx Object */ + + CopyObject (DerefOf (Local5), MAUX) /* \DTM0.LDCH.MAUX */ + If ((Local1 < HI0N)) + { + If (CH03 (Arg0, Z174, 0x41, 0x045E, 0x00)) + { + Return (0x02) + } + + Local2 = MAUX () + If (CH03 (Arg0, Z174, 0x42, 0x0462, 0x00)) + { + Return (0x03) + } + + If ((Local5 != Local2)) + { + ERR (Arg0, Z174, 0x0466, 0x00, 0x00, Local2, Local5) + } + } + ElseIf (CH04 (Arg0, 0x00, 0xFF, Z174, 0x0469, 0x00, 0x00)) + { + /* AE_NOT_FOUND */ + + Return (0x04) + } + + Local1++ + Local0-- + } + + Return (0x00) + } + + /* Loading a number of different SSDTs */ + /* Arg1: the number of SSDT to load */ + Method (TSTA, 2, NotSerialized) + { + Concatenate (Arg0, "-tsta", Arg0) + If (INIT ()) + { + ERR (Arg0, Z174, 0x047B, 0x00, 0x00, "INIT", 0x01) + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0x46, 0x047E, 0x00)) + { + Return (0x01) + } + + Local0 = Arg1 + While (Local0) + { + If (LD ()) + { + ERR (Arg0, Z174, 0x0485, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0x48, 0x0488, 0x00)) + { + Return (0x01) + } + + Local0-- + If (LDCH (Arg0)) + { + ERR (Arg0, Z174, 0x048E, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + } + + Local0 = Arg1 + While (Local0) + { + If (UNLD ()) + { + ERR (Arg0, Z174, 0x0496, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0x4B, 0x0499, 0x00)) + { + Return (0x01) + } + + Local0-- + If (LDCH (Arg0)) + { + ERR (Arg0, Z174, 0x049F, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + } + + Return (0x00) + } + + /* Exceptions when the Object argument does not refer to */ + /* an operation region field or an operation region */ + /* Originated from ssdt3.asl: iasl -tc ssdt3.asl */ + Name (BUF3, Buffer (0x011D) + { + /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x1D, 0x01, 0x00, 0x00, // SSDT.... + /* 0008 */ 0x02, 0x4F, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .OIntel. + /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x31, 0x08, 0x16, 0x20, 0x5B, 0x82, 0x47, 0x0F, // 1.. [.G. + /* 0028 */ 0x41, 0x55, 0x58, 0x44, 0x08, 0x49, 0x4E, 0x54, // AUXD.INT + /* 0030 */ 0x30, 0x0E, 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, // 0..2Tv.. + /* 0038 */ 0xDC, 0xFE, 0x08, 0x53, 0x54, 0x52, 0x30, 0x0D, // ...STR0. + /* 0040 */ 0x73, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, // source s + /* 0048 */ 0x74, 0x72, 0x69, 0x6E, 0x67, 0x30, 0x00, 0x08, // tring0.. + /* 0050 */ 0x42, 0x55, 0x46, 0x30, 0x11, 0x0C, 0x0A, 0x09, // BUF0.... + /* 0058 */ 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, // ........ + /* 0060 */ 0x01, 0x08, 0x50, 0x41, 0x43, 0x30, 0x12, 0x27, // ..PAC0.' + /* 0068 */ 0x03, 0x0E, 0x1F, 0x32, 0x54, 0x76, 0x98, 0xBA, // ...2Tv.. + /* 0070 */ 0xDC, 0xFE, 0x0D, 0x74, 0x65, 0x73, 0x74, 0x20, // ...test + /* 0078 */ 0x70, 0x61, 0x63, 0x6B, 0x61, 0x67, 0x65, 0x30, // package0 + /* 0080 */ 0x00, 0x11, 0x0C, 0x0A, 0x09, 0x13, 0x12, 0x11, // ........ + /* 0088 */ 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x5B, 0x80, // ......[. + /* 0090 */ 0x4F, 0x50, 0x52, 0x30, 0x00, 0x0C, 0x21, 0x43, // OPR0..!C + /* 0098 */ 0x65, 0x07, 0x0A, 0x98, 0x5B, 0x81, 0x0B, 0x4F, // e...[..O + /* 00A0 */ 0x50, 0x52, 0x30, 0x01, 0x46, 0x4C, 0x55, 0x30, // PR0.FLU0 + /* 00A8 */ 0x20, 0x5B, 0x82, 0x10, 0x44, 0x45, 0x56, 0x30, // [..DEV0 + /* 00B0 */ 0x08, 0x53, 0x30, 0x30, 0x30, 0x0D, 0x44, 0x45, // .S000.DE + /* 00B8 */ 0x56, 0x30, 0x00, 0x5B, 0x02, 0x45, 0x56, 0x45, // V0.[.EVE + /* 00C0 */ 0x30, 0x14, 0x08, 0x4D, 0x4D, 0x4D, 0x30, 0x00, // 0..MMM0. + /* 00C8 */ 0xA4, 0x00, 0x5B, 0x01, 0x4D, 0x54, 0x58, 0x30, // ..[.MTX0 + /* 00D0 */ 0x00, 0x5B, 0x84, 0x13, 0x50, 0x57, 0x52, 0x30, // .[..PWR0 + /* 00D8 */ 0x00, 0x00, 0x00, 0x08, 0x53, 0x30, 0x30, 0x30, // ....S000 + /* 00E0 */ 0x0D, 0x50, 0x57, 0x52, 0x30, 0x00, 0x5B, 0x83, // .PWR0.[. + /* 00E8 */ 0x16, 0x43, 0x50, 0x55, 0x30, 0x00, 0xFF, 0xFF, // .CPU0... + /* 00F0 */ 0xFF, 0xFF, 0x00, 0x08, 0x53, 0x30, 0x30, 0x30, // ....S000 + /* 00F8 */ 0x0D, 0x43, 0x50, 0x55, 0x30, 0x00, 0x5B, 0x85, // .CPU0.[. + /* 0100 */ 0x10, 0x54, 0x5A, 0x4E, 0x30, 0x08, 0x53, 0x30, // .TZN0.S0 + /* 0108 */ 0x30, 0x30, 0x0D, 0x54, 0x5A, 0x4E, 0x30, 0x00, // 00.TZN0. + /* 0110 */ 0x5B, 0x13, 0x42, 0x55, 0x46, 0x30, 0x00, 0x0A, // [.BUF0.. + /* 0118 */ 0x45, 0x42, 0x46, 0x4C, 0x30 // EBFL0 + }) + OperationRegion (IST3, SystemMemory, 0x0400, 0x011F) + Field (IST3, ByteAcc, NoLock, Preserve) + { + RFU3, 2296 + } + + Method (TSTB, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDBH, 0x00) + Concatenate (Arg0, "-tstb", Arg0) + RFU3 = BUF3 /* \DTM0.BUF3 */ + Load (RFU3, DDB0) /* \DTM0.TSTB.DDB0 */ + If (CH03 (Arg0, Z174, 0x50, 0x04E2, 0x00)) + { + Return (0x01) + } + + /* Uninitialized: it can not be aplied to Load which */ + /* allows NameString only to be used as Object parameter */ + /* Integer */ + Load (\AUXD.INT0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x04EB, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.INT0) + If ((C009 != Local0)) + { + ERR (Arg0, Z174, 0x04EE, 0x00, 0x00, Local0, C009) + } + + /* String */ + + Load (\AUXD.STR0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x04F3, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.STR0) + If ((C00A != Local0)) + { + ERR (Arg0, Z174, 0x04F6, 0x00, 0x00, Local0, C00A) + } + + /* Buffer */ + + If (Y282) + { + /* TBD: LBZ480 update allows Buffer to be Source of Load */ + + Load (\AUXD.BUF0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x04FD, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.BUF0) + If ((C00B != Local0)) + { + ERR (Arg0, Z174, 0x0500, 0x00, 0x00, Local0, C00B) + } + } + + /* Package */ + + Load (\AUXD.PAC0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0506, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.PAC0) + If ((C00C != Local0)) + { + ERR (Arg0, Z174, 0x0509, 0x00, 0x00, Local0, C00C) + } + + /* Field Unit */ + /* Device */ + Load (\AUXD.DEV0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0510, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.DEV0) + If ((C00E != Local0)) + { + ERR (Arg0, Z174, 0x0513, 0x00, 0x00, Local0, C00E) + } + + /* Event */ + + Load (\AUXD.EVE0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0518, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.EVE0) + If ((C00F != Local0)) + { + ERR (Arg0, Z174, 0x051B, 0x00, 0x00, Local0, C00F) + } + + /* Method */ + + Load (\AUXD.MMM0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0520, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.MMM0) + If ((C010 != Local0)) + { + ERR (Arg0, Z174, 0x0523, 0x00, 0x00, Local0, C010) + } + + /* Mutex */ + + Load (\AUXD.MTX0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0528, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.MTX0) + If ((C011 != Local0)) + { + ERR (Arg0, Z174, 0x052B, 0x00, 0x00, Local0, C011) + } + + /* OpRegion */ + /* Power Resource */ + Load (\AUXD.PWR0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0532, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.PWR0) + If ((C013 != Local0)) + { + ERR (Arg0, Z174, 0x0535, 0x00, 0x00, Local0, C013) + } + + /* Processor */ + + Load (\AUXD.CPU0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x053A, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.CPU0) + If ((C014 != Local0)) + { + ERR (Arg0, Z174, 0x053D, 0x00, 0x00, Local0, C014) + } + + /* Thermal Zone */ + + Load (\AUXD.TZN0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0542, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.TZN0) + If ((C015 != Local0)) + { + ERR (Arg0, Z174, 0x0545, 0x00, 0x00, Local0, C015) + } + + /* Buffer Field */ + + If (Y282) + { + /* TBD: LBZ480 update allows Buffer Field to be Source of Load */ + + Load (\AUXD.BFL0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x054C, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.BFL0) + If ((C016 != Local0)) + { + ERR (Arg0, Z174, 0x054F, 0x00, 0x00, Local0, C016) + } + } + + /* DDB Handle */ + + Load (DDB0, DDBH) /* \DTM0.TSTB.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0555, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (DDB0) + If ((C017 != Local0)) + { + ERR (Arg0, Z174, 0x0558, 0x00, 0x00, Local0, C017) + } + + Unload (DDB0) + Return (0x00) + } + + /* Exceptions when an OpRegion passed as the Object */ + /* parameter of Load is not of SystemMemory type */ + Method (TSTC, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tstc", Arg0) + OperationRegion (RGN1, SystemIO, 0x0280, 0x0123) + OperationRegion (RGN2, PCI_Config, 0x0480, 0x0125) + OperationRegion (RGN3, EmbeddedControl, 0x0680, 0x0127) + OperationRegion (RGN4, SMBus, 0x0880, 0x0109) + OperationRegion (RGN5, SystemCMOS, 0x0A80, 0x012B) + OperationRegion (RGN6, PCIBARTarget, 0x0C80, 0x012D) + /* UserDefRegionSpace */ + + OperationRegion (RGN7, 0x80, 0x0D80, 0x0137) + OperationRegion (RGN8, 0xCF, 0x0E80, 0x0138) + OperationRegion (RGN9, 0xFF, 0x0F80, 0x0139) + If (CH03 (Arg0, Z174, 0x6F, 0x0574, 0x00)) + { + Return (0x01) + } + + /* SystemIO */ + + Load (RGN1, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x057A, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN1) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x057D, 0x00, 0x00, Local0, C012) + } + + /* PCI_Config */ + + Load (RGN2, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0582, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN2) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x0585, 0x00, 0x00, Local0, C012) + } + + /* EmbeddedControl */ + + Load (RGN3, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x058A, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN3) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x058D, 0x00, 0x00, Local0, C012) + } + + /* SMBus */ + + Load (RGN4, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x0592, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN4) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x0595, 0x00, 0x00, Local0, C012) + } + + /* SystemCMOS */ + + Load (RGN5, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x059A, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN5) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x059D, 0x00, 0x00, Local0, C012) + } + + /* PciBarTarget */ + + Load (RGN6, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x05A2, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN6) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x05A5, 0x00, 0x00, Local0, C012) + } + + /* UserDefRegionSpace 0x80 */ + + Load (RGN7, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x05AA, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN7) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x05AD, 0x00, 0x00, Local0, C012) + } + + /* UserDefRegionSpace 0xcf */ + + Load (RGN8, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x05B2, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN8) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x05B5, 0x00, 0x00, Local0, C012) + } + + /* UserDefRegionSpace 0xff */ + + Load (RGN9, DDBH) /* \DTM0.TSTC.DDBH */ + CH04 (Arg0, 0x00, 0x2F, Z174, 0x05BA, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (RGN9) + If ((C012 != Local0)) + { + ERR (Arg0, Z174, 0x05BD, 0x00, 0x00, Local0, C012) + } + + Return (0x00) + } + + /* Exceptions when the table contained in an OpRegion */ + /* (Field) is not an SSDT */ + Method (TSTD, 1, Serialized) + { + Name (HI0, 0x00) + Concatenate (Arg0, "-tstd", Arg0) + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x05CC, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Modify the Signature field of the Table Header */ + + Local0 = SIG /* \DTM0.SIG_ */ + Local0++ + SIG = Local0 + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0x83, 0x05DB, 0x00)) + { + Return (0x01) + } + + /* Load operator execution, OpRegion case */ + + If (Y290) + { + Load (IST0, HI0) /* \DTM0.TSTD.HI0_ */ + CH04 (Arg0, 0x00, 0x25, Z174, 0x05E2, 0x00, 0x00) /* AE_BAD_SIGNATURE */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x05E5, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + } + + /* Load operator execution, OpRegion Field case */ + + Load (RFU0, HI0) /* \DTM0.TSTD.HI0_ */ + CH04 (Arg0, 0x00, 0x25, Z174, 0x05EC, 0x00, 0x00) /* AE_BAD_SIGNATURE */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x05EF, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (0x00) + } + + /* Exceptions when the length of the supplied SSDT is greater */ + /* than the length of the respective OpRegion or Region Field, */ + /* or less than the length of the Table Header */ + /* Arg1: 0 - the 'greater' case, 1 - the 'less' case */ + Method (TSTE, 2, Serialized) + { + Name (HI0, 0x00) + Concatenate (Arg0, "-tste", Arg0) + If (Arg1) + { + Concatenate (Arg0, ".less", Arg0) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0604, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Modify the Length field of the Table Header */ + + If (Arg1) + { + Local0 = 0x23 + } + Else + { + Local0 = SizeOf (BUF0) + Local0++ + } + + LENG = Local0 + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0x91, 0x0617, 0x00)) + { + Return (0x01) + } + + /* Load operator execution, OpRegion case */ + + If (Y290) + { + Load (IST0, HI0) /* \DTM0.TSTE.HI0_ */ + CH04 (Arg0, 0x00, 0x2A, Z174, 0x061E, 0x00, 0x00) /* AE_INVALID_TABLE_LENGTH */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0621, 0x00, 0x00, "\\SSS0", 0x01) + /* CleanUp */ + + Unload (HI0) + If (CH03 (Arg0, Z174, 0x94, 0x0625, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0629, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + } + } + + /* Load operator execution, OpRegion Field case */ + + Load (RFU0, HI0) /* \DTM0.TSTE.HI0_ */ + If (!Arg1) + { + /* If the table length in the header is larger than the buffer. */ + + CH04 (Arg0, 0x00, 0x36, Z174, 0x0633, 0x00, 0x00) /* AE_AML_BUFFER_LIMIT */ + } + Else + { + /* If the table length is smaller than an ACPI table header. */ + + CH04 (Arg0, 0x00, 0x2A, Z174, 0x0636, 0x00, 0x00) /* AE_INVALID_TABLE_LENGTH */ + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x063A, 0x00, 0x00, "\\SSS0", 0x01) + Unload (HI0) + If (CH03 (Arg0, Z174, 0x98, 0x063C, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0640, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + } + + Return (0x00) + } + + /* Exceptions when the checksum of the supplied SSDT is invalid */ + + Method (TSTF, 1, Serialized) + { + Name (HI0, 0x00) + Concatenate (Arg0, "-tstf", Arg0) + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0650, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + /* Spoil the CheckSum */ + + Store ((SUM + 0x01), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0xA1, 0x065D, 0x00)) + { + Return (0x01) + } + + /* Load operator execution, OpRegion case */ + + If (Y290) + { + Load (IST0, HI0) /* \DTM0.TSTF.HI0_ */ + CH04 (Arg0, 0x00, 0x27, Z174, 0x0664, 0x00, 0x00) /* AE_BAD_CHECKSUM */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0667, 0x00, 0x00, "\\SSS0", 0x01) + /*Cleanup */ + + Unload (HI0) + If (CH03 (Arg0, Z174, 0xA4, 0x066B, 0x00)) + { + Return (0x01) + } + + Store ((SUM + 0x01), SUM) /* \DTM0.SUM_ */ + } + } + + /* Load operator execution, OpRegion Field case */ + + Load (RFU0, HI0) /* \DTM0.TSTF.HI0_ */ + CH04 (Arg0, 0x00, 0x27, Z174, 0x0674, 0x00, 0x00) /* AE_BAD_CHECKSUM */ + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0677, 0x00, 0x00, "\\SSS0", 0x01) + /*Cleanup */ + + Unload (HI0) + If (CH03 (Arg0, Z174, 0xA7, 0x067B, 0x00)) + { + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0xA8, 0x067E, 0x00)) + { + Return (0x01) + } + } + + Return (0x00) + } + + /* Object of any type (expect Field Units and Buffer Fields) */ + /* can be used as the DDBHandle argument */ + Method (TSTG, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Name (DDBH, 0x00) + Method (M000, 4, NotSerialized) + { + Concatenate (Arg0, "-m000.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z174, 0x0695, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x069A, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + Load (RFU0, Arg2) + If (CH03 (Arg0, Z174, 0xB2, 0x069F, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (Arg2) + If ((C017 != Local0)) + { + ERR (Arg0, Z174, 0x06A4, 0x00, 0x00, Local0, C017) + } + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x06A8, 0x00, 0x00, "\\SSS0", 0x00) + Return (0x01) + } + + Unload (DerefOf (Arg2)) + If (CH03 (Arg0, Z174, 0xB5, 0x06AD, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x06B1, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + Return (0x00) + } + + Concatenate (Arg0, "-tstg", Arg0) + /* Load Auxiliry table */ + + RFU3 = BUF3 /* \DTM0.BUF3 */ + Load (RFU3, DDB0) /* \DTM0.TSTG.DDB0 */ + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0xB7, 0x06C3, 0x00)) + { + Return (0x01) + } + + /* Uninitialized */ + + M000 (Arg0, "uni", RefOf (Local1), C008) + /* Integer */ + + M000 (Arg0, "int", RefOf (\AUXD.INT0), C009) + /* String */ + + M000 (Arg0, "str", RefOf (\AUXD.STR0), C00A) + /* Buffer */ + + M000 (Arg0, "buf", RefOf (\AUXD.BUF0), C00B) + /* Writing NewObj to ArgX which is a RefOf(OldObj), should */ + /* result in RefOf(NewObj), but this is currently not */ + /* working. */ + If (Y260) + { + /* Package */ + + M000 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + /* Field Unit */ + + M000 (Arg0, "flu", RefOf (\AUXD.FLU0), C00D) + /* Device */ + + M000 (Arg0, "dev", RefOf (\AUXD.DEV0), C00E) + /* Event */ + + M000 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + /* Method */ + + M000 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + /* Mutex */ + + M000 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + /* OpRegion */ + + M000 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + /* Power Resource */ + + M000 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + /* Processor */ + + M000 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + /* Thermal Zone */ + + M000 (Arg0, "tzn", RefOf (\AUXD.TZN0), C015) + /* Buffer Field */ + + M000 (Arg0, "bfl", RefOf (\AUXD.BFL0), C016) + /* DDB Handle */ + + CopyObject (DDB0, DDB1) /* \DTM0.TSTG.DDB1 */ + M000 (Arg0, "ddb", RefOf (DDB1), C017) + } + + Unload (DDB0) + CH03 (Arg0, Z174, 0xB8, 0x06FF, 0x00) + Return (0x00) + } + + /* AE_OWNER_ID_LIMIT exception when too many Tables loaded, */ + /* Arg1: 0 - Load case, 1 - LoadTable case */ + Method (TSTH, 2, Serialized) + { + Name (MAXT, 0xF6) + Name (DDB1, 0x00) + Name (DDB3, 0x00) + Concatenate (Arg0, "-tsth", Arg0) + If (INIT ()) + { + ERR (Arg0, Z174, 0x070F, 0x00, 0x00, "INIT", 0x01) + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0xC1, 0x0712, 0x00)) + { + Return (0x01) + } + + RFU1 = BUF1 /* \DTM0.BUF1 */ + RFU3 = BUF3 /* \DTM0.BUF3 */ + Local0 = MAXT /* \DTM0.TSTH.MAXT */ + While (Local0) + { + Debug = HI0N /* \DTM0.HI0N */ + If (LD ()) + { + ERR (Arg0, Z174, 0x071C, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0xC3, 0x071F, 0x00)) + { + Return (0x01) + } + + Local0-- + } + + /* Methods can not be called after the following Load */ + /* (OWNER_ID is exhausted) */ + Load (RFU1, DDB1) /* \DTM0.TSTH.DDB1 */ + /* The following Load should cause AE_OWNER_ID_LIMIT */ + + If (Arg1) + { + LoadTable ("OEM1", "", "", "", "", Zero) + } + Else + { + Load (RFU3, DDB3) /* \DTM0.TSTH.DDB3 */ + } + + /* Futher 1 Method can be called */ + + Unload (DDB1) + CH04 (Arg0, 0x00, 0x56, Z174, 0x0733, 0x00, 0x00) /* AE_OWNER_ID_LIMIT */ + Local0 = MAXT /* \DTM0.TSTH.MAXT */ + While (Local0) + { + If (UNLD ()) + { + ERR (Arg0, Z174, 0x0738, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + + If (CH03 (Arg0, Z174, 0xC6, 0x073B, 0x00)) + { + Return (0x01) + } + + Local0-- + } + + If (LDCH (0x00)) + { + ERR (Arg0, Z174, 0x0742, 0x00, 0x00, "HI0N", HI0N) + Return (0x01) + } + + Return (0x00) + } + + /* Exception when SSDT specified as the Object parameter */ + /* of the Load operator is already loaded */ + Method (TSTI, 1, Serialized) + { + Name (HI0, 0x00) + Name (HI1, 0x00) + Concatenate (Arg0, "-tsti", Arg0) + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0753, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0xD1, 0x075D, 0x00)) + { + Return (0x01) + } + + /* Load operator execution */ + + Load (RFU0, HI0) /* \DTM0.TSTI.HI0_ */ + If (CH03 (Arg0, Z174, 0xD2, 0x0763, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (HI0) + If ((C017 != Local0)) + { + ERR (Arg0, Z174, 0x0769, 0x00, 0x00, Local0, C017) + } + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x076E, 0x00, 0x00, "\\SSS0", 0x00) + Return (0x01) + } + + Local1 = 0x05 + While (Local1) + { + /* Repeated Load operator execution */ + + Load (RFU0, HI1) /* \DTM0.TSTI.HI1_ */ + CH04 (Arg0, 0x00, 0x07, Z174, 0x0777, 0x05, Local1) /* AE_ALREADY_EXISTS */ + Local0 = ObjectType (HI1) + If ((C009 != Local0)) + { + ERR (Arg0, Z174, 0x077B, 0x00, 0x00, Local0, C009) + } + + Local1-- + } + + Unload (HI0) + If (CH03 (Arg0, Z174, 0xD7, 0x0783, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0788, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (0x00) + } + + /* Exception when there already is an previously created Object */ + /* referred by the namepath of the new Object in the Table loaded */ + Method (TSTJ, 1, Serialized) + { + Name (HI0, 0x00) + Name (HI1, 0x00) + Concatenate (Arg0, "-tstj", Arg0) + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0798, 0x00, 0x00, "\\SSS0", 0x01) + Return (0x01) + } + + ^RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Recalculate and save CheckSum */ + + Local0 = ^RFU0 /* \DTM0.RFU0 */ + Store ((^SUM + CHSM (Local0, SizeOf (Local0))), ^SUM) /* \DTM0.SUM_ */ + If (CH03 (Arg0, Z174, 0xE1, 0x07A2, 0x00)) + { + Return (0x01) + } + + /* Load operator execution */ + + Load (^RFU0, HI0) /* \DTM0.TSTJ.HI0_ */ + If (CH03 (Arg0, Z174, 0xE2, 0x07A8, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (HI0) + If ((C017 != Local0)) + { + ERR (Arg0, Z174, 0x07AE, 0x00, 0x00, Local0, C017) + } + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x07B3, 0x00, 0x00, "\\SSS0", 0x00) + Return (0x01) + } + + /* Load another table, containing declaration of \SSS0 */ + + OperationRegion (IST0, SystemMemory, 0x80000000, 0x34) + Field (IST0, ByteAcc, NoLock, Preserve) + { + RFU0, 416 + } + + Field (IST0, ByteAcc, NoLock, Preserve) + { + SIG, 32, + LENG, 32, + REV, 8, + SUM, 8, + OID, 48, + OTID, 64, + OREV, 32, + CID, 32, + CREV, 32, + Offset (0x27), + SSNM, 32, + Offset (0x2F), + SSRT, 32 + } + + RFU0 = BUF0 /* \DTM0.BUF0 */ + /* Modify Revision field of SSDT */ + + Store ((CREV + 0x01), CREV) /* \DTM0.TSTJ.CREV */ + /* Recalculate and save CheckSum */ + + Local0 = RFU0 /* \DTM0.TSTJ.RFU0 */ + Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.TSTJ.SUM_ */ + Local1 = 0x05 + While (Local1) + { + /* Any next Load */ + + Load (RFU0, HI1) /* \DTM0.TSTJ.HI1_ */ + CH04 (Arg0, 0x00, 0x07, Z174, 0x07DD, 0x05, Local1) /* AE_ALREADY_EXISTS */ + Local0 = ObjectType (HI1) + If ((C009 != Local0)) + { + ERR (Arg0, Z174, 0x07E1, 0x00, 0x00, Local0, C009) + } + + Local1-- + } + + Unload (HI0) + If (CH03 (Arg0, Z174, 0xE7, 0x07E9, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x07EE, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (0x00) + } + + /* Originated from ssdt5.asl: iasl -tc ssdt5.asl */ + + Name (BUF5, Buffer (0x92) + { + /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x92, 0x00, 0x00, 0x00, // SSDT.... + /* 0008 */ 0x02, 0xBA, 0x69, 0x41, 0x53, 0x4C, 0x54, 0x53, // ..iASLTS + /* 0010 */ 0x4C, 0x54, 0x42, 0x4C, 0x30, 0x30, 0x30, 0x35, // LTBL0005 + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x31, 0x08, 0x16, 0x20, 0x08, 0x44, 0x44, 0x42, // 1.. .DDB + /* 0028 */ 0x58, 0x00, 0x08, 0x42, 0x55, 0x46, 0x58, 0x11, // X..BUFX. + /* 0030 */ 0x37, 0x0A, 0x34, 0x53, 0x53, 0x44, 0x54, 0x34, // 7.4SSDT4 + /* 0038 */ 0x00, 0x00, 0x00, 0x02, 0x98, 0x49, 0x6E, 0x74, // .....Int + /* 0040 */ 0x65, 0x6C, 0x00, 0x4D, 0x61, 0x6E, 0x79, 0x00, // el.Many. + /* 0048 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x49, // .......I + /* 0050 */ 0x4E, 0x54, 0x4C, 0x15, 0x12, 0x06, 0x20, 0x14, // NTL... . + /* 0058 */ 0x0F, 0x5C, 0x53, 0x53, 0x53, 0x30, 0x00, 0xA4, // .\SSS0.. + /* 0060 */ 0x0D, 0x5C, 0x53, 0x53, 0x53, 0x30, 0x00, 0x5B, // .\SSS0.[ + /* 0068 */ 0x80, 0x49, 0x53, 0x54, 0x58, 0x00, 0x00, 0x0A, // .ISTX... + /* 0070 */ 0x34, 0x5B, 0x81, 0x0C, 0x49, 0x53, 0x54, 0x58, // 4[..ISTX + /* 0078 */ 0x01, 0x52, 0x46, 0x55, 0x58, 0x40, 0x1A, 0x70, // .RFUX@.p + /* 0080 */ 0x42, 0x55, 0x46, 0x58, 0x52, 0x46, 0x55, 0x58, // BUFXRFUX + /* 0088 */ 0x5B, 0x20, 0x52, 0x46, 0x55, 0x58, 0x44, 0x44, // [ RFUXDD + /* 0090 */ 0x42, 0x58 // BX + }) + OperationRegion (IST5, SystemMemory, 0x0600, 0x92) + Field (IST5, ByteAcc, NoLock, Preserve) + { + RFU5, 1168 + } + + /* DDB Handle */ + + External (\DDBX, UnknownObj) + /* Recursive Load in module level code */ + + Method (TSTK, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tstk", Arg0) + If (CondRefOf (\DDBX, Local0)) + { + ERR (Arg0, Z174, 0x0819, 0x00, 0x00, "\\DDBX", 0x01) + Return (Zero) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x081D, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + RFU5 = BUF5 /* \DTM0.BUF5 */ + Load (RFU5, DDBH) /* \DTM0.TSTK.DDBH */ + If (CH03 (Arg0, Z174, 0xF2, 0x0823, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\DDBX, Local0)){} + Else + { + ERR (Arg0, Z174, 0x0829, 0x00, 0x00, "\\DDBX", 0x01) + Return (Zero) + } + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z174, 0x082E, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + Unload (DDBX) + If (CH03 (Arg0, Z174, 0xF5, 0x0833, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z174, 0x0838, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + Unload (DDBH) + If (CH03 (Arg0, Z174, 0xF7, 0x083D, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\DDBX, Local0)) + { + ERR (Arg0, Z174, 0x0842, 0x00, 0x00, "\\DDBX", 0x01) + Return (Zero) + } + } + } + + Method (TLD0, 0, Serialized) + { + Name (TS, "TLD0") + /* Loading SSDT from a SystemMemory OpRegion, */ + /* different targets for DDBHandle */ + CH03 (TS, Z174, 0x0200, 0x084F, 0x00) + /* Named Objects */ + + SRMT ("TLD0.tst0") + \DTM0.TST0 (TS) + CH03 (TS, Z174, 0x0201, 0x0855, 0x00) + /* LocalX Object */ + + SRMT ("TLD0.tst1") + \DTM0.TST1 (TS) + CH03 (TS, Z174, 0x0202, 0x085B, 0x00) + /* Package element */ + + SRMT ("TLD0.tst2") + \DTM0.TST2 (TS) + CH03 (TS, Z174, 0x0203, 0x0861, 0x00) + /* By Reference in ArgX */ + + SRMT ("TLD0.tst3") + \DTM0.TST3 (TS) + /* Loading SSDT from a Field of an OpRegion of any type, */ + /* different targets for DDBHandle */ + CH03 (TS, Z174, 0x0204, 0x086A, 0x00) + /* SystemMemory Region */ + + SRMT ("TLD0.tst4") + \DTM0.TST4 (TS) + CH03 (TS, Z174, 0x0205, 0x0870, 0x00) + /* SystemIO Region */ + + SRMT ("TLD0.tst5") + \DTM0.TST5 (TS) + CH03 (TS, Z174, 0x0206, 0x0876, 0x00) + /* EmbeddedControl Region */ + + SRMT ("TLD0.tst6") + \DTM0.TST6 (TS) + CH03 (TS, Z174, 0x0207, 0x087C, 0x00) + /* User defined Region */ + + SRMT ("TLD0.tst7") + \DTM0.TST7 (TS) + CH03 (TS, Z174, 0x0208, 0x0882, 0x00) + /* Check that "namespace location to load the Definition Block */ + /* is relative to the current namespace" scope, */ + SRMT ("TLD0.tst8") + \DTM0.TST8 (TS) + CH03 (TS, Z174, 0x0209, 0x0889, 0x00) + /* Check global and dynamic declarations of OpRegions */ + /* and the appropriate _REG Methods invocation for the */ + /* loaded SSDT */ + SRMT ("TLD0.tst9") + \DTM0.TST9 (TS) + CH03 (TS, Z174, 0x020A, 0x0891, 0x00) + /* Object of any type can be used as the DDBHandle argument */ + + SRMT ("TLD0.tstg") + \DTM0.TSTG (TS) + CH03 (TS, Z174, 0x020B, 0x0897, 0x00) + /* Loading a number of different SSDTs */ + + SRMT ("TLD0.tsta") + If (Y261) + { + \DTM0.TSTA (TS, 0xF0) + } + Else + { + BLCK () + } + + CH03 (TS, Z174, 0x020C, 0x08A1, 0x00) + /* Recursive Load in module level */ + + SRMT ("TLD0.tstk") + \DTM0.TSTK (TS) + CH03 (TS, Z174, 0x020D, 0x08A7, 0x00) + } + + /* Exceptional conditions */ + + Method (TLD1, 0, Serialized) + { + Name (TS, "TLD1") + /* Exceptions when the Object argument does not refer to */ + /* an operation region field or an operation region */ + SRMT ("TLD1.tstb") + \DTM0.TSTB (TS) + /* Exceptions when the an OpRegion passed as the Object */ + /* parameter of Load is not of SystemMemory type */ + SRMT ("TLD1.tstc") + \DTM0.TSTC (TS) + /* Exceptions when the table contained in an OpRegion */ + /* (Field) is not an SSDT */ + SRMT ("TLD1.tstd") + \DTM0.TSTD (TS) + /* Exceptions when the length of the supplied SSDT is greater */ + /* than the length of the respective OpRegion or Region Field, */ + SRMT ("TLD1.tste.0") + If (Y284) + { + \DTM0.TSTE (TS, 0x00) + } + Else + { + BLCK () + } + + /* Exceptions when the length of the supplied SSDT is */ + /* less than the length of the Table Header */ + SRMT ("TLD1.tste.1") + \DTM0.TSTE (TS, 0x01) + /* Exceptions when the checksum of the supplied SSDT is invalid */ + + SRMT ("TLD1.tstf") + \DTM0.TSTF (TS) + /* AE_OWNER_ID_LIMIT exception when too many Tables loaded */ + + SRMT ("TLD1.tsth") + If (Y294) + { + \DTM0.TSTH (TS, 0x00) + } + Else + { + BLCK () + } + + /* Exception when SSDT specified as the Object parameter */ + /* of the Load operator is already loaded */ + SRMT ("TLD1.tsti") + \DTM0.TSTI (TS) + /* Exception when there already is an previously created Object */ + /* referred by the namepath of the new Object in the Table loaded */ + SRMT ("TLD1.tstj") + \DTM0.TSTJ (TS) + } - // Loading a number of different SSDTs - SRMT("TLD0.tsta") - if (y261) { - \DTM0.tsta(ts, 240) - } else { - BLCK() - } - - CH03(ts, z174, 0x20c, __LINE__, 0) - - // Recursive Load in module level - SRMT("TLD0.tstk") - \DTM0.tstk(ts) - - CH03(ts, z174, 0x20d, __LINE__, 0) -} - -// Exceptional conditions -Method(TLD1,, Serialized) -{ - Name(ts, "TLD1") - - // Exceptions when the Object argument does not refer to - // an operation region field or an operation region - SRMT("TLD1.tstb") - \DTM0.tstb(ts) - - // Exceptions when the an OpRegion passed as the Object - // parameter of Load is not of SystemMemory type - SRMT("TLD1.tstc") - \DTM0.tstc(ts) - - // Exceptions when the table contained in an OpRegion - // (Field) is not an SSDT - SRMT("TLD1.tstd") - \DTM0.tstd(ts) - - // Exceptions when the length of the supplied SSDT is greater - // than the length of the respective OpRegion or Region Field, - SRMT("TLD1.tste.0") - if (y284) { - \DTM0.tste(ts, 0) - } else { - BLCK() - } - - // Exceptions when the length of the supplied SSDT is - // less than the length of the Table Header - SRMT("TLD1.tste.1") - \DTM0.tste(ts, 1) - - // Exceptions when the checksum of the supplied SSDT is invalid - SRMT("TLD1.tstf") - \DTM0.tstf(ts) - - // AE_OWNER_ID_LIMIT exception when too many Tables loaded - SRMT("TLD1.tsth") - if (y294) { - \DTM0.tsth(ts, 0) - } else { - BLCK() - } - - // Exception when SSDT specified as the Object parameter - // of the Load operator is already loaded - SRMT("TLD1.tsti") - \DTM0.tsti(ts) - - // Exception when there already is an previously created Object - // referred by the namepath of the new Object in the Table loaded - SRMT("TLD1.tstj") - \DTM0.tstj(ts) -} diff --git a/tests/aslts/src/runtime/collections/functional/table/loadtable.asl b/tests/aslts/src/runtime/collections/functional/table/loadtable.asl index 4e623bec2..9b804cbe7 100644 --- a/tests/aslts/src/runtime/collections/functional/table/loadtable.asl +++ b/tests/aslts/src/runtime/collections/functional/table/loadtable.asl @@ -1,2326 +1,2519 @@ -/* - * Some or all of this work - Copyright (c) 2006 - 2017, 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: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. - */ - -/* - * LoadTable ASL operator functionality - */ - -/* - * This sub-test is intended to comprehensively verify - * the LoadTable ASL operator functionality. - * - * Performs a run-time load of a Definition Block from the XSDT. - * - * 17.5.68 LoadTable (Load Definition Block From XSDT) - * Syntax - * LoadTable (SignatureString, OEMIDString, OEMTableIDString, - * RootPathString, ParameterPathString, ParameterData) => DDBHandle - * - * On testing the following issues should be covered: - * - * - loading from the XSDT of a Definition Block in which the Signature - * field (should differ from "DSDT" and "SSDT") matches SignatureString, - * the OEM ID field matches OEMIDString, and the OEM Table ID matches - * OEMTableIDString, - * - * - all comparisons are case sensitive, - * - * - the result of the LoadTable operator is an Object of the DDBHandle type, - * - * - if no table matches the specified parameters, then 0 is returned, - * - * - the DDBHandle Object returned from the LoadTable operator can be used - * to unload the table, - * - * - any of the optional parameters (RootPathString, ParameterPathString, - * and ParameterData) can be omitted, - * - * - different sources of the String parameters: literals, Named Objects, - * LocalX, ArgX, elements of Packages, results of functions, any TermArg - * - * - different sources of the optional parameters: literals, Named Objects, - * LocalX, ArgX, elements of Packages, results of functions, any TermArg - * - * - implicit operand conversion of the parameters specified to be strings, - * - * - namespace location to load the Definition Block is determined by the - * RootPathString parameter, - * - * - the RootPathString is evaluated using normal scoping rules, assuming - * that the scope of the LoadTable operator is the current scope, - * - * - if RootPathString is not specified, "\" is assumed, - * - * - if ParameterPathString and ParameterData are specified, the data object - * specified by ParameterData is stored into the object specified by - * ParameterPathString after the table has been added into the namespace, - * - * - if the first character of ParameterPathString is a backslash or caret - * character, then the path of the object is ParameterPathString. Otherwise, - * it is RootPathString.ParameterPathString, - * - * - if some SSDT matching the LoadTable parameters is originally not listed - * in XSDT, LoadTable returns 0, - * - * - exceptional conditions caused by inappropriate data: - * = the SignatureString is greater than four characters, - * = the OEMIDString is greater than six characters, - * = the OEMTableID is greater than eight characters, - * = incorrect types of the parameters, - * = some DSDT or SSDT matching the LoadTable parameters is already loaded - * (actually on initial loading of tables listed in XSDT), - * = the matched table is already loaded, - * = there already is an previously loaded Object referred by the path - * in the Namespace, - * = the object specified by the ParameterPathString does not exist, - * = storing of data of the ParameterData data type is not allowed, - * = AE_OWNER_ID_LIMIT exception when too many Tables loaded. - * - * Can not be tested following issues: - * - providing of the table matched the LoadTable parameters to be "in memory - * marked by AddressRangeReserved or AddressRangeNVS", - * - overriding the supplied table with "a newer revision Definition Block - * of the same OEM Table ID" by the OS, - * - loading a Definition Block to be a synchronous operation ("the control - * methods defined in the Definition Block are not executed during load - * time"). - * - * Note: the tests is based on the current representation of the auxiliary - * OEM1 table in the artificial set of tables in the RSDT of acpiexec. - */ - -Name(z176, 176) - -Device(DTM2) { - - Device(DEVR) {Name(s000, "DEVR")} - - // Contents of the OEM1 signature table addressed by the RSDT in acpiexec - Name(OEMT, Buffer(0x30){ - 0x4F,0x45,0x4D,0x31,0x38,0x00,0x00,0x00, /* 00000000 "OEM18..." */ - 0x01,0x4B,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".KIntel." */ - 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x18,0x09,0x03,0x20,0x08,0x5F,0x58,0x54, /* 00000020 "... ._XT" */ - 0x32,0x0A,0x04,0x14,0x0C,0x5F,0x58,0x54, /* 00000028 "2...._XT" */ - 0x31,0x00,0x70,0x01,0x5F,0x58,0x54,0x32, /* 00000030 "1.p._XT2" */ - }) - - CreateField (OEMT, 0, 32, FOEM) - CreateField (OEMT, 80, 48, FOID) - CreateField (OEMT, 128, 64, FTID) - - Name(SOEM, "OEM1") - Name(SOID, "Intel") - Name(STID, "Many") - - Name(POEM, Package(3) {"OEM1", "Intel", "Many"}) - - Name(RPST, "\\DTM2") - Name(PLDT, 0) - Name(PPST, "\\DTM2.PLDT") - Name(DDBH, 0) - - // Check DataTable Region - Method(chdr, 1, Serialized) - { - DataTableRegion (DR00, "OEM1", "", "") - Field(DR00, AnyAcc, NoLock, Preserve) { - FU00, 0x1C0} - - Concatenate(arg0, "-tst0", arg0) - - if (LNotEqual(OEMT, FU00)) { - err(arg0, z176, __LINE__, 0, 0, FU00, OEMT) - return (1) - } - - return (0) - } - - // Simple Loadtable test - Method(tst0, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst0", arg0) - - if (chdr(arg0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", "\\", PPST, 1), DDBH) - - if (CH03(arg0, z176, 0x003, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDBH) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x008, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // All comparisons of Loadtable parameters are case sensitive, - // if no table matches the specified parameters, then 0 is returned - Method(tst1, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst1", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - // Successful comparison - - Store(0, \DTM2.PLDT) - - if (y281) { - Store(LoadTable("OEM1", "Intel", "Many", "\\", PPST, 1), DDBH) - } else { - Store(LoadTable("OEM1", "", "", "\\", PPST, 1), DDBH) - } - - if (CH03(arg0, z176, 0x011, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDBH) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x015, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - // Unhappy comparison due to the SignatureString - - Store(0, \DTM2.PLDT) - - Store(ObjectType(Local2), Local1) - if (LNotEqual(Local1, c008)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c008) - } - - Store(LoadTable("OeM1", "Intel", "Many", "\\", PPST, 1), Local2) - if (y281) { - // No exception - if (CH03(arg0, z176, 0x018, __LINE__, 0)) { - return (1) - } - } else { - // Exception: AE_BAD_SIGNATURE - if (CH04(arg0, 1, 37, z176, __LINE__, 0, 0)) { - return (1) - } - } - Store(ObjectType(Local2), Local1) - if (y281) { - if (LNotEqual(Local1, c009)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c009) - } - if (LNotEqual(Local2, 0)) { - err(arg0, z176, __LINE__, 0, 0, Local2, 0) - } - } else { - if (LNotEqual(Local1, c008)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c008) - } - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - // Unhappy comparison due to the OEMIDString - - Store(0, \DTM2.PLDT) - - Store(ObjectType(Local3), Local1) - if (LNotEqual(Local1, c008)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c008) - } - - Store(LoadTable("OEM1", "InteL", "Many", "\\", PPST, 1), Local3) - - if (CH03(arg0, z176, 0x020, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(Local3), Local1) - if (LNotEqual(Local1, c009)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c009) - } - - if (LNotEqual(Local3, 0)) { - err(arg0, z176, __LINE__, 0, 0, Local3, 0) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - // Unhappy comparison due to the OEMTableIDString - - Store(0, \DTM2.PLDT) - - Store(ObjectType(Local4), Local1) - if (LNotEqual(Local1, c008)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c008) - } - - Store(LoadTable("OEM1", "Intel", "many", "\\", PPST, 1), Local4) - - if (CH03(arg0, z176, 0x026, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(Local4), Local1) - if (LNotEqual(Local1, c009)) { - err(arg0, z176, __LINE__, 0, 0, Local1, c009) - } - - if (LNotEqual(Local4, 0)) { - err(arg0, z176, __LINE__, 0, 0, Local4, 0) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // Any of the RootPathString, ParameterPathString, and ParameterData - // parameters in LoadTable expression can be omitted - Method(tst2, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - Name(DDB2, 0) - Name(DDB3, 0) + /* + * Some or all of this work - Copyright (c) 2006 - 2017, 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: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + /* + * LoadTable ASL operator functionality + */ + /* + * This sub-test is intended to comprehensively verify + * the LoadTable ASL operator functionality. + * + * Performs a run-time load of a Definition Block from the XSDT. + * + * 17.5.68 LoadTable (Load Definition Block From XSDT) + * Syntax + * LoadTable (SignatureString, OEMIDString, OEMTableIDString, + * RootPathString, ParameterPathString, ParameterData) => DDBHandle + * + * On testing the following issues should be covered: + * + * - loading from the XSDT of a Definition Block in which the Signature + * field (should differ from "DSDT" and "SSDT") matches SignatureString, + * the OEM ID field matches OEMIDString, and the OEM Table ID matches + * OEMTableIDString, + * + * - all comparisons are case sensitive, + * + * - the result of the LoadTable operator is an Object of the DDBHandle type, + * + * - if no table matches the specified parameters, then 0 is returned, + * + * - the DDBHandle Object returned from the LoadTable operator can be used + * to unload the table, + * + * - any of the optional parameters (RootPathString, ParameterPathString, + * and ParameterData) can be omitted, + * + * - different sources of the String parameters: literals, Named Objects, + * LocalX, ArgX, elements of Packages, results of functions, any TermArg + * + * - different sources of the optional parameters: literals, Named Objects, + * LocalX, ArgX, elements of Packages, results of functions, any TermArg + * + * - implicit operand conversion of the parameters specified to be strings, + * + * - namespace location to load the Definition Block is determined by the + * RootPathString parameter, + * + * - the RootPathString is evaluated using normal scoping rules, assuming + * that the scope of the LoadTable operator is the current scope, + * + * - if RootPathString is not specified, "\" is assumed, + * + * - if ParameterPathString and ParameterData are specified, the data object + * specified by ParameterData is stored into the object specified by + * ParameterPathString after the table has been added into the namespace, + * + * - if the first character of ParameterPathString is a backslash or caret + * character, then the path of the object is ParameterPathString. Otherwise, + * it is RootPathString.ParameterPathString, + * + * - if some SSDT matching the LoadTable parameters is originally not listed + * in XSDT, LoadTable returns 0, + * + * - exceptional conditions caused by inappropriate data: + * = the SignatureString is greater than four characters, + * = the OEMIDString is greater than six characters, + * = the OEMTableID is greater than eight characters, + * = incorrect types of the parameters, + * = some DSDT or SSDT matching the LoadTable parameters is already loaded + * (actually on initial loading of tables listed in XSDT), + * = the matched table is already loaded, + * = there already is an previously loaded Object referred by the path + * in the Namespace, + * = the object specified by the ParameterPathString does not exist, + * = storing of data of the ParameterData data type is not allowed, + * = AE_OWNER_ID_LIMIT exception when too many Tables loaded. + * + * Can not be tested following issues: + * - providing of the table matched the LoadTable parameters to be "in memory + * marked by AddressRangeReserved or AddressRangeNVS", + * - overriding the supplied table with "a newer revision Definition Block + * of the same OEM Table ID" by the OS, + * - loading a Definition Block to be a synchronous operation ("the control + * methods defined in the Definition Block are not executed during load + * time"). + * + * Note: the tests is based on the current representation of the auxiliary + * OEM1 table in the artificial set of tables in the RSDT of acpiexec. + */ + Name (Z176, 0xB0) + Device (DTM2) + { + Device (DEVR) + { + Name (S000, "DEVR") + } + + /* Contents of the OEM1 signature table addressed by the RSDT in acpiexec */ + + Name (OEMT, Buffer (0x38) + { + /* 0000 */ 0x4F, 0x45, 0x4D, 0x31, 0x38, 0x00, 0x00, 0x00, // OEM18... + /* 0008 */ 0x01, 0x4B, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .KIntel. + /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x18, 0x09, 0x03, 0x20, 0x08, 0x5F, 0x58, 0x54, // ... ._XT + /* 0028 */ 0x32, 0x0A, 0x04, 0x14, 0x0C, 0x5F, 0x58, 0x54, // 2...._XT + /* 0030 */ 0x31, 0x00, 0x70, 0x01, 0x5F, 0x58, 0x54, 0x32 // 1.p._XT2 + }) + CreateField (OEMT, 0x00, 0x20, FOEM) + CreateField (OEMT, 0x50, 0x30, FOID) + CreateField (OEMT, 0x80, 0x40, FTID) + Name (SOEM, "OEM1") + Name (SOID, "Intel") + Name (STID, "Many") + Name (POEM, Package (0x03) + { + "OEM1", + "Intel", + "Many" + }) + Name (RPST, "\\DTM2") + Name (PLDT, 0x00) + Name (PPST, "\\DTM2.PLDT") + Name (DDBH, 0x00) + /* Check DataTable Region */ + + Method (CHDR, 1, Serialized) + { + DataTableRegion (DR00, "OEM1", "", "") + Field (DR00, AnyAcc, NoLock, Preserve) + { + FU00, 448 + } + + Concatenate (Arg0, "-tst0", Arg0) + If ((OEMT != FU00)) + { + ERR (Arg0, Z176, 0x9F, 0x00, 0x00, FU00, OEMT) + Return (0x01) + } + + Return (0x00) + } + + /* Simple Loadtable test */ + + Method (TST0, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst0", Arg0) + If (CHDR (Arg0)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0xB2, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + \DTM2.PLDT = 0x00 + DDBH = LoadTable ("OEM1", "", "", "\\", PPST, 0x01) + If (CH03 (Arg0, Z176, 0x03, 0xBA, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0xC0, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0xC5, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0xCA, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDBH) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x08, 0xD0, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0xD5, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* All comparisons of Loadtable parameters are case sensitive, */ + /* if no table matches the specified parameters, then 0 is returned */ + Method (TST1, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst1", Arg0) + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0xE4, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + /* Successful comparison */ + + \DTM2.PLDT = 0x00 + If (Y281) + { + DDBH = LoadTable ("OEM1", "Intel", "Many", "\\", PPST, 0x01) + } + Else + { + DDBH = LoadTable ("OEM1", "", "", "\\", PPST, 0x01) + } + + If (CH03 (Arg0, Z176, 0x11, 0xF2, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0xF8, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0xFD, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x0102, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDBH) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x15, 0x0108, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x010D, 0x00, 0x00, "\\_XT2", 0x01) + } + + /* Unhappy comparison due to the SignatureString */ + + \DTM2.PLDT = 0x00 + Local1 = ObjectType (Local2) + If ((Local1 != C008)) + { + ERR (Arg0, Z176, 0x0116, 0x00, 0x00, Local1, C008) + } + + Local2 = LoadTable ("OeM1", "Intel", "Many", "\\", PPST, 0x01) + If (Y281) + { + /* No exception */ + + If (CH03 (Arg0, Z176, 0x18, 0x011C, 0x00)) + { + Return (0x01) + } + } + ElseIf /* Exception: AE_BAD_SIGNATURE */ + + (CH04 (Arg0, 0x01, 0x25, Z176, 0x0121, 0x00, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (Local2) + If (Y281) + { + If ((Local1 != C009)) + { + ERR (Arg0, Z176, 0x0128, 0x00, 0x00, Local1, C009) + } + + If ((Local2 != 0x00)) + { + ERR (Arg0, Z176, 0x012B, 0x00, 0x00, Local2, 0x00) + } + } + ElseIf ((Local1 != C008)) + { + ERR (Arg0, Z176, 0x012F, 0x00, 0x00, Local1, C008) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0134, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0138, 0x00, 0x00, "\\_XT2", 0x01) + } + + /* Unhappy comparison due to the OEMIDString */ + + \DTM2.PLDT = 0x00 + Local1 = ObjectType (Local3) + If ((Local1 != C008)) + { + ERR (Arg0, Z176, 0x0141, 0x00, 0x00, Local1, C008) + } + + Local3 = LoadTable ("OEM1", "InteL", "Many", "\\", PPST, 0x01) + If (CH03 (Arg0, Z176, 0x20, 0x0146, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (Local3) + If ((Local1 != C009)) + { + ERR (Arg0, Z176, 0x014C, 0x00, 0x00, Local1, C009) + } + + If ((Local3 != 0x00)) + { + ERR (Arg0, Z176, 0x0150, 0x00, 0x00, Local3, 0x00) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0154, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0158, 0x00, 0x00, "\\_XT2", 0x01) + } + + /* Unhappy comparison due to the OEMTableIDString */ + + \DTM2.PLDT = 0x00 + Local1 = ObjectType (Local4) + If ((Local1 != C008)) + { + ERR (Arg0, Z176, 0x0161, 0x00, 0x00, Local1, C008) + } + + Local4 = LoadTable ("OEM1", "Intel", "many", "\\", PPST, 0x01) + If (CH03 (Arg0, Z176, 0x26, 0x0166, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (Local4) + If ((Local1 != C009)) + { + ERR (Arg0, Z176, 0x016C, 0x00, 0x00, Local1, C009) + } + + If ((Local4 != 0x00)) + { + ERR (Arg0, Z176, 0x0170, 0x00, 0x00, Local4, 0x00) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0174, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0178, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* Any of the RootPathString, ParameterPathString, and ParameterData */ + /* parameters in LoadTable expression can be omitted */ + Method (TST2, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Name (DDB2, 0x00) + Name (DDB3, 0x00) + Concatenate (Arg0, "-tst2", Arg0) + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x018A, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + /* Check when RootPathString omitted */ + + \DTM2.PLDT = 0x00 + DDB0 = LoadTable ("OEM1", "", "", "", PPST, 0x01) + If (CH03 (Arg0, Z176, 0x31, 0x0194, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDB0) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x019A, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x019F, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x01A4, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDB0) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x35, 0x01AA, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x01AF, 0x00, 0x00, "\\_XT2", 0x01) + } + + /* Check when ParameterPathString omitted */ + + \DTM2.PLDT = 0x00 + DDB1 = LoadTable ("OEM1", "", "", "\\", "", 0x01) + If (CH03 (Arg0, Z176, 0x37, 0x01B8, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDB1) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x01BE, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x01C3, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x01C8, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDB1) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x3B, 0x01CE, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x01D3, 0x00, 0x00, "\\_XT2", 0x01) + } + + /* Check when ParameterData omitted */ + + \DTM2.PLDT = 0x00 + DDB2 = LoadTable ("OEM1", "", "", "\\", PPST, Zero) + If (CH03 (Arg0, Z176, 0x3D, 0x01DC, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDB2) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x01E2, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x01E7, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x01EC, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDB2) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x41, 0x01F2, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x01F7, 0x00, 0x00, "\\_XT2", 0x01) + } + + /* Check when all optional parameters omitted */ + + \DTM2.PLDT = 0x00 + DDB3 = LoadTable ("OEM1", "", "", "", "", Zero) + If (CH03 (Arg0, Z176, 0x43, 0x0200, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDB3) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x0206, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x020B, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x0210, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDB3) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x47, 0x0216, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x021B, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* Different sources of the String parameters: Named Objects, LocalX, */ + /* ArgX, elements of Packages, results of functions, any TermArg */ + Method (TST3, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Name (DDB2, 0x00) + Name (DDB3, 0x00) + Name (DDB4, 0x00) + Name (DDB5, 0x00) + Name (DDB6, 0x00) + Name (SOID, "") + Name (STID, "") + Name (POEM, Package (0x03) + { + "OEM1", + "", + "" + }) + Method (M000, 1, NotSerialized) + { + Return (Arg0) + } + + Method (M001, 3, NotSerialized) + { + Concatenate (Arg0, Arg2, Arg0) + If (CH03 (Arg0, Z176, 0x51, 0x0238, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (Arg1) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x023E, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0243, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x0248, 0x00, 0x00, "\\DTM2._XT2", 0x00) + } + + Unload (Arg1) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x55, 0x024E, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0253, 0x00, 0x00, "\\DTM2._XT2", 0x01) + Return (0x01) + } + + Return (0x00) + } + + Method (M002, 3, NotSerialized) + { + Return (LoadTable (Arg0, DerefOf (Arg1), DerefOf (Arg2), "", "", Zero)) + } + + Method (M003, 3, NotSerialized) + { + Return (LoadTable (DerefOf (Arg0), Arg1, DerefOf (Arg2), "", "", Zero)) + } + + Method (M004, 3, NotSerialized) + { + Return (LoadTable (DerefOf (Arg0), DerefOf (Arg1), Arg2, "", "", Zero)) + } + + Concatenate (Arg0, "-tst3", Arg0) + If (Y281) + { + SOID = ^SOID /* \DTM2.SOID */ + STID = ^STID /* \DTM2.STID */ + POEM = ^POEM /* \DTM2.POEM */ + } + + If (CondRefOf (\DTM2._XT2, Local0)) + { + ERR (Arg0, Z176, 0x0272, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + /* Check LoadTable(Named, LocalX, Method(), , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = SOID /* \DTM2.TST3.SOID */ + DDB0 = LoadTable (SOEM, Local2, M000 (STID), "", "", Zero) + If (M001 (Arg0, DDB0, ".NLM")) + { + Return (0x01) + } + + /* Check LoadTable(Method(), Named, LocalX, , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = STID /* \DTM2.TST3.STID */ + DDB1 = LoadTable (M000 (SOEM), SOID, Local2, "", "", Zero) + If (M001 (Arg0, DDB1, ".MNL")) + { + Return (0x01) + } + + /* Check LoadTable(LocalX, Method(), Named, , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = SOEM /* \DTM2.SOEM */ + DDB2 = LoadTable (Local2, M000 (SOID), STID, "", "", Zero) + If (M001 (Arg0, DDB2, ".LMN")) + { + Return (0x01) + } + + /* Check LoadTable(ArgX, Derefof(Refof), Derefof(Index), , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = RefOf (SOID) + Store (POEM [0x02], Local3) + DDB3 = M002 (SOEM, Local2, Local3) + If (M001 (Arg0, DDB3, ".ARI")) + { + Return (0x01) + } + + /* Check LoadTable(Derefof(Index), ArgX, Derefof(Refof), , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = RefOf (STID) + Store (POEM [0x00], Local3) + DDB4 = M003 (Local3, SOID, Local2) + If (M001 (Arg0, DDB4, ".IAR")) + { + Return (0x01) + } + + /* Check LoadTable(Derefof(Refof), Derefof(Index), ArgX, , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = RefOf (SOEM) + Store (POEM [0x01], Local3) + DDB5 = M004 (Local2, Local3, STID) + If (M001 (Arg0, DDB5, ".RIA")) + { + Return (0x01) + } + + /* Check LoadTable(TermArg, TermArg, TermArg, , , ) */ + + \DTM2.PLDT = 0x00 + Local2 = Concatenate ("term", SOEM) + Local2 = ToBuffer (Local2) + Local3 = ToBuffer (SOID) + Local4 = "" + DDB6 = LoadTable (Mid (ToString (Local2, Ones), 0x04, 0x04), ToString ( + M000 (Local3), Ones), Concatenate (M000 (STID), Local4), "", "", Zero) + If (M001 (Arg0, DDB6, ".TTT")) + { + Return (0x01) + } + + Return (0x00) + } + + /* Different sources of the optional parameters (RootPathString, */ + /* ParameterPathString, and ParameterData): Named Objects, LocalX, */ + /* ArgX, elements of Packages, results of functions, any TermArg */ + Method (TST4, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Name (DDB2, 0x00) + Name (DDB3, 0x00) + Name (DDB4, 0x00) + Name (DDB5, 0x00) + Name (DDB6, 0x00) + Name (RPST, "\\DTM2") + Name (PPST, "\\DTM2.PLDT") + Name (NVAL, 0x01) + Name (POPT, Package (0x03) + { + "\\DTM2", + "\\DTM2.PLDT", + 0x01 + }) + Method (M000, 1, NotSerialized) + { + Return (Arg0) + } + + Method (M001, 3, NotSerialized) + { + Concatenate (Arg0, Arg2, Arg0) + If (CH03 (Arg0, Z176, 0x61, 0x02F1, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (Arg1) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x02F7, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x02FC, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\DTM2._XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x0301, 0x00, 0x00, "\\DTM2._XT2", 0x00) + } + + Unload (Arg1) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x65, 0x0307, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\DTM2._XT2, Local0)) + { + ERR (Arg0, Z176, 0x030C, 0x00, 0x00, "\\DTM2._XT2", 0x01) + Return (0x01) + } + + Return (0x00) + } + + Method (M002, 3, NotSerialized) + { + /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* return (LoadTable("OEM1", "", "", Arg0, Derefof(Arg1), Derefof(Arg2))) */ + /* parse error, expecting `')'' ^ */ + Return (LoadTable ("OEM1", "", "", Arg0, DerefOf (Arg1), 0x01)) + } + + Method (M003, 3, NotSerialized) + { + /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* return (LoadTable("OEM1", "", "", Derefof(Arg0), Arg1, Derefof(Arg2))) */ + /* parse error, expecting `')'' ^ */ + Return (LoadTable ("OEM1", "", "", DerefOf (Arg0), Arg1, 0x01)) + } + + Method (M004, 3, NotSerialized) + { + /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* return (LoadTable("OEM1", "", "", Derefof(Arg0), Derefof(Arg1), Arg2)) */ + /* parse error, expecting `')'' ^ */ + Return (LoadTable ("OEM1", "", "", DerefOf (Arg0), DerefOf (Arg1), 0x01)) + } + + Concatenate (Arg0, "-tst4", Arg0) + If (CondRefOf (\DTM2._XT2, Local0)) + { + ERR (Arg0, Z176, 0x032E, 0x00, 0x00, "\\DTM2._XT2", 0x01) + Return (0x01) + } + + /* Check LoadTable(..., Named, LocalX, Method()) */ + + \DTM2.PLDT = 0x00 + Local2 = PPST /* \DTM2.TST4.PPST */ + /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* Store(LoadTable("OEM1", "", "", RPST, Local2, m000(1)), DDB0) */ + /* parse error, expecting `')'' ^ */ + DDB0 = LoadTable ("OEM1", "", "", RPST, Local2, 0x01) + If (M001 (Arg0, DDB0, ".NLM")) + { + Return (0x01) + } + + /* Check LoadTable(..., Method(), Named, LocalX) */ + + \DTM2.PLDT = 0x00 + Local2 = 0x01 + /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* Store(LoadTable("OEM1", "", "", m000(RPST), PPST, Local2), DDB1) */ + /* parse error, expecting `')'' ^ */ + DDB1 = LoadTable ("OEM1", "", "", M000 (RPST), PPST, 0x01) + If (M001 (Arg0, DDB1, ".MNL")) + { + Return (0x01) + } + + /* Check LoadTable(..., LocalX, Method(), Named) */ + + \DTM2.PLDT = 0x00 + Local2 = RPST /* \DTM2.TST4.RPST */ + DDB2 = LoadTable ("OEM1", "", "", Local2, M000 (PPST), NVAL) + If (M001 (Arg0, DDB2, ".LMN")) + { + Return (0x01) + } + + /* Check LoadTable(..., ArgX, Derefof(Refof), Derefof(Index)) */ + + \DTM2.PLDT = 0x00 + Local2 = RefOf (PPST) + Store (POPT [0x02], Local3) + DDB3 = M002 (RPST, Local2, Local3) + If (M001 (Arg0, DDB3, ".ARI")) + { + Return (0x01) + } + + /* Check LoadTable(..., Derefof(Index), ArgX, Derefof(Refof)) */ + + \DTM2.PLDT = 0x00 + Local2 = RefOf (NVAL) + Store (POPT [0x00], Local3) + DDB4 = M003 (Local3, PPST, Local2) + If (M001 (Arg0, DDB4, ".ARI")) + { + Return (0x01) + } + + /* Check LoadTable(..., Derefof(Refof), Derefof(Index), ArgX) */ + + \DTM2.PLDT = 0x00 + Local2 = RefOf (RPST) + Store (POPT [0x01], Local3) + DDB5 = M004 (Local2, Local3, NVAL) + If (M001 (Arg0, DDB5, ".ARI")) + { + Return (0x01) + } + + /* Check LoadTable(..., TermArg, TermArg, TermArg) */ + + \DTM2.PLDT = 0x00 + Local2 = Concatenate ("term", RPST) + Local2 = ToBuffer (Local2) + Local3 = ToBuffer (PPST) + Local4 = 0x03 + DDB6 = LoadTable ("OEM1", "", "", Mid (ToString (Local2, Ones), 0x04, + 0x05), ToString (M000 (Local3), Ones), /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* Subtract(m000(Local4), 2)), */ +(0x03 - 0x02)) + If (M001 (Arg0, DDB6, ".TTT")) + { + Return (0x01) + } + + Return (0x00) + } + + /* Namespace location to load the Definition Block is determined */ + /* by the RootPathString parameter of Loadtable */ + /* Arg1: RootPathString */ + Method (TST5, 2, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst5", Arg0) + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x03A7, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + If (CondRefOf (\DTM2.DEVR._XT2, Local0)) + { + ERR (Arg0, Z176, 0x03AC, 0x00, 0x00, "\\DTM2.DEVR._XT2", 0x01) + Return (0x01) + } + + \DTM2.PLDT = 0x00 + DDBH = LoadTable ("OEM1", "", "", Arg1, PPST, 0x01) + If (CH03 (Arg0, Z176, 0x72, 0x03B4, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x03BA, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x03BF, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x03C3, 0x00, 0x00, "\\_XT2", 0x01) + } + + If (CondRefOf (\DTM2.DEVR._XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x03C8, 0x00, 0x00, "\\DTM2.DEVR._XT2", 0x00) + } + + Unload (DDBH) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x77, 0x03CE, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x03D3, 0x00, 0x00, "\\_XT2", 0x01) + } + + If (CondRefOf (\DTM2.DEVR._XT2, Local0)) + { + ERR (Arg0, Z176, 0x03D7, 0x00, 0x00, "\\DTM2.DEVR._XT2", 0x01) + } + + Return (0x00) + } + + /* "\" is assumed to be Namespace location to load the Definition */ + /* Block if RootPathString parameter is not specified */ + Method (TST6, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst6", Arg0) + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x03E6, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + \DTM2.PLDT = 0x00 + DDBH = LoadTable ("OEM1", "", "", "", PPST, 0x01) + If (CH03 (Arg0, Z176, 0x81, 0x03EE, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x03F4, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x03F9, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x03FE, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDBH) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0x85, 0x0404, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0409, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* If the first character of ParameterPathString is a backslash */ + /* or caret character, then the path of the object set up on success */ + /* is ParameterPathString. It is RootPathString.ParameterPathString */ + /* in any case. */ + Method (TST7, 1, Serialized) + { + Name (DDBH, 0x00) + Name (PLDT, 0x00) + Concatenate (Arg0, "-tst7", Arg0) + DDBH = LoadTable ("OEM1", "", "", RPST, "^TST7.PLDT", 0x01) + If (CH03 (Arg0, Z176, 0x91, 0x041C, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x0422, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != PLDT)) + { + ERR (Arg0, Z176, 0x0427, 0x00, 0x00, PLDT, 0x01) + } + + Unload (DDBH) + If (CH03 (Arg0, Z176, 0x94, 0x042C, 0x00)) + { + Return (0x01) + } + + PLDT = 0x00 + \DTM2.PLDT = 0x00 + DDBH = LoadTable ("OEM1", "", "", RPST, "PLDT", 0x01) + If (CH03 (Arg0, Z176, 0x95, 0x0435, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x043B, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x00 != PLDT)) + { + ERR (Arg0, Z176, 0x0440, 0x00, 0x00, PLDT, 0x00) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0444, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + Unload (DDBH) + If (CH03 (Arg0, Z176, 0x99, 0x0449, 0x00)) + { + Return (0x01) + } + + Return (0x00) + } + + /* Exceptions when the SignatureString is greater than four characters, */ + /* the OEMIDString is greater than six characters, or the OEMTableID is */ + /* greater than eight characters */ + Method (TST8, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tst8", Arg0) + \DTM2.PLDT = 0x00 + /* SignatureString is greater than four characters */ + + If (Y287) + { + DDBH = LoadTable ("OEM1X", "", "", RPST, PPST, 0x01) + } + Else + { + LoadTable ("OEM1X", "", "", RPST, PPST, 0x01) + } + + CH04 (Arg0, 0x00, 0x3D, Z176, 0x0462, 0x00, 0x00) /* AE_AML_STRING_LIMIT */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0465, 0x00, 0x00, \DTM2.PLDT, 0x01) + If (Y287) + { + Return (0x01) + } + Else + { + /* Cleanup */ + + Unload (DDBH) + \DTM2.PLDT = 0x00 + } + } + + /* OEMIDString is greater than six characters */ + + LoadTable ("OEM1", "IntelXX", "", RPST, PPST, 0x01) + CH04 (Arg0, 0x00, 0x3D, Z176, 0x0473, 0x00, 0x00) /* AE_AML_STRING_LIMIT */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0476, 0x00, 0x00, \DTM2.PLDT, 0x01) + Return (0x01) + } + + /* OEMTableID is greater than eight characters */ + + LoadTable ("OEM1", "", "ManyXXXXX", RPST, PPST, 0x01) + CH04 (Arg0, 0x00, 0x3D, Z176, 0x047D, 0x00, 0x00) /* AE_AML_STRING_LIMIT */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0480, 0x00, 0x00, \DTM2.PLDT, 0x01) + Return (0x01) + } + + Return (0x00) + } + + /* Exceptions when some DSDT or SSDT matching the LoadTable parameters */ + /* is already loaded (actually on initial loading of tables listed in XSDT) */ + Method (TST9, 1, NotSerialized) + { + Concatenate (Arg0, "-tst9", Arg0) + \DTM2.PLDT = 0x00 + /* SignatureString is "DSDT" */ + + LoadTable ("DSDT", "", "", RPST, PPST, 0x01) + CH04 (Arg0, 0x00, 0x07, Z176, 0x0492, 0x00, 0x00) /* AE_ALREADY_EXISTS */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0495, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + /* SignatureString is "SSDT" */ + + LoadTable ("SSDT", "", "", RPST, PPST, 0x01) + CH04 (Arg0, 0x00, 0x07, Z176, 0x049B, 0x00, 0x00) /* AE_ALREADY_EXISTS */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x049E, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + Return (0x00) + } + + /* Exceptions when the matched table is already loaded */ + + Method (TSTA, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tsta", Arg0) + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x04AC, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + \DTM2.PLDT = 0x00 + DDBH = LoadTable ("OEM1", "", "", "\\", PPST, 0x01) + If (CH03 (Arg0, Z176, 0xB1, 0x04B4, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x04BA, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x04BF, 0x00, 0x00, \DTM2.PLDT, 0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x04C4, 0x00, 0x00, "\\_XT2", 0x00) + } + + \DTM2.PLDT = 0x00 + LoadTable ("OEM1", "", "", "\\DTM2", PPST, 0x01) + CH04 (Arg0, 0x00, 0x07, Z176, 0x04CB, 0x00, 0x00) /* AE_ALREADY_EXISTS */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x04CE, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\DTM2._XT2, Local0)) + { + ERR (Arg0, Z176, 0x04D2, 0x00, 0x00, "\\DTM2._XT2", 0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x04D7, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDBH) + Debug = "OEM1 unloaded" + If (CH03 (Arg0, Z176, 0xB9, 0x04DD, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x04E2, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* Originated from ssdt4.asl: iasl -tc ssdt4.asl */ + + Name (BUF4, Buffer (0x44) + { + /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x44, 0x00, 0x00, 0x00, // SSDTD... + /* 0008 */ 0x02, 0x08, 0x69, 0x41, 0x53, 0x4C, 0x54, 0x53, // ..iASLTS + /* 0010 */ 0x4C, 0x54, 0x42, 0x4C, 0x30, 0x30, 0x30, 0x31, // LTBL0001 + /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL + /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x10, 0x1F, 0x5C, 0x00, // ... ..\. + /* 0028 */ 0x08, 0x5F, 0x58, 0x54, 0x32, 0x0D, 0x61, 0x62, // ._XT2.ab + /* 0030 */ 0x73, 0x6F, 0x6C, 0x75, 0x74, 0x65, 0x20, 0x6C, // solute l + /* 0038 */ 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, // ocation + /* 0040 */ 0x6F, 0x62, 0x6A, 0x00 // obj. + }) + OperationRegion (IST4, SystemMemory, 0x0600, 0x44) + Field (IST4, ByteAcc, NoLock, Preserve) + { + RFU4, 544 + } + + /* Exceptions when there already is an previously loaded Object */ + /* referred by the path in the Namespace */ + Method (TSTB, 1, Serialized) + { + Name (DDBH, 0x00) + Concatenate (Arg0, "-tstb", Arg0) + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0504, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + RFU4 = BUF4 /* \DTM2.BUF4 */ + Load (RFU4, DDBH) /* \DTM2.TSTB.DDBH */ + If (CH03 (Arg0, Z176, 0xC1, 0x050B, 0x00)) + { + Return (0x01) + } + + Local1 = ObjectType (DDBH) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z176, 0x0511, 0x00, 0x00, Local1, C017) + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x0517, 0x00, 0x00, "\\_XT2", 0x00) + } + + \DTM2.PLDT = 0x00 + LoadTable ("OEM1", "", "", "\\", PPST, 0x01) + CH04 (Arg0, 0x00, 0x07, Z176, 0x051E, 0x00, 0x00) /* AE_ALREADY_EXISTS */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0521, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x0526, 0x00, 0x00, "\\_XT2", 0x00) + } + + Unload (DDBH) + Debug = "SSDT unloaded" + If (CH03 (Arg0, Z176, 0xC7, 0x052C, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0531, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* Exceptions when the object specified by the ParameterPathString */ + /* does not exist */ + Method (TSTC, 1, NotSerialized) + { + Concatenate (Arg0, "-tstc", Arg0) + LoadTable ("DSDT", "", "", RPST, "\\DTM2.NULL", 0x01) + CH04 (Arg0, 0x00, 0x05, Z176, 0x053F, 0x00, 0x00) /* AE_NOT_FOUND */ + Return (0x00) + } + + /* Exceptions when storing of data of the ParameterData data type */ + /* to the specified object is not allowed. */ + Method (TSTD, 1, NotSerialized) + { + Concatenate (Arg0, "-tstd", Arg0) + \DTM2.PLDT = 0x00 + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \DTM2.DEVR) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x054E, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0551, 0x00, 0x00, \DTM2.PLDT, 0x00) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0555, 0x00, 0x00, "\\_XT2", 0x01) + } + + Return (0x00) + } + + /* Implicit operand conversion of the parameters specified to be strings */ + + Method (TSTE, 1, Serialized) + { + Name (DDBH, 0x02) + Name (SOID, "") + Name (STID, "") + Name (RPST, "\\") + Name (PPST, "DTM2.PLDT") + Name (DSTR, "01234") + Method (M000, 3, Serialized) + { + Name (DDBH, 0x02) + \DTM2.PLDT = 0x00 + Concatenate (Arg0, "-m000.", Arg0) + Concatenate (Arg0, Mid (DSTR, Arg2, 0x01), Arg0) + Switch (ToInteger (Arg2)) + { + Case (0x00) + { + LoadTable (Arg1, SOID, STID, RPST, PPST, 0x01) + Return (CH04 (Arg0, 0x00, 0x25, Z176, 0x0571, 0x00, 0x00))/* AE_BAD_SIGNATURE */ + } + Case (0x01) + { + DDBH = LoadTable (SOEM, Arg1, STID, RPST, PPST, 0x01) + } + Case (0x02) + { + DDBH = LoadTable (SOEM, SOID, Arg1, RPST, PPST, 0x01) + } + Case (0x03) + { + LoadTable (SOEM, SOID, STID, Arg1, PPST, 0x01) + Return (CH04 (Arg0, 0x00, 0x1E, Z176, 0x057B, 0x00, 0x00)) /* AE_BAD_PATHNAME */ + } + Case (0x04) + { + LoadTable (SOEM, SOID, STID, RPST, Arg1, 0x01) + Return (CH04 (Arg0, 0x00, 0x1E, Z176, 0x057F, 0x00, 0x00)) /* AE_BAD_PATHNAME */ + } + + } + + If (CH03 (Arg0, Z176, 0xD3, 0x0583, 0x00)) + { + Return (0x01) + } + + If ((0x00 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x0588, 0x00, 0x00, \DTM2.PLDT, 0x00) + Return (0x01) + } + + Local5 = ObjectType (DDBH) + If (CH03 (Arg0, Z176, 0xD5, 0x058E, 0x00)) + { + Return (0x01) + } + + If ((Local5 != C009)) + { + /* Integer */ + + ERR (Arg0, Z176, 0x0593, 0x00, 0x00, Local5, C009) + Return (0x01) + } + + If ((0x00 != DDBH)) + { + ERR (Arg0, Z176, 0x0598, 0x00, 0x00, DDBH, 0x00) + Return (0x01) + } + + Return (0x00) + } + + Concatenate (Arg0, "-tste", Arg0) + If (Y281) + { + SOID = ^SOID /* \DTM2.SOID */ + STID = ^STID /* \DTM2.STID */ + } + + /* Buffer to String implicit conversion, only check that then */ + /* no exception occurs. Actually due to the conversion rule */ + /* resulting strings will not match the table fields */ + ToBuffer (SOEM, Local0) + ToBuffer (SOID, Local1) + ToBuffer (STID, Local2) + ToBuffer (RPST, Local3) + ToBuffer (PPST, Local4) + If (M000 (Arg0, Local0, 0x00)) + { + Return (0x01) + } + + If (M000 (Arg0, Local1, 0x01)) + { + Return (0x01) + } + + If (M000 (Arg0, Local2, 0x02)) + { + Return (0x01) + } + + If (M000 (Arg0, Local3, 0x03)) + { + Return (0x01) + } + + If (M000 (Arg0, Local4, 0x04)) + { + Return (0x01) + } + + /* Check consistency of the parameters */ + + If ((ToBuffer (SOEM) != Local0)) + { + ERR (Arg0, Z176, 0x05B9, 0x00, 0x00, Local0, ToBuffer (SOEM)) + Return (0x01) + } + + If ((ToBuffer (SOID) != Local1)) + { + ERR (Arg0, Z176, 0x05BE, 0x00, 0x00, Local1, ToBuffer (SOID)) + Return (0x01) + } + + If ((ToBuffer (STID) != Local2)) + { + ERR (Arg0, Z176, 0x05C3, 0x00, 0x00, Local2, ToBuffer (STID)) + Return (0x01) + } + + If ((ToBuffer (RPST) != Local3)) + { + ERR (Arg0, Z176, 0x05C8, 0x00, 0x00, Local3, ToBuffer (RPST)) + Return (0x01) + } + + If ((ToBuffer (PPST) != Local4)) + { + ERR (Arg0, Z176, 0x05CD, 0x00, 0x00, Local4, ToBuffer (PPST)) + Return (0x01) + } + + /* Integer to String implicit conversion */ + + ToInteger (Local0, Local0) + ToInteger (Local1, Local1) + ToInteger (Local2, Local2) + ToInteger (Local3, Local3) + ToInteger (Local4, Local4) + /*if (m000(arg0, Local0, 0)) {return (1)} */ + /*if (m000(arg0, Local1, 1)) {return (1)} */ + /*if (m000(arg0, Local2, 2)) {return (1)} */ + If (M000 (Arg0, Local3, 0x03)) + { + Return (0x01) + } + + If (M000 (Arg0, Local4, 0x04)) + { + Return (0x01) + } + + /* Actual trivial Buffer to String implicit conversion */ + + If (Y293) + { + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x05E3, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + Local0 = 0x00 + Local1 = Buffer (Local0){} + \DTM2.PLDT = 0x00 + DDBH = LoadTable (SOEM, Local1, Local1, RPST, PPST, 0x01) + If (CH03 (Arg0, Z176, 0xE1, 0x05EE, 0x00)) + { + Return (0x01) + } + + If ((0x01 != \DTM2.PLDT)) + { + ERR (Arg0, Z176, 0x05F3, 0x00, 0x00, \DTM2.PLDT, 0x01) + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)){} + Else + { + ERR (Arg0, Z176, 0x05F9, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + + Unload (DDBH) + If (CH03 (Arg0, Z176, 0xE4, 0x05FF, 0x00)) + { + Return (0x01) + } + + If (CondRefOf (\_XT2, Local0)) + { + ERR (Arg0, Z176, 0x0604, 0x00, 0x00, "\\_XT2", 0x01) + Return (0x01) + } + } + + Return (0x00) + } + + /* LoadTable returns 0 if some SSDT matching the LoadTable */ + /* parameters is originally not listed in XSDT */ + /* + * This test should never happen in real ASL code. So it is removed. + * + * The Load operation will add a table to global table list, which is + * the master list that can be find in XSDT. + * + * The Unload operation will just delete the namespace owned by the table, + * release OwnerId and reset the table flag, but the table remains in + * global table list. + * + * So, LoadTable after Load and UnLoad operation will cause exception. + * + * Nothing like this should happen in real ASL code. The BIOS writer + * knows whether the table is in the XSDT or not. + */ + /* + Method(tstf, 1) + { + Name(DDBH, 0) + Concatenate(arg0, "-tstf", arg0) + if (CondRefof(\_XT2, Local0)) { + err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) + return (1) + } + Store(BUF4, RFU4) + Load(RFU4, DDBH) + if (CH03(arg0, z176, 0x0f2, __LINE__, 0)) { + return (1) + } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, __LINE__, 0, 0, Local1, c017) + return (1) + } + if (CondRefof(\_XT2, Local0)) { + } else { + err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) + } + UnLoad(DDBH) + Store("SSDT unloaded", Debug) + if (CH03(arg0, z176, 0x0f5, __LINE__, 0)) { + return (1) + } + if (CondRefof(\_XT2, Local0)) { + err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) + return (1) + } + Store(0, \DTM2.PLDT) + if (y289) { + LoadTable("SSDT", "iASLTS", "LTBL0001", "\\", PPST, 1) + } else { + Store(LoadTable("SSDT", "iASLTS", "LTBL0001", "\\", PPST, 1), DDBH) + } + CH04(arg0, 0, 28, z176, __LINE__, 0, 0) // AE_BAD_PARAMETER + if (LNotEqual(0, \DTM2.PLDT)) { + err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) + } + if (CondRefof(\_XT2, Local0)) { + err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) + if (y289) { + // Cleanup + UnLoad(DDBH) + } + } + return (0) + } + */ + /* AE_OWNER_ID_LIMIT exception when too many Tables loaded */ + Method (TSTG, 1, NotSerialized) + { + Concatenate (Arg0, "-tstg-\\DTM0", Arg0) + \DTM0.TSTH (Arg0, 0x01) + } + + /* Exceptions when the parameter of the Loadtable operator */ + /* is of incorrect types */ + Method (TSTH, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Name (BTYP, Buffer (0x10) + { + /* 0000 */ 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, // ........ + /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 // ........ + }) + Method (M000, 4, NotSerialized) + { + Concatenate (Arg0, "-m000.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z176, 0x0678, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + LoadTable (DerefOf (Arg2), "", "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x067D, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Return (0x00) + } + + Method (M001, 4, NotSerialized) + { + Concatenate (Arg0, "-m001.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z176, 0x0689, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + LoadTable ("OEM1", DerefOf (Arg2), "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x068E, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Return (0x00) + } + + Method (M002, 4, NotSerialized) + { + Concatenate (Arg0, "-m002.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z176, 0x069A, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + LoadTable ("OEM1", "", DerefOf (Arg2), "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x069F, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Return (0x00) + } + + Method (M003, 4, NotSerialized) + { + Concatenate (Arg0, "-m003.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z176, 0x06AB, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + LoadTable ("OEM1", "", "", DerefOf (Arg2), "\\DTM2.PLDT", 0x01) + If (DerefOf (BTYP [Arg3])) + { + CH04 (Arg0, 0x00, 0x1E, Z176, 0x06B1, 0x00, 0x00) /* AE_BAD_PATHNAME */ + } + Else + { + CH04 (Arg0, 0x00, 0x2F, Z176, 0x06B3, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + + Return (0x00) + } + + Method (M004, 4, NotSerialized) + { + Concatenate (Arg0, "-m004.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z176, 0x06C0, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + LoadTable ("OEM1", "", "", "\\", DerefOf (Arg2), 0x01) + If (DerefOf (BTYP [Arg3])) + { + CH04 (Arg0, 0x00, 0x1E, Z176, 0x06C6, 0x00, 0x00) /* AE_BAD_PATHNAME */ + } + Else + { + CH04 (Arg0, 0x00, 0x2F, Z176, 0x06C8, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + + Return (0x00) + } + + Concatenate (Arg0, "-tsth", Arg0) + /* Load Auxiliry table */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB0) /* \DTM2.TSTH.DDB0 */ + If (CH03 (Arg0, Z176, 0x010C, 0x06D4, 0x00)) + { + Return (0x01) + } + + /* Uninitialized */ + + If (0x00) + { + Local1 = 0x00 + } + + Local0 = ObjectType (Local1) + If ((C008 != Local0)) + { + ERR (Arg0, Z176, 0x06DE, 0x00, 0x00, Local0, C008) + } + Else + { + LoadTable (Local1, "", "", "\\", "\\DTM2.PLDT", 0x01) + If (SLCK) + { + CH04 (Arg0, 0x00, 0x3D, Z176, 0x06E2, 0x00, 0x00) /* AE_AML_STRING_LIMIT */ + } + Else + { + CH04 (Arg0, 0x00, 0x31, Z176, 0x06E4, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */ + } + + LoadTable ("OEM1", Local1, "", "\\", "\\DTM2.PLDT", 0x01) + If (SLCK) + { + CH04 (Arg0, 0x00, 0x3D, Z176, 0x06E8, 0x00, 0x00) /* AE_AML_STRING_LIMIT */ + } + Else + { + CH04 (Arg0, 0x00, 0x31, Z176, 0x06EA, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */ + } + + LoadTable ("OEM1", "", Local1, "\\", "\\DTM2.PLDT", 0x01) + If (SLCK) + { + /* ACPI_OEM_TABLE_ID_SIZE should be less than 8. */ + /* The size of the "Integer" converted from "Any" is ISZ0*2. */ + If ((ISZ0 <= 0x04)) + { + CH03 (Arg0, Z176, 0x0110, 0x06F1, 0x00) /* No exception */ + } + Else + { + CH04 (Arg0, 0x00, 0x3D, Z176, 0x06F3, 0x00, 0x00) /* AE_AML_STRING_LIMIT */ + } + } + Else + { + CH04 (Arg0, 0x00, 0x31, Z176, 0x06F6, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */ + } + + LoadTable ("OEM1", "", "", Local1, "\\DTM2.PLDT", 0x01) + If (SLCK) + { + CH04 (Arg0, 0x00, 0x1E, Z176, 0x06FA, 0x00, 0x00) /* AE_BAD_PATHNAME */ + } + Else + { + CH04 (Arg0, 0x00, 0x31, Z176, 0x06FC, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */ + } + + LoadTable ("OEM1", "", "", "\\", Local1, 0x01) + If (SLCK) + { + CH04 (Arg0, 0x00, 0x1E, Z176, 0x0700, 0x00, 0x00) /* AE_BAD_PATHNAME */ + } + Else + { + CH04 (Arg0, 0x00, 0x31, Z176, 0x0702, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */ + } + } + + /* Integer */ + + M003 (Arg0, "int", RefOf (\AUXD.INT0), C009) + M004 (Arg0, "int", RefOf (\AUXD.INT0), C009) + /* String */ + + M003 (Arg0, "str", RefOf (\AUXD.STR0), C00A) + M004 (Arg0, "str", RefOf (\AUXD.STR0), C00A) + /* Buffer */ + + M003 (Arg0, "buf", RefOf (\AUXD.BUF0), C00B) + M004 (Arg0, "buf", RefOf (\AUXD.BUF0), C00B) + /* Package */ + + If (Y286) + { + M000 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + M001 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + M002 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + M003 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + M004 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + } + + LoadTable (\AUXD.PAC0, "", "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x071B, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", \AUXD.PAC0, "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x071D, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", \AUXD.PAC0, "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x071F, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", "", \AUXD.PAC0, "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0721, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", "", "\\", \AUXD.PAC0, 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0723, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.PAC0) + If ((C00C != Local0)) + { + ERR (Arg0, Z176, 0x0726, 0x00, 0x00, Local0, C00C) + } + + /* Field Unit */ + + M003 (Arg0, "flu", RefOf (\AUXD.FLU0), C00D) + M004 (Arg0, "flu", RefOf (\AUXD.FLU0), C00D) + /* Device */ + + LoadTable (\AUXD.DEV0, "", "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x072F, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", \AUXD.DEV0, "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0731, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", \AUXD.DEV0, "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0733, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", "", \AUXD.DEV0, "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0735, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", "", "\\", \AUXD.DEV0, 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0737, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.DEV0) + If ((C00E != Local0)) + { + ERR (Arg0, Z176, 0x073A, 0x00, 0x00, Local0, C00E) + } + + /* Event */ + + M000 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + M001 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + M002 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + M003 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + M004 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + /* Method */ + + M000 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + M001 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + M002 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + M003 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + M004 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + /* Mutex */ + + M000 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + M001 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + M002 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + M003 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + M004 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + /* OpRegion */ + + M000 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + M001 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + M002 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + M003 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + M004 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + /* Power Resource */ + + M000 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + M001 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + M002 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + M003 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + M004 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + /* Processor */ + + M000 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + M001 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + M002 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + M003 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + M004 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + /* Thermal Zone */ + + LoadTable (\AUXD.TZN0, "", "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0769, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", \AUXD.TZN0, "", "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x076B, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", \AUXD.TZN0, "\\", "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x076D, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", "", \AUXD.TZN0, "\\DTM2.PLDT", 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x076F, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + LoadTable ("OEM1", "", "", "\\", \AUXD.TZN0, 0x01) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0771, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.TZN0) + If ((C015 != Local0)) + { + ERR (Arg0, Z176, 0x0774, 0x00, 0x00, Local0, C015) + } + + /* Buffer Field */ + + M003 (Arg0, "bfl", RefOf (\AUXD.BFL0), C016) + M004 (Arg0, "bfl", RefOf (\AUXD.BFL0), C016) + Unload (DDB0) + CH03 (Arg0, Z176, 0x0126, 0x077D, 0x00) + Return (0x00) + } + + /* Exceptions when the ParameterData parameter of the Loadtable operator */ + /* can not be saved into the Object referred by ParameterPathString */ + Method (TSTI, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Concatenate (Arg0, "-tsti", Arg0) + /* Load Auxiliry table */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB0) /* \DTM2.TSTI.DDB0 */ + If (CH03 (Arg0, Z176, 0x0130, 0x078F, 0x00)) + { + Return (0x01) + } + + /* Uninitialized */ + + If (0x00) + { + Local1 = 0x00 + } + + Local0 = ObjectType (Local1) + If ((C008 != Local0)) + { + ERR (Arg0, Z176, 0x0799, 0x00, 0x00, Local0, C008) + } + /* Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */ + /* + LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", Local1) + if (SLCK) { + CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE + } else { + CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL + } + */ + Else + { + } + + /* Integer */ + + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07A9, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + DDB1 = LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.INT0) + If (CH03 (Arg0, Z176, 0x0134, 0x07AD, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07B2, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + If ((\DTM2.PLDT != \AUXD.INT0)) + { + ERR (Arg0, Z176, 0x07B6, 0x00, 0x00, \DTM2.PLDT, \AUXD.INT0) + Return (0x01) + } + + Unload (DDB1) + If (CH03 (Arg0, Z176, 0x0137, 0x07BA, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\AUXD.INT0) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07BF, 0x00, 0x00, Local0, C009) + } + + /* String */ + + If (Y296) + { + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07C6, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + DDB1 = LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.STR0) + If (CH03 (Arg0, Z176, 0x013A, 0x07CA, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07CF, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + If ((\DTM2.PLDT != \AUXD.STR0)) + { + ERR (Arg0, Z176, 0x07D3, 0x00, 0x00, \DTM2.PLDT, \AUXD.STR0) + Return (0x01) + } + + Unload (DDB1) + If (CH03 (Arg0, Z176, 0x013D, 0x07D7, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\AUXD.STR0) + If ((C00A != Local0)) + { + ERR (Arg0, Z176, 0x07DC, 0x00, 0x00, Local0, C00A) + } + } + + /* Buffer */ + + If (Y296) + { + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07E4, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + DDB1 = LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.BUF0) + If (CH03 (Arg0, Z176, 0x0140, 0x07E8, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x07ED, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + If ((\DTM2.PLDT != \AUXD.BUF0)) + { + ERR (Arg0, Z176, 0x07F1, 0x00, 0x00, \DTM2.PLDT, \AUXD.BUF0) + Return (0x01) + } + + Unload (DDB1) + If (CH03 (Arg0, Z176, 0x0143, 0x07F5, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\AUXD.BUF0) + If ((C00B != Local0)) + { + ERR (Arg0, Z176, 0x07FA, 0x00, 0x00, Local0, C00B) + } + } + + /* Package */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.PAC0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0800, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.PAC0) + If ((C00C != Local0)) + { + ERR (Arg0, Z176, 0x0803, 0x00, 0x00, Local0, C00C) + } + + /* Field Unit */ + + If (Y296) + { + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x080A, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + DDB1 = LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.FLU0) + If (CH03 (Arg0, Z176, 0x0148, 0x080E, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x0813, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + If ((\DTM2.PLDT != \AUXD.FLU0)) + { + ERR (Arg0, Z176, 0x0817, 0x00, 0x00, \DTM2.PLDT, \AUXD.FLU0) + Return (0x01) + } + + Unload (DDB1) + If (CH03 (Arg0, Z176, 0x014B, 0x081B, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\AUXD.FLU0) + If ((C00D != Local0)) + { + ERR (Arg0, Z176, 0x0820, 0x00, 0x00, Local0, C00D) + } + } + + /* Device */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.DEV0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0826, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.DEV0) + If ((C00E != Local0)) + { + ERR (Arg0, Z176, 0x0829, 0x00, 0x00, Local0, C00E) + } + + /* Event */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.EVE0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x082E, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.EVE0) + If ((C00F != Local0)) + { + ERR (Arg0, Z176, 0x0831, 0x00, 0x00, Local0, C00F) + } + + /* Method */ + + If (Y288) + { + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.MMM0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0837, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.MMM0) + If ((C010 != Local0)) + { + ERR (Arg0, Z176, 0x083A, 0x00, 0x00, Local0, C010) + } + } + + /* Mutex */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.MTX0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0840, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.MTX0) + If ((C011 != Local0)) + { + ERR (Arg0, Z176, 0x0843, 0x00, 0x00, Local0, C011) + } + + /* OpRegion */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.OPR0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0848, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.OPR0) + If ((C012 != Local0)) + { + ERR (Arg0, Z176, 0x084B, 0x00, 0x00, Local0, C012) + } + + /* Power Resource */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.PWR0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0850, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.PWR0) + If ((C013 != Local0)) + { + ERR (Arg0, Z176, 0x0853, 0x00, 0x00, Local0, C013) + } + + /* Processor */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.CPU0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0858, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.CPU0) + If ((C014 != Local0)) + { + ERR (Arg0, Z176, 0x085B, 0x00, 0x00, Local0, C014) + } + + /* Thermal Zone */ + + LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.TZN0) + CH04 (Arg0, 0x00, 0x2F, Z176, 0x0860, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Local0 = ObjectType (\AUXD.TZN0) + If ((C015 != Local0)) + { + ERR (Arg0, Z176, 0x0863, 0x00, 0x00, Local0, C015) + } + + /* Buffer Field */ + + If (Y296) + { + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x086A, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + DDB1 = LoadTable ("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.BFL0) + If (CH03 (Arg0, Z176, 0x015E, 0x086E, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\DTM2.PLDT) + If ((C009 != Local0)) + { + ERR (Arg0, Z176, 0x0873, 0x00, 0x00, Local0, C009) + Return (0x01) + } + + If ((\DTM2.PLDT != \AUXD.BFL0)) + { + ERR (Arg0, Z176, 0x0877, 0x00, 0x00, \DTM2.PLDT, \AUXD.BFL0) + Return (0x01) + } + + Unload (DDB1) + If (CH03 (Arg0, Z176, 0x0161, 0x087B, 0x00)) + { + Return (0x01) + } + + Local0 = ObjectType (\AUXD.BFL0) + If ((C016 != Local0)) + { + ERR (Arg0, Z176, 0x0880, 0x00, 0x00, Local0, C016) + } + } + + Unload (DDB0) + CH03 (Arg0, Z176, 0x0163, 0x0886, 0x00) + Return (0x00) + } + } + + Method (TLT0, 0, Serialized) + { + Name (TS, "TLT0") + CH03 (TS, Z176, 0x0200, 0x0890, 0x00) + /* Simple Loadtable test */ + + SRMT ("TLT0.tst0") + \DTM2.TST0 (TS) + CH03 (TS, Z176, 0x0201, 0x0896, 0x00) + /* All comparisons of Loadtable parameters are case sensitive, */ + /* if no table matches the specified parameters, then 0 is returned */ + SRMT ("TLT0.tst1") + \DTM2.TST1 (TS) + CH03 (TS, Z176, 0x0202, 0x089D, 0x00) + /* Any of the RootPathString, ParameterPathString, and ParameterData */ + /* parameters in LoadTable expression can be omitted */ + SRMT ("TLT0.tst2") + \DTM2.TST2 (TS) + CH03 (TS, Z176, 0x0203, 0x08A4, 0x00) + /* Different sources of the String parameters: Named Objects, LocalX, */ + /* ArgX, elements of Packages, results of functions, any TermArg */ + SRMT ("TLT0.tst3") + \DTM2.TST3 (TS) + CH03 (TS, Z176, 0x0204, 0x08AB, 0x00) + /* Different sources of the optional parameters (RootPathString, */ + /* ParameterPathString, and ParameterData): Named Objects, LocalX, */ + /* ArgX, elements of Packages, results of functions, any TermArg */ + SRMT ("TLT0.tst4") + \DTM2.TST4 (TS) + CH03 (TS, Z176, 0x0205, 0x08B3, 0x00) + /* Namespace location to load the Definition Block is determined */ + /* by the RootPathString parameter of Loadtable */ + SRMT ("TLT0.tst5.0") + \DTM2.TST5 (TS, "\\DTM2.DEVR") + CH03 (TS, Z176, 0x0206, 0x08BA, 0x00) + /* The RootPathString value is evaluated using normal scoping rules, */ + /* assuming that the scope of the LoadTable operator is the current */ + /* scope */ + SRMT ("TLT0.tst5.1") + \DTM2.TST5 (TS, "^DEVR") + CH03 (TS, Z176, 0x0207, 0x08C2, 0x00) + /* "\" is assumed to be Namespace location to load the Definition */ + /* Block if RootPathString parameter is not specified */ + SRMT ("TLT0.tst6") + \DTM2.TST6 (TS) + CH03 (TS, Z176, 0x0208, 0x08C9, 0x00) + /* If the first character of ParameterPathString is a backslash */ + /* or caret character, then the path of the object set up on success */ + /* is ParameterPathString. It is RootPathString.ParameterPathString */ + /* in any case. */ + SRMT ("TLT0.tst7") + \DTM2.TST7 (TS) + CH03 (TS, Z176, 0x0209, 0x08D2, 0x00) + /* Implicit operand conversion of the parameters specified to be strings */ + + SRMT ("TLT0.tste") + \DTM2.TSTE (TS) + CH03 (TS, Z176, 0x020A, 0x08D8, 0x00) + /* LoadTable returns 0 if some SSDT matching the LoadTable */ + /* parameters is originally not listed in XSDT */ + /*SRMT("TLT0.tstf") */ + /*\DTM2.tstf(ts) */ + CH03 (TS, Z176, 0x020B, 0x08DF, 0x00) + } + + /* Exceptional conditions */ + + Method (TLT1, 0, Serialized) + { + Name (TS, "TLT1") + /* Exceptions when the SignatureString is greater than four characters, */ + /* the OEMIDString is greater than six characters, or the OEMTableID is */ + /* greater than eight characters */ + SRMT ("TLT1.tst8") + \DTM2.TST8 (TS) + /* Exceptions when some DSDT or SSDT matching the LoadTable parameters */ + /* is already loaded (actually on initial loading of tables listed in XSDT) */ + SRMT ("TLT1.tst9") + \DTM2.TST9 (TS) + /* Exceptions when the matched table is already loaded */ + + SRMT ("TLT1.tsta") + \DTM2.TSTA (TS) + /* Exceptions when there already is an previously loaded Object */ + /* referred by the path in the Namespace */ + SRMT ("TLT1.tstb") + \DTM2.TSTB (TS) + /* Exceptions when the object specified by the ParameterPathString */ + /* does not exist */ + SRMT ("TLT1.tstc") + \DTM2.TSTC (TS) + /* Exceptions when storing of data of the ParameterData data type */ + /* to the specified object is not allowed. */ + SRMT ("TLT1.tstd") + \DTM2.TSTD (TS) + /* AE_OWNER_ID_LIMIT exception when too many Tables loaded */ + + SRMT ("TLT1.tstg") + If (Y294) + { + \DTM2.TSTG (TS) + } + Else + { + BLCK () + } + + /* Exceptions when the parameter of the Loadtable operator */ + /* is of incorrect types */ + SRMT ("TLT1.tsth") + \DTM2.TSTH (TS) + /* Exceptions when the ParameterData parameter of the Loadtable operator */ + /* can not be saved into the Object referred by ParameterPathString */ + SRMT ("TLT1.tsti") + \DTM2.TSTI (TS) + } - Concatenate(arg0, "-tst2", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - // Check when RootPathString omitted - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", , PPST, 1), DDB0) - - if (CH03(arg0, z176, 0x031, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDB0), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDB0) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x035, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - // Check when ParameterPathString omitted - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", "\\", , 1), DDB1) - - if (CH03(arg0, z176, 0x037, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDB1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDB1) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x03b, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - // Check when ParameterData omitted - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", "\\", PPST, ), DDB2) - - if (CH03(arg0, z176, 0x03d, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDB2), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDB2) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x041, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - // Check when all optional parameters omitted - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", , , ), DDB3) - - if (CH03(arg0, z176, 0x043, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDB3), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDB3) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x047, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // Different sources of the String parameters: Named Objects, LocalX, - // ArgX, elements of Packages, results of functions, any TermArg - Method(tst3, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - Name(DDB2, 0) - Name(DDB3, 0) - Name(DDB4, 0) - Name(DDB5, 0) - Name(DDB6, 0) - - Name(SOID, "") - Name(STID, "") - - Name(POEM, Package(3) {"OEM1", "", ""}) - - Method(m000, 1) {Return (arg0)} - - Method(m001, 3) - { - Concatenate(arg0, arg2, arg0) - - if (CH03(arg0, z176, 0x051, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(arg1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2._XT2", 0) - } - - UnLoad(arg1) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x055, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2._XT2", 1) - return (1) - } - - return (0) - } - - Method(m002, 3) - { - return (LoadTable(Arg0, Derefof(Arg1), Derefof(Arg2), , , )) - } - - Method(m003, 3) - { - return (LoadTable(Derefof(Arg0), Arg1, Derefof(Arg2), , , )) - } - - Method(m004, 3) - { - return (LoadTable(Derefof(Arg0), Derefof(Arg1), Arg2, , , )) - } - - Concatenate(arg0, "-tst3", arg0) - - if (y281) { - Store(^SOID, SOID) - Store(^STID, STID) - Store(^POEM, POEM) - } - - if (CondRefof(\DTM2._XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - // Check LoadTable(Named, LocalX, Method(), , , ) - - Store(0, \DTM2.PLDT) - - Store(SOID, Local2) - - Store(LoadTable(SOEM, Local2, m000(STID), , , ), DDB0) - - if (m001(arg0, DDB0, ".NLM")) { - return (1) - } - - // Check LoadTable(Method(), Named, LocalX, , , ) - - Store(0, \DTM2.PLDT) - - Store(STID, Local2) - - Store(LoadTable(m000(SOEM), SOID, Local2, , , ), DDB1) - - if (m001(arg0, DDB1, ".MNL")) { - return (1) - } - - // Check LoadTable(LocalX, Method(), Named, , , ) - - Store(0, \DTM2.PLDT) - - Store(SOEM, Local2) - - Store(LoadTable(Local2, m000(SOID), STID, , , ), DDB2) - - if (m001(arg0, DDB2, ".LMN")) { - return (1) - } - - // Check LoadTable(ArgX, Derefof(Refof), Derefof(Index), , , ) - - Store(0, \DTM2.PLDT) - - Store(Refof(SOID), Local2) - Store(Index(POEM, 2), Local3) - - Store(m002(SOEM, Local2, Local3), DDB3) - - if (m001(arg0, DDB3, ".ARI")) { - return (1) - } - - // Check LoadTable(Derefof(Index), ArgX, Derefof(Refof), , , ) - - Store(0, \DTM2.PLDT) - - Store(Refof(STID), Local2) - Store(Index(POEM, 0), Local3) - - Store(m003(Local3, SOID, Local2), DDB4) - - if (m001(arg0, DDB4, ".IAR")) { - return (1) - } - - // Check LoadTable(Derefof(Refof), Derefof(Index), ArgX, , , ) - - Store(0, \DTM2.PLDT) - - Store(Refof(SOEM), Local2) - Store(Index(POEM, 1), Local3) - - Store(m004(Local2, Local3, STID), DDB5) - - if (m001(arg0, DDB5, ".RIA")) { - return (1) - } - - // Check LoadTable(TermArg, TermArg, TermArg, , , ) - - Store(0, \DTM2.PLDT) - - Store(Concatenate("term", SOEM), Local2) - Store(ToBuffer(Local2), Local2) - - Store(ToBuffer(SOID), Local3) - - Store("", Local4) - - Store(LoadTable( - Mid(ToString(Local2), 4, 4), - ToString(m000(Local3)), - Concatenate(m000(STID), Local4), , , ), - DDB6) - - if (m001(arg0, DDB6, ".TTT")) { - return (1) - } - - return (0) - } - - // Different sources of the optional parameters (RootPathString, - // ParameterPathString, and ParameterData): Named Objects, LocalX, - // ArgX, elements of Packages, results of functions, any TermArg - Method(tst4, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - Name(DDB2, 0) - Name(DDB3, 0) - Name(DDB4, 0) - Name(DDB5, 0) - Name(DDB6, 0) - - Name(RPST, "\\DTM2") - Name(PPST, "\\DTM2.PLDT") - Name(NVAL, 1) - Name(POPT, Package(3) {"\\DTM2", "\\DTM2.PLDT", 1}) - - Method(m000, 1) {Return (arg0)} - - Method(m001, 3) - { - Concatenate(arg0, arg2, arg0) - - if (CH03(arg0, z176, 0x061, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(arg1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\DTM2._XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2._XT2", 0) - } - - UnLoad(arg1) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x065, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\DTM2._XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2._XT2", 1) - return (1) - } - - return (0) - } - - Method(m002, 3) - { -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -// return (LoadTable("OEM1", "", "", Arg0, Derefof(Arg1), Derefof(Arg2))) -// parse error, expecting `')'' ^ - return (LoadTable("OEM1", "", "", Arg0, Derefof(Arg1), 1)) - } - - Method(m003, 3) - { -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -// return (LoadTable("OEM1", "", "", Derefof(Arg0), Arg1, Derefof(Arg2))) -// parse error, expecting `')'' ^ - return (LoadTable("OEM1", "", "", Derefof(Arg0), Arg1, 1)) - } - - Method(m004, 3) - { -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -// return (LoadTable("OEM1", "", "", Derefof(Arg0), Derefof(Arg1), Arg2)) -// parse error, expecting `')'' ^ - return (LoadTable("OEM1", "", "", Derefof(Arg0), Derefof(Arg1), 1)) - } - - Concatenate(arg0, "-tst4", arg0) - - if (CondRefof(\DTM2._XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2._XT2", 1) - return (1) - } - - // Check LoadTable(..., Named, LocalX, Method()) - - Store(0, \DTM2.PLDT) - - Store(PPST, Local2) - -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -// Store(LoadTable("OEM1", "", "", RPST, Local2, m000(1)), DDB0) -// parse error, expecting `')'' ^ - Store(LoadTable("OEM1", "", "", RPST, Local2, 1), DDB0) - - if (m001(arg0, DDB0, ".NLM")) { - return (1) - } - - // Check LoadTable(..., Method(), Named, LocalX) - - Store(0, \DTM2.PLDT) - - Store(1, Local2) - -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -// Store(LoadTable("OEM1", "", "", m000(RPST), PPST, Local2), DDB1) -// parse error, expecting `')'' ^ - Store(LoadTable("OEM1", "", "", m000(RPST), PPST, 1), DDB1) - - if (m001(arg0, DDB1, ".MNL")) { - return (1) - } - - // Check LoadTable(..., LocalX, Method(), Named) - - Store(0, \DTM2.PLDT) - - Store(RPST, Local2) - - Store(LoadTable("OEM1", "", "", Local2, m000(PPST), NVAL), DDB2) - - if (m001(arg0, DDB2, ".LMN")) { - return (1) - } - - // Check LoadTable(..., ArgX, Derefof(Refof), Derefof(Index)) - - Store(0, \DTM2.PLDT) - - Store(Refof(PPST), Local2) - Store(Index(POPT, 2), Local3) - - Store(m002(RPST, Local2, Local3), DDB3) - - if (m001(arg0, DDB3, ".ARI")) { - return (1) - } - - // Check LoadTable(..., Derefof(Index), ArgX, Derefof(Refof)) - - Store(0, \DTM2.PLDT) - - Store(Refof(NVAL), Local2) - Store(Index(POPT, 0), Local3) - - Store(m003(Local3, PPST, Local2), DDB4) - - if (m001(arg0, DDB4, ".ARI")) { - return (1) - } - - // Check LoadTable(..., Derefof(Refof), Derefof(Index), ArgX) - - Store(0, \DTM2.PLDT) - - Store(Refof(RPST), Local2) - Store(Index(POPT, 1), Local3) - - Store(m004(Local2, Local3, NVAL), DDB5) - - if (m001(arg0, DDB5, ".ARI")) { - return (1) - } - - // Check LoadTable(..., TermArg, TermArg, TermArg) - - Store(0, \DTM2.PLDT) - - Store(Concatenate("term", RPST), Local2) - Store(ToBuffer(Local2), Local2) - - Store(ToBuffer(PPST), Local3) - - Store(3, Local4) - - Store(LoadTable("OEM1", "", "", - Mid(ToString(Local2), 4, 5), - ToString(m000(Local3)), -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -// Subtract(m000(Local4), 2)), - Subtract(3, 2)), - DDB6) - - if (m001(arg0, DDB6, ".TTT")) { - return (1) - } - - return (0) - } - - // Namespace location to load the Definition Block is determined - // by the RootPathString parameter of Loadtable - // Arg1: RootPathString - Method(tst5, 2, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst5", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - if (CondRefof(\DTM2.DEVR._XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2.DEVR._XT2", 1) - return (1) - } - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", Arg1, PPST, 1), DDBH) - - if (CH03(arg0, z176, 0x072, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - if (CondRefof(\DTM2.DEVR._XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2.DEVR._XT2", 0) - } - - UnLoad(DDBH) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x077, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - if (CondRefof(\DTM2.DEVR._XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2.DEVR._XT2", 1) - } - - return (0) - } - - // "\" is assumed to be Namespace location to load the Definition - // Block if RootPathString parameter is not specified - Method(tst6, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst6", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", , PPST, 1), DDBH) - - if (CH03(arg0, z176, 0x081, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDBH) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x085, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // If the first character of ParameterPathString is a backslash - // or caret character, then the path of the object set up on success - // is ParameterPathString. It is RootPathString.ParameterPathString - // in any case. - Method(tst7, 1, Serialized) - { - Name(DDBH, 0) - Name(PLDT, 0) - - Concatenate(arg0, "-tst7", arg0) - - Store(LoadTable("OEM1", "", "", RPST, "^TST7.PLDT", 1), DDBH) - - if (CH03(arg0, z176, 0x091, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, PLDT)) { - err(arg0, z176, __LINE__, 0, 0, PLDT, 1) - } - - UnLoad(DDBH) - - if (CH03(arg0, z176, 0x094, __LINE__, 0)) { - return (1) - } - - Store(0, PLDT) - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", RPST, "PLDT", 1), DDBH) - - if (CH03(arg0, z176, 0x095, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(0, PLDT)) { - err(arg0, z176, __LINE__, 0, 0, PLDT, 0) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - UnLoad(DDBH) - - if (CH03(arg0, z176, 0x099, __LINE__, 0)) { - return (1) - } - - return (0) - } - - // Exceptions when the SignatureString is greater than four characters, - // the OEMIDString is greater than six characters, or the OEMTableID is - // greater than eight characters - Method(tst8, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tst8", arg0) - - Store(0, \DTM2.PLDT) - - // SignatureString is greater than four characters - if (y287) { - Store(LoadTable("OEM1X", "", "", RPST, PPST, 1), DDBH) - } else { - LoadTable("OEM1X", "", "", RPST, PPST, 1) - } - - CH04(arg0, 0, 61, z176, __LINE__, 0, 0) // AE_AML_STRING_LIMIT - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - - if (y287) { - return (1) - } else { - // Cleanup - UnLoad(DDBH) - Store(0, \DTM2.PLDT) - } - } - - // OEMIDString is greater than six characters - LoadTable("OEM1", "IntelXX", "", RPST, PPST, 1) - - CH04(arg0, 0, 61, z176, __LINE__, 0, 0) // AE_AML_STRING_LIMIT - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - return (1) - } - - // OEMTableID is greater than eight characters - LoadTable("OEM1", "", "ManyXXXXX", RPST, PPST, 1) - - CH04(arg0, 0, 61, z176, __LINE__, 0, 0) // AE_AML_STRING_LIMIT - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - return (1) - } - - return (0) - } - - // Exceptions when some DSDT or SSDT matching the LoadTable parameters - // is already loaded (actually on initial loading of tables listed in XSDT) - Method(tst9, 1) - { - Concatenate(arg0, "-tst9", arg0) - - Store(0, \DTM2.PLDT) - - // SignatureString is "DSDT" - LoadTable("DSDT", "", "", RPST, PPST, 1) - - CH04(arg0, 0, 7, z176, __LINE__, 0, 0) // AE_ALREADY_EXISTS - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - // SignatureString is "SSDT" - LoadTable("SSDT", "", "", RPST, PPST, 1) - - CH04(arg0, 0, 7, z176, __LINE__, 0, 0) // AE_ALREADY_EXISTS - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - return (0) - } - - // Exceptions when the matched table is already loaded - Method(tsta, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tsta", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(0, \DTM2.PLDT) - - Store(LoadTable("OEM1", "", "", "\\", PPST, 1), DDBH) - - if (CH03(arg0, z176, 0x0b1, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - Store(0, \DTM2.PLDT) - - LoadTable("OEM1", "", "", "\\DTM2", PPST, 1) - - CH04(arg0, 0, 7, z176, __LINE__, 0, 0) // AE_ALREADY_EXISTS - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\DTM2._XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\DTM2._XT2", 1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDBH) - Store("OEM1 unloaded", Debug) - - if (CH03(arg0, z176, 0x0b9, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // Originated from ssdt4.asl: iasl -tc ssdt4.asl - Name(BUF4, Buffer(){ - 0x53,0x53,0x44,0x54,0x44,0x00,0x00,0x00, /* 00000000 "SSDTD..." */ - 0x02,0x08,0x69,0x41,0x53,0x4C,0x54,0x53, /* 00000008 "..iASLTS" */ - 0x4C,0x54,0x42,0x4C,0x30,0x30,0x30,0x31, /* 00000010 "LTBL0001" */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x15,0x12,0x06,0x20,0x10,0x1F,0x5C,0x00, /* 00000020 "... ..\." */ - 0x08,0x5F,0x58,0x54,0x32,0x0D,0x61,0x62, /* 00000028 "._XT2.ab" */ - 0x73,0x6F,0x6C,0x75,0x74,0x65,0x20,0x6C, /* 00000030 "solute l" */ - 0x6F,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20, /* 00000038 "ocation " */ - 0x6F,0x62,0x6A,0x00, - }) - - OperationRegion (IST4, SystemMemory, 0x600, 0x44) - - Field(IST4, ByteAcc, NoLock, Preserve) { - RFU4, 0x220, - } - - // Exceptions when there already is an previously loaded Object - // referred by the path in the Namespace - Method(tstb, 1, Serialized) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tstb", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(BUF4, RFU4) - Load(RFU4, DDBH) - - if (CH03(arg0, z176, 0x0c1, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - Store(0, \DTM2.PLDT) - - LoadTable("OEM1", "", "", "\\", PPST, 1) - - CH04(arg0, 0, 7, z176, __LINE__, 0, 0) // AE_ALREADY_EXISTS - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDBH) - Store("SSDT unloaded", Debug) - - if (CH03(arg0, z176, 0x0c7, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // Exceptions when the object specified by the ParameterPathString - // does not exist - Method(tstc, 1) - { - Concatenate(arg0, "-tstc", arg0) - - LoadTable("DSDT", "", "", RPST, "\\DTM2.NULL", 1) - - CH04(arg0, 0, 5, z176, __LINE__, 0, 0) // AE_NOT_FOUND - - return (0) - } - - // Exceptions when storing of data of the ParameterData data type - // to the specified object is not allowed. - Method(tstd, 1) - { - Concatenate(arg0, "-tstd", arg0) - - Store(0, \DTM2.PLDT) - - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \DTM2.DEVR) - - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - } - - return (0) - } - - // Implicit operand conversion of the parameters specified to be strings - Method(tste, 1, Serialized) - { - Name(DDBH, 2) - Name(SOID, "") - Name(STID, "") - Name(RPST, "\\") - Name(PPST, "DTM2.PLDT") - Name(DSTR, "01234") - - Method(m000, 3, Serialized) - { - Name(DDBH, 2) - - Store(0, \DTM2.PLDT) - - Concatenate(arg0, "-m000.", arg0) - Concatenate(arg0, Mid(DSTR, arg2, 1), arg0) - - Switch(ToInteger (arg2)) { - Case(0) { - LoadTable(arg1, SOID, STID, RPST, PPST, 1) - return (CH04(arg0, 0, 37, z176, __LINE__, 0, 0))// AE_BAD_SIGNATURE - } - Case(1) { - Store(LoadTable(SOEM, arg1, STID, RPST, PPST, 1), DDBH) - } - Case(2) { - Store(LoadTable(SOEM, SOID, arg1, RPST, PPST, 1), DDBH) - } - Case(3) { - LoadTable(SOEM, SOID, STID, arg1, PPST, 1) - return (CH04(arg0, 0, 30, z176, __LINE__, 0, 0)) // AE_BAD_PATHNAME - } - Case(4) { - LoadTable(SOEM, SOID, STID, RPST, arg1, 1) - return (CH04(arg0, 0, 30, z176, __LINE__, 0, 0)) // AE_BAD_PATHNAME - } - } - - if (CH03(arg0, z176, 0x0d3, __LINE__, 0)) { - return (1) - } - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - return (1) - } - - Store(ObjectType(DDBH), Local5) - - if (CH03(arg0, z176, 0x0d5, __LINE__, 0)) { - return (1) - } - - if (LNotEqual(Local5, c009)) { // Integer - err(arg0, z176, __LINE__, 0, 0, Local5, c009) - return (1) - } - - if (LNotEqual(0, DDBH)) { - err(arg0, z176, __LINE__, 0, 0, DDBH, 0) - return (1) - } - - return (0) - } - - Concatenate(arg0, "-tste", arg0) - - if (y281) { - Store(^SOID, SOID) - Store(^STID, STID) - } - - // Buffer to String implicit conversion, only check that then - // no exception occurs. Actually due to the conversion rule - // resulting strings will not match the table fields - - ToBuffer(SOEM, Local0) - ToBuffer(SOID, Local1) - ToBuffer(STID, Local2) - ToBuffer(RPST, Local3) - ToBuffer(PPST, Local4) - - if (m000(arg0, Local0, 0)) {return (1)} - if (m000(arg0, Local1, 1)) {return (1)} - if (m000(arg0, Local2, 2)) {return (1)} - if (m000(arg0, Local3, 3)) {return (1)} - if (m000(arg0, Local4, 4)) {return (1)} - - // Check consistency of the parameters - - if (LNotEqual(ToBuffer(SOEM), Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, ToBuffer(SOEM)) - return (1) - } - - if (LNotEqual(ToBuffer(SOID), Local1)) { - err(arg0, z176, __LINE__, 0, 0, Local1, ToBuffer(SOID)) - return (1) - } - - if (LNotEqual(ToBuffer(STID), Local2)) { - err(arg0, z176, __LINE__, 0, 0, Local2, ToBuffer(STID)) - return (1) - } - - if (LNotEqual(ToBuffer(RPST), Local3)) { - err(arg0, z176, __LINE__, 0, 0, Local3, ToBuffer(RPST)) - return (1) - } - - if (LNotEqual(ToBuffer(PPST), Local4)) { - err(arg0, z176, __LINE__, 0, 0, Local4, ToBuffer(PPST)) - return (1) - } - - // Integer to String implicit conversion - - ToInteger(Local0, Local0) - ToInteger(Local1, Local1) - ToInteger(Local2, Local2) - ToInteger(Local3, Local3) - ToInteger(Local4, Local4) - - //if (m000(arg0, Local0, 0)) {return (1)} - //if (m000(arg0, Local1, 1)) {return (1)} - //if (m000(arg0, Local2, 2)) {return (1)} - if (m000(arg0, Local3, 3)) {return (1)} - if (m000(arg0, Local4, 4)) {return (1)} - - // Actual trivial Buffer to String implicit conversion - - if (y293) { - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(0, Local0) - Store(Buffer(Local0){}, Local1) - - Store(0, \DTM2.PLDT) - - Store(LoadTable(SOEM, Local1, Local1, RPST, PPST, 1), DDBH) - - if (CH03(arg0, z176, 0x0e1, __LINE__, 0)) { - return (1) - } - - if (LNotEqual(1, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 1) - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - UnLoad(DDBH) - - if (CH03(arg0, z176, 0x0e4, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - } - - return (0) - } - - // LoadTable returns 0 if some SSDT matching the LoadTable - // parameters is originally not listed in XSDT - /* - * This test should never happen in real ASL code. So it is removed. - * - * The Load operation will add a table to global table list, which is - * the master list that can be find in XSDT. - * - * The Unload operation will just delete the namespace owned by the table, - * release OwnerId and reset the table flag, but the table remains in - * global table list. - * - * So, LoadTable after Load and UnLoad operation will cause exception. - * - * Nothing like this should happen in real ASL code. The BIOS writer - * knows whether the table is in the XSDT or not. - */ - /* - Method(tstf, 1) - { - Name(DDBH, 0) - - Concatenate(arg0, "-tstf", arg0) - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(BUF4, RFU4) - Load(RFU4, DDBH) - - if (CH03(arg0, z176, 0x0f2, __LINE__, 0)) { - return (1) - } - - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, __LINE__, 0, 0, Local1, c017) - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - } else { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 0) - } - - UnLoad(DDBH) - Store("SSDT unloaded", Debug) - - if (CH03(arg0, z176, 0x0f5, __LINE__, 0)) { - return (1) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - return (1) - } - - Store(0, \DTM2.PLDT) - - if (y289) { - LoadTable("SSDT", "iASLTS", "LTBL0001", "\\", PPST, 1) - } else { - Store(LoadTable("SSDT", "iASLTS", "LTBL0001", "\\", PPST, 1), DDBH) - } - - CH04(arg0, 0, 28, z176, __LINE__, 0, 0) // AE_BAD_PARAMETER - - if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, 0) - } - - if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, __LINE__, 0, 0, "\\_XT2", 1) - if (y289) { - // Cleanup - UnLoad(DDBH) - } - } - - return (0) - } - */ - - // AE_OWNER_ID_LIMIT exception when too many Tables loaded - Method(tstg, 1) - { - Concatenate(arg0, "-tstg-\\DTM0", arg0) - - \DTM0.tsth(arg0, 1) - } - - // Exceptions when the parameter of the Loadtable operator - // is of incorrect types - Method(tsth, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - Name(BTYP, Buffer(){0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}) - - Method(m000, 4) - { - Concatenate(arg0, "-m000.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - LoadTable(Derefof(arg2), "", "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - - return (0) - } - - Method(m001, 4) - { - Concatenate(arg0, "-m001.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - LoadTable("OEM1", Derefof(arg2), "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - - return (0) - } - - Method(m002, 4) - { - Concatenate(arg0, "-m002.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - LoadTable("OEM1", "", Derefof(arg2), "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - - return (0) - } - - Method(m003, 4) - { - Concatenate(arg0, "-m003.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - LoadTable("OEM1", "", "", Derefof(arg2), "\\DTM2.PLDT", 1) - if (Derefof(Index(BTYP, arg3))) { - CH04(arg0, 0, 30, z176, __LINE__, 0, 0) // AE_BAD_PATHNAME - } else { - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } - - return (0) - } - - Method(m004, 4) - { - Concatenate(arg0, "-m004.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - LoadTable("OEM1", "", "", "\\", Derefof(arg2), 1) - if (Derefof(Index(BTYP, arg3))) { - CH04(arg0, 0, 30, z176, __LINE__, 0, 0) // AE_BAD_PATHNAME - } else { - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } - - return (0) - } - - Concatenate(arg0, "-tsth", arg0) - - // Load Auxiliry table - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB0) - - if (CH03(arg0, z176, 0x10c, __LINE__, 0)) { - return (1) - } - - // Uninitialized - if (0) { - Store(0, Local1) - } - Store(ObjectType(Local1), Local0) - if (LNotEqual(c008, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c008) - } else { - LoadTable(Local1, "", "", "\\", "\\DTM2.PLDT", 1) - if (SLCK) { - CH04(arg0, 0, 61, z176, __LINE__, 0, 0) // AE_AML_STRING_LIMIT - } else { - CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } - LoadTable("OEM1", Local1, "", "\\", "\\DTM2.PLDT", 1) - if (SLCK) { - CH04(arg0, 0, 61, z176, __LINE__, 0, 0) // AE_AML_STRING_LIMIT - } else { - CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } - LoadTable("OEM1", "", Local1, "\\", "\\DTM2.PLDT", 1) - if (SLCK) { - // ACPI_OEM_TABLE_ID_SIZE should be less than 8. - // The size of the "Integer" converted from "Any" is ISZ0*2. - if (LLessEqual(ISZ0, 4)) { - CH03(arg0, z176, 0x110, __LINE__, 0) // No exception - } else { - CH04(arg0, 0, 61, z176, __LINE__, 0, 0) // AE_AML_STRING_LIMIT - } - } else { - CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } - LoadTable("OEM1", "", "", Local1, "\\DTM2.PLDT", 1) - if (SLCK) { - CH04(arg0, 0, 30, z176, __LINE__, 0, 0) // AE_BAD_PATHNAME - } else { - CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } - LoadTable("OEM1", "", "", "\\", Local1, 1) - if (SLCK) { - CH04(arg0, 0, 30, z176, __LINE__, 0, 0) // AE_BAD_PATHNAME - } else { - CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } - } - - // Integer - m003(arg0, "int", Refof(\AUXD.INT0), c009) - m004(arg0, "int", Refof(\AUXD.INT0), c009) - - // String - m003(arg0, "str", Refof(\AUXD.STR0), c00a) - m004(arg0, "str", Refof(\AUXD.STR0), c00a) - - // Buffer - m003(arg0, "buf", Refof(\AUXD.BUF0), c00b) - m004(arg0, "buf", Refof(\AUXD.BUF0), c00b) - - // Package - if (y286) { - m000(arg0, "pac", Refof(\AUXD.PAC0), c00c) - m001(arg0, "pac", Refof(\AUXD.PAC0), c00c) - m002(arg0, "pac", Refof(\AUXD.PAC0), c00c) - m003(arg0, "pac", Refof(\AUXD.PAC0), c00c) - m004(arg0, "pac", Refof(\AUXD.PAC0), c00c) - } - LoadTable(\AUXD.PAC0, "", "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", \AUXD.PAC0, "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", \AUXD.PAC0, "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", "", \AUXD.PAC0, "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", "", "\\", \AUXD.PAC0, 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.PAC0), Local0) - if (LNotEqual(c00c, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00c) - } - - // Field Unit - m003(arg0, "flu", Refof(\AUXD.FLU0), c00d) - m004(arg0, "flu", Refof(\AUXD.FLU0), c00d) - - // Device - LoadTable(\AUXD.DEV0, "", "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", \AUXD.DEV0, "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", \AUXD.DEV0, "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", "", \AUXD.DEV0, "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", "", "\\", \AUXD.DEV0, 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.DEV0), Local0) - if (LNotEqual(c00e, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00e) - } - - // Event - m000(arg0, "evt", Refof(\AUXD.EVE0), c00f) - m001(arg0, "evt", Refof(\AUXD.EVE0), c00f) - m002(arg0, "evt", Refof(\AUXD.EVE0), c00f) - m003(arg0, "evt", Refof(\AUXD.EVE0), c00f) - m004(arg0, "evt", Refof(\AUXD.EVE0), c00f) - - // Method - m000(arg0, "met", Refof(\AUXD.MMM0), c010) - m001(arg0, "met", Refof(\AUXD.MMM0), c010) - m002(arg0, "met", Refof(\AUXD.MMM0), c010) - m003(arg0, "met", Refof(\AUXD.MMM0), c010) - m004(arg0, "met", Refof(\AUXD.MMM0), c010) - - // Mutex - m000(arg0, "mtx", Refof(\AUXD.MTX0), c011) - m001(arg0, "mtx", Refof(\AUXD.MTX0), c011) - m002(arg0, "mtx", Refof(\AUXD.MTX0), c011) - m003(arg0, "mtx", Refof(\AUXD.MTX0), c011) - m004(arg0, "mtx", Refof(\AUXD.MTX0), c011) - - // OpRegion - m000(arg0, "opr", Refof(\AUXD.OPR0), c012) - m001(arg0, "opr", Refof(\AUXD.OPR0), c012) - m002(arg0, "opr", Refof(\AUXD.OPR0), c012) - m003(arg0, "opr", Refof(\AUXD.OPR0), c012) - m004(arg0, "opr", Refof(\AUXD.OPR0), c012) - - // Power Resource - m000(arg0, "pwr", Refof(\AUXD.PWR0), c013) - m001(arg0, "pwr", Refof(\AUXD.PWR0), c013) - m002(arg0, "pwr", Refof(\AUXD.PWR0), c013) - m003(arg0, "pwr", Refof(\AUXD.PWR0), c013) - m004(arg0, "pwr", Refof(\AUXD.PWR0), c013) - - // Processor - m000(arg0, "cpu", Refof(\AUXD.CPU0), c014) - m001(arg0, "cpu", Refof(\AUXD.CPU0), c014) - m002(arg0, "cpu", Refof(\AUXD.CPU0), c014) - m003(arg0, "cpu", Refof(\AUXD.CPU0), c014) - m004(arg0, "cpu", Refof(\AUXD.CPU0), c014) - - // Thermal Zone - LoadTable(\AUXD.TZN0, "", "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", \AUXD.TZN0, "", "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", \AUXD.TZN0, "\\", "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", "", \AUXD.TZN0, "\\DTM2.PLDT", 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - LoadTable("OEM1", "", "", "\\", \AUXD.TZN0, 1) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.TZN0), Local0) - if (LNotEqual(c015, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c015) - } - - // Buffer Field - m003(arg0, "bfl", Refof(\AUXD.BFL0), c016) - m004(arg0, "bfl", Refof(\AUXD.BFL0), c016) - - UnLoad(DDB0) - - CH03(arg0, z176, 0x126, __LINE__, 0) - - return (0) - } - - // Exceptions when the ParameterData parameter of the Loadtable operator - // can not be saved into the Object referred by ParameterPathString - Method(tsti, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - - Concatenate(arg0, "-tsti", arg0) - - // Load Auxiliry table - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB0) - - if (CH03(arg0, z176, 0x130, __LINE__, 0)) { - return (1) - } - - // Uninitialized - if (0) { - Store(0, Local1) - } - Store(ObjectType(Local1), Local0) - if (LNotEqual(c008, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c008) - } else { -// Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm -/* - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", Local1) - if (SLCK) { - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } else { - CH04(arg0, 0, 49, z176, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } -*/ - } - - // Integer - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - Store(LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.INT0), DDB1) - if (CH03(arg0, z176, 0x134, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - if (LNotEqual(\DTM2.PLDT, \AUXD.INT0)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, \AUXD.INT0) - return (1) - } - Unload(DDB1) - if (CH03(arg0, z176, 0x137, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\AUXD.INT0), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - } - - // String - if (y296) { - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - Store(LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.STR0), DDB1) - if (CH03(arg0, z176, 0x13a, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - if (LNotEqual(\DTM2.PLDT, \AUXD.STR0)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, \AUXD.STR0) - return (1) - } - Unload(DDB1) - if (CH03(arg0, z176, 0x13d, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\AUXD.STR0), Local0) - if (LNotEqual(c00a, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00a) - } - } - - // Buffer - if (y296) { - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - Store(LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.BUF0), DDB1) - if (CH03(arg0, z176, 0x140, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - if (LNotEqual(\DTM2.PLDT, \AUXD.BUF0)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, \AUXD.BUF0) - return (1) - } - Unload(DDB1) - if (CH03(arg0, z176, 0x143, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\AUXD.BUF0), Local0) - if (LNotEqual(c00b, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00b) - } - } - - // Package - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.PAC0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.PAC0), Local0) - if (LNotEqual(c00c, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00c) - } - - // Field Unit - if (y296) { - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - Store(LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.FLU0), DDB1) - if (CH03(arg0, z176, 0x148, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - if (LNotEqual(\DTM2.PLDT, \AUXD.FLU0)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, \AUXD.FLU0) - return (1) - } - Unload(DDB1) - if (CH03(arg0, z176, 0x14b, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\AUXD.FLU0), Local0) - if (LNotEqual(c00d, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00d) - } - } - - // Device - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.DEV0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.DEV0), Local0) - if (LNotEqual(c00e, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00e) - } - - // Event - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.EVE0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.EVE0), Local0) - if (LNotEqual(c00f, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c00f) - } - - // Method - if (y288) { - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.MMM0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.MMM0), Local0) - if (LNotEqual(c010, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c010) - } - } - - // Mutex - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.MTX0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.MTX0), Local0) - if (LNotEqual(c011, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c011) - } - - // OpRegion - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.OPR0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.OPR0), Local0) - if (LNotEqual(c012, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c012) - } - - // Power Resource - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.PWR0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.PWR0), Local0) - if (LNotEqual(c013, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c013) - } - - // Processor - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.CPU0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.CPU0), Local0) - if (LNotEqual(c014, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c014) - } - - // Thermal Zone - LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.TZN0) - CH04(arg0, 0, 47, z176, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - Store(ObjectType(\AUXD.TZN0), Local0) - if (LNotEqual(c015, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c015) - } - - // Buffer Field - if (y296) { - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - Store(LoadTable("OEM1", "", "", "\\", "\\DTM2.PLDT", \AUXD.BFL0), DDB1) - if (CH03(arg0, z176, 0x15e, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\DTM2.PLDT), Local0) - if (LNotEqual(c009, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c009) - return (1) - } - if (LNotEqual(\DTM2.PLDT, \AUXD.BFL0)) { - err(arg0, z176, __LINE__, 0, 0, \DTM2.PLDT, \AUXD.BFL0) - return (1) - } - Unload(DDB1) - if (CH03(arg0, z176, 0x161, __LINE__, 0)) { - return (1) - } - Store(ObjectType(\AUXD.BFL0), Local0) - if (LNotEqual(c016, Local0)) { - err(arg0, z176, __LINE__, 0, 0, Local0, c016) - } - } - - UnLoad(DDB0) - - CH03(arg0, z176, 0x163, __LINE__, 0) - - return (0) - } -} - -Method(TLT0,, Serialized) -{ - Name(ts, "TLT0") - - CH03(ts, z176, 0x200, __LINE__, 0) - - // Simple Loadtable test - SRMT("TLT0.tst0") - \DTM2.tst0(ts) - - CH03(ts, z176, 0x201, __LINE__, 0) - - // All comparisons of Loadtable parameters are case sensitive, - // if no table matches the specified parameters, then 0 is returned - SRMT("TLT0.tst1") - \DTM2.tst1(ts) - - CH03(ts, z176, 0x202, __LINE__, 0) - - // Any of the RootPathString, ParameterPathString, and ParameterData - // parameters in LoadTable expression can be omitted - SRMT("TLT0.tst2") - \DTM2.tst2(ts) - - CH03(ts, z176, 0x203, __LINE__, 0) - - // Different sources of the String parameters: Named Objects, LocalX, - // ArgX, elements of Packages, results of functions, any TermArg - SRMT("TLT0.tst3") - \DTM2.tst3(ts) - - CH03(ts, z176, 0x204, __LINE__, 0) - - // Different sources of the optional parameters (RootPathString, - // ParameterPathString, and ParameterData): Named Objects, LocalX, - // ArgX, elements of Packages, results of functions, any TermArg - SRMT("TLT0.tst4") - \DTM2.tst4(ts) - - CH03(ts, z176, 0x205, __LINE__, 0) - - // Namespace location to load the Definition Block is determined - // by the RootPathString parameter of Loadtable - SRMT("TLT0.tst5.0") - \DTM2.tst5(ts, "\\DTM2.DEVR") - - CH03(ts, z176, 0x206, __LINE__, 0) - - // The RootPathString value is evaluated using normal scoping rules, - // assuming that the scope of the LoadTable operator is the current - // scope - SRMT("TLT0.tst5.1") - \DTM2.tst5(ts, "^DEVR") - - CH03(ts, z176, 0x207, __LINE__, 0) - - // "\" is assumed to be Namespace location to load the Definition - // Block if RootPathString parameter is not specified - SRMT("TLT0.tst6") - \DTM2.tst6(ts) - - CH03(ts, z176, 0x208, __LINE__, 0) - - // If the first character of ParameterPathString is a backslash - // or caret character, then the path of the object set up on success - // is ParameterPathString. It is RootPathString.ParameterPathString - // in any case. - SRMT("TLT0.tst7") - \DTM2.tst7(ts) - - CH03(ts, z176, 0x209, __LINE__, 0) - - // Implicit operand conversion of the parameters specified to be strings - SRMT("TLT0.tste") - \DTM2.tste(ts) - - CH03(ts, z176, 0x20a, __LINE__, 0) - - // LoadTable returns 0 if some SSDT matching the LoadTable - // parameters is originally not listed in XSDT - //SRMT("TLT0.tstf") - //\DTM2.tstf(ts) - - CH03(ts, z176, 0x20b, __LINE__, 0) -} - -// Exceptional conditions -Method(TLT1,, Serialized) -{ - Name(ts, "TLT1") - - // Exceptions when the SignatureString is greater than four characters, - // the OEMIDString is greater than six characters, or the OEMTableID is - // greater than eight characters - SRMT("TLT1.tst8") - \DTM2.tst8(ts) - - // Exceptions when some DSDT or SSDT matching the LoadTable parameters - // is already loaded (actually on initial loading of tables listed in XSDT) - SRMT("TLT1.tst9") - \DTM2.tst9(ts) - - // Exceptions when the matched table is already loaded - SRMT("TLT1.tsta") - \DTM2.tsta(ts) - - // Exceptions when there already is an previously loaded Object - // referred by the path in the Namespace - SRMT("TLT1.tstb") - \DTM2.tstb(ts) - - // Exceptions when the object specified by the ParameterPathString - // does not exist - SRMT("TLT1.tstc") - \DTM2.tstc(ts) - - // Exceptions when storing of data of the ParameterData data type - // to the specified object is not allowed. - SRMT("TLT1.tstd") - \DTM2.tstd(ts) - - // AE_OWNER_ID_LIMIT exception when too many Tables loaded - SRMT("TLT1.tstg") - if (y294) { - \DTM2.tstg(ts) - } else { - BLCK() - } - - // Exceptions when the parameter of the Loadtable operator - // is of incorrect types - SRMT("TLT1.tsth") - \DTM2.tsth(ts) - - // Exceptions when the ParameterData parameter of the Loadtable operator - // can not be saved into the Object referred by ParameterPathString - SRMT("TLT1.tsti") - \DTM2.tsti(ts) -} diff --git a/tests/aslts/src/runtime/collections/functional/table/unload.asl b/tests/aslts/src/runtime/collections/functional/table/unload.asl index 0beee8af6..291fdbfb9 100644 --- a/tests/aslts/src/runtime/collections/functional/table/unload.asl +++ b/tests/aslts/src/runtime/collections/functional/table/unload.asl @@ -1,697 +1,820 @@ -/* - * Some or all of this work - Copyright (c) 2006 - 2017, 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: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. - */ - -/* - * UnLoad ASL operator functionality - */ - -/* - * This sub-test is intended to comprehensively verify - * the Unload ASL operator functionality. - * - * Performs a run-time unload of a Definition Block that was - * loaded using a Load (and LoadTable) term. - * - * The overall functionality of the Unload Objects is indirectly - * verified by other Table management tests as far as Unload is - * needed to perform cleanup and check effectiveness of Load and - * LoadTable operators. - * - * 17.5.126 Unload (Unload Definition Block) - * Syntax - * Unload (Handle) - * - * On testing the following issues should be covered (actually in the tests - * of loading except for the exceptional conditions ones): - * - * - successful execution of the Unload operator for the specified DDBHandle - * obtained through loading of a SSDT from a proper location, - * - * - successful execution of the Unload operator for the specified DDBHandle - * obtained through LoadTable operator, - * - * - the Handle parameter of the Unload can be specified as Named Object, - * LocalX, ArgX, Derefof (to Index or RefOf reference), and Method call, - * - * - all namespace objects created as a result of the corresponding Load - * operation are removed from the namespace, - * - * - unloading a number of different SSDTs, - * - * - Load/UnLoad processing can be done with the same table many times, - * - * - exceptional conditions caused by inappropriate data: - * = the parameter of the UnLoad operator is not of DDBHandle type, - * = execute UnLoad operator with the same DDBHandle repeatedly, - * = the operand of UnLoad operator is absent. - * - * Can not be tested following issues: - * - unloading a SSDT to be a synchronous operation ("the control methods - * defined in the Definition Block are not executed during load time") - */ - -Name(z175, 175) - -Device(DTM1) { - - // Different Sources to specify DDBHandle for UnLoad. - // Most of them (Named Object, LocalX, ArgX, Derefof) - // are checked in load.asl - - // DDBHandle returned by Method call - Method(tst0, 1, Serialized) - { - Name(HI0, 0) - - Method(m000) {Return (HI0)} - - Concatenate(arg0, "-tst0", arg0) - - Store(\DTM0.BUF0, \DTM0.RFU0) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\SSS0", 1) - return - } - - // Modify Revision field of SSDT - Store(Add(\DTM0.CREV, 1), \DTM0.CREV) - - // Recalculate and save CheckSum - Store(\DTM0.RFU0, Local0) - Store(Add(\DTM0.SUM, \DTM0.CHSM(Local0, SizeOf (Local0))), \DTM0.SUM) - - if (CH03(arg0, z175, 0x001, __LINE__, 0)) { - return - } - - Load(\DTM0.RFU0, HI0) - - if (CH03(arg0, z175, 0x002, __LINE__, 0)) { - return - } - - Store("Table Loaded", Debug) - - Store(ObjectType(HI0), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z175, __LINE__, 0, 0, Local1, c017) - } - - // Check the new Object appears - - if (CondRefof(\SSS0, Local0)) { - } else { - err(arg0, z175, __LINE__, 0, 0, "\\SSS0", 0) - } - - Store(ObjectType(Local0), Local1) - if (LNotEqual(Local1, c010)) { // Method - err(arg0, z175, __LINE__, 0, 0, Local1, c010) - } else { - Store(\SSS0(), Local0) - if (CH03(arg0, z175, 0x006, __LINE__, 1)) { - return - } - if (LNotEqual("\\SSS0", Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, "\\SSS0") - } - } - - // UnLoad operator execution - UnLoad(m000()) - - if (CH03(arg0, z175, 0x008, __LINE__, 0)) { - return - } - - Store("Table Unloaded", Debug) - - if (CondRefof(\SSS0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\SSS0", 1) - } - return - } - - // All namespace objects created as a result of the corresponding - // Load operation are absent in the namespace after UnLoad - Method(tst1, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - - Method(m000, 4) - { - Concatenate(arg0, "-m000.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - return (0) - } - - Method(m001, 1) - { - Concatenate(arg0, "-m001", arg0) - - // Integer - if (CondRefof(\AUXD.INT0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.INT0", 1) - return (1) - } - - // String - if (CondRefof(\AUXD.STR0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.STR0", 1) - return (1) - } - - // Buffer - if (CondRefof(\AUXD.BUF0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.BUF0", 1) - return (1) - } - - // Package - if (CondRefof(\AUXD.PAC0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.PAC0", 1) - return (1) - } - - // Field Unit - if (CondRefof(\AUXD.FLU0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.FLU0", 1) - return (1) - } - - // Device - if (CondRefof(\AUXD.DEV0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.DEV0", 1) - return (1) - } - - // Event - if (CondRefof(\AUXD.EVE0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.EVE0", 1) - return (1) - } - - // Method - if (CondRefof(\AUXD.MMM0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.MMM0", 1) - return (1) - } - - // Mutex - if (CondRefof(\AUXD.MTX0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.MTX0", 1) - return (1) - } - - // OpRegion - if (CondRefof(\AUXD.OPR0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.OPR0", 1) - return (1) - } - - // Power Resource - if (CondRefof(\AUXD.PWR0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.PWR0", 1) - return (1) - } - - // Processor - if (CondRefof(\AUXD.CPU0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.CPU0", 1) - return (1) - } - - // Thermal Zone - if (CondRefof(\AUXD.TZN0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.TZN0", 1) - return (1) - } - - // Buffer Field - if (CondRefof(\AUXD.BFL0, Local0)) { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.BFL0", 1) - return (1) - } - - return (0) - } - - Concatenate(arg0, "-tst1", arg0) - - // Check absence of the auxiliary table Objects before Load - if (m001(Concatenate(arg0, ".before"))) { - return (1) - } - - // Load auxiliary table - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB0) - - if (CH03(arg0, z175, 0x01f, __LINE__, 0)) { - return (1) - } - - // Integer - if (CondRefof(\AUXD.INT0, Local0)) { - m000(arg0, "int", Local0, c009) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.INT0", 0) - } - - // String - if (CondRefof(\AUXD.STR0, Local0)) { - m000(arg0, "str", Local0, c00a) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.STR0", 0) - } - - // Buffer - if (CondRefof(\AUXD.BUF0, Local0)) { - m000(arg0, "buf", Local0, c00b) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.BUF0", 0) - } - - // Package - if (y286) { - if (CondRefof(\AUXD.PAC0, Local0)) { - m000(arg0, "pac", Local0, c00c) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.PAC0", 0) - } - } - - // Field Unit - if (CondRefof(\AUXD.FLU0, Local0)) { - m000(arg0, "flu", Local0, c00d) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.FLU0", 0) - } - - // Device - if (CondRefof(\AUXD.DEV0, Local0)) { - m000(arg0, "dev", Local0, c00e) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.DEV0", 0) - } - - // Event - if (CondRefof(\AUXD.EVE0, Local0)) { - m000(arg0, "evt", Local0, c00f) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.EVE0", 0) - } - - // Method - if (CondRefof(\AUXD.MMM0, Local0)) { - m000(arg0, "met", Local0, c010) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.MMM0", 0) - } - - // Mutex - if (CondRefof(\AUXD.MTX0, Local0)) { - m000(arg0, "mtx", Local0, c011) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.MTX0", 0) - } - - // OpRegion - if (CondRefof(\AUXD.OPR0, Local0)) { - m000(arg0, "opr", Local0, c012) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.OPR0", 0) - } - - // Power Resource - if (CondRefof(\AUXD.PWR0, Local0)) { - m000(arg0, "pwr", Local0, c013) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.PWR0", 0) - } - - // Processor - if (CondRefof(\AUXD.CPU0, Local0)) { - m000(arg0, "cpu", Local0, c014) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.CPU0", 0) - } - - // Thermal Zone - if (CondRefof(\AUXD.TZN0, Local0)) { - m000(arg0, "cpu", Local0, c015) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.TZN0", 0) - } - - // Buffer Field - if (CondRefof(\AUXD.BFL0, Local0)) { - m000(arg0, "bfl", Local0, c016) - } else { - err(arg0, z175, __LINE__, 0, 0, "\\AUXD.BFL0", 0) - } - - UnLoad(DDB0) - - CH03(arg0, z175, 0x02f, __LINE__, 0) - - // Check absence of the auxiliary table Objects after UnLoad - if (m001(Concatenate(arg0, ".after"))) { - return (1) - } - - return (0) - } - - // Load/UnLoad processing can be done with the same table many times - Method(tst2, 1) - { - Concatenate(arg0, "tst2.", arg0) - - Store(5, Local0) - - while (Local0) { - if (tst1(Concatenate(arg0, Mid("0123456789", Local0, 1)))) { - return (1) - } - Decrement(Local0) - } - - return (0) - } - - // Exceptions when the parameter of the UnLoad operator - // is not of DDBHandle type - Method(tst3, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - - Method(m000, 4) - { - Concatenate(arg0, "-m000.", arg0) - Concatenate(arg0, arg1, arg0) - - Store(ObjectType(arg2), Local0) - if (LNotEqual(arg3, Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, arg3) - return (1) - } - - UnLoad(Derefof(arg2)) - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - - return (0) - } - - Concatenate(arg0, "-tst3", arg0) - - // Load auxiliary table - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB0) - - if (CH03(arg0, z175, 0x033, __LINE__, 0)) { - return (1) - } - - // Uninitialized - if (0) { - Store(0, Local1) - } - Store(ObjectType(Local1), Local0) - if (LNotEqual(c008, Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, c008) - } else { - UnLoad(Local1) - if (SLCK) { - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } else { - CH04(arg0, 0, 49, z175, __LINE__, 0, 0) // AE_AML_UNINITIALIZED_LOCAL - } - } - - // Integer - m000(arg0, "int", Refof(\AUXD.INT0), c009) - - // String - m000(arg0, "str", Refof(\AUXD.STR0), c00a) - - // Buffer - m000(arg0, "buf", Refof(\AUXD.BUF0), c00b) - - // Package - - if (y286) { - m000(arg0, "pac", Refof(\AUXD.PAC0), c00c) - } - - Store(ObjectType(\AUXD.PAC0), Local0) - if (LNotEqual(c00c, Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, c00c) - } else { - UnLoad(\AUXD.PAC0) - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } + /* + * Some or all of this work - Copyright (c) 2006 - 2017, 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: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + /* + * UnLoad ASL operator functionality + */ + /* + * This sub-test is intended to comprehensively verify + * the Unload ASL operator functionality. + * + * Performs a run-time unload of a Definition Block that was + * loaded using a Load (and LoadTable) term. + * + * The overall functionality of the Unload Objects is indirectly + * verified by other Table management tests as far as Unload is + * needed to perform cleanup and check effectiveness of Load and + * LoadTable operators. + * + * 17.5.126 Unload (Unload Definition Block) + * Syntax + * Unload (Handle) + * + * On testing the following issues should be covered (actually in the tests + * of loading except for the exceptional conditions ones): + * + * - successful execution of the Unload operator for the specified DDBHandle + * obtained through loading of a SSDT from a proper location, + * + * - successful execution of the Unload operator for the specified DDBHandle + * obtained through LoadTable operator, + * + * - the Handle parameter of the Unload can be specified as Named Object, + * LocalX, ArgX, Derefof (to Index or RefOf reference), and Method call, + * + * - all namespace objects created as a result of the corresponding Load + * operation are removed from the namespace, + * + * - unloading a number of different SSDTs, + * + * - Load/UnLoad processing can be done with the same table many times, + * + * - exceptional conditions caused by inappropriate data: + * = the parameter of the UnLoad operator is not of DDBHandle type, + * = execute UnLoad operator with the same DDBHandle repeatedly, + * = the operand of UnLoad operator is absent. + * + * Can not be tested following issues: + * - unloading a SSDT to be a synchronous operation ("the control methods + * defined in the Definition Block are not executed during load time") + */ + Name (Z175, 0xAF) + Device (DTM1) + { + /* Different Sources to specify DDBHandle for UnLoad. */ + /* Most of them (Named Object, LocalX, ArgX, Derefof) */ + /* are checked in load.asl */ + /* DDBHandle returned by Method call */ + Method (TST0, 1, Serialized) + { + Name (HI0, 0x00) + Method (M000, 0, NotSerialized) + { + Return (HI0) /* \DTM1.TST0.HI0_ */ + } + + Concatenate (Arg0, "-tst0", Arg0) + \DTM0.RFU0 = \DTM0.BUF0 + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z175, 0x62, 0x00, 0x00, "\\SSS0", 0x01) + Return (Zero) + } + + /* Modify Revision field of SSDT */ + + Store ((\DTM0.CREV + 0x01), \DTM0.CREV) + /* Recalculate and save CheckSum */ + + Local0 = \DTM0.RFU0 + Store ((\DTM0.SUM + \DTM0.CHSM (Local0, SizeOf (Local0))), \DTM0.SUM) + If (CH03 (Arg0, Z175, 0x01, 0x6D, 0x00)) + { + Return (Zero) + } + + Load (\DTM0.RFU0, HI0) /* \DTM1.TST0.HI0_ */ + If (CH03 (Arg0, Z175, 0x02, 0x73, 0x00)) + { + Return (Zero) + } + + Debug = "Table Loaded" + Local1 = ObjectType (HI0) + If ((Local1 != C017)) + { + /* DDB Handle */ + + ERR (Arg0, Z175, 0x7B, 0x00, 0x00, Local1, C017) + } + + /* Check the new Object appears */ + + If (CondRefOf (\SSS0, Local0)){} + Else + { + ERR (Arg0, Z175, 0x82, 0x00, 0x00, "\\SSS0", 0x00) + } + + Local1 = ObjectType (Local0) + If ((Local1 != C010)) + { + /* Method */ + + ERR (Arg0, Z175, 0x87, 0x00, 0x00, Local1, C010) + } + Else + { + Local0 = \SSS0 () + If (CH03 (Arg0, Z175, 0x06, 0x8A, 0x01)) + { + Return (Zero) + } + + If (("\\SSS0" != Local0)) + { + ERR (Arg0, Z175, 0x8E, 0x00, 0x00, Local0, "\\SSS0") + } + } + + /* UnLoad operator execution */ + + Unload (M000 ()) + If (CH03 (Arg0, Z175, 0x08, 0x95, 0x00)) + { + Return (Zero) + } + + Debug = "Table Unloaded" + If (CondRefOf (\SSS0, Local0)) + { + ERR (Arg0, Z175, 0x9C, 0x00, 0x00, "\\SSS0", 0x01) + } + + Return (Zero) + } + + /* All namespace objects created as a result of the corresponding */ + /* Load operation are absent in the namespace after UnLoad */ + Method (TST1, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Method (M000, 4, NotSerialized) + { + Concatenate (Arg0, "-m000.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z175, 0xAF, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + Return (0x00) + } + + Method (M001, 1, NotSerialized) + { + Concatenate (Arg0, "-m001", Arg0) + /* Integer */ + + If (CondRefOf (\AUXD.INT0, Local0)) + { + ERR (Arg0, Z175, 0xBC, 0x00, 0x00, "\\AUXD.INT0", 0x01) + Return (0x01) + } + + /* String */ + + If (CondRefOf (\AUXD.STR0, Local0)) + { + ERR (Arg0, Z175, 0xC2, 0x00, 0x00, "\\AUXD.STR0", 0x01) + Return (0x01) + } + + /* Buffer */ + + If (CondRefOf (\AUXD.BUF0, Local0)) + { + ERR (Arg0, Z175, 0xC8, 0x00, 0x00, "\\AUXD.BUF0", 0x01) + Return (0x01) + } + + /* Package */ + + If (CondRefOf (\AUXD.PAC0, Local0)) + { + ERR (Arg0, Z175, 0xCE, 0x00, 0x00, "\\AUXD.PAC0", 0x01) + Return (0x01) + } + + /* Field Unit */ + + If (CondRefOf (\AUXD.FLU0, Local0)) + { + ERR (Arg0, Z175, 0xD4, 0x00, 0x00, "\\AUXD.FLU0", 0x01) + Return (0x01) + } + + /* Device */ + + If (CondRefOf (\AUXD.DEV0, Local0)) + { + ERR (Arg0, Z175, 0xDA, 0x00, 0x00, "\\AUXD.DEV0", 0x01) + Return (0x01) + } + + /* Event */ + + If (CondRefOf (\AUXD.EVE0, Local0)) + { + ERR (Arg0, Z175, 0xE0, 0x00, 0x00, "\\AUXD.EVE0", 0x01) + Return (0x01) + } + + /* Method */ + + If (CondRefOf (\AUXD.MMM0, Local0)) + { + ERR (Arg0, Z175, 0xE6, 0x00, 0x00, "\\AUXD.MMM0", 0x01) + Return (0x01) + } + + /* Mutex */ + + If (CondRefOf (\AUXD.MTX0, Local0)) + { + ERR (Arg0, Z175, 0xEC, 0x00, 0x00, "\\AUXD.MTX0", 0x01) + Return (0x01) + } + + /* OpRegion */ + + If (CondRefOf (\AUXD.OPR0, Local0)) + { + ERR (Arg0, Z175, 0xF2, 0x00, 0x00, "\\AUXD.OPR0", 0x01) + Return (0x01) + } + + /* Power Resource */ + + If (CondRefOf (\AUXD.PWR0, Local0)) + { + ERR (Arg0, Z175, 0xF8, 0x00, 0x00, "\\AUXD.PWR0", 0x01) + Return (0x01) + } + + /* Processor */ + + If (CondRefOf (\AUXD.CPU0, Local0)) + { + ERR (Arg0, Z175, 0xFE, 0x00, 0x00, "\\AUXD.CPU0", 0x01) + Return (0x01) + } + + /* Thermal Zone */ + + If (CondRefOf (\AUXD.TZN0, Local0)) + { + ERR (Arg0, Z175, 0x0104, 0x00, 0x00, "\\AUXD.TZN0", 0x01) + Return (0x01) + } + + /* Buffer Field */ + + If (CondRefOf (\AUXD.BFL0, Local0)) + { + ERR (Arg0, Z175, 0x010A, 0x00, 0x00, "\\AUXD.BFL0", 0x01) + Return (0x01) + } + + Return (0x00) + } + + Concatenate (Arg0, "-tst1", Arg0) + /* Check absence of the auxiliary table Objects before Load */ + + If (M001 (Concatenate (Arg0, ".before"))) + { + Return (0x01) + } + + /* Load auxiliary table */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB0) /* \DTM1.TST1.DDB0 */ + If (CH03 (Arg0, Z175, 0x1F, 0x011C, 0x00)) + { + Return (0x01) + } + + /* Integer */ + + If (CondRefOf (\AUXD.INT0, Local0)) + { + M000 (Arg0, "int", Local0, C009) + } + Else + { + ERR (Arg0, Z175, 0x0124, 0x00, 0x00, "\\AUXD.INT0", 0x00) + } + + /* String */ + + If (CondRefOf (\AUXD.STR0, Local0)) + { + M000 (Arg0, "str", Local0, C00A) + } + Else + { + ERR (Arg0, Z175, 0x012B, 0x00, 0x00, "\\AUXD.STR0", 0x00) + } + + /* Buffer */ + + If (CondRefOf (\AUXD.BUF0, Local0)) + { + M000 (Arg0, "buf", Local0, C00B) + } + Else + { + ERR (Arg0, Z175, 0x0132, 0x00, 0x00, "\\AUXD.BUF0", 0x00) + } + + /* Package */ + + If (Y286) + { + If (CondRefOf (\AUXD.PAC0, Local0)) + { + M000 (Arg0, "pac", Local0, C00C) + } + Else + { + ERR (Arg0, Z175, 0x013A, 0x00, 0x00, "\\AUXD.PAC0", 0x00) + } + } + + /* Field Unit */ + + If (CondRefOf (\AUXD.FLU0, Local0)) + { + M000 (Arg0, "flu", Local0, C00D) + } + Else + { + ERR (Arg0, Z175, 0x0142, 0x00, 0x00, "\\AUXD.FLU0", 0x00) + } + + /* Device */ + + If (CondRefOf (\AUXD.DEV0, Local0)) + { + M000 (Arg0, "dev", Local0, C00E) + } + Else + { + ERR (Arg0, Z175, 0x0149, 0x00, 0x00, "\\AUXD.DEV0", 0x00) + } + + /* Event */ + + If (CondRefOf (\AUXD.EVE0, Local0)) + { + M000 (Arg0, "evt", Local0, C00F) + } + Else + { + ERR (Arg0, Z175, 0x0150, 0x00, 0x00, "\\AUXD.EVE0", 0x00) + } + + /* Method */ + + If (CondRefOf (\AUXD.MMM0, Local0)) + { + M000 (Arg0, "met", Local0, C010) + } + Else + { + ERR (Arg0, Z175, 0x0157, 0x00, 0x00, "\\AUXD.MMM0", 0x00) + } + + /* Mutex */ + + If (CondRefOf (\AUXD.MTX0, Local0)) + { + M000 (Arg0, "mtx", Local0, C011) + } + Else + { + ERR (Arg0, Z175, 0x015E, 0x00, 0x00, "\\AUXD.MTX0", 0x00) + } + + /* OpRegion */ + + If (CondRefOf (\AUXD.OPR0, Local0)) + { + M000 (Arg0, "opr", Local0, C012) + } + Else + { + ERR (Arg0, Z175, 0x0165, 0x00, 0x00, "\\AUXD.OPR0", 0x00) + } + + /* Power Resource */ + + If (CondRefOf (\AUXD.PWR0, Local0)) + { + M000 (Arg0, "pwr", Local0, C013) + } + Else + { + ERR (Arg0, Z175, 0x016C, 0x00, 0x00, "\\AUXD.PWR0", 0x00) + } + + /* Processor */ + + If (CondRefOf (\AUXD.CPU0, Local0)) + { + M000 (Arg0, "cpu", Local0, C014) + } + Else + { + ERR (Arg0, Z175, 0x0173, 0x00, 0x00, "\\AUXD.CPU0", 0x00) + } + + /* Thermal Zone */ + + If (CondRefOf (\AUXD.TZN0, Local0)) + { + M000 (Arg0, "cpu", Local0, C015) + } + Else + { + ERR (Arg0, Z175, 0x017A, 0x00, 0x00, "\\AUXD.TZN0", 0x00) + } + + /* Buffer Field */ + + If (CondRefOf (\AUXD.BFL0, Local0)) + { + M000 (Arg0, "bfl", Local0, C016) + } + Else + { + ERR (Arg0, Z175, 0x0181, 0x00, 0x00, "\\AUXD.BFL0", 0x00) + } + + Unload (DDB0) + CH03 (Arg0, Z175, 0x2F, 0x0186, 0x00) + /* Check absence of the auxiliary table Objects after UnLoad */ + + If (M001 (Concatenate (Arg0, ".after"))) + { + Return (0x01) + } + + Return (0x00) + } + + /* Load/UnLoad processing can be done with the same table many times */ + + Method (TST2, 1, NotSerialized) + { + Concatenate (Arg0, "tst2.", Arg0) + Local0 = 0x05 + While (Local0) + { + If (TST1 (Concatenate (Arg0, Mid ("0123456789", Local0, 0x01)))) + { + Return (0x01) + } + + Local0-- + } + + Return (0x00) + } + + /* Exceptions when the parameter of the UnLoad operator */ + /* is not of DDBHandle type */ + Method (TST3, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Method (M000, 4, NotSerialized) + { + Concatenate (Arg0, "-m000.", Arg0) + Concatenate (Arg0, Arg1, Arg0) + Local0 = ObjectType (Arg2) + If ((Arg3 != Local0)) + { + ERR (Arg0, Z175, 0x01AF, 0x00, 0x00, Local0, Arg3) + Return (0x01) + } + + Unload (DerefOf (Arg2)) + CH04 (Arg0, 0x00, 0x2F, Z175, 0x01B4, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + Return (0x00) + } + + Concatenate (Arg0, "-tst3", Arg0) + /* Load auxiliary table */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB0) /* \DTM1.TST3.DDB0 */ + If (CH03 (Arg0, Z175, 0x33, 0x01BF, 0x00)) + { + Return (0x01) + } + + /* Uninitialized */ + + If (0x00) + { + Local1 = 0x00 + } + + Local0 = ObjectType (Local1) + If ((C008 != Local0)) + { + ERR (Arg0, Z175, 0x01C9, 0x00, 0x00, Local0, C008) + } + Else + { + Unload (Local1) + If (SLCK) + { + CH04 (Arg0, 0x00, 0x2F, Z175, 0x01CD, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + Else + { + CH04 (Arg0, 0x00, 0x31, Z175, 0x01CF, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */ + } + } + + /* Integer */ + + M000 (Arg0, "int", RefOf (\AUXD.INT0), C009) + /* String */ + + M000 (Arg0, "str", RefOf (\AUXD.STR0), C00A) + /* Buffer */ + + M000 (Arg0, "buf", RefOf (\AUXD.BUF0), C00B) + /* Package */ + + If (Y286) + { + M000 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) + } + + Local0 = ObjectType (\AUXD.PAC0) + If ((C00C != Local0)) + { + ERR (Arg0, Z175, 0x01E4, 0x00, 0x00, Local0, C00C) + } + Else + { + Unload (\AUXD.PAC0) + CH04 (Arg0, 0x00, 0x2F, Z175, 0x01E7, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + + /* Field Unit */ + + M000 (Arg0, "flu", RefOf (\AUXD.FLU0), C00D) + /* Device */ + + Local0 = ObjectType (\AUXD.DEV0) + If ((C00E != Local0)) + { + ERR (Arg0, Z175, 0x01F0, 0x00, 0x00, Local0, C00E) + } + Else + { + Unload (\AUXD.DEV0) + CH04 (Arg0, 0x00, 0x2F, Z175, 0x01F3, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + + /* Event */ + + M000 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) + /* Method */ + + M000 (Arg0, "met", RefOf (\AUXD.MMM0), C010) + /* Mutex */ + + M000 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) + /* OpRegion */ + + M000 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) + /* Power Resource */ + + M000 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) + /* Processor */ + + M000 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) + /* Thermal Zone */ + + Local0 = ObjectType (\AUXD.TZN0) + If ((C015 != Local0)) + { + ERR (Arg0, Z175, 0x020B, 0x00, 0x00, Local0, C015) + } + Else + { + Unload (\AUXD.TZN0) + CH04 (Arg0, 0x00, 0x2F, Z175, 0x020E, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + + /* Buffer Field */ + + M000 (Arg0, "bfl", RefOf (\AUXD.BFL0), C016) + Unload (DDB0) + CH03 (Arg0, Z175, 0x3C, 0x0216, 0x00) + Return (0x00) + } + + /* Exceptions when UnLoad is executed with the same DDBHandle repeatedly */ + + Method (TST4, 1, Serialized) + { + Name (DDB0, 0x00) + Name (DDB1, 0x00) + Concatenate (Arg0, "-tst4", Arg0) + /* Load auxiliary table */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB0) /* \DTM1.TST4.DDB0 */ + If (CH03 (Arg0, Z175, 0x3D, 0x0227, 0x00)) + { + Return (0x01) + } + + /* First Unload */ + + Unload (DDB0) + If (CH03 (Arg0, Z175, 0x3E, 0x022E, 0x00)) + { + Return (0x01) + } + + Local0 = 0x05 + While (Local0) + { + /* Any next */ + + Unload (DDB0) + CH04 (Arg0, 0x00, 0x1C, Z175, 0x0238, 0x05, Local0) /* AE_BAD_PARAMETER */ + Local0-- + } + + /* Second DDBHandle */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB1) /* \DTM1.TST4.DDB1 */ + If (CH03 (Arg0, Z175, 0x40, 0x0241, 0x00)) + { + Return (0x01) + } + + Local0 = 0x05 + While (Local0) + { + /* Any next */ + + Unload (DDB0) + CH04 (Arg0, 0x00, 0x1C, Z175, 0x024B, 0x05, Local0) /* AE_BAD_PARAMETER */ + Local0-- + } + + Unload (DDB1) + If (CH03 (Arg0, Z175, 0x42, 0x0252, 0x00)) + { + Return (0x01) + } + + Return (0x00) + } + + /* Exceptions when the operand of UnLoad operator is absent */ + + Method (TST5, 1, Serialized) + { + Name (DDB0, 0x00) + Method (M000, 0, NotSerialized) + { + Return (0x00) + } + + Method (M001, 0, NotSerialized) + { + Return (DDB0) /* \DTM1.TST5.DDB0 */ + } + + Concatenate (Arg0, "-tst5", Arg0) + /* Load auxiliary table */ + + \DTM0.RFU3 = \DTM0.BUF3 + Load (\DTM0.RFU3, DDB0) /* \DTM1.TST5.DDB0 */ + If (CH03 (Arg0, Z175, 0x43, 0x0267, 0x00)) + { + Return (0x01) + } + + /* Device */ + + Unload (DerefOf (RefOf (\AUXD.DEV0))) + CH04 (Arg0, 0x00, 0x3E, Z175, 0x026D, 0x00, 0x00) /* AE_AML_NO_RETURN_VALUE */ + /* Thermal Zone */ + + Unload (DerefOf (RefOf (\AUXD.TZN0))) + CH04 (Arg0, 0x00, 0x3E, Z175, 0x0271, 0x00, 0x00) /* AE_AML_NO_RETURN_VALUE */ + /* Method execution */ + + CopyObject (M000 (), M001) /* \DTM1.TST5.M001 */ + Unload (M001 ()) + If (SLCK) + { + CH04 (Arg0, 0x00, 0x2F, Z175, 0x0278, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + Else + { + CH04 (Arg0, 0x00, 0x2F, Z175, 0x027A, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ + } + + Unload (DDB0) + If (CH03 (Arg0, Z175, 0x48, 0x027F, 0x00)) + { + Return (0x01) + } + + Return (0x00) + } + } + + Method (TUL0, 0, Serialized) + { + Name (TS, "TUL0") + CH03 (TS, Z175, 0x0200, 0x028B, 0x00) + /* Different Sources to specify DDBHandle for UnLoad. */ + /* Most of them (Named Object, LocalX, ArgX, Derefof) */ + /* are checked in load.asl */ + /* DDBHandle returned by Method call */ + SRMT ("TUL0.tst0") + \DTM1.TST0 (TS) + CH03 (TS, Z175, 0x0201, 0x0294, 0x00) + /* All namespace objects created as a result of the corresponding */ + /* Load operation are absent in the namespace after UnLoad */ + SRMT ("TUL0.tst1") + \DTM1.TST1 (TS) + CH03 (TS, Z175, 0x0202, 0x029B, 0x00) + /* Load/UnLoad processing can be done with the same table many times */ + + SRMT ("TUL0.tst2") + \DTM1.TST2 (TS) + CH03 (TS, Z175, 0x0203, 0x02A1, 0x00) + } + + /* Exceptional conditions */ + + Method (TUL1, 0, Serialized) + { + Name (TS, "TUL1") + /* Exceptions when the parameter of the UnLoad operator */ + /* is not of DDBHandle type */ + SRMT ("TUL1.tst3") + \DTM1.TST3 (TS) + /* Exceptions when UnLoad is executed with the same DDBHandle repeatedly */ + + SRMT ("TUL1.tst4") + If (Y292) + { + \DTM1.TST4 (TS) + } + Else + { + BLCK () + } + + /* Exceptions when the operand of UnLoad operator is absent */ + + SRMT ("TUL1.tst5") + \DTM1.TST5 (TS) + } - // Field Unit - m000(arg0, "flu", Refof(\AUXD.FLU0), c00d) - - // Device - Store(ObjectType(\AUXD.DEV0), Local0) - if (LNotEqual(c00e, Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, c00e) - } else { - UnLoad(\AUXD.DEV0) - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } - - // Event - m000(arg0, "evt", Refof(\AUXD.EVE0), c00f) - - // Method - m000(arg0, "met", Refof(\AUXD.MMM0), c010) - - // Mutex - m000(arg0, "mtx", Refof(\AUXD.MTX0), c011) - - // OpRegion - m000(arg0, "opr", Refof(\AUXD.OPR0), c012) - - // Power Resource - m000(arg0, "pwr", Refof(\AUXD.PWR0), c013) - - // Processor - m000(arg0, "cpu", Refof(\AUXD.CPU0), c014) - - // Thermal Zone - Store(ObjectType(\AUXD.TZN0), Local0) - if (LNotEqual(c015, Local0)) { - err(arg0, z175, __LINE__, 0, 0, Local0, c015) - } else { - UnLoad(\AUXD.TZN0) - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } - - // Buffer Field - m000(arg0, "bfl", Refof(\AUXD.BFL0), c016) - - UnLoad(DDB0) - - CH03(arg0, z175, 0x03c, __LINE__, 0) - - return (0) - } - - // Exceptions when UnLoad is executed with the same DDBHandle repeatedly - Method(tst4, 1, Serialized) - { - Name(DDB0, 0) - Name(DDB1, 0) - - Concatenate(arg0, "-tst4", arg0) - - // Load auxiliary table - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB0) - - if (CH03(arg0, z175, 0x03d, __LINE__, 0)) { - return (1) - } - - // First Unload - UnLoad(DDB0) - - if (CH03(arg0, z175, 0x03e, __LINE__, 0)) { - return (1) - } - - Store(5, Local0) - while (Local0) { - - // Any next - UnLoad(DDB0) - - CH04(arg0, 0, 28, z175, __LINE__, 5, Local0) // AE_BAD_PARAMETER - - Decrement(Local0) - } - - // Second DDBHandle - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB1) - - if (CH03(arg0, z175, 0x040, __LINE__, 0)) { - return (1) - } - - Store(5, Local0) - while (Local0) { - - // Any next - UnLoad(DDB0) - - CH04(arg0, 0, 28, z175, __LINE__, 5, Local0) // AE_BAD_PARAMETER - - Decrement(Local0) - } - - UnLoad(DDB1) - - if (CH03(arg0, z175, 0x042, __LINE__, 0)) { - return (1) - } - - return (0) - } - - // Exceptions when the operand of UnLoad operator is absent - Method(tst5, 1, Serialized) - { - Name(DDB0, 0) - - Method(m000) {Return (0) } - Method(m001) {Return (DDB0)} - - Concatenate(arg0, "-tst5", arg0) - - // Load auxiliary table - Store(\DTM0.BUF3, \DTM0.RFU3) - Load(\DTM0.RFU3, DDB0) - - if (CH03(arg0, z175, 0x043, __LINE__, 0)) { - return (1) - } - - // Device - UnLoad(Derefof(Refof(\AUXD.DEV0))) - CH04(arg0, 0, 62, z175, __LINE__, 0, 0) // AE_AML_NO_RETURN_VALUE - - // Thermal Zone - UnLoad(Derefof(Refof(\AUXD.TZN0))) - CH04(arg0, 0, 62, z175, __LINE__, 0, 0) // AE_AML_NO_RETURN_VALUE - - // Method execution - CopyObject(m000, m001) - UnLoad(m001()) - - if (SLCK) { - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } else { - CH04(arg0, 0, 47, z175, __LINE__, 0, 0) // AE_AML_OPERAND_TYPE - } - - UnLoad(DDB0) - - if (CH03(arg0, z175, 0x048, __LINE__, 0)) { - return (1) - } - - return (0) - } -} - -Method(TUL0,, Serialized) -{ - Name(ts, "TUL0") - - CH03(ts, z175, 0x200, __LINE__, 0) - - // Different Sources to specify DDBHandle for UnLoad. - // Most of them (Named Object, LocalX, ArgX, Derefof) - // are checked in load.asl - // DDBHandle returned by Method call - SRMT("TUL0.tst0") - \DTM1.tst0(ts) - - CH03(ts, z175, 0x201, __LINE__, 0) - - // All namespace objects created as a result of the corresponding - // Load operation are absent in the namespace after UnLoad - SRMT("TUL0.tst1") - \DTM1.tst1(ts) - - CH03(ts, z175, 0x202, __LINE__, 0) - - // Load/UnLoad processing can be done with the same table many times - SRMT("TUL0.tst2") - \DTM1.tst2(ts) - - CH03(ts, z175, 0x203, __LINE__, 0) -} - -// Exceptional conditions -Method(TUL1,, Serialized) -{ - Name(ts, "TUL1") - - // Exceptions when the parameter of the UnLoad operator - // is not of DDBHandle type - SRMT("TUL1.tst3") - \DTM1.tst3(ts) - - // Exceptions when UnLoad is executed with the same DDBHandle repeatedly - SRMT("TUL1.tst4") - if (y292) { - \DTM1.tst4(ts) - } else { - BLCK() - } - - // Exceptions when the operand of UnLoad operator is absent - SRMT("TUL1.tst5") - \DTM1.tst5(ts) -} |