1 /* 2 * Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without modification, 6 * are permitted provided that the following conditions are met: 7 * 8 * Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * Redistributions in binary form must reproduce the above copyright notice, 11 * this list of conditions and the following disclaimer in the documentation 12 * and/or other materials provided with the distribution. 13 * Neither the name of Intel Corporation nor the names of its contributors 14 * may be used to endorse or promote products derived from this software 15 * without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 /* 29 * Calls to methods instead of Add 30 */ 31 /* 32 SEE: 33 do here all the tests ns0-ns... with Add replaced by MAdd 34 */ 35 Name (Z158, 0x9E) 36 Method (M401, 1, Serialized) 37 { 38 Name (I000, 0x01) 39 Name (I001, 0x00) 40 Name (P000, Package (0x04) 41 { 42 0x01, 43 0x02, 44 0x03, 45 0x04 46 }) 47 CH03 (__METHOD__, Z158, __LINE__, 0x00, 0x00) 48 I001 = Arg0 49 Method (MADD, 2, NotSerialized) 50 { 51 Local0 = (Arg0 + Arg1) 52 Return (Local0) 53 } 54 55 Method (M001, 0, NotSerialized) 56 { 57 Method (M002, 0, NotSerialized) 58 { 59 Method (M003, 0, NotSerialized) 60 { 61 Method (M004, 0, NotSerialized) 62 { 63 Method (M005, 0, NotSerialized) 64 { 65 Method (M006, 0, NotSerialized) 66 { 67 Method (M007, 0, NotSerialized) 68 { 69 Method (M008, 0, NotSerialized) 70 { 71 If (I001) 72 { 73 CopyObject (P000, I000) /* \M401.I000 */ 74 } 75 76 Return (0x00) 77 } 78 79 I000 = 0x80000000 80 Return (MADD (I000, M008 ())) 81 } 82 83 I000 = 0x07000000 84 Return (MADD (I000, M007 ())) 85 } 86 87 I000 = 0x00600000 88 Return (MADD (I000, M006 ())) 89 } 90 91 I000 = 0x00050000 92 Return (MADD (I000, M005 ())) 93 } 94 95 I000 = 0x4000 96 Return (MADD (I000, M004 ())) 97 } 98 99 I000 = 0x0300 100 Return (MADD (I000, M003 ())) 101 } 102 103 I000 = 0x20 104 Return (MADD (I000, M002 ())) 105 } 106 107 Local0 = MADD (I000, M001 ()) 108 If ((Local0 != 0x87654321)) 109 { 110 ERR (__METHOD__, Z158, __LINE__, 0x00, 0x00, Local0, 0x87654321) 111 } 112 113 If ((I000 != 0x80000000)) 114 { 115 ERR (__METHOD__, Z158, __LINE__, 0x00, 0x00, I000, 0x80000000) 116 } 117 118 CH03 (__METHOD__, Z158, __LINE__, 0x00, 0x00) 119 } 120 121 Method (N004, 0, NotSerialized) 122 { 123 If (0x01) 124 { 125 SRMT ("m401-0") 126 M401 (0x00) 127 SRMT ("m401-1") 128 If (Y200) 129 { 130 M401 (0x01) 131 } 132 Else 133 { 134 BLCK () 135 } 136 } 137 Else 138 { 139 SRMT ("m401-0") 140 M401 (0x00) 141 } 142 } 143