ReactOS 0.4.15-dev-7906-g1b85a5f
acevents.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Name: acevents.h - Event subcomponent prototypes and defines
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#ifndef __ACEVENTS_H__
45#define __ACEVENTS_H__
46
47
48/*
49 * Conditions to trigger post enabling GPE polling:
50 * It is not sufficient to trigger edge-triggered GPE with specific GPE
51 * chips, software need to poll once after enabling.
52 */
53#ifdef ACPI_USE_GPE_POLLING
54#define ACPI_GPE_IS_POLLING_NEEDED(__gpe__) \
55 ((__gpe__)->RuntimeCount == 1 && \
56 (__gpe__)->Flags & ACPI_GPE_INITIALIZED && \
57 ((__gpe__)->Flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_EDGE_TRIGGERED)
58#else
59#define ACPI_GPE_IS_POLLING_NEEDED(__gpe__) FALSE
60#endif
61
62
63/*
64 * evevent
65 */
68 void);
69
72 void);
73
76 void);
77
78
79/*
80 * evmisc
81 */
85
89
93 UINT32 NotifyValue);
94
95
96/*
97 * evglock - Global Lock support
98 */
101 void);
102
107
111 void))
112
115 void);
116
117
118/*
119 * evgpe - Low-level GPE support
120 */
121UINT32
123 ACPI_GPE_XRUPT_INFO *GpeXruptList);
124
128
132
136 BOOLEAN IsMasked);
137
141 BOOLEAN ClearOnEnable);
142
146
149 ACPI_HANDLE GpeDevice,
151
155 ACPI_GPE_BLOCK_INFO *GpeBlock);
156
160
161UINT32
163 ACPI_NAMESPACE_NODE *GpeDevice,
166
167
168/*
169 * evgpeblk - Upper-level GPE block support
170 */
173 ACPI_NAMESPACE_NODE *GpeDevice,
176 UINT32 RegisterCount,
177 UINT16 GpeBlockBaseNumber,
178 UINT32 InterruptNumber,
179 ACPI_GPE_BLOCK_INFO **ReturnGpeBlock);
180
183 ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
184 ACPI_GPE_BLOCK_INFO *GpeBlock,
185 void *Context);
186
190 ACPI_GPE_BLOCK_INFO *GpeBlock))
191
192UINT32
194 ACPI_NAMESPACE_NODE *GpeDevice,
197
198
199/*
200 * evgpeinit - GPE initialization and update
201 */
204 void);
205
207void
209 ACPI_OWNER_ID TableOwnerId))
210
213 ACPI_HANDLE ObjHandle,
215 void *Context,
216 void **ReturnValue);
217
218
219/*
220 * evgpeutil - GPE utilities
221 */
224 ACPI_GPE_CALLBACK GpeWalkCallback,
225 void *Context);
226
229 ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
230 ACPI_GPE_BLOCK_INFO *GpeBlock,
231 void *Context);
232
235 UINT32 InterruptNumber,
236 ACPI_GPE_XRUPT_INFO **GpeXruptBlock);
237
240 ACPI_GPE_XRUPT_INFO *GpeXrupt);
241
244 ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
245 ACPI_GPE_BLOCK_INFO *GpeBlock,
246 void *Context);
247
248
249/*
250 * evhandler - Address space handling
251 */
255 ACPI_OPERAND_OBJECT *HandlerObj);
256
261
264 void);
265
272 void *Context);
273
274
275/*
276 * evregion - Operation region support
277 */
280 void);
281
284 ACPI_OPERAND_OBJECT *RegionObj,
285 ACPI_OPERAND_OBJECT *FieldObj,
287 UINT32 RegionOffset,
288 UINT32 BitWidth,
289 UINT64 *Value);
290
293 ACPI_OPERAND_OBJECT *HandlerObj,
294 ACPI_OPERAND_OBJECT *RegionObj,
295 BOOLEAN AcpiNsIsLocked);
296
297void
299 ACPI_OPERAND_OBJECT *RegionObj,
300 BOOLEAN AcpiNsIsLocked);
301
302void
307
310 ACPI_OPERAND_OBJECT *RegionObj,
312
313
314/*
315 * evregini - Region initialization and setup
316 */
321 void *HandlerContext,
322 void **RegionContext);
323
328 void *HandlerContext,
329 void **RegionContext);
330
335 void *HandlerContext,
336 void **RegionContext);
337
342 void *HandlerContext,
343 void **RegionContext);
344
349 void *HandlerContext,
350 void **RegionContext);
351
356 void *HandlerContext,
357 void **RegionContext);
358
363 void *HandlerContext,
364 void **RegionContext);
365
368 ACPI_OPERAND_OBJECT *RegionObj);
369
373
374
375/*
376 * evsci - SCI (System Control Interrupt) handling/dispatch
377 */
380 void *Context);
381
382UINT32
384 void);
385
386UINT32
388 void);
389
392 void);
393
395void
397 void))
398
399#endif /* __ACEVENTS_H__ */
unsigned short UINT16
unsigned char BOOLEAN
unsigned long long UINT64
unsigned char UINT8
unsigned int UINT32
#define ACPI_SYSTEM_XFACE
Definition: acenv.h:326
UINT32 Level
Definition: acevents.h:214
UINT32 void void ** ReturnValue
Definition: acevents.h:216
ACPI_STATUS AcpiEvPciConfigRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:179
UINT32 AcpiEvGetGpeNumberIndex(UINT32 GpeNumber)
UINT32 ACPI_SYSTEM_XFACE AcpiEvGpeXruptHandler(void *Context)
Definition: evsci.c:176
UINT32 AcpiEvInstallSciHandler(void)
Definition: evsci.c:211
BOOLEAN AcpiEvIsPciRootBridge(ACPI_NAMESPACE_NODE *Node)
Definition: evrgnini.c:382
ACPI_STATUS AcpiEvDeleteGpeXrupt(ACPI_GPE_XRUPT_INFO *GpeXrupt)
Definition: evgpeutil.c:270
ACPI_STATUS AcpiEvExecuteRegMethod(ACPI_OPERAND_OBJECT *RegionObj, UINT32 Function)
Definition: evregion.c:615
ACPI_STATUS AcpiEvGpeInitialize(void)
Definition: evgpeinit.c:84
ACPI_STATUS AcpiEvDefaultRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:568
ACPI_STATUS AcpiEvFinishGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: evgpe.c:670
ACPI_GPE_EVENT_INFO * AcpiEvGetGpeEventInfo(ACPI_HANDLE GpeDevice, UINT32 GpeNumber)
Definition: evgpe.c:372
ACPI_STATUS AcpiEvAddressSpaceDispatch(ACPI_OPERAND_OBJECT *RegionObj, ACPI_OPERAND_OBJECT *FieldObj, UINT32 Function, UINT32 RegionOffset, UINT32 BitWidth, UINT64 *Value)
Definition: evregion.c:150
void AcpiEvExecuteRegMethods(ACPI_NAMESPACE_NODE *Node, ACPI_ADR_SPACE_TYPE SpaceId, UINT32 Function)
Definition: evregion.c:761
ACPI_STATUS AcpiEvQueueNotifyRequest(ACPI_NAMESPACE_NODE *Node, UINT32 NotifyValue)
Definition: evmisc.c:111
UINT32 AcpiEvGpeDetect(ACPI_GPE_XRUPT_INFO *GpeXruptList)
Definition: evgpe.c:433
ACPI_STATUS AcpiEvPciBarRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:450
ACPI_STATUS AcpiEvCmosRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:481
ACPI_STATUS AcpiEvDeleteGpeHandlers(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: evgpeutil.c:339
UINT32 AcpiEvSciDispatch(void)
Definition: evsci.c:75
ACPI_STATUS AcpiEvInstallSpaceHandler(ACPI_NAMESPACE_NODE *Node, ACPI_ADR_SPACE_TYPE SpaceId, ACPI_ADR_SPACE_HANDLER Handler, ACPI_ADR_SPACE_SETUP Setup, void *Context)
Definition: evhandler.c:389
ACPI_STATUS AcpiEvInitializeRegion(ACPI_OPERAND_OBJECT *RegionObj)
Definition: evrgnini.c:629
ACPI_STATUS AcpiEvInitializeGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: evgpeblk.c:481
ACPI_STATUS AcpiEvIoSpaceRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:139
ACPI_STATUS AcpiEvInstallRegionHandlers(void)
Definition: evhandler.c:88
ACPI_STATUS AcpiEvInitializeEvents(void)
Definition: evevent.c:77
BOOLEAN AcpiEvHasDefaultHandler(ACPI_NAMESPACE_NODE *Node, ACPI_ADR_SPACE_TYPE SpaceId)
Definition: evhandler.c:166
ACPI_STATUS AcpiEvAttachRegion(ACPI_OPERAND_OBJECT *HandlerObj, ACPI_OPERAND_OBJECT *RegionObj, BOOLEAN AcpiNsIsLocked)
Definition: evregion.c:568
ACPI_STATUS AcpiEvInstallXruptHandlers(void)
Definition: evevent.c:131
ACPI_STATUS AcpiEvInitGlobalLockHandler(void)
Definition: evglock.c:74
void AcpiEvDetachRegion(ACPI_OPERAND_OBJECT *RegionObj, BOOLEAN AcpiNsIsLocked)
Definition: evregion.c:398
ACPI_STATUS AcpiEvWalkGpeList(ACPI_GPE_CALLBACK GpeWalkCallback, void *Context)
Definition: evgpeutil.c:67
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
ACPI_OPERAND_OBJECT * AcpiEvFindRegionHandler(ACPI_ADR_SPACE_TYPE SpaceId, ACPI_OPERAND_OBJECT *HandlerObj)
Definition: evhandler.c:346
ACPI_STATUS AcpiEvDataTableRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:512
BOOLEAN AcpiEvIsNotifyObject(ACPI_NAMESPACE_NODE *Node)
Definition: evmisc.c:75
ACPI_STATUS AcpiEvMaskGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo, BOOLEAN IsMasked)
Definition: evgpe.c:156
ACPI_STATUS AcpiEvSystemMemoryRegionSetup(ACPI_HANDLE Handle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: evrgnini.c:70
ACPI_STATUS AcpiEvUpdateGpeEnableMask(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: evgpe.c:79
ACPI_STATUS AcpiEvGetGpeDevice(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: evgpeutil.c:130
ACPI_STATUS AcpiEvEnableGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: evgpe.c:126
ACPI_GPE_EVENT_INFO * AcpiEvLowGetGpeInfo(UINT32 GpeNumber, ACPI_GPE_BLOCK_INFO *GpeBlock)
Definition: evgpe.c:327
UINT32 AcpiEvDetectGpe(ACPI_NAMESPACE_NODE *GpeDevice, ACPI_GPE_EVENT_INFO *GpeEventInfo, UINT32 GpeNumber)
Definition: evgpe.c:722
ACPI_STATUS AcpiEvGetGpeXruptBlock(UINT32 InterruptNumber, ACPI_GPE_XRUPT_INFO **GpeXruptBlock)
Definition: evgpeutil.c:178
UINT32 AcpiEvFixedEventDetect(void)
Definition: evevent.c:233
ACPI_STATUS AcpiEvInitializeOpRegions(void)
Definition: evregion.c:86
ACPI_STATUS AcpiEvRemoveGpeReference(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: evgpe.c:276
ACPI_STATUS AcpiEvRemoveAllSciHandlers(void)
Definition: evsci.c:246
ACPI_STATUS AcpiEvAddGpeReference(ACPI_GPE_EVENT_INFO *GpeEventInfo, BOOLEAN ClearOnEnable)
Definition: evgpe.c:221
ACPI_GPE_EVENT_INFO UINT32 GpeNumber
Definition: acevents.h:196
ACPI_STATUS AcpiEvCreateGpeBlock(ACPI_NAMESPACE_NODE *GpeDevice, UINT64 Address, UINT8 SpaceId, UINT32 RegisterCount, UINT16 GpeBlockBaseNumber, UINT32 InterruptNumber, ACPI_GPE_BLOCK_INFO **ReturnGpeBlock)
Definition: evgpeblk.c:371
ACPI_STATUS(* ACPI_GPE_CALLBACK)(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: aclocal.h:628
#define ACPI_HW_DEPENDENT_RETURN_OK(Prototype)
Definition: acpixf.h:338
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE ACPI_ADR_SPACE_HANDLER ACPI_ADR_SPACE_SETUP Setup
Definition: acpixf.h:834
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE SpaceId
Definition: acpixf.h:832
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:672
#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype)
Definition: acpixf.h:344
UINT8 ACPI_ADR_SPACE_TYPE
Definition: actypes.h:859
ACPI_STATUS(* ACPI_ADR_SPACE_SETUP)(ACPI_HANDLE RegionHandle, UINT32 Function, void *HandlerContext, void **RegionContext)
Definition: actypes.h:1239
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS(* ACPI_ADR_SPACE_HANDLER)(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT64 *Value, void *HandlerContext, void *RegionContext)
Definition: actypes.h:1203
UINT16 ACPI_OWNER_ID
Definition: actypes.h:486
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1156
ACPI_STATUS AcpiEvReleaseGlobalLock(void)
Definition: evglock.c:333
ACPI_STATUS AcpiEvAcquireGlobalLock(UINT16 Timeout)
Definition: evglock.c:230
ACPI_STATUS AcpiEvRemoveGlobalLockHandler(void)
Definition: evglock.c:135
UINT32 AcpiEvGpeDispatch(ACPI_NAMESPACE_NODE *GpeDevice, ACPI_GPE_EVENT_INFO *GpeEventInfo, UINT32 GpeNumber)
Definition: evgpe.c:857
ACPI_STATUS AcpiEvDeleteGpeBlock(ACPI_GPE_BLOCK_INFO *GpeBlock)
Definition: evgpeblk.c:148
ACPI_STATUS AcpiEvMatchGpeMethod(ACPI_HANDLE ObjHandle, UINT32 Level, void *Context, void **ReturnValue)
Definition: evgpeinit.c:327
void AcpiEvUpdateGpes(ACPI_OWNER_ID TableOwnerId)
Definition: evgpeinit.c:233
void AcpiEvTerminate(void)
Definition: evmisc.c:263
ULONG Handle
Definition: gdb_input.c:15
static WCHAR Address[46]
Definition: ping.c:68
static ULONG Timeout
Definition: ping.c:61
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413