1 /****************************************************************************** 2 * 3 * Name: acevents.h - Event subcomponent prototypes and defines 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2013, 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 #ifndef __ACEVENTS_H__ 45 #define __ACEVENTS_H__ 46 47 48 /* 49 * evevent 50 */ 51 ACPI_STATUS 52 AcpiEvInitializeEvents ( 53 void); 54 55 ACPI_STATUS 56 AcpiEvInstallXruptHandlers ( 57 void); 58 59 UINT32 60 AcpiEvFixedEventDetect ( 61 void); 62 63 64 /* 65 * evmisc 66 */ 67 BOOLEAN 68 AcpiEvIsNotifyObject ( 69 ACPI_NAMESPACE_NODE *Node); 70 71 UINT32 72 AcpiEvGetGpeNumberIndex ( 73 UINT32 GpeNumber); 74 75 ACPI_STATUS 76 AcpiEvQueueNotifyRequest ( 77 ACPI_NAMESPACE_NODE *Node, 78 UINT32 NotifyValue); 79 80 81 /* 82 * evglock - Global Lock support 83 */ 84 ACPI_STATUS 85 AcpiEvInitGlobalLockHandler ( 86 void); 87 88 ACPI_HW_DEPENDENT_RETURN_OK ( 89 ACPI_STATUS 90 AcpiEvAcquireGlobalLock( 91 UINT16 Timeout)) 92 93 ACPI_HW_DEPENDENT_RETURN_OK ( 94 ACPI_STATUS 95 AcpiEvReleaseGlobalLock( 96 void)) 97 98 ACPI_STATUS 99 AcpiEvRemoveGlobalLockHandler ( 100 void); 101 102 103 /* 104 * evgpe - Low-level GPE support 105 */ 106 UINT32 107 AcpiEvGpeDetect ( 108 ACPI_GPE_XRUPT_INFO *GpeXruptList); 109 110 ACPI_STATUS 111 AcpiEvUpdateGpeEnableMask ( 112 ACPI_GPE_EVENT_INFO *GpeEventInfo); 113 114 ACPI_STATUS 115 AcpiEvEnableGpe ( 116 ACPI_GPE_EVENT_INFO *GpeEventInfo); 117 118 ACPI_STATUS 119 AcpiEvAddGpeReference ( 120 ACPI_GPE_EVENT_INFO *GpeEventInfo); 121 122 ACPI_STATUS 123 AcpiEvRemoveGpeReference ( 124 ACPI_GPE_EVENT_INFO *GpeEventInfo); 125 126 ACPI_GPE_EVENT_INFO * 127 AcpiEvGetGpeEventInfo ( 128 ACPI_HANDLE GpeDevice, 129 UINT32 GpeNumber); 130 131 ACPI_GPE_EVENT_INFO * 132 AcpiEvLowGetGpeInfo ( 133 UINT32 GpeNumber, 134 ACPI_GPE_BLOCK_INFO *GpeBlock); 135 136 ACPI_STATUS 137 AcpiEvFinishGpe ( 138 ACPI_GPE_EVENT_INFO *GpeEventInfo); 139 140 141 /* 142 * evgpeblk - Upper-level GPE block support 143 */ 144 ACPI_STATUS 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); 152 153 ACPI_STATUS 154 AcpiEvInitializeGpeBlock ( 155 ACPI_GPE_XRUPT_INFO *GpeXruptInfo, 156 ACPI_GPE_BLOCK_INFO *GpeBlock, 157 void *Context); 158 159 ACPI_HW_DEPENDENT_RETURN_OK ( 160 ACPI_STATUS 161 AcpiEvDeleteGpeBlock ( 162 ACPI_GPE_BLOCK_INFO *GpeBlock)) 163 164 UINT32 165 AcpiEvGpeDispatch ( 166 ACPI_NAMESPACE_NODE *GpeDevice, 167 ACPI_GPE_EVENT_INFO *GpeEventInfo, 168 UINT32 GpeNumber); 169 170 171 /* 172 * evgpeinit - GPE initialization and update 173 */ 174 ACPI_STATUS 175 AcpiEvGpeInitialize ( 176 void); 177 178 ACPI_HW_DEPENDENT_RETURN_VOID ( 179 void 180 AcpiEvUpdateGpes ( 181 ACPI_OWNER_ID TableOwnerId)) 182 183 ACPI_STATUS 184 AcpiEvMatchGpeMethod ( 185 ACPI_HANDLE ObjHandle, 186 UINT32 Level, 187 void *Context, 188 void **ReturnValue); 189 190 191 /* 192 * evgpeutil - GPE utilities 193 */ 194 ACPI_STATUS 195 AcpiEvWalkGpeList ( 196 ACPI_GPE_CALLBACK GpeWalkCallback, 197 void *Context); 198 199 BOOLEAN 200 AcpiEvValidGpeEvent ( 201 ACPI_GPE_EVENT_INFO *GpeEventInfo); 202 203 ACPI_STATUS 204 AcpiEvGetGpeDevice ( 205 ACPI_GPE_XRUPT_INFO *GpeXruptInfo, 206 ACPI_GPE_BLOCK_INFO *GpeBlock, 207 void *Context); 208 209 ACPI_STATUS 210 AcpiEvGetGpeXruptBlock ( 211 UINT32 InterruptNumber, 212 ACPI_GPE_XRUPT_INFO **GpeXruptBlock); 213 214 ACPI_STATUS 215 AcpiEvDeleteGpeXrupt ( 216 ACPI_GPE_XRUPT_INFO *GpeXrupt); 217 218 ACPI_STATUS 219 AcpiEvDeleteGpeHandlers ( 220 ACPI_GPE_XRUPT_INFO *GpeXruptInfo, 221 ACPI_GPE_BLOCK_INFO *GpeBlock, 222 void *Context); 223 224 225 /* 226 * evhandler - Address space handling 227 */ 228 BOOLEAN 229 AcpiEvHasDefaultHandler ( 230 ACPI_NAMESPACE_NODE *Node, 231 ACPI_ADR_SPACE_TYPE SpaceId); 232 233 ACPI_STATUS 234 AcpiEvInstallRegionHandlers ( 235 void); 236 237 ACPI_STATUS 238 AcpiEvInstallSpaceHandler ( 239 ACPI_NAMESPACE_NODE *Node, 240 ACPI_ADR_SPACE_TYPE SpaceId, 241 ACPI_ADR_SPACE_HANDLER Handler, 242 ACPI_ADR_SPACE_SETUP Setup, 243 void *Context); 244 245 246 /* 247 * evregion - Operation region support 248 */ 249 ACPI_STATUS 250 AcpiEvInitializeOpRegions ( 251 void); 252 253 ACPI_STATUS 254 AcpiEvAddressSpaceDispatch ( 255 ACPI_OPERAND_OBJECT *RegionObj, 256 ACPI_OPERAND_OBJECT *FieldObj, 257 UINT32 Function, 258 UINT32 RegionOffset, 259 UINT32 BitWidth, 260 UINT64 *Value); 261 262 ACPI_STATUS 263 AcpiEvAttachRegion ( 264 ACPI_OPERAND_OBJECT *HandlerObj, 265 ACPI_OPERAND_OBJECT *RegionObj, 266 BOOLEAN AcpiNsIsLocked); 267 268 void 269 AcpiEvDetachRegion ( 270 ACPI_OPERAND_OBJECT *RegionObj, 271 BOOLEAN AcpiNsIsLocked); 272 273 ACPI_STATUS 274 AcpiEvExecuteRegMethods ( 275 ACPI_NAMESPACE_NODE *Node, 276 ACPI_ADR_SPACE_TYPE SpaceId); 277 278 ACPI_STATUS 279 AcpiEvExecuteRegMethod ( 280 ACPI_OPERAND_OBJECT *RegionObj, 281 UINT32 Function); 282 283 284 /* 285 * evregini - Region initialization and setup 286 */ 287 ACPI_STATUS 288 AcpiEvSystemMemoryRegionSetup ( 289 ACPI_HANDLE Handle, 290 UINT32 Function, 291 void *HandlerContext, 292 void **RegionContext); 293 294 ACPI_STATUS 295 AcpiEvIoSpaceRegionSetup ( 296 ACPI_HANDLE Handle, 297 UINT32 Function, 298 void *HandlerContext, 299 void **RegionContext); 300 301 ACPI_STATUS 302 AcpiEvPciConfigRegionSetup ( 303 ACPI_HANDLE Handle, 304 UINT32 Function, 305 void *HandlerContext, 306 void **RegionContext); 307 308 ACPI_STATUS 309 AcpiEvCmosRegionSetup ( 310 ACPI_HANDLE Handle, 311 UINT32 Function, 312 void *HandlerContext, 313 void **RegionContext); 314 315 ACPI_STATUS 316 AcpiEvPciBarRegionSetup ( 317 ACPI_HANDLE Handle, 318 UINT32 Function, 319 void *HandlerContext, 320 void **RegionContext); 321 322 ACPI_STATUS 323 AcpiEvDefaultRegionSetup ( 324 ACPI_HANDLE Handle, 325 UINT32 Function, 326 void *HandlerContext, 327 void **RegionContext); 328 329 ACPI_STATUS 330 AcpiEvInitializeRegion ( 331 ACPI_OPERAND_OBJECT *RegionObj, 332 BOOLEAN AcpiNsLocked); 333 334 335 /* 336 * evsci - SCI (System Control Interrupt) handling/dispatch 337 */ 338 UINT32 ACPI_SYSTEM_XFACE 339 AcpiEvGpeXruptHandler ( 340 void *Context); 341 342 UINT32 343 AcpiEvSciDispatch ( 344 void); 345 346 UINT32 347 AcpiEvInstallSciHandler ( 348 void); 349 350 ACPI_STATUS 351 AcpiEvRemoveAllSciHandlers ( 352 void); 353 354 ACPI_HW_DEPENDENT_RETURN_VOID ( 355 void 356 AcpiEvTerminate ( 357 void)) 358 359 #endif /* __ACEVENTS_H__ */