1 /******************************************************************************
3 * Name: acevents.h - Event subcomponent prototypes and defines
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2013, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
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.
44 #ifndef __ACEVENTS_H__
45 #define __ACEVENTS_H__
52 AcpiEvInitializeEvents (
56 AcpiEvInstallXruptHandlers (
60 AcpiEvFixedEventDetect (
68 AcpiEvIsNotifyObject (
69 ACPI_NAMESPACE_NODE
*Node
);
72 AcpiEvGetGpeNumberIndex (
76 AcpiEvQueueNotifyRequest (
77 ACPI_NAMESPACE_NODE
*Node
,
82 * evglock - Global Lock support
85 AcpiEvInitGlobalLockHandler (
88 ACPI_HW_DEPENDENT_RETURN_OK (
90 AcpiEvAcquireGlobalLock(
93 ACPI_HW_DEPENDENT_RETURN_OK (
95 AcpiEvReleaseGlobalLock(
99 AcpiEvRemoveGlobalLockHandler (
104 * evgpe - Low-level GPE support
108 ACPI_GPE_XRUPT_INFO
*GpeXruptList
);
111 AcpiEvUpdateGpeEnableMask (
112 ACPI_GPE_EVENT_INFO
*GpeEventInfo
);
116 ACPI_GPE_EVENT_INFO
*GpeEventInfo
);
119 AcpiEvAddGpeReference (
120 ACPI_GPE_EVENT_INFO
*GpeEventInfo
);
123 AcpiEvRemoveGpeReference (
124 ACPI_GPE_EVENT_INFO
*GpeEventInfo
);
126 ACPI_GPE_EVENT_INFO
*
127 AcpiEvGetGpeEventInfo (
128 ACPI_HANDLE GpeDevice
,
131 ACPI_GPE_EVENT_INFO
*
132 AcpiEvLowGetGpeInfo (
134 ACPI_GPE_BLOCK_INFO
*GpeBlock
);
138 ACPI_GPE_EVENT_INFO
*GpeEventInfo
);
142 * evgpeblk - Upper-level GPE block support
145 AcpiEvCreateGpeBlock (
146 ACPI_NAMESPACE_NODE
*GpeDevice
,
147 ACPI_GENERIC_ADDRESS
*GpeBlockAddress
,
148 UINT32 RegisterCount
,
149 UINT8 GpeBlockBaseNumber
,
150 UINT32 InterruptNumber
,
151 ACPI_GPE_BLOCK_INFO
**ReturnGpeBlock
);
154 AcpiEvInitializeGpeBlock (
155 ACPI_GPE_XRUPT_INFO
*GpeXruptInfo
,
156 ACPI_GPE_BLOCK_INFO
*GpeBlock
,
159 ACPI_HW_DEPENDENT_RETURN_OK (
161 AcpiEvDeleteGpeBlock (
162 ACPI_GPE_BLOCK_INFO
*GpeBlock
))
166 ACPI_NAMESPACE_NODE
*GpeDevice
,
167 ACPI_GPE_EVENT_INFO
*GpeEventInfo
,
172 * evgpeinit - GPE initialization and update
175 AcpiEvGpeInitialize (
178 ACPI_HW_DEPENDENT_RETURN_VOID (
181 ACPI_OWNER_ID TableOwnerId
))
184 AcpiEvMatchGpeMethod (
185 ACPI_HANDLE ObjHandle
,
192 * evgpeutil - GPE utilities
196 ACPI_GPE_CALLBACK GpeWalkCallback
,
200 AcpiEvValidGpeEvent (
201 ACPI_GPE_EVENT_INFO
*GpeEventInfo
);
205 ACPI_GPE_XRUPT_INFO
*GpeXruptInfo
,
206 ACPI_GPE_BLOCK_INFO
*GpeBlock
,
209 ACPI_GPE_XRUPT_INFO
*
210 AcpiEvGetGpeXruptBlock (
211 UINT32 InterruptNumber
);
214 AcpiEvDeleteGpeXrupt (
215 ACPI_GPE_XRUPT_INFO
*GpeXrupt
);
218 AcpiEvDeleteGpeHandlers (
219 ACPI_GPE_XRUPT_INFO
*GpeXruptInfo
,
220 ACPI_GPE_BLOCK_INFO
*GpeBlock
,
225 * evhandler - Address space handling
228 AcpiEvHasDefaultHandler (
229 ACPI_NAMESPACE_NODE
*Node
,
230 ACPI_ADR_SPACE_TYPE SpaceId
);
233 AcpiEvInstallRegionHandlers (
237 AcpiEvInstallSpaceHandler (
238 ACPI_NAMESPACE_NODE
*Node
,
239 ACPI_ADR_SPACE_TYPE SpaceId
,
240 ACPI_ADR_SPACE_HANDLER Handler
,
241 ACPI_ADR_SPACE_SETUP Setup
,
246 * evregion - Operation region support
249 AcpiEvInitializeOpRegions (
253 AcpiEvAddressSpaceDispatch (
254 ACPI_OPERAND_OBJECT
*RegionObj
,
255 ACPI_OPERAND_OBJECT
*FieldObj
,
263 ACPI_OPERAND_OBJECT
*HandlerObj
,
264 ACPI_OPERAND_OBJECT
*RegionObj
,
265 BOOLEAN AcpiNsIsLocked
);
269 ACPI_OPERAND_OBJECT
*RegionObj
,
270 BOOLEAN AcpiNsIsLocked
);
273 AcpiEvExecuteRegMethods (
274 ACPI_NAMESPACE_NODE
*Node
,
275 ACPI_ADR_SPACE_TYPE SpaceId
);
278 AcpiEvExecuteRegMethod (
279 ACPI_OPERAND_OBJECT
*RegionObj
,
284 * evregini - Region initialization and setup
287 AcpiEvSystemMemoryRegionSetup (
290 void *HandlerContext
,
291 void **RegionContext
);
294 AcpiEvIoSpaceRegionSetup (
297 void *HandlerContext
,
298 void **RegionContext
);
301 AcpiEvPciConfigRegionSetup (
304 void *HandlerContext
,
305 void **RegionContext
);
308 AcpiEvCmosRegionSetup (
311 void *HandlerContext
,
312 void **RegionContext
);
315 AcpiEvPciBarRegionSetup (
318 void *HandlerContext
,
319 void **RegionContext
);
322 AcpiEvDefaultRegionSetup (
325 void *HandlerContext
,
326 void **RegionContext
);
329 AcpiEvInitializeRegion (
330 ACPI_OPERAND_OBJECT
*RegionObj
,
331 BOOLEAN AcpiNsLocked
);
335 * evsci - SCI (System Control Interrupt) handling/dispatch
337 UINT32 ACPI_SYSTEM_XFACE
338 AcpiEvGpeXruptHandler (
346 AcpiEvInstallSciHandler (
350 AcpiEvRemoveAllSciHandlers (
353 ACPI_HW_DEPENDENT_RETURN_VOID (
358 #endif /* __ACEVENTS_H__ */