ReactOS  0.4.14-dev-342-gdc047f9
utglobal.c
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Module Name: utglobal - Global variables for the ACPI subsystem
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2019, Intel Corp.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions, and the following disclaimer,
16  * without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  * substantially similar to the "NO WARRANTY" disclaimer below
19  * ("Disclaimer") and any redistribution must be conditioned upon
20  * including a substantially similar Disclaimer requirement for further
21  * binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  * of any contributors may be used to endorse or promote products derived
24  * from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43 
44 #define EXPORT_ACPI_INTERFACES
45 #define DEFINE_ACPI_GLOBALS
46 
47 #include "acpi.h"
48 #include "accommon.h"
49 
50 #define _COMPONENT ACPI_UTILITIES
51  ACPI_MODULE_NAME ("utglobal")
52 
53 
54 /*******************************************************************************
55  *
56  * Static global variable initialization.
57  *
58  ******************************************************************************/
59 
60 /* Various state name strings */
61 
63 {
64  "\\_S0_",
65  "\\_S1_",
66  "\\_S2_",
67  "\\_S3_",
68  "\\_S4_",
69  "\\_S5_"
70 };
71 
73 {
74  "_S0W",
75  "_S1W",
76  "_S2W",
77  "_S3W",
78  "_S4W"
79 };
80 
82 {
83  "_S1D",
84  "_S2D",
85  "_S3D",
86  "_S4D"
87 };
88 
89 
90 /* Hex-to-ascii */
91 
92 const char AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
93 const char AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
94 
95 
96 /*******************************************************************************
97  *
98  * Namespace globals
99  *
100  ******************************************************************************/
101 
102 /*
103  * Predefined ACPI Names (Built-in to the Interpreter)
104  *
105  * NOTES:
106  * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run
107  * during the initialization sequence.
108  * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to
109  * perform a Notify() operation on it. 09/2010: Changed to type Device.
110  * This still allows notifies, but does not confuse host code that
111  * searches for valid ThermalZone objects.
112  */
114 {
115  {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL},
116  {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL},
117  {"_SB_", ACPI_TYPE_DEVICE, NULL},
118  {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
119  {"_TZ_", ACPI_TYPE_DEVICE, NULL},
120  /*
121  * March, 2015:
122  * The _REV object is in the process of being deprecated, because
123  * other ACPI implementations permanently return 2. Thus, it
124  * has little or no value. Return 2 for compatibility with
125  * other ACPI implementations.
126  */
127  {"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR (char, 2)},
128  {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
129  {"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR (char, 1)},
130  {"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR (char, 1)},
131 
132  /* Table terminator */
133 
135 };
136 
137 
138 #if (!ACPI_REDUCED_HARDWARE)
139 /******************************************************************************
140  *
141  * Event and Hardware globals
142  *
143  ******************************************************************************/
144 
146 {
147  /* Name Parent Register Register Bit Position Register Bit Mask */
148 
157 
164 
170 
172 };
173 
174 
176 {
182 };
183 #endif /* !ACPI_REDUCED_HARDWARE */
184 
185 
186 #if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
187 
188 /* ToPld macro: compile/disassemble strings */
189 
190 const char *AcpiGbl_PldPanelList[] =
191 {
192  "TOP",
193  "BOTTOM",
194  "LEFT",
195  "RIGHT",
196  "FRONT",
197  "BACK",
198  "UNKNOWN",
199  NULL
200 };
201 
202 const char *AcpiGbl_PldVerticalPositionList[] =
203 {
204  "UPPER",
205  "CENTER",
206  "LOWER",
207  NULL
208 };
209 
210 const char *AcpiGbl_PldHorizontalPositionList[] =
211 {
212  "LEFT",
213  "CENTER",
214  "RIGHT",
215  NULL
216 };
217 
218 const char *AcpiGbl_PldShapeList[] =
219 {
220  "ROUND",
221  "OVAL",
222  "SQUARE",
223  "VERTICALRECTANGLE",
224  "HORIZONTALRECTANGLE",
225  "VERTICALTRAPEZOID",
226  "HORIZONTALTRAPEZOID",
227  "UNKNOWN",
228  "CHAMFERED",
229  NULL
230 };
231 #endif
232 
233 
234 /* Public globals */
235 
236 ACPI_EXPORT_SYMBOL (AcpiGbl_FADT)
237 ACPI_EXPORT_SYMBOL (AcpiDbgLevel)
238 ACPI_EXPORT_SYMBOL (AcpiDbgLayer)
239 ACPI_EXPORT_SYMBOL (AcpiGpeCount)
240 ACPI_EXPORT_SYMBOL (AcpiCurrentGpeCount)
const char AcpiGbl_LowerHexDigits[]
Definition: utglobal.c:92
#define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE
Definition: aclocal.h:1242
#define ACPI_BITMASK_POWER_BUTTON_STATUS
Definition: aclocal.h:1198
#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE
Definition: aclocal.h:1219
#define ACPI_REGISTER_PM2_CONTROL
Definition: aclocal.h:1187
ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]
Definition: utglobal.c:145
#define ACPI_BITMASK_SLEEP_BUTTON_ENABLE
Definition: aclocal.h:1217
#define ACPI_BITPOSITION_WAKE_STATUS
Definition: aclocal.h:1239
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
#define ACPI_BITMASK_TIMER_STATUS
Definition: aclocal.h:1195
#define ACPI_REGISTER_PM1_CONTROL
Definition: aclocal.h:1186
#define ACPI_S_STATE_COUNT
Definition: actypes.h:622
#define ACPI_BITMASK_ARB_DISABLE
Definition: aclocal.h:1227
#define ACPI_BITMASK_GLOBAL_LOCK_RELEASE
Definition: aclocal.h:1223
#define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS
Definition: aclocal.h:1236
#define ACPI_BITMASK_RT_CLOCK_ENABLE
Definition: aclocal.h:1218
#define ACPI_BITPOSITION_BUS_MASTER_STATUS
Definition: aclocal.h:1233
#define ACPI_BITREG_GLOBAL_LOCK_STATUS
Definition: actypes.h:894
#define ACPI_BITPOSITION_BUS_MASTER_RLD
Definition: aclocal.h:1249
#define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE
Definition: aclocal.h:1244
const char * AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS]
Definition: utglobal.c:72
#define ACPI_BITMASK_BUS_MASTER_STATUS
Definition: aclocal.h:1196
#define ACPI_NUM_BITREG
Definition: actypes.h:923
#define ACPI_BITPOSITION_ARB_DISABLE
Definition: aclocal.h:1254
#define ACPI_BITREG_TIMER_ENABLE
Definition: actypes.h:903
#define ACPI_MODULE_NAME(Name)
Definition: acoutput.h:216
#define ACPI_BITPOSITION_RT_CLOCK_ENABLE
Definition: aclocal.h:1245
#define ACPI_EXPORT_SYMBOL(Symbol)
Definition: actypes.h:343
#define ACPI_NUM_SxW_METHODS
Definition: acconfig.h:232
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_NUM_SxD_METHODS
Definition: acconfig.h:231
#define ACPI_REGISTER_PM1_STATUS
Definition: aclocal.h:1184
#define ACPI_BITPOSITION_SLEEP_TYPE
Definition: aclocal.h:1251
#define ACPI_BITREG_POWER_BUTTON_ENABLE
Definition: actypes.h:905
#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE
Definition: aclocal.h:1215
#define ACPI_BITREG_RT_CLOCK_ENABLE
Definition: actypes.h:907
#define ACPI_BITREG_POWER_BUTTON_STATUS
Definition: actypes.h:895
#define ACPI_OS_NAME
Definition: acconfig.h:73
#define ACPI_BITMASK_SLEEP_BUTTON_STATUS
Definition: aclocal.h:1199
#define ACPI_BITPOSITION_TIMER_STATUS
Definition: aclocal.h:1232
#define ACPI_TYPE_METHOD
Definition: actypes.h:686
const char AcpiGbl_UpperHexDigits[]
Definition: utglobal.c:93
const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[]
Definition: utglobal.c:113
#define ACPI_BITPOSITION_SCI_ENABLE
Definition: aclocal.h:1248
#define ACPI_NUM_FIXED_EVENTS
Definition: actypes.h:760
#define ACPI_BITMASK_RT_CLOCK_STATUS
Definition: aclocal.h:1200
#define ACPI_BITMASK_SLEEP_TYPE
Definition: aclocal.h:1224
#define ACPI_TYPE_ANY
Definition: actypes.h:678
#define ACPI_BITPOSITION_SLEEP_ENABLE
Definition: aclocal.h:1252
#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE
Definition: aclocal.h:1246
#define ACPI_BITMASK_SLEEP_ENABLE
Definition: aclocal.h:1225
#define ACPI_BITREG_GLOBAL_LOCK_ENABLE
Definition: actypes.h:904
#define ACPI_TYPE_DEVICE
Definition: actypes.h:684
#define ACPI_BITMASK_GLOBAL_LOCK_STATUS
Definition: aclocal.h:1197
#define ACPI_BITPOSITION_POWER_BUTTON_ENABLE
Definition: aclocal.h:1243
#define ACPI_BITREG_RT_CLOCK_STATUS
Definition: actypes.h:897
#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS
Definition: aclocal.h:1238
#define ACPI_BITMASK_BUS_MASTER_RLD
Definition: aclocal.h:1222
#define ACPI_BITMASK_WAKE_STATUS
Definition: aclocal.h:1202
#define ACPI_BITREG_SLEEP_BUTTON_ENABLE
Definition: actypes.h:906
#define ACPI_BITREG_TIMER_STATUS
Definition: actypes.h:892
#define ACPI_TYPE_MUTEX
Definition: actypes.h:687
const char * AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS]
Definition: utglobal.c:81
#define ACPI_BITPOSITION_RT_CLOCK_STATUS
Definition: aclocal.h:1237
#define ACPI_BITMASK_TIMER_ENABLE
Definition: aclocal.h:1214
#define ACPI_TYPE_LOCAL_SCOPE
Definition: actypes.h:717
#define const
Definition: zconf.h:230
#define ACPI_BITMASK_PCIEXP_WAKE_STATUS
Definition: aclocal.h:1201
#define ACPI_BITMASK_SCI_ENABLE
Definition: aclocal.h:1221
#define ACPI_BITREG_SLEEP_BUTTON_STATUS
Definition: actypes.h:896
#define ACPI_TYPE_STRING
Definition: actypes.h:680
#define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS
Definition: aclocal.h:1234
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
#define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE
Definition: aclocal.h:1250
#define ACPI_REGISTER_PM1_ENABLE
Definition: aclocal.h:1185
ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS]
Definition: utglobal.c:175
#define ACPI_BITPOSITION_TIMER_ENABLE
Definition: aclocal.h:1241
#define ACPI_BITMASK_POWER_BUTTON_ENABLE
Definition: aclocal.h:1216
const char * AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT]
Definition: utglobal.c:62
#define ACPI_BITPOSITION_POWER_BUTTON_STATUS
Definition: aclocal.h:1235