diff --git a/tests/aslts/src/runtime/cntl/common.asl b/tests/aslts/src/runtime/cntl/common.asl index 506db8cf5..c4657eec3 100644 --- a/tests/aslts/src/runtime/cntl/common.asl +++ b/tests/aslts/src/runtime/cntl/common.asl @@ -190,9 +190,10 @@ Name(zFFF, 0x7FF) Name(F64, 0) /* - * Byte size of Integer + * Byte and character size of Integer */ Name(ISZ0, 0) +Name(ISZC, 0) /* * The tests execution trace. @@ -1325,10 +1326,12 @@ Method(STRT, 1) If (LLess (REV, 2)) { Store(0, F64) Store(4, ISZ0) + Store(8, ISZC) Store ("32-bit mode", Debug) } else { Store(1, F64) Store(8, ISZ0) + Store(16, ISZC) Store ("64-bit mode", Debug) } diff --git a/tests/aslts/src/runtime/cntl/ehandle.asl b/tests/aslts/src/runtime/cntl/ehandle.asl index f057d34be..a2d3bae7e 100644 --- a/tests/aslts/src/runtime/cntl/ehandle.asl +++ b/tests/aslts/src/runtime/cntl/ehandle.asl @@ -223,8 +223,8 @@ Method(CH02) /* * Check that the counter of current exceptions is zero. Set it to zero. - * arg0 - diagnistic message - * arg1 - absoulute index of file initiating the checking + * arg0 - diagnostic message + * arg1 - absolute index of file initiating the checking * arg2 - index of checking * arg3 - arg5 of err, "received value" * arg4 - arg6 of err, "expected value" @@ -248,6 +248,19 @@ Method(CH03, 5) return (Local7) } +// +// Convert 32/64 bit integer to 16-bit Hex value +// +Method(ST16, 1) +{ + Name (EBUF, Buffer(ISZC){}) /* 8 or 16 bytes, depending on 32/64 mode */ + Name (RBUF, Buffer(4){}) + + Store (ToHexString (Arg0), EBUF) + Mid (EBUF, Subtract(ISZC, 4), 4, RBUF) + Return (Concatenate ("0x", ToString (RBUF))) +} + /* * Check that exceptions are handled as expected, report errors * (if any) and set the current number of exceptions to zero. @@ -257,7 +270,7 @@ Method(CH03, 5) * - check the number of exceptions * - the last arisen exception matches one described by arguments * - * arg0 - diagnistic message + * arg0 - diagnostic message * arg1 - * zero means: * - check that only one exception has arisen (curent number is equal to 1) @@ -269,7 +282,7 @@ Method(CH03, 5) * 2: check that the last opcode is equal to that specified by arg2 * * arg2 - index of exception info in pf00 Package - * arg3 - absoulute index of file initiating the checking + * arg3 - absolute index of file initiating the checking * arg4 - index of checking * arg5 - arg5 of err, "received value" * arg6 - arg6 of err, "expected value" @@ -295,14 +308,14 @@ Method(CH04, 7) if (LEqual(EXC0, 0)) { Store (1, Local5) - Concatenate("No exception has arisen, expected one: ", Local4, Local0) - Concatenate(", opcode 0x", Local3, Local1) - Concatenate(Local0, Local1, Local0) + Concatenate("No exception - expected: ", Local4, Local0) + Concatenate(Local0, "-", Local0) + Concatenate(Local0, ST16(Local3), Local0) Store(Local0, Debug) } else { if (LAnd(LNot(arg1), LGreater(EXC0, 1))) { Store(1, Local5) - Concatenate("More than one exceptions have arisen: 0x", EXC0, Local0) + Concatenate("More than one exception: 0x", EXC0, Local0) Store(Local0, Debug) } else { if (LEqual(arg1, 1)) { @@ -317,20 +330,23 @@ Method(CH04, 7) if (LNotEqual(Local3, Local6)) { Store(1, Local5) - Concatenate("The exception: ", Local7, Local0) - Concatenate(", opcode 0x", Local6, Local1) - Concatenate(Local0, Local1, Local0) - Concatenate(" differs expected one: ", Local4, Local1) - Concatenate(Local0, Local1, Local0) - Concatenate(", opcode 0x", Local3, Local1) + Concatenate("Exception: ", Local7, Local0) + + Concatenate(Local0, "-", Local0) + Concatenate(Local0, ST16(Local6), Local0) + + Concatenate(" differs from expected: ", Local4, Local1) Concatenate(Local0, Local1, Local0) + + Concatenate(Local0, "-", Local0) + Concatenate(Local0, ST16(Local3), Local0) Store(Local0, Debug) } if (LNotEqual(Local4, Local7)) { Store(1, Local5) - Store("Unexpected name of exception:", Debug) - Store(Concatenate("expected: ", Local4), Debug) - Store(Concatenate("received: ", Local7), Debug) + Store("Unexpected exception:", Debug) + Store(Concatenate("Expected: ", Local4), Debug) + Store(Concatenate("Received: ", Local7), Debug) } } } @@ -439,9 +455,9 @@ Method(MTEX, 1) /* * The same as CH03, but to be used in multi-threading mode * - * arg0 - diagnistic message + * arg0 - diagnostic message * arg1 - ID of current thread - * arg2 - absoulute index of file initiating the checking + * arg2 - absolute index of file initiating the checking * arg3 - index of checking * arg4 - arg5 of err, "received value" * arg5 - arg6 of err, "expected value" @@ -479,7 +495,7 @@ Method(CH08, 6) * arg0 - non-zero means to treat "More than one exceptions" as error * arg1 - ID of current thread * arg2 - index of exception info in pf00 Package - * arg3 - absoulute index of file initiating the checking + * arg3 - absolute index of file initiating the checking * arg4 - index of checking * arg5 - RefOf to Integer to return 'current number of exceptions occur on this thread' * @@ -510,14 +526,14 @@ Method(CH09, 6) if (LEqual(Local7, 0)) { /* No exceptions */ Store (1, Local5) - Concatenate("No exception has arisen, expected one: ", Local4, Local0) + Concatenate("No exception has arisen, expected: ", Local4, Local0) Concatenate(", opcode 0x", Local3, Local1) Concatenate(Local0, Local1, Local0) MSG0(arg1, Local0) } else { if (LAnd(arg0, LGreater(Local7, 1))) { Store(1, Local5) - Concatenate("More than one exceptions have arisen: 0x", Local7, Local0) + Concatenate("More than one exception has arisen: 0x", Local7, Local0) MSG0(arg1, Local0) } else { @@ -526,8 +542,8 @@ Method(CH09, 6) if (LNotEqual(Local3, Local6)) { Store(1, Local5) Concatenate("The exception 0x", Local6, Local0) - Concatenate(Local0, " differs expected one 0x", Local1) - Concatenate(Local1, Local3, Local0) + Concatenate(Local0, " differs from expected ", Local1) + Concatenate(Local1, ST16 (Local3), Local0) MSG0(arg1, Local0) } } diff --git a/tests/aslts/src/runtime/cntl/runmode.asl b/tests/aslts/src/runtime/cntl/runmode.asl index 5877d8206..1b249f5b9 100644 --- a/tests/aslts/src/runtime/cntl/runmode.asl +++ b/tests/aslts/src/runtime/cntl/runmode.asl @@ -464,8 +464,9 @@ Name(run4, 0) * 25.12.2006 - 5, (1277 files, 382 folder, 15.3 MB, 2006 tests, 38(44) test cases, 278 bugs of ACPICA) * 01.03.2007 - 6, (1403 files, 415 folder, 17.0 MB, 2227 tests, 40(46) test cases, 305 bugs of ACPICA) * 21.03.2007 - 7, (1409 files, 417 folder, 17.1 MB, 2236 tests, 40(46) test cases, 307 bugs of ACPICA) + * December 2011: - 0x15 (ACPI 5.0) */ -Name(REL0, 0x20111027) +Name(REL0, 0x15) /* * Settings number, used to adjust the aslts tests for different releases of ACPICA diff --git a/tests/aslts/src/runtime/collections/functional/table/load.asl b/tests/aslts/src/runtime/collections/functional/table/load.asl index 875a8a952..5f604ed98 100644 --- a/tests/aslts/src/runtime/collections/functional/table/load.asl +++ b/tests/aslts/src/runtime/collections/functional/table/load.asl @@ -42,7 +42,7 @@ * * On testing the following issues should be covered: * - * - loading SSDT (or PSDT) from a SystemMemory OpRegion, + * - loading SSDT from a SystemMemory OpRegion, * * - loading SSDT from a Region Field in a OpRegion of any type, * @@ -69,7 +69,7 @@ * = 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 SSDT or PSDT one, + * = 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 @@ -302,8 +302,7 @@ Device(DTM0) { // Simple Load test auxiliary method // Arg1: DDBH, 0 - Local Named, 1 - Global Named, // 2 - LocalX, 3 - element of Package - // Arg2: Object, 0 - SSDT, 1 - PSDT, - Method(m000, 3) + Method(m000, 2) { Name(HI0, 0) Name(PHI0, Package(1){}) @@ -317,12 +316,6 @@ Device(DTM0) { return } - // Check PSDT case - if (Arg2) { - Concatenate(arg0, ".PSDT", arg0) - Store("PSDT", SIG) - } - // Modify Revision field of SSDT Store(Add(CREV, 1), CREV) @@ -335,7 +328,7 @@ Device(DTM0) { } // Load operator execution - switch (arg1) { + switch (ToInteger (arg1)) { case (0) {Load(RFU0, HI0)} case (1) {Load(RFU0, \DTM0.HI0)} case (2) {Load(RFU0, Local2)} @@ -355,7 +348,7 @@ Device(DTM0) { // Check DDBHandle ObjectType if (y260) { - switch (arg1) { + switch (ToInteger (arg1)) { case (0) {Store(ObjectType(HI0), Local1)} case (1) {Store(ObjectType(\DTM0.HI0), Local1)} case (2) {Store(ObjectType(Local2), Local1)} @@ -387,7 +380,7 @@ Device(DTM0) { } // UnLoad operator execution - switch (arg1) { + switch (ToInteger (arg1)) { case (0) {UnLoad(HI0)} case (1) {UnLoad(\DTM0.HI0)} case (2) {UnLoad(Local2)} @@ -404,7 +397,7 @@ Device(DTM0) { err(arg0, z174, 0x00a, 0, 0, "\\SSS0", 1) } - return (0) + return } // Simple Load test auxiliary method for ArgX, part1 @@ -489,7 +482,7 @@ Device(DTM0) { err(arg0, z174, 0x014, 0, 0, "\\SSS0", 1) } - return (0) + return } // Loading SSDT from a SystemMemory OpRegion, @@ -502,18 +495,10 @@ Device(DTM0) { Concatenate(arg0, "-tst0", arg0) // Local Named Integer - m000(arg0, 0, 0) + m000(arg0, 0) // Global Named Integer - m000(arg0, 1, 0) - - // PSDT case - - // Local Named Integer - m000(arg0, 0, 1) - - // Global Named Integer - m000(arg0, 1, 1) + m000(arg0, 1) } // DDBHandle storing into LocalX @@ -522,10 +507,7 @@ Device(DTM0) { Concatenate(arg0, "-tst1", arg0) // LocalX - m000(arg0, 2, 0) - - // PSDT case - m000(arg0, 2, 1) + m000(arg0, 2) } // DDBHandle storing into Package element @@ -536,10 +518,7 @@ Device(DTM0) { // Package element // Crash on copying the specific reference Object if (y261) { - m000(arg0, 3, 0) - - // PSDT case - m000(arg0, 3, 1) + m000(arg0, 3) } } @@ -650,7 +629,7 @@ Device(DTM0) { } // Load operator execution - switch (arg1) { + switch (ToInteger (arg1)) { case (0) {Load(RFU0, HI0)} case (1) {Load(RFU0, \DTM0.HI0)} case (2) {Load(RFU0, Local2)} @@ -670,7 +649,7 @@ Device(DTM0) { // Check DDBHandle ObjectType if (y260) { - switch (arg1) { + switch (ToInteger (arg1)) { case (0) {Store(ObjectType(HI0), Local1)} case (1) {Store(ObjectType(\DTM0.HI0), Local1)} case (2) {Store(ObjectType(Local2), Local1)} @@ -702,7 +681,7 @@ Device(DTM0) { } // UnLoad operator execution - switch (arg1) { + switch (ToInteger (arg1)) { case (0) {UnLoad(HI0)} case (1) {UnLoad(\DTM0.HI0)} case (2) {UnLoad(Local2)} @@ -719,7 +698,7 @@ Device(DTM0) { err(arg0, z174, 0x01f, 0, 0, "\\SSS0", 1) } - return (0) + return } // Auxiliary method for ArgX, part1 @@ -1502,7 +1481,7 @@ Device(DTM0) { } // Exceptions when the table contained in an OpRegion - // (Field) is not SSDT or PSDT one, + // (Field) is not an SSDT Method(tstd, 1) { Name(HI0, 0) @@ -1592,7 +1571,7 @@ Device(DTM0) { // Load operator execution, OpRegion case if (y290) { Load(IST0, HI0) - CH04(arg0, 0, 38, z174, 0x092, 0, 0) // AE_BAD_HEADER + CH04(arg0, 0, 42, z174, 0x092, 0, 0) // AE_INVALID_TABLE_LENGTH if (CondRefof(\SSS0, Local0)) { err(arg0, z174, 0x093, 0, 0, "\\SSS0", 1) @@ -1611,7 +1590,7 @@ Device(DTM0) { // Load operator execution, OpRegion Field case Load(RFU0, HI0) - CH04(arg0, 0, 38, z174, 0x096, 0, 0) // AE_BAD_HEADER + CH04(arg0, 0, 42, z174, 0x096, 0, 0) // AE_INVALID_TABLE_LENGTH if (CondRefof(\SSS0, Local0)) { err(arg0, z174, 0x097, 0, 0, "\\SSS0", 1) @@ -2167,7 +2146,7 @@ Method(TLD1) \DTM0.tstc(ts) // Exceptions when the table contained in an OpRegion - // (Field) is not SSDT or PSDT one, + // (Field) is not an SSDT SRMT("TLD1.tstd") \DTM0.tstd(ts) diff --git a/tests/aslts/src/runtime/collections/functional/table/loadtable.asl b/tests/aslts/src/runtime/collections/functional/table/loadtable.asl index da7c23d45..e73216744 100644 --- a/tests/aslts/src/runtime/collections/functional/table/loadtable.asl +++ b/tests/aslts/src/runtime/collections/functional/table/loadtable.asl @@ -1404,7 +1404,7 @@ Device(DTM2) { Concatenate(arg0, "-m000.", arg0) Concatenate(arg0, Mid(DSTR, arg2, 1), arg0) - Switch(arg2) { + Switch(ToInteger (arg2)) { Case(0) { Store(LoadTable(arg1, SOID, STID, RPST, PPST, 1), DDBH) } diff --git a/tests/aslts/src/runtime/collections/functional/table/unload.asl b/tests/aslts/src/runtime/collections/functional/table/unload.asl index f8e093108..efaf82f33 100644 --- a/tests/aslts/src/runtime/collections/functional/table/unload.asl +++ b/tests/aslts/src/runtime/collections/functional/table/unload.asl @@ -274,12 +274,12 @@ Device(DTM1) { Concatenate(arg0, "-tst1", arg0) - // Check absence of the Auxiliry table Objects before Load + // Check absence of the auxiliary table Objects before Load if (m001(Concatenate(arg0, ".before"))) { return (1) } - // Load Auxiliry table + // Load auxiliary table Store(\DTM0.BUF3, \DTM0.RFU3) Load(\DTM0.RFU3, DDB0) @@ -391,7 +391,7 @@ Device(DTM1) { CH03(arg0, z175, 0x02f, 0, 0) - // Check absence of the Auxiliry table Objects after UnLoad + // Check absence of the auxiliary table Objects after UnLoad if (m001(Concatenate(arg0, ".after"))) { return (1) } @@ -442,7 +442,7 @@ Device(DTM1) { Concatenate(arg0, "-tst3", arg0) - // Load Auxiliry table + // Load auxiliary table Store(\DTM0.BUF3, \DTM0.RFU3) Load(\DTM0.RFU3, DDB0) @@ -546,7 +546,7 @@ Device(DTM1) { Concatenate(arg0, "-tst4", arg0) - // Load Auxiliry table + // Load auxiliary table Store(\DTM0.BUF3, \DTM0.RFU3) Load(\DTM0.RFU3, DDB0) @@ -567,7 +567,7 @@ Device(DTM1) { // Any next UnLoad(DDB0) - CH04(arg0, 0, 47, z175, 0x03f, 5, Local0) // AE_AML_OPERAND_TYPE + CH04(arg0, 0, 28, z175, 0x03f, 5, Local0) // AE_BAD_PARAMETER Decrement(Local0) } @@ -586,7 +586,7 @@ Device(DTM1) { // Any next UnLoad(DDB0) - CH04(arg0, 0, 47, z175, 0x041, 5, Local0) // AE_AML_OPERAND_TYPE + CH04(arg0, 0, 28, z175, 0x041, 5, Local0) // AE_BAD_PARAMETER Decrement(Local0) } @@ -610,7 +610,7 @@ Device(DTM1) { Concatenate(arg0, "-tst5", arg0) - // Load Auxiliry table + // Load auxiliary table Store(\DTM0.BUF3, \DTM0.RFU3) Load(\DTM0.RFU3, DDB0)