📄 aclocal.h
字号:
#define ACPI_BTYPE_METHOD 0x00000080#define ACPI_BTYPE_MUTEX 0x00000100#define ACPI_BTYPE_REGION 0x00000200#define ACPI_BTYPE_POWER 0x00000400#define ACPI_BTYPE_PROCESSOR 0x00000800#define ACPI_BTYPE_THERMAL 0x00001000#define ACPI_BTYPE_BUFFER_FIELD 0x00002000#define ACPI_BTYPE_DDB_HANDLE 0x00004000#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000#define ACPI_BTYPE_REFERENCE 0x00010000#define ACPI_BTYPE_RESOURCE 0x00020000#define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)#define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE)#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)#define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF/***************************************************************************** * * Event typedefs and structs * ****************************************************************************//* Dispatch info for each GPE -- either a method or handler, cannot be both */struct acpi_handler_info { acpi_event_handler address; /* Address of handler, if any */ void *context; /* Context to be passed to handler */ struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */};union acpi_gpe_dispatch_info { struct acpi_namespace_node *method_node; /* Method node for this GPE level */ struct acpi_handler_info *handler;};/* * Information about a GPE, one per each GPE in an array. * NOTE: Important to keep this struct as small as possible. */struct acpi_gpe_event_info { union acpi_gpe_dispatch_info dispatch; /* Either Method or Handler */ struct acpi_gpe_register_info *register_info; /* Backpointer to register info */ u8 flags; /* Misc info about this GPE */ u8 gpe_number; /* This GPE */};/* Information about a GPE register pair, one per each status/enable pair in an array */struct acpi_gpe_register_info { struct acpi_generic_address status_address; /* Address of status reg */ struct acpi_generic_address enable_address; /* Address of enable reg */ u8 enable_for_wake; /* GPEs to keep enabled when sleeping */ u8 enable_for_run; /* GPEs to keep enabled when running */ u8 base_gpe_number; /* Base GPE number for this register */};/* * Information about a GPE register block, one per each installed block -- * GPE0, GPE1, and one per each installed GPE Block Device. */struct acpi_gpe_block_info { struct acpi_namespace_node *node; struct acpi_gpe_block_info *previous; struct acpi_gpe_block_info *next; struct acpi_gpe_xrupt_info *xrupt_block; /* Backpointer to interrupt block */ struct acpi_gpe_register_info *register_info; /* One per GPE register pair */ struct acpi_gpe_event_info *event_info; /* One for each GPE */ struct acpi_generic_address block_address; /* Base address of the block */ u32 register_count; /* Number of register pairs in block */ u8 block_base_number; /* Base GPE number for this block */};/* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */struct acpi_gpe_xrupt_info { struct acpi_gpe_xrupt_info *previous; struct acpi_gpe_xrupt_info *next; struct acpi_gpe_block_info *gpe_block_list_head; /* List of GPE blocks for this xrupt */ u32 interrupt_number; /* System interrupt number */};struct acpi_gpe_walk_info { struct acpi_namespace_node *gpe_device; struct acpi_gpe_block_info *gpe_block;};typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, struct acpi_gpe_block_info * gpe_block);/* Information about each particular fixed event */struct acpi_fixed_event_handler { acpi_event_handler handler; /* Address of handler. */ void *context; /* Context to be passed to handler */};struct acpi_fixed_event_info { u8 status_register_id; u8 enable_register_id; u16 status_bit_mask; u16 enable_bit_mask;};/* Information used during field processing */struct acpi_field_info { u8 skip_field; u8 field_flag; u32 pkg_length;};/***************************************************************************** * * Generic "state" object for stacks * ****************************************************************************/#define ACPI_CONTROL_NORMAL 0xC0#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2#define ACPI_CONTROL_PREDICATE_FALSE 0xC3#define ACPI_CONTROL_PREDICATE_TRUE 0xC4#define ACPI_STATE_COMMON \ void *next; \ u8 descriptor_type; /* To differentiate various internal objs */\ u8 flags; \ u16 value; \ u16 state; /* There are 2 bytes available here until the next natural alignment boundary */struct acpi_common_state {ACPI_STATE_COMMON};/* * Update state - used to traverse complex objects such as packages */struct acpi_update_state { ACPI_STATE_COMMON union acpi_operand_object *object;};/* * Pkg state - used to traverse nested package structures */struct acpi_pkg_state { ACPI_STATE_COMMON u16 index; union acpi_operand_object *source_object; union acpi_operand_object *dest_object; struct acpi_walk_state *walk_state; void *this_target_obj; u32 num_packages;};/* * Control state - one per if/else and while constructs. * Allows nesting of these constructs */struct acpi_control_state { ACPI_STATE_COMMON u16 opcode; union acpi_parse_object *predicate_op; u8 *aml_predicate_start; /* Start of if/while predicate */ u8 *package_end; /* End of if/while block */};/* * Scope state - current scope during namespace lookups */struct acpi_scope_state { ACPI_STATE_COMMON struct acpi_namespace_node *node;};struct acpi_pscope_state { ACPI_STATE_COMMON u32 arg_count; /* Number of fixed arguments */ union acpi_parse_object *op; /* Current op being parsed */ u8 *arg_end; /* Current argument end */ u8 *pkg_end; /* Current package end */ u32 arg_list; /* Next argument to parse */};/* * Thread state - one per thread across multiple walk states. Multiple walk * states are created when there are nested control methods executing. */struct acpi_thread_state { ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested acquire) level */ struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ acpi_thread_id thread_id; /* Running thread ID */};/* * Result values - used to accumulate the results of nested * AML arguments */struct acpi_result_values { ACPI_STATE_COMMON u8 num_results; u8 last_insert; union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];};typedefacpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state, union acpi_parse_object ** out_op);typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state);/* * Notify info - used to pass info to the deferred notify * handler/dispatcher. */struct acpi_notify_info { ACPI_STATE_COMMON struct acpi_namespace_node *node; union acpi_operand_object *handler_obj;};/* Generic state is union of structs above */union acpi_generic_state { struct acpi_common_state common; struct acpi_control_state control; struct acpi_update_state update; struct acpi_scope_state scope; struct acpi_pscope_state parse_scope; struct acpi_pkg_state pkg; struct acpi_thread_state thread; struct acpi_result_values results; struct acpi_notify_info notify;};/***************************************************************************** * * Interpreter typedefs and structs * ****************************************************************************/typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);/***************************************************************************** * * Parser typedefs and structs * ****************************************************************************//* * AML opcode, name, and argument layout */struct acpi_opcode_info {#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT) char *name; /* Opcode name (disassembler/debug only) */#endif u32 parse_args; /* Grammar/Parse time arguments */ u32 runtime_args; /* Interpret time arguments */ u16 flags; /* Misc flags */ u8 object_type; /* Corresponding internal object type */ u8 class; /* Opcode class */ u8 type; /* Opcode type */};union acpi_parse_value { acpi_integer integer; /* Integer constant (Up to 64 bits) */ struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */ u32 size; /* bytelist or field size */ char *string; /* NULL terminated string */ u8 *buffer; /* buffer or string */ char *name; /* NULL terminated string */ union acpi_parse_object *arg; /* arguments and contained ops */};#define ACPI_PARSE_COMMON \ union acpi_parse_object *parent; /* Parent op */\ u8 descriptor_type; /* To differentiate various internal objs */\ u8 flags; /* Type of Op */\ u16 aml_opcode; /* AML opcode */\ u32 aml_offset; /* Offset of declaration in AML */\ union acpi_parse_object *next; /* Next op */\ struct acpi_namespace_node *node; /* For use by interpreter */\ union acpi_parse_value value; /* Value or args associated with the opcode */\ ACPI_DISASM_ONLY_MEMBERS (\ u8 disasm_flags; /* Used during AML disassembly */\ u8 disasm_opcode; /* Subtype used for disassembly */\ char aml_op_name[16]) /* Op name (debug only) */#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) */struct acpi_parse_obj_common {ACPI_PARSE_COMMON};/* * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions), * and bytelists. */struct acpi_parse_obj_named { ACPI_PARSE_COMMON u8 *path; u8 *data; /* AML body or bytelist data */ u32 length; /* AML length */ u32 name; /* 4-byte name or zero if no name */};/* This version is used by the i_aSL compiler only */#define ACPI_MAX_PARSEOP_NAME 20struct acpi_parse_obj_asl { ACPI_PARSE_COMMON union acpi_parse_object *child;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -