acpixf.h revision 100966
1 2/****************************************************************************** 3 * 4 * Name: acpixf.h - External interfaces to the ACPI subsystem 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117 118#ifndef __ACXFACE_H__ 119#define __ACXFACE_H__ 120 121#include "actypes.h" 122#include "actbl.h" 123 124 125 /* 126 * Global interfaces 127 */ 128 129ACPI_STATUS 130AcpiInitializeSubsystem ( 131 void); 132 133ACPI_STATUS 134AcpiEnableSubsystem ( 135 UINT32 Flags); 136 137ACPI_STATUS 138AcpiInitializeObjects ( 139 UINT32 Flags); 140 141ACPI_STATUS 142AcpiTerminate ( 143 void); 144 145ACPI_STATUS 146AcpiSubsystemStatus ( 147 void); 148 149ACPI_STATUS 150AcpiEnable ( 151 void); 152 153ACPI_STATUS 154AcpiDisable ( 155 void); 156 157ACPI_STATUS 158AcpiGetSystemInfo ( 159 ACPI_BUFFER *RetBuffer); 160 161const char * 162AcpiFormatException ( 163 ACPI_STATUS Exception); 164 165ACPI_STATUS 166AcpiPurgeCachedObjects ( 167 void); 168 169ACPI_STATUS 170AcpiInstallInitializationHandler ( 171 ACPI_INIT_HANDLER Handler, 172 UINT32 Function); 173 174/* 175 * ACPI Memory manager 176 */ 177 178void * 179AcpiAllocate ( 180 UINT32 Size); 181 182void * 183AcpiCallocate ( 184 UINT32 Size); 185 186void 187AcpiFree ( 188 void *Address); 189 190 191/* 192 * ACPI table manipulation interfaces 193 */ 194 195ACPI_STATUS 196AcpiFindRootPointer ( 197 UINT32 Flags, 198 ACPI_POINTER *RsdpAddress); 199 200ACPI_STATUS 201AcpiLoadTables ( 202 void); 203 204ACPI_STATUS 205AcpiLoadTable ( 206 ACPI_TABLE_HEADER *TablePtr); 207 208ACPI_STATUS 209AcpiUnloadTable ( 210 ACPI_TABLE_TYPE TableType); 211 212ACPI_STATUS 213AcpiGetTableHeader ( 214 ACPI_TABLE_TYPE TableType, 215 UINT32 Instance, 216 ACPI_TABLE_HEADER *OutTableHeader); 217 218ACPI_STATUS 219AcpiGetTable ( 220 ACPI_TABLE_TYPE TableType, 221 UINT32 Instance, 222 ACPI_BUFFER *RetBuffer); 223 224ACPI_STATUS 225AcpiGetFirmwareTable ( 226 ACPI_STRING Signature, 227 UINT32 Instance, 228 UINT32 Flags, 229 ACPI_TABLE_HEADER **TablePointer); 230 231 232/* 233 * Namespace and name interfaces 234 */ 235 236ACPI_STATUS 237AcpiWalkNamespace ( 238 ACPI_OBJECT_TYPE Type, 239 ACPI_HANDLE StartObject, 240 UINT32 MaxDepth, 241 ACPI_WALK_CALLBACK UserFunction, 242 void *Context, 243 void * *ReturnValue); 244 245ACPI_STATUS 246AcpiGetDevices ( 247 NATIVE_CHAR *HID, 248 ACPI_WALK_CALLBACK UserFunction, 249 void *Context, 250 void **ReturnValue); 251 252ACPI_STATUS 253AcpiGetName ( 254 ACPI_HANDLE Handle, 255 UINT32 NameType, 256 ACPI_BUFFER *RetPathPtr); 257 258ACPI_STATUS 259AcpiGetHandle ( 260 ACPI_HANDLE Parent, 261 ACPI_STRING Pathname, 262 ACPI_HANDLE *RetHandle); 263 264ACPI_STATUS 265AcpiAttachData ( 266 ACPI_HANDLE ObjHandle, 267 ACPI_OBJECT_HANDLER Handler, 268 void *Data); 269 270ACPI_STATUS 271AcpiDetachData ( 272 ACPI_HANDLE ObjHandle, 273 ACPI_OBJECT_HANDLER Handler); 274 275ACPI_STATUS 276AcpiGetData ( 277 ACPI_HANDLE ObjHandle, 278 ACPI_OBJECT_HANDLER Handler, 279 void **Data); 280 281 282/* 283 * Object manipulation and enumeration 284 */ 285 286ACPI_STATUS 287AcpiEvaluateObject ( 288 ACPI_HANDLE Object, 289 ACPI_STRING Pathname, 290 ACPI_OBJECT_LIST *ParameterObjects, 291 ACPI_BUFFER *ReturnObjectBuffer); 292 293ACPI_STATUS 294AcpiEvaluateObjectTyped ( 295 ACPI_HANDLE Object, 296 ACPI_STRING Pathname, 297 ACPI_OBJECT_LIST *ExternalParams, 298 ACPI_BUFFER *ReturnBuffer, 299 ACPI_OBJECT_TYPE ReturnType); 300 301ACPI_STATUS 302AcpiGetObjectInfo ( 303 ACPI_HANDLE Device, 304 ACPI_DEVICE_INFO *Info); 305 306ACPI_STATUS 307AcpiGetNextObject ( 308 ACPI_OBJECT_TYPE Type, 309 ACPI_HANDLE Parent, 310 ACPI_HANDLE Child, 311 ACPI_HANDLE *OutHandle); 312 313ACPI_STATUS 314AcpiGetType ( 315 ACPI_HANDLE Object, 316 ACPI_OBJECT_TYPE *OutType); 317 318ACPI_STATUS 319AcpiGetParent ( 320 ACPI_HANDLE Object, 321 ACPI_HANDLE *OutHandle); 322 323 324/* 325 * Event handler interfaces 326 */ 327 328ACPI_STATUS 329AcpiInstallFixedEventHandler ( 330 UINT32 AcpiEvent, 331 ACPI_EVENT_HANDLER Handler, 332 void *Context); 333 334ACPI_STATUS 335AcpiRemoveFixedEventHandler ( 336 UINT32 AcpiEvent, 337 ACPI_EVENT_HANDLER Handler); 338 339ACPI_STATUS 340AcpiInstallNotifyHandler ( 341 ACPI_HANDLE Device, 342 UINT32 HandlerType, 343 ACPI_NOTIFY_HANDLER Handler, 344 void *Context); 345 346ACPI_STATUS 347AcpiRemoveNotifyHandler ( 348 ACPI_HANDLE Device, 349 UINT32 HandlerType, 350 ACPI_NOTIFY_HANDLER Handler); 351 352ACPI_STATUS 353AcpiInstallAddressSpaceHandler ( 354 ACPI_HANDLE Device, 355 ACPI_ADR_SPACE_TYPE SpaceId, 356 ACPI_ADR_SPACE_HANDLER Handler, 357 ACPI_ADR_SPACE_SETUP Setup, 358 void *Context); 359 360ACPI_STATUS 361AcpiRemoveAddressSpaceHandler ( 362 ACPI_HANDLE Device, 363 ACPI_ADR_SPACE_TYPE SpaceId, 364 ACPI_ADR_SPACE_HANDLER Handler); 365 366ACPI_STATUS 367AcpiInstallGpeHandler ( 368 UINT32 GpeNumber, 369 UINT32 Type, 370 ACPI_GPE_HANDLER Handler, 371 void *Context); 372 373ACPI_STATUS 374AcpiAcquireGlobalLock ( 375 UINT32 Timeout, 376 UINT32 *Handle); 377 378ACPI_STATUS 379AcpiReleaseGlobalLock ( 380 UINT32 Handle); 381 382ACPI_STATUS 383AcpiRemoveGpeHandler ( 384 UINT32 GpeNumber, 385 ACPI_GPE_HANDLER Handler); 386 387ACPI_STATUS 388AcpiEnableEvent ( 389 UINT32 AcpiEvent, 390 UINT32 Type, 391 UINT32 Flags); 392 393ACPI_STATUS 394AcpiDisableEvent ( 395 UINT32 AcpiEvent, 396 UINT32 Type, 397 UINT32 Flags); 398 399ACPI_STATUS 400AcpiClearEvent ( 401 UINT32 AcpiEvent, 402 UINT32 Type); 403 404ACPI_STATUS 405AcpiGetEventStatus ( 406 UINT32 AcpiEvent, 407 UINT32 Type, 408 ACPI_EVENT_STATUS *EventStatus); 409 410/* 411 * Resource interfaces 412 */ 413 414ACPI_STATUS 415AcpiGetCurrentResources( 416 ACPI_HANDLE DeviceHandle, 417 ACPI_BUFFER *RetBuffer); 418 419ACPI_STATUS 420AcpiGetPossibleResources( 421 ACPI_HANDLE DeviceHandle, 422 ACPI_BUFFER *RetBuffer); 423 424ACPI_STATUS 425AcpiSetCurrentResources ( 426 ACPI_HANDLE DeviceHandle, 427 ACPI_BUFFER *InBuffer); 428 429ACPI_STATUS 430AcpiGetIrqRoutingTable ( 431 ACPI_HANDLE BusDeviceHandle, 432 ACPI_BUFFER *RetBuffer); 433 434 435/* 436 * Hardware (ACPI device) interfaces 437 */ 438 439ACPI_STATUS 440AcpiGetRegister ( 441 UINT32 RegisterId, 442 UINT32 *ReturnValue, 443 UINT32 Flags); 444 445ACPI_STATUS 446AcpiSetRegister ( 447 UINT32 RegisterId, 448 UINT32 Value, 449 UINT32 Flags); 450 451ACPI_STATUS 452AcpiSetFirmwareWakingVector ( 453 ACPI_PHYSICAL_ADDRESS PhysicalAddress); 454 455ACPI_STATUS 456AcpiGetFirmwareWakingVector ( 457 ACPI_PHYSICAL_ADDRESS *PhysicalAddress); 458 459ACPI_STATUS 460AcpiGetSleepTypeData ( 461 UINT8 SleepState, 462 UINT8 *Slp_TypA, 463 UINT8 *Slp_TypB); 464 465ACPI_STATUS 466AcpiEnterSleepStatePrep ( 467 UINT8 SleepState); 468 469ACPI_STATUS 470AcpiEnterSleepState ( 471 UINT8 SleepState); 472 473ACPI_STATUS 474AcpiLeaveSleepState ( 475 UINT8 SleepState); 476 477 478#endif /* __ACXFACE_H__ */ 479