Debian Codegraph @

tests/aslts/src/runtime/collections/bdemo/ACPICA/0083/DECL.asl

raw
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 /*
30 * Bug 0083:
31 *
32 * SUMMARY: No exception on DerefOf of an arbitrary Source
33 */
34
35 Method(me34,, Serialized)
36 {
37 Event(e000)
38 Mutex(mx00, 0)
39 ThermalZone(tz00) {}
40 Processor(pr00, 0, 0xFFFFFFFF, 0) {}
41 PowerResource(pw00, 1, 0) {Method(mmmm){return (0)}}
42 OperationRegion(r000, SystemMemory, 0x100, 0x100)
43
44 Name(b9Z0, Buffer() {0xb0,0xb1,0xb2,0xb3,0xb4})
45 OperationRegion(r9Z0, SystemMemory, 0x100, 0x100)
46
47 CreateField(b9Z0, 0, 8, bf90)
48 Field(r9Z0, ByteAcc, NoLock, Preserve) {f900,8,f901,8,f902,8,f903,8}
49 BankField(r9Z0, f901, 0, ByteAcc, NoLock, Preserve) {bn90,4}
50 IndexField(f902, f903, ByteAcc, NoLock, Preserve) {if90,8,if91,8}
51
52 Device(d000) {}
53 Name(i000, 0x89abcdef)
54 Name(b000, Buffer() {1,2,3,4})
55 Name(p000, Package() {1,2,3,4})
56
57 /*
58 * Derefof(0x89abcdef)
59 * Invalid type ^ ([Integer] found, DerefOf operator requires [String|Reference])
60 */
61
62
63 // Expected exception for each DerefOf below
64
65 CH03("", 0, 0x000, __LINE__, 0)
66 Store(DerefOf(i000), Local0)
67 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
68
69 CH03("", 0, 0x000, __LINE__, 0)
70 Store(DerefOf(b000), Local0)
71 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
72
73 CH03("", 0, 0x000, __LINE__, 0)
74 Store(DerefOf(p000), Local0)
75 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
76
77 CH03("", 0, 0x000, __LINE__, 0)
78 Store(DerefOf(d000), Local0)
79 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
80
81
82 CH03("", 0, 0x000, __LINE__, 0)
83 Store(DerefOf(e000), Local0)
84 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
85
86 CH03("", 0, 0x000, __LINE__, 0)
87 Store(DerefOf(mx00), Local0)
88 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
89
90 CH03("", 0, 0x000, __LINE__, 0)
91 Store(DerefOf(tz00), Local0)
92 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
93
94 CH03("", 0, 0x000, __LINE__, 0)
95 Store(DerefOf(pr00), Local0)
96 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
97
98 CH03("", 0, 0x000, __LINE__, 0)
99 Store(DerefOf(pw00), Local0)
100 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
101
102 CH03("", 0, 0x000, __LINE__, 0)
103 Store(DerefOf(r000), Local0)
104 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
105
106
107 CH03("", 0, 0x000, __LINE__, 0)
108 Store(DerefOf(bf90), Local0)
109 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
110
111 CH03("", 0, 0x000, __LINE__, 0)
112 Store(DerefOf(f900), Local0)
113 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
114
115 CH03("", 0, 0x000, __LINE__, 0)
116 Store(DerefOf(f901), Local0)
117 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
118
119 CH03("", 0, 0x000, __LINE__, 0)
120 Store(DerefOf(f902), Local0)
121 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
122
123 CH03("", 0, 0x000, __LINE__, 0)
124 Store(DerefOf(f903), Local0)
125 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
126
127 CH03("", 0, 0x000, __LINE__, 0)
128 Store(DerefOf(bn90), Local0)
129 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
130
131 CH03("", 0, 0x000, __LINE__, 0)
132 Store(DerefOf(if90), Local0)
133 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
134
135 CH03("", 0, 0x000, __LINE__, 0)
136 Store(DerefOf(if91), Local0)
137 CH04("", 0, 0xff, 0, __LINE__, 0, 0)
138
139
140 // And so on..
141 }