ReactOS 0.4.15-dev-7924-g5949c20
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 - 2022, 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 MERCHANTABILITY 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
92const char AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
93const 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)},
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{
183};
184#endif /* !ACPI_REDUCED_HARDWARE */
185
186
187#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
188
189/* ToPld macro: compile/disassemble strings */
190
191const char *AcpiGbl_PldPanelList[] =
192{
193 "TOP",
194 "BOTTOM",
195 "LEFT",
196 "RIGHT",
197 "FRONT",
198 "BACK",
199 "UNKNOWN",
200 NULL
201};
202
203const char *AcpiGbl_PldVerticalPositionList[] =
204{
205 "UPPER",
206 "CENTER",
207 "LOWER",
208 NULL
209};
210
211const char *AcpiGbl_PldHorizontalPositionList[] =
212{
213 "LEFT",
214 "CENTER",
215 "RIGHT",
216 NULL
217};
218
219const char *AcpiGbl_PldShapeList[] =
220{
221 "ROUND",
222 "OVAL",
223 "SQUARE",
224 "VERTICALRECTANGLE",
225 "HORIZONTALRECTANGLE",
226 "VERTICALTRAPEZOID",
227 "HORIZONTALTRAPEZOID",
228 "UNKNOWN",
229 "CHAMFERED",
230 NULL
231};
232#endif
233
234
235/* Public globals */
236
237ACPI_EXPORT_SYMBOL (AcpiGbl_FADT)
238ACPI_EXPORT_SYMBOL (AcpiDbgLevel)
239ACPI_EXPORT_SYMBOL (AcpiDbgLayer)
240ACPI_EXPORT_SYMBOL (AcpiGpeCount)
241ACPI_EXPORT_SYMBOL (AcpiCurrentGpeCount)
#define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE
Definition: aclocal.h:1250
#define ACPI_REGISTER_PM2_CONTROL
Definition: aclocal.h:1187
#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS
Definition: aclocal.h:1238
#define ACPI_BITPOSITION_TIMER_STATUS
Definition: aclocal.h:1232
#define ACPI_BITPOSITION_SLEEP_TYPE
Definition: aclocal.h:1251
#define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS
Definition: aclocal.h:1236
#define ACPI_REGISTER_PM1_ENABLE
Definition: aclocal.h:1185
#define ACPI_BITMASK_SLEEP_TYPE
Definition: aclocal.h:1224
#define ACPI_BITPOSITION_POWER_BUTTON_ENABLE
Definition: aclocal.h:1243
#define ACPI_BITMASK_SLEEP_BUTTON_ENABLE
Definition: aclocal.h:1217
#define ACPI_BITMASK_BUS_MASTER_STATUS
Definition: aclocal.h:1196
#define ACPI_BITMASK_GLOBAL_LOCK_RELEASE
Definition: aclocal.h:1223
#define ACPI_BITPOSITION_RT_CLOCK_ENABLE
Definition: aclocal.h:1245
#define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE
Definition: aclocal.h:1244
#define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS
Definition: aclocal.h:1234
#define ACPI_BITMASK_BUS_MASTER_RLD
Definition: aclocal.h:1222
#define ACPI_BITMASK_WAKE_STATUS
Definition: aclocal.h:1202
#define ACPI_BITPOSITION_POWER_BUTTON_STATUS
Definition: aclocal.h:1235
#define ACPI_BITPOSITION_BUS_MASTER_RLD
Definition: aclocal.h:1249
#define ACPI_BITMASK_GLOBAL_LOCK_STATUS
Definition: aclocal.h:1197
#define ACPI_BITMASK_POWER_BUTTON_ENABLE
Definition: aclocal.h:1216
#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE
Definition: aclocal.h:1215
#define ACPI_BITMASK_SLEEP_BUTTON_STATUS
Definition: aclocal.h:1199
#define ACPI_BITPOSITION_SCI_ENABLE
Definition: aclocal.h:1248
#define ACPI_BITPOSITION_BUS_MASTER_STATUS
Definition: aclocal.h:1233
#define ACPI_BITPOSITION_ARB_DISABLE
Definition: aclocal.h:1254
#define ACPI_BITPOSITION_RT_CLOCK_STATUS
Definition: aclocal.h:1237
#define ACPI_BITMASK_RT_CLOCK_STATUS
Definition: aclocal.h:1200
#define ACPI_BITMASK_RT_CLOCK_ENABLE
Definition: aclocal.h:1218
#define ACPI_REGISTER_PM1_CONTROL
Definition: aclocal.h:1186
#define ACPI_BITPOSITION_TIMER_ENABLE
Definition: aclocal.h:1241
#define ACPI_BITMASK_TIMER_STATUS
Definition: aclocal.h:1195
#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE
Definition: aclocal.h:1246
#define ACPI_REGISTER_PM1_STATUS
Definition: aclocal.h:1184
#define ACPI_BITMASK_PCIEXP_WAKE_STATUS
Definition: aclocal.h:1201
#define ACPI_BITPOSITION_SLEEP_ENABLE
Definition: aclocal.h:1252
#define ACPI_BITMASK_ARB_DISABLE
Definition: aclocal.h:1227
#define ACPI_BITMASK_POWER_BUTTON_STATUS
Definition: aclocal.h:1198
#define ACPI_BITMASK_TIMER_ENABLE
Definition: aclocal.h:1214
#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE
Definition: aclocal.h:1219
#define ACPI_BITMASK_SCI_ENABLE
Definition: aclocal.h:1221
#define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE
Definition: aclocal.h:1242
#define ACPI_BITPOSITION_WAKE_STATUS
Definition: aclocal.h:1239
#define ACPI_BITMASK_SLEEP_ENABLE
Definition: aclocal.h:1225
#define ACPI_MODULE_NAME(Name)
Definition: acoutput.h:216
#define ACPI_TYPE_STRING
Definition: actypes.h:689
#define ACPI_BITREG_SLEEP_BUTTON_STATUS
Definition: actypes.h:907
#define ACPI_BITREG_TIMER_ENABLE
Definition: actypes.h:914
#define ACPI_BITREG_POWER_BUTTON_STATUS
Definition: actypes.h:906
#define ACPI_TYPE_MUTEX
Definition: actypes.h:696
#define ACPI_BITREG_RT_CLOCK_ENABLE
Definition: actypes.h:918
#define ACPI_TYPE_INTEGER
Definition: actypes.h:688
#define ACPI_BITREG_GLOBAL_LOCK_ENABLE
Definition: actypes.h:915
#define ACPI_BITREG_GLOBAL_LOCK_STATUS
Definition: actypes.h:905
#define ACPI_TYPE_ANY
Definition: actypes.h:687
#define ACPI_BITREG_PCIEXP_WAKE_STATUS
Definition: actypes.h:910
#define ACPI_TYPE_DEVICE
Definition: actypes.h:693
#define ACPI_BITREG_SLEEP_BUTTON_ENABLE
Definition: actypes.h:917
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
#define ACPI_EXPORT_SYMBOL(Symbol)
Definition: actypes.h:343
#define ACPI_NUM_FIXED_EVENTS
Definition: actypes.h:770
#define ACPI_S_STATE_COUNT
Definition: actypes.h:631
#define ACPI_BITREG_RT_CLOCK_STATUS
Definition: actypes.h:908
#define ACPI_BITREG_POWER_BUTTON_ENABLE
Definition: actypes.h:916
#define ACPI_NUM_BITREG
Definition: actypes.h:934
#define ACPI_TYPE_METHOD
Definition: actypes.h:695
#define ACPI_TYPE_LOCAL_SCOPE
Definition: actypes.h:726
#define ACPI_BITREG_PCIEXP_WAKE_DISABLE
Definition: actypes.h:919
#define ACPI_BITREG_TIMER_STATUS
Definition: actypes.h:903
#define NULL
Definition: types.h:112
#define ACPI_NUM_SxD_METHODS
Definition: acconfig.h:234
#define ACPI_NUM_SxW_METHODS
Definition: acconfig.h:235
#define ACPI_OS_NAME
Definition: acconfig.h:73
ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS]
Definition: utglobal.c:175
const char * AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT]
Definition: utglobal.c:62
const char * AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS]
Definition: utglobal.c:72
const char AcpiGbl_LowerHexDigits[]
Definition: utglobal.c:92
const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[]
Definition: utglobal.c:113
const char AcpiGbl_UpperHexDigits[]
Definition: utglobal.c:93
const char * AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS]
Definition: utglobal.c:81
ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]
Definition: utglobal.c:145
#define const
Definition: zconf.h:233