📄 aclocal.h
字号:
#define ACPI_DASM_BUFFER 0x00#define ACPI_DASM_RESOURCE 0x01#define ACPI_DASM_STRING 0x02#define ACPI_DASM_UNICODE 0x03#define ACPI_DASM_EISAID 0x04#define ACPI_DASM_MATCHOP 0x05#define ACPI_DASM_LNOT_PREFIX 0x06#define ACPI_DASM_LNOT_SUFFIX 0x07#define ACPI_DASM_IGNORE 0x08/* * Generic operation (for example: If, While, Store) */typedef struct acpi_parse_obj_common{ ACPI_PARSE_COMMON} ACPI_PARSE_OBJ_COMMON;/* * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and OpRegions), * and bytelists. */typedef struct acpi_parse_obj_named{ ACPI_PARSE_COMMON UINT8 *Path; UINT8 *Data; /* AML body or bytelist data */ UINT32 Length; /* AML length */ UINT32 Name; /* 4-byte name or zero if no name */} ACPI_PARSE_OBJ_NAMED;/* This version is used by the iASL compiler only */#define ACPI_MAX_PARSEOP_NAME 20typedef struct acpi_parse_obj_asl{ ACPI_PARSE_COMMON union acpi_parse_object *Child; union acpi_parse_object *ParentMethod; char *Filename; char *ExternalName; char *Namepath; char NameSeg[4]; UINT32 ExtraValue; UINT32 Column; UINT32 LineNumber; UINT32 LogicalLineNumber; UINT32 LogicalByteOffset; UINT32 EndLine; UINT32 EndLogicalLine; UINT32 AcpiBtype; UINT32 AmlLength; UINT32 AmlSubtreeLength; UINT32 FinalAmlLength; UINT32 FinalAmlOffset; UINT32 CompileFlags; UINT16 ParseOpcode; UINT8 AmlOpcodeLength; UINT8 AmlPkgLenBytes; UINT8 Extra; char ParseOpName[ACPI_MAX_PARSEOP_NAME];} ACPI_PARSE_OBJ_ASL;typedef union acpi_parse_object{ ACPI_PARSE_OBJ_COMMON Common; ACPI_PARSE_OBJ_NAMED Named; ACPI_PARSE_OBJ_ASL Asl;} ACPI_PARSE_OBJECT;/* * Parse state - one state per parser invocation and each control * method. */typedef struct acpi_parse_state{ UINT8 *AmlStart; /* First AML byte */ UINT8 *Aml; /* Next AML byte */ UINT8 *AmlEnd; /* (last + 1) AML byte */ UINT8 *PkgStart; /* Current package begin */ UINT8 *PkgEnd; /* Current package end */ union acpi_parse_object *StartOp; /* Root of parse tree */ struct acpi_namespace_node *StartNode; union acpi_generic_state *Scope; /* Current scope */ union acpi_parse_object *StartScope; UINT32 AmlSize;} ACPI_PARSE_STATE;/* Parse object flags */#define ACPI_PARSEOP_GENERIC 0x01#define ACPI_PARSEOP_NAMED 0x02#define ACPI_PARSEOP_DEFERRED 0x04#define ACPI_PARSEOP_BYTELIST 0x08#define ACPI_PARSEOP_IN_STACK 0x10#define ACPI_PARSEOP_TARGET 0x20#define ACPI_PARSEOP_IN_CACHE 0x80/* Parse object DisasmFlags */#define ACPI_PARSEOP_IGNORE 0x01#define ACPI_PARSEOP_PARAMLIST 0x02#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04#define ACPI_PARSEOP_SPECIAL 0x10/***************************************************************************** * * Hardware (ACPI registers) and PNP * ****************************************************************************/#define PCI_ROOT_HID_STRING "PNP0A03"#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08"typedef struct acpi_bit_register_info{ UINT8 ParentRegister; UINT8 BitPosition; UINT16 AccessBitMask;} ACPI_BIT_REGISTER_INFO;/* * Some ACPI registers have bits that must be ignored -- meaning that they * must be preserved. */#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) *//* * Register IDs * These are the full ACPI registers */#define ACPI_REGISTER_PM1_STATUS 0x01#define ACPI_REGISTER_PM1_ENABLE 0x02#define ACPI_REGISTER_PM1_CONTROL 0x03#define ACPI_REGISTER_PM1A_CONTROL 0x04#define ACPI_REGISTER_PM1B_CONTROL 0x05#define ACPI_REGISTER_PM2_CONTROL 0x06#define ACPI_REGISTER_PM_TIMER 0x07#define ACPI_REGISTER_PROCESSOR_BLOCK 0x08#define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x09/* Masks used to access the BitRegisters */#define ACPI_BITMASK_TIMER_STATUS 0x0001#define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010#define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020#define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100#define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200#define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */#define ACPI_BITMASK_WAKE_STATUS 0x8000#define ACPI_BITMASK_ALL_FIXED_STATUS (\ ACPI_BITMASK_TIMER_STATUS | \ ACPI_BITMASK_BUS_MASTER_STATUS | \ ACPI_BITMASK_GLOBAL_LOCK_STATUS | \ ACPI_BITMASK_POWER_BUTTON_STATUS | \ ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ ACPI_BITMASK_RT_CLOCK_STATUS | \ ACPI_BITMASK_WAKE_STATUS)#define ACPI_BITMASK_TIMER_ENABLE 0x0001#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020#define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100#define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200#define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000 /* ACPI 3.0 */#define ACPI_BITMASK_SCI_ENABLE 0x0001#define ACPI_BITMASK_BUS_MASTER_RLD 0x0002#define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004#define ACPI_BITMASK_SLEEP_TYPE_X 0x1C00#define ACPI_BITMASK_SLEEP_ENABLE 0x2000#define ACPI_BITMASK_ARB_DISABLE 0x0001/* Raw bit position of each BitRegister */#define ACPI_BITPOSITION_TIMER_STATUS 0x00#define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04#define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05#define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08#define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09#define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E /* ACPI 3.0 */#define ACPI_BITPOSITION_WAKE_STATUS 0x0F#define ACPI_BITPOSITION_TIMER_ENABLE 0x00#define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05#define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08#define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09#define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E /* ACPI 3.0 */#define ACPI_BITPOSITION_SCI_ENABLE 0x00#define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01#define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02#define ACPI_BITPOSITION_SLEEP_TYPE_X 0x0A#define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D#define ACPI_BITPOSITION_ARB_DISABLE 0x00/***************************************************************************** * * Resource descriptors * ****************************************************************************//* ResourceType values */#define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0#define ACPI_ADDRESS_TYPE_IO_RANGE 1#define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2/* Resource descriptor types and masks */#define ACPI_RESOURCE_NAME_LARGE 0x80#define ACPI_RESOURCE_NAME_SMALL 0x00#define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */#define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type *//* * Small resource descriptor "names" as defined by the ACPI specification. * Note: Bits 2:0 are used for the descriptor length */#define ACPI_RESOURCE_NAME_IRQ 0x20#define ACPI_RESOURCE_NAME_DMA 0x28#define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38#define ACPI_RESOURCE_NAME_IO 0x40#define ACPI_RESOURCE_NAME_FIXED_IO 0x48#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68#define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70#define ACPI_RESOURCE_NAME_END_TAG 0x78/* * Large resource descriptor "names" as defined by the ACPI specification. * Note: includes the Large Descriptor bit in bit[7] */#define ACPI_RESOURCE_NAME_MEMORY24 0x81#define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82#define ACPI_RESOURCE_NAME_RESERVED_L1 0x83#define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84#define ACPI_RESOURCE_NAME_MEMORY32 0x85#define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86#define ACPI_RESOURCE_NAME_ADDRESS32 0x87#define ACPI_RESOURCE_NAME_ADDRESS16 0x88#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B/***************************************************************************** * * Miscellaneous * ****************************************************************************/#define ACPI_ASCII_ZERO 0x30/***************************************************************************** * * Debugger * ****************************************************************************/typedef struct acpi_db_method_info{ ACPI_HANDLE MainThreadGate; ACPI_HANDLE ThreadCompleteGate; UINT32 *Threads; UINT32 NumThreads; UINT32 NumCreated; UINT32 NumCompleted; char *Name; UINT32 Flags; UINT32 NumLoops; char Pathname[128]; char **Args; /* * Arguments to be passed to method for the command * Threads - * the Number of threads, ID of current thread and * Index of current thread inside all them created. */ char InitArgs; char *Arguments[4]; char NumThreadsStr[11]; char IdOfThreadStr[11]; char IndexOfThreadStr[11];} ACPI_DB_METHOD_INFO;typedef struct acpi_integrity_info{ UINT32 Nodes; UINT32 Objects;} ACPI_INTEGRITY_INFO;#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01#define ACPI_DB_CONSOLE_OUTPUT 0x02#define ACPI_DB_DUPLICATE_OUTPUT 0x03/***************************************************************************** * * Debug * ****************************************************************************//* Entry for a memory allocation (debug only) */#define ACPI_MEM_MALLOC 0#define ACPI_MEM_CALLOC 1#define ACPI_MAX_MODULE_NAME 16#define ACPI_COMMON_DEBUG_MEM_HEADER \ struct acpi_debug_mem_block *Previous; \ struct acpi_debug_mem_block *Next; \ UINT32 Size; \ UINT32 Component; \ UINT32 Line; \ char Module[ACPI_MAX_MODULE_NAME]; \ UINT8 AllocType;typedef struct acpi_debug_mem_header{ ACPI_COMMON_DEBUG_MEM_HEADER} ACPI_DEBUG_MEM_HEADER;typedef struct acpi_debug_mem_block{ ACPI_COMMON_DEBUG_MEM_HEADER UINT64 UserSpace;} ACPI_DEBUG_MEM_BLOCK;#define ACPI_MEM_LIST_GLOBAL 0#define ACPI_MEM_LIST_NSNODE 1#define ACPI_MEM_LIST_MAX 1#define ACPI_NUM_MEM_LISTS 2typedef struct acpi_memory_list{ char *ListName; void *ListHead; UINT16 ObjectSize; UINT16 MaxDepth; UINT16 CurrentDepth; UINT16 LinkOffset;#ifdef ACPI_DBG_TRACK_ALLOCATIONS /* Statistics for debug memory tracking only */ UINT32 TotalAllocated; UINT32 TotalFreed; UINT32 MaxOccupied; UINT32 TotalSize; UINT32 CurrentTotalSize; UINT32 Requests; UINT32 Hits;#endif} ACPI_MEMORY_LIST;#endif /* __ACLOCAL_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -