Debian Codegraph @

tests/aslts/src/runtime/collections/bdemo/ACPICA/0231/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 * Bug 231:
30 *
31 * SUMMARY: ParameterTypes argument of Method declaration is not supported
32 */
33 Method (M128, 0, Serialized)
34 {
35 /* Data to be passed to Method */
36
37 Name (I000, 0xFE7CB391D65A0000)
38 Name (S000, "12340002")
39 Name (B000, Buffer (0x04)
40 {
41 0x01, 0x02, 0x03, 0x04 // ....
42 })
43 Name (B001, Buffer (0x05)
44 {
45 0xB0, 0xB1, 0xB2, 0xB3, 0xB4 // .....
46 })
47 Name (P000, Package (0x04)
48 {
49 0x01,
50 0x02,
51 0x03,
52 0x04
53 })
54 Event (E000)
55 Mutex (MX00, 0x00)
56 Device (D000)
57 {
58 Name (I000, 0xABCD0017)
59 }
60
61 ThermalZone (TZ00)
62 {
63 }
64
65 Processor (PR00, 0x00, 0xFFFFFFFF, 0x00){}
66 OperationRegion (R900, SystemMemory, 0x0100, 0x0100)
67 OperationRegion (R9Z0, SystemMemory, 0x0100, 0x0100)
68 PowerResource (PW90, 0x01, 0x0000)
69 {
70 Method (MMMM, 0, NotSerialized)
71 {
72 Return (0x00)
73 }
74 }
75
76 CreateField (B001, 0x00, 0x08, BF90)
77 Field (R9Z0, ByteAcc, NoLock, Preserve)
78 {
79 F900, 8,
80 F901, 8,
81 F902, 8,
82 F903, 8
83 }
84
85 BankField (R9Z0, F901, 0x00, ByteAcc, NoLock, Preserve)
86 {
87 BN90, 4
88 }
89
90 IndexField (F902, F903, ByteAcc, NoLock, Preserve)
91 {
92 IF90, 8,
93 IF91, 8
94 }
95
96 Method (MMM0, 0, NotSerialized)
97 {
98 Return ("mmm0")
99 }
100
101 /* Method */
102
103 Method (M000, 1, NotSerialized)
104 {
105 Debug = Arg0
106 }
107
108 Method (M100, 0, NotSerialized)
109 {
110 Debug = "Start of test"
111 M000 (I000)
112 M000 (S000)
113 M000 (B000)
114 M000 (P000)
115 M000 (E000)
116 M000 (MX00)
117 M000 (D000)
118 M000 (TZ00)
119 M000 (PR00)
120 M000 (R900)
121 M000 (PW90)
122 M000 (BF90)
123 M000 (F900)
124 M000 (BN90)
125 M000 (IF90)
126 M000 (MMM0 ())
127 M000 (0xFE7CB391D65A0000)
128 M000 ("12340002")
129 M000 (Buffer (0x04)
130 {
131 0x01, 0x02, 0x03, 0x04 // ....
132 })
133 M000 (Package (0x04)
134 {
135 0x01,
136 0x02,
137 0x03,
138 0x04
139 })
140 Debug = "Finish of test"
141 }
142
143 CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
144 M100 ()
145 /* Expect either ASL compiler error or any AML interpreter exception */
146
147 CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
148 }