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_GPE_XRUPT_INFO * 210 AcpiEvGetGpeXruptBlock ( 211 UINT32 InterruptNumber); 212 213 ACPI_STATUS 214 AcpiEvDeleteGpeXrupt ( 215 ACPI_GPE_XRUPT_INFO *GpeXrupt); 216 217 ACPI_STATUS 218 AcpiEvDeleteGpeHandlers ( 219 ACPI_GPE_XRUPT_INFO *GpeXruptInfo, 220 ACPI_GPE_BLOCK_INFO *GpeBlock, 221 void *Context); 222 223 224 /* 225 * evhandler - Address space handling 226 */ 227 BOOLEAN 228 AcpiEvHasDefaultHandler ( 229 ACPI_NAMESPACE_NODE *Node, 230 ACPI_ADR_SPACE_TYPE SpaceId); 231 232 ACPI_STATUS 233 AcpiEvInstallRegionHandlers ( 234 void); 235 236 ACPI_STATUS 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, 242 void *Context); 243 244 245 /* 246 * evregion - Operation region support 247 */ 248 ACPI_STATUS 249 AcpiEvInitializeOpRegions ( 250 void); 251 252 ACPI_STATUS 253 AcpiEvAddressSpaceDispatch ( 254 ACPI_OPERAND_OBJECT *RegionObj, 255 ACPI_OPERAND_OBJECT *FieldObj, 256 UINT32 Function, 257 UINT32 RegionOffset, 258 UINT32 BitWidth, 259 UINT64 *Value); 260 261 ACPI_STATUS 262 AcpiEvAttachRegion ( 263 ACPI_OPERAND_OBJECT *HandlerObj, 264 ACPI_OPERAND_OBJECT *RegionObj, 265 BOOLEAN AcpiNsIsLocked); 266 267 void 268 AcpiEvDetachRegion ( 269 ACPI_OPERAND_OBJECT *RegionObj, 270 BOOLEAN AcpiNsIsLocked); 271 272 ACPI_STATUS 273 AcpiEvExecuteRegMethods ( 274 ACPI_NAMESPACE_NODE *Node, 275 ACPI_ADR_SPACE_TYPE SpaceId); 276 277 ACPI_STATUS 278 AcpiEvExecuteRegMethod ( 279 ACPI_OPERAND_OBJECT *RegionObj, 280 UINT32 Function); 281 282 283 /* 284 * evregini - Region initialization and setup 285 */ 286 ACPI_STATUS 287 AcpiEvSystemMemoryRegionSetup ( 288 ACPI_HANDLE Handle, 289 UINT32 Function, 290 void *HandlerContext, 291 void **RegionContext); 292 293 ACPI_STATUS 294 AcpiEvIoSpaceRegionSetup ( 295 ACPI_HANDLE Handle, 296 UINT32 Function, 297 void *HandlerContext, 298 void **RegionContext); 299 300 ACPI_STATUS 301 AcpiEvPciConfigRegionSetup ( 302 ACPI_HANDLE Handle, 303 UINT32 Function, 304 void *HandlerContext, 305 void **RegionContext); 306 307 ACPI_STATUS 308 AcpiEvCmosRegionSetup ( 309 ACPI_HANDLE Handle, 310 UINT32 Function, 311 void *HandlerContext, 312 void **RegionContext); 313 314 ACPI_STATUS 315 AcpiEvPciBarRegionSetup ( 316 ACPI_HANDLE Handle, 317 UINT32 Function, 318 void *HandlerContext, 319 void **RegionContext); 320 321 ACPI_STATUS 322 AcpiEvDefaultRegionSetup ( 323 ACPI_HANDLE Handle, 324 UINT32 Function, 325 void *HandlerContext, 326 void **RegionContext); 327 328 ACPI_STATUS 329 AcpiEvInitializeRegion ( 330 ACPI_OPERAND_OBJECT *RegionObj, 331 BOOLEAN AcpiNsLocked); 332 333 334 /* 335 * evsci - SCI (System Control Interrupt) handling/dispatch 336 */ 337 UINT32 ACPI_SYSTEM_XFACE 338 AcpiEvGpeXruptHandler ( 339 void *Context); 340 341 UINT32 342 AcpiEvSciDispatch ( 343 void); 344 345 UINT32 346 AcpiEvInstallSciHandler ( 347 void); 348 349 ACPI_STATUS 350 AcpiEvRemoveAllSciHandlers ( 351 void); 352 353 ACPI_HW_DEPENDENT_RETURN_VOID ( 354 void 355 AcpiEvTerminate ( 356 void)) 357 358 #endif /* __ACEVENTS_H__ */ 359