• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/acpica/tests/aslts/src/runtime/collections/bdemo/ACPICA/0012/
1/*
2 * Some or all of this work - Copyright (c) 2006 - 2016, 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 * Access to Method type objects
31 *
32 * SEE ALSO: misc/m15b
33 *
34 * Add here the tests of types:
35 * - \xx.xx (relative to the root)
36 * - ^xx.xx (relative to the parent)
37 * -  xx.xx
38 * - Methods inside another type objects
39 */
40
41/* Access to Method in one level up */
42
43Method(m13b)
44{
45	return (0xabcd0000)
46}
47
48Method(m138)
49{
50	CH03("", 0, 0x098, 0, 0)
51	Store(DerefOf("m13b"), Local0)
52	if (SLCK) {
53		CH03("", 0, 0x099, 0, 0)
54		Store(ObjectType(Local0), Local1)
55		if (LNotEqual(Local1, c010)) {
56			err("", zFFF, 0x09a, 0, 0, Local1, c010)
57		}
58	} else {
59		CH04("", 0, 47, 0, 0x09b, 0, 0) // AE_AML_OPERAND_TYPE
60	}
61}
62
63/* Access to the Method itself */
64
65Method(m12c)
66{
67	CH03("", 0, 0x09c, 0, 0)
68	Store(DerefOf("m12c"), Local0)
69	if (SLCK) {
70		CH03("", 0, 0x09d, 0, 0)
71		Store(ObjectType(Local0), Local1)
72		if (LNotEqual(Local1, c010)) {
73			err("", zFFF, 0x09e, 0, 0, Local1, c010)
74		}
75	} else {
76		CH04("", 0, 47, 0, 0x09f, 0, 0) // AE_AML_OPERAND_TYPE
77	}
78}
79
80/* Access to Method of the same level */
81
82Method(m139)
83{
84	Method(m13c)
85	{
86		return (0xabcd0003)
87	}
88
89	CH03("", 0, 0x0a0, 0, 0)
90	Store(DerefOf("m13c"), Local0)
91	if (SLCK) {
92		CH03("", 0, 0x0a1, 0, 0)
93		Store(ObjectType(Local0), Local1)
94		if (LNotEqual(Local1, c010)) {
95			err("", zFFF, 0x0a2, 0, 0, Local1, c010)
96		}
97	} else {
98		CH04("", 0, 47, 0, 0x0a3, 0, 0) // AE_AML_OPERAND_TYPE
99	}
100}
101
102/* Access to Method in one level up inside another Method */
103
104Method(m13a)
105{
106	Method(m13d)
107	{
108		return (0xabcd0004)
109	}
110	Method(m138)
111	{
112		CH03("", 0, 0x0a4, 0, 0)
113		Store(DerefOf("m13d"), Local0)
114		if (SLCK) {
115			CH03("", 0, 0x0a5, 0, 0)
116			Store(ObjectType(Local0), Local1)
117			if (LNotEqual(Local1, c010)) {
118				err("", zFFF, 0x0a6, 0, 0, Local1, c010)
119			}
120		} else {
121			CH04("", 0, 47, 0, 0x0a7, 0, 0) // AE_AML_OPERAND_TYPE
122		}
123	}
124	m138()
125}
126
127Method(m12f)
128{
129	SRMT("m138")
130	m138()
131	SRMT("m12c")
132	m12c()
133	SRMT("m139")
134	m139()
135	SRMT("m13a")
136	m13a()
137}
138