summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-10-26 14:48:17 +0800
committerLv Zheng <lv.zheng@intel.com>2016-10-26 14:48:17 +0800
commite24b6af0f8dad5bfacd991a2dc6af5b77f36cc84 (patch)
treeb3411d254bbb9eec109c796b1e9ec507159c4326
parent2272cc45f5158ac8919cc0472259d13de954c690 (diff)
downloadacpica-e24b6af0f8dad5bfacd991a2dc6af5b77f36cc84.tar.gz
ASLTS: table: Add TLD0.tstk test
Add a test to see if a recursive "Load" - loading table2 via MLC during table1 loading - can be performed. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
-rw-r--r--tests/aslts/src/runtime/collections/functional/table/load.asl89
-rw-r--r--tests/aslts/src/runtime/collections/functional/table/ssdt5.asl55
2 files changed, 144 insertions, 0 deletions
diff --git a/tests/aslts/src/runtime/collections/functional/table/load.asl b/tests/aslts/src/runtime/collections/functional/table/load.asl
index ad4efffc0..26ab9e406 100644
--- a/tests/aslts/src/runtime/collections/functional/table/load.asl
+++ b/tests/aslts/src/runtime/collections/functional/table/load.asl
@@ -2032,6 +2032,89 @@ Device(DTM0) {
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, 0x0f0, 0, 0, "\\DDBX", 1)
+ return
+ }
+ if (CondRefof(\SSS0, Local0)) {
+ err(arg0, z174, 0x0f1, 0, 0, "\\SSS0", 1)
+ return
+ }
+
+ Store(BUF5, RFU5)
+ Load(RFU5, DDBH)
+ if (CH03(arg0, z174, 0x0f2, 0, 0)) {
+ return (1)
+ }
+
+ if (CondRefof(\DDBX, Local0)) {
+ } else {
+ err(arg0, z174, 0x0f3, 0, 0, "\\DDBX", 1)
+ return
+ }
+ if (CondRefof(\SSS0, Local0)) {
+ } else {
+ err(arg0, z174, 0x0f4, 0, 0, "\\SSS0", 1)
+ return
+ }
+
+ Unload(DDBX)
+ if (CH03(arg0, z174, 0x0f5, 0, 0)) {
+ return (1)
+ }
+
+ if (CondRefof(\SSS0, Local0)) {
+ err(arg0, z174, 0x0f6, 0, 0, "\\SSS0", 1)
+ return
+ }
+
+ UnLoad(DDBH)
+ if (CH03(arg0, z174, 0x0f7, 0, 0)) {
+ return (1)
+ }
+
+ if (CondRefof(\DDBX, Local0)) {
+ err(arg0, z174, 0x0f8, 0, 0, "\\DDBX", 1)
+ return
+ }
+ }
}
Method(TLD0,, Serialized)
@@ -2124,6 +2207,12 @@ Method(TLD0,, Serialized)
}
CH03(ts, z174, 0x20c, 0, 0)
+
+ // Recursive Load in module level
+ SRMT("TLD0.tstk")
+ \DTM0.tstk(ts)
+
+ CH03(ts, z174, 0x20d, 0, 0)
}
// Exceptional conditions
diff --git a/tests/aslts/src/runtime/collections/functional/table/ssdt5.asl b/tests/aslts/src/runtime/collections/functional/table/ssdt5.asl
new file mode 100644
index 000000000..faf3f16fc
--- /dev/null
+++ b/tests/aslts/src/runtime/collections/functional/table/ssdt5.asl
@@ -0,0 +1,55 @@
+/*
+ * Some or all of this work - Copyright (c) 2006 - 2016, 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.
+ */
+
+DefinitionBlock(
+ "ssdt5.aml", // Output filename
+ "SSDT", // Signature
+ 0x02, // DSDT Revision
+ "iASLTS", // OEMID
+ "LTBL0005", // TABLE ID
+ 0x00000001 // OEM Revision
+ ) {
+
+ Name(DDBX, 0)
+ // Originated from ssdt0.asl: iasl -tc ssdt0.asl
+ Name(BUFX, 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,
+ })
+ OperationRegion (ISTX, SystemMemory, 0, 0x34)
+ Field(ISTX, ByteAcc, NoLock, Preserve) {
+ RFUX, 0x1a0,
+ }
+ Store(BUFX, RFUX)
+ Load(RFUX, DDBX)
+}