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 * Bug 134: 30 * 31 * SUMMARY: Writing RefOf reference from inside Method breaks effectively local Arg 32 */ 33 Method (MF23, 7, NotSerialized) 34 { 35 Debug = "LocalX case of Method started:" 36 Local0 = RefOf (ID14) 37 Local1 = Local0 38 Local2 = Local1 39 Local3 = Local2 40 Local4 = Local3 41 Local5 = Local4 42 Local6 = Local5 43 Local6 = DerefOf (Local0) 44 Debug = Local6 45 If ((Local6 != 0x11)) 46 { 47 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local6, 0x11) 48 } 49 50 Debug = "LocalX case of Method finished" 51 } 52 53 Method (MF24, 7, NotSerialized) 54 { 55 Debug = "ArgX case (1) of Method started:" 56 Arg0 = RefOf (ID14) 57 Arg1 = Arg0 58 Arg2 = Arg1 59 Arg3 = Arg2 60 Arg4 = Arg3 61 Arg5 = Arg4 62 Arg6 = Arg5 63 Arg6 = DerefOf (Arg0) 64 Debug = Arg6 65 If ((Arg6 != 0x11)) 66 { 67 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Arg6, 0x11) 68 } 69 70 Debug = "ArgX case (1) of Method finished" 71 } 72 73 Method (MF25, 7, NotSerialized) 74 { 75 Debug = "ArgX case (2) of Method started:" 76 Local0 = RefOf (ID14) 77 Arg1 = Local0 78 Arg2 = Local0 79 Arg3 = Local0 80 Arg4 = Local0 81 Arg5 = Local0 82 Arg6 = Local0 83 Arg6 = DerefOf (Arg0) 84 Debug = Arg6 85 If ((Arg6 != 0x11)) 86 { 87 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Arg6, 0x11) 88 } 89 90 Debug = "ArgX case (2) of Method finished" 91 } 92 93 Method (MF26, 0, NotSerialized) 94 { 95 SRMT ("mf23") 96 MF23 (ID14, ID15, ID16, ID17, ID18, ID19, ID1A) 97 SRMT ("mf24") 98 If (Y134) 99 { 100 MF24 (ID14, ID15, ID16, ID17, ID18, ID19, ID1A) 101 } 102 Else 103 { 104 BLCK () 105 } 106 107 SRMT ("mf25") 108 If (Y134) 109 { 110 MF25 (ID14, ID15, ID16, ID17, ID18, ID19, ID1A) 111 } 112 Else 113 { 114 BLCK () 115 } 116 } 117