📄 aclocal.h
字号:
/****************************************************************************** * * Name: aclocal.h - Internal data types used across the ACPI subsystem * $Revision: 1.250 $ * *****************************************************************************//****************************************************************************** * * 1. Copyright Notice * * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. * All rights reserved. * * 2. License * * 2.1. This is your license from Intel Corp. under its intellectual property * rights. You may have additional license terms from the party that provided * you this software, covering your right to use that party's intellectual * property rights. * * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a * copy of the source code appearing in this file ("Covered Code") an * irrevocable, perpetual, worldwide license under Intel's copyrights in the * base code distributed originally by Intel ("Original Intel Code") to copy, * make derivatives, distribute, use and display any portion of the Covered * Code in any form, with the right to sublicense such rights; and * * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent * license (with the right to sublicense), under only those claims of Intel * patents that are infringed by the Original Intel Code, to make, use, sell, * offer to sell, and import the Covered Code and derivative works thereof * solely to the minimum extent necessary to exercise the above copyright * license, and in no event shall the patent license extend to any additions * to or modifications of the Original Intel Code. No other license or right * is granted directly or by implication, estoppel or otherwise; * * The above copyright and patent license is granted only if the following * conditions are met: * * 3. Conditions * * 3.1. Redistribution of Source with Rights to Further Distribute Source. * Redistribution of source code of any substantial portion of the Covered * Code or modification with rights to further distribute source must include * the above Copyright Notice, the above License, this list of Conditions, * and the following Disclaimer and Export Compliance provision. In addition, * Licensee must cause all Covered Code to which Licensee contributes to * contain a file documenting the changes Licensee made to create that Covered * Code and the date of any change. Licensee must include in that file the * documentation of any changes made by any predecessor Licensee. Licensee * must include a prominent statement that the modification is derived, * directly or indirectly, from Original Intel Code. * * 3.2. Redistribution of Source with no Rights to Further Distribute Source. * Redistribution of source code of any substantial portion of the Covered * Code or modification without rights to further distribute source must * include the following Disclaimer and Export Compliance provision in the * documentation and/or other materials provided with distribution. In * addition, Licensee may not authorize further sublicense of source of any * portion of the Covered Code, and must include terms to the effect that the * license from Licensee to its licensee is limited to the intellectual * property embodied in the software Licensee provides to its licensee, and * not to intellectual property embodied in modifications its licensee may * make. * * 3.3. Redistribution of Executable. Redistribution in executable form of any * substantial portion of the Covered Code or modification must reproduce the * above Copyright Notice, and the following Disclaimer and Export Compliance * provision in the documentation and/or other materials provided with the * distribution. * * 3.4. Intel retains all right, title, and interest in and to the Original * Intel Code. * * 3.5. Neither the name Intel nor any other trademark owned or controlled by * Intel shall be used in advertising or otherwise to promote the sale, use or * other dealings in products derived from or relating to the Covered Code * without prior written authorization from Intel. * * 4. Disclaimer and Export Compliance * * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A * PARTICULAR PURPOSE. * * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY * LIMITED REMEDY. * * 4.3. Licensee shall not export, either directly or indirectly, any of this * software or system incorporating such software without first obtaining any * required license or other approval from the U. S. Department of Commerce or * any other agency or department of the United States Government. In the * event Licensee exports any such software from the United States or * re-exports any such software from a foreign destination, Licensee shall * ensure that the distribution and export/re-export of the software is in * compliance with all laws, regulations, orders, or other restrictions of the * U.S. Export Administration Regulations. Licensee agrees that neither it nor * any of its subsidiaries will export/re-export any technical data, process, * software, or service, directly or indirectly, to any country for which the * United States government or any agency thereof requires an export license, * other governmental approval, or letter of assurance, without first obtaining * such license, approval or letter. * *****************************************************************************/#ifndef __ACLOCAL_H__#define __ACLOCAL_H__/* acpisrc:StructDefs -- for acpisrc conversion */#define ACPI_WAIT_FOREVER 0xFFFF /* UINT16, as per ACPI spec */#define ACPI_DO_NOT_WAIT 0#define ACPI_SERIALIZED 0xFFtypedef UINT32 ACPI_MUTEX_HANDLE;#define ACPI_GLOBAL_LOCK (ACPI_SEMAPHORE) (-1)/* Total number of aml opcodes defined */#define AML_NUM_OPCODES 0x7F/* Forward declarations */struct acpi_walk_state;struct acpi_obj_mutex;union acpi_parse_object;/***************************************************************************** * * Mutex typedefs and structs * ****************************************************************************//* * Predefined handles for the mutex objects used within the subsystem * All mutex objects are automatically created by AcpiUtMutexInitialize. * * The acquire/release ordering protocol is implied via this list. Mutexes * with a lower value must be acquired before mutexes with a higher value. * * NOTE: any changes here must be reflected in the AcpiGbl_MutexNames * table below also! */#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */#define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */#define ACPI_MAX_MUTEX 7#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)#ifdef DEFINE_ACPI_GLOBALS/* Debug names for the mutexes above */static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] ={ "ACPI_MTX_Interpreter", "ACPI_MTX_Tables", "ACPI_MTX_Namespace", "ACPI_MTX_Events", "ACPI_MTX_Caches", "ACPI_MTX_Memory", "ACPI_MTX_CommandComplete", "ACPI_MTX_CommandReady"};#endif#endif/* * Predefined handles for spinlocks used within the subsystem. * These spinlocks are created by AcpiUtMutexInitialize */#define ACPI_LOCK_GPES 0#define ACPI_LOCK_HARDWARE 1#define ACPI_MAX_LOCK 1#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1/* Owner IDs are used to track namespace nodes for selective deletion */typedef UINT8 ACPI_OWNER_ID;#define ACPI_OWNER_ID_MAX 0xFF/* This Thread ID means that the mutex is not in use (unlocked) */#define ACPI_MUTEX_NOT_ACQUIRED (UINT32) -1/* Table for the global mutexes */typedef struct acpi_mutex_info{ ACPI_MUTEX Mutex; UINT32 UseCount; ACPI_THREAD_ID ThreadId;} ACPI_MUTEX_INFO;/* Lock flag parameter for various interfaces */#define ACPI_MTX_DO_NOT_LOCK 0#define ACPI_MTX_LOCK 1/* Field access granularities */#define ACPI_FIELD_BYTE_GRANULARITY 1#define ACPI_FIELD_WORD_GRANULARITY 2#define ACPI_FIELD_DWORD_GRANULARITY 4#define ACPI_FIELD_QWORD_GRANULARITY 8#define ACPI_ENTRY_NOT_FOUND NULL/***************************************************************************** * * Namespace typedefs and structs * ****************************************************************************//* Operational modes of the AML interpreter/scanner */typedef enum{ ACPI_IMODE_LOAD_PASS1 = 0x01, ACPI_IMODE_LOAD_PASS2 = 0x02, ACPI_IMODE_EXECUTE = 0x03} ACPI_INTERPRETER_MODE;typedef union acpi_name_union{ UINT32 Integer; char Ascii[4];} ACPI_NAME_UNION;/* * The Namespace Node describes a named object that appears in the AML. * DescriptorType is used to differentiate between internal descriptors. * * The node is optimized for both 32-bit and 64-bit platforms: * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. * * Note: The DescriptorType and Type fields must appear in the identical * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT * structures. */typedef struct acpi_namespace_node{ union acpi_operand_object *Object; /* Interpreter object */ UINT8 DescriptorType; /* Differentiate object descriptor types */ UINT8 Type; /* ACPI Type associated with this name */ UINT8 Flags; /* Miscellaneous flags */ ACPI_OWNER_ID OwnerId; /* Node creator */ ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */ struct acpi_namespace_node *Child; /* First child */ struct acpi_namespace_node *Peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */ /* * The following fields are used by the ASL compiler and disassembler only */#ifdef ACPI_LARGE_NAMESPACE_NODE union acpi_parse_object *Op; UINT32 Value; UINT32 Length;#endif} ACPI_NAMESPACE_NODE;/* Namespace Node flags */#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */#define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */#define ANOBJ_IS_BIT_OFFSET 0x40 /* iASL only: Reference is a bit offset */#define ANOBJ_IS_REFERENCED 0x80 /* iASL only: Object was referenced *//* * ACPI Table Descriptor. One per ACPI table */typedef struct acpi_table_desc{ ACPI_PHYSICAL_ADDRESS Address; ACPI_TABLE_HEADER *Pointer; UINT32 Length; /* Length fixed at 32 bits */ ACPI_NAME_UNION Signature; ACPI_OWNER_ID OwnerId; UINT8 Flags;} ACPI_TABLE_DESC;/* Flags for above */#define ACPI_TABLE_ORIGIN_UNKNOWN (0)#define ACPI_TABLE_ORIGIN_MAPPED (1)#define ACPI_TABLE_ORIGIN_ALLOCATED (2)#define ACPI_TABLE_ORIGIN_MASK (3)#define ACPI_TABLE_IS_LOADED (4)/* One internal RSDT for table management */typedef struct acpi_internal_rsdt{ ACPI_TABLE_DESC *Tables; UINT32 Count; UINT32 Size; UINT8 Flags;} ACPI_INTERNAL_RSDT;/* Flags for above */#define ACPI_ROOT_ORIGIN_UNKNOWN (0) /* ~ORIGIN_ALLOCATED */#define ACPI_ROOT_ORIGIN_ALLOCATED (1)#define ACPI_ROOT_ALLOW_RESIZE (2)/* Predefined (fixed) table indexes */#define ACPI_TABLE_INDEX_DSDT (0)#define ACPI_TABLE_INDEX_FACS (1)typedef struct acpi_find_context{ char *SearchFor; ACPI_HANDLE *List; UINT32 *Count;} ACPI_FIND_CONTEXT;typedef struct acpi_ns_search_data{ ACPI_NAMESPACE_NODE *Node;} ACPI_NS_SEARCH_DATA;/* * Predefined Namespace items */typedef struct acpi_predefined_names{ char *Name; UINT8 Type; char *Val;} ACPI_PREDEFINED_NAMES;/* Object types used during package copies */#define ACPI_COPY_TYPE_SIMPLE 0#define ACPI_COPY_TYPE_PACKAGE 1/* Info structure used to convert external<->internal namestrings */typedef struct acpi_namestring_info{ char *ExternalName; char *NextExternalChar; char *InternalName; UINT32 Length; UINT32 NumSegments; UINT32 NumCarats; BOOLEAN FullyQualified;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -