📄 actypes.h
字号:
#define INTERNAL_TYPE_ALIAS 21 /* 0x15 */#define INTERNAL_TYPE_NOTIFY 22 /* 0x16 */#define INTERNAL_TYPE_ADDRESS_HANDLER 23 /* 0x17 */#define INTERNAL_TYPE_RESOURCE 24 /* 0x18 */#define INTERNAL_TYPE_RESOURCE_FIELD 25 /* 0x19 */#define INTERNAL_TYPE_NODE_MAX 25/* These are pseudo-types because there are never any namespace nodes with these types */#define INTERNAL_TYPE_FIELD_DEFN 26 /* 0x1A Name, Byte_const, multiple Field_element */#define INTERNAL_TYPE_BANK_FIELD_DEFN 27 /* 0x1B 2 Name,DWord_const,Byte_const,multi Field_element */#define INTERNAL_TYPE_INDEX_FIELD_DEFN 28 /* 0x1C 2 Name, Byte_const, multiple Field_element */#define INTERNAL_TYPE_IF 29 /* 0x1D */#define INTERNAL_TYPE_ELSE 30 /* 0x1E */#define INTERNAL_TYPE_WHILE 31 /* 0x1F */#define INTERNAL_TYPE_SCOPE 32 /* 0x20 Name, multiple Node */#define INTERNAL_TYPE_DEF_ANY 33 /* 0x21 type is Any, suppress search of enclosing scopes */#define INTERNAL_TYPE_EXTRA 34 /* 0x22 */#define INTERNAL_TYPE_MAX 34#define INTERNAL_TYPE_INVALID 35#define ACPI_TYPE_NOT_FOUND 0xFF/* * Bitmapped ACPI types * Used internally only */#define ACPI_BTYPE_ANY 0x00000000#define ACPI_BTYPE_INTEGER 0x00000001#define ACPI_BTYPE_STRING 0x00000002#define ACPI_BTYPE_BUFFER 0x00000004#define ACPI_BTYPE_PACKAGE 0x00000008#define ACPI_BTYPE_FIELD_UNIT 0x00000010#define ACPI_BTYPE_DEVICE 0x00000020#define ACPI_BTYPE_EVENT 0x00000040#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/* * Acpi_event Types: * ------------ * Fixed & general purpose... */typedef u32 acpi_event_type;#define ACPI_EVENT_FIXED (acpi_event_type) 0#define ACPI_EVENT_GPE (acpi_event_type) 1/* * Fixed events */#define ACPI_EVENT_PMTIMER (acpi_event_type) 0 /* * There's no bus master event so index 1 is used for IRQ's that are not * handled by the SCI handler */#define ACPI_EVENT_NOT_USED (acpi_event_type) 1#define ACPI_EVENT_GLOBAL (acpi_event_type) 2#define ACPI_EVENT_POWER_BUTTON (acpi_event_type) 3#define ACPI_EVENT_SLEEP_BUTTON (acpi_event_type) 4#define ACPI_EVENT_RTC (acpi_event_type) 5#define ACPI_EVENT_GENERAL (acpi_event_type) 6#define ACPI_EVENT_MAX 6#define ACPI_NUM_FIXED_EVENTS (acpi_event_type) 7#define ACPI_GPE_INVALID 0xFF#define ACPI_GPE_MAX 0xFF#define ACPI_NUM_GPE 256#define ACPI_EVENT_LEVEL_TRIGGERED (acpi_event_type) 1#define ACPI_EVENT_EDGE_TRIGGERED (acpi_event_type) 2/* * GPEs */#define ACPI_EVENT_ENABLE 0x1#define ACPI_EVENT_WAKE_ENABLE 0x2#define ACPI_EVENT_DISABLE 0x1#define ACPI_EVENT_WAKE_DISABLE 0x2/* * Acpi_event Status: * ------------- * The encoding of acpi_event_status is illustrated below. * Note that a set bit (1) indicates the property is TRUE * (e.g. if bit 0 is set then the event is enabled). * +-------------+-+-+-+ * | Bits 31:3 |2|1|0| * +-------------+-+-+-+ * | | | | * | | | +- Enabled? * | | +--- Enabled for wake? * | +----- Set? * +----------- <Reserved> */typedef u32 acpi_event_status;#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04/* Notify types */#define ACPI_SYSTEM_NOTIFY 0#define ACPI_DEVICE_NOTIFY 1#define ACPI_MAX_NOTIFY_HANDLER_TYPE 1#define MAX_SYS_NOTIFY 0x7f/* Address Space (Operation Region) Types */typedef u8 ACPI_ADR_SPACE_TYPE;#define ACPI_ADR_SPACE_SYSTEM_MEMORY (ACPI_ADR_SPACE_TYPE) 0#define ACPI_ADR_SPACE_SYSTEM_IO (ACPI_ADR_SPACE_TYPE) 1#define ACPI_ADR_SPACE_PCI_CONFIG (ACPI_ADR_SPACE_TYPE) 2#define ACPI_ADR_SPACE_EC (ACPI_ADR_SPACE_TYPE) 3#define ACPI_ADR_SPACE_SMBUS (ACPI_ADR_SPACE_TYPE) 4#define ACPI_ADR_SPACE_CMOS (ACPI_ADR_SPACE_TYPE) 5#define ACPI_ADR_SPACE_PCI_BAR_TARGET (ACPI_ADR_SPACE_TYPE) 6/* * External ACPI object definition */typedef union acpi_obj{ acpi_object_type type; /* See definition of Acpi_ns_type for values */ struct { acpi_object_type type; acpi_integer value; /* The actual number */ } integer; struct { acpi_object_type type; u32 length; /* # of bytes in string, excluding trailing null */ NATIVE_CHAR *pointer; /* points to the string value */ } string; struct { acpi_object_type type; u32 length; /* # of bytes in buffer */ u8 *pointer; /* points to the buffer */ } buffer; struct { acpi_object_type type; u32 fill1; acpi_handle handle; /* object reference */ } reference; struct { acpi_object_type type; u32 count; /* # of elements in package */ union acpi_obj *elements; /* Pointer to an array of ACPI_OBJECTs */ } package; struct { acpi_object_type type; u32 proc_id; ACPI_IO_ADDRESS pblk_address; u32 pblk_length; } processor; struct { acpi_object_type type; u32 system_level; u32 resource_order; } power_resource;} acpi_object, *PACPI_OBJECT;/* * List of objects, used as a parameter list for control method evaluation */typedef struct acpi_obj_list{ u32 count; acpi_object *pointer;} acpi_object_list, *PACPI_OBJECT_LIST;/* * Miscellaneous common Data Structures used by the interfaces */typedef struct{ u32 length; /* Length in bytes of the buffer */ void *pointer; /* pointer to buffer */} acpi_buffer;/* * Name_type for Acpi_get_name */#define ACPI_FULL_PATHNAME 0#define ACPI_SINGLE_NAME 1#define ACPI_NAME_TYPE_MAX 1/* * Structure and flags for Acpi_get_system_info */#define SYS_MODE_UNKNOWN 0x0000#define SYS_MODE_ACPI 0x0001#define SYS_MODE_LEGACY 0x0002#define SYS_MODES_MASK 0x0003/* * ACPI Table Info. One per ACPI table _type_ */typedef struct acpi_table_info{ u32 count;} acpi_table_info;/* * System info returned by Acpi_get_system_info() */typedef struct _acpi_sys_info{ u32 acpi_ca_version; u32 flags; u32 timer_resolution; u32 reserved1; u32 reserved2; u32 debug_level; u32 debug_layer; u32 num_table_types; acpi_table_info table_info [NUM_ACPI_TABLES];} acpi_system_info;/* * Various handlers and callback procedures */typedefu32 (*acpi_event_handler) ( void *context);typedefvoid (*acpi_gpe_handler) ( void *context);typedefvoid (*acpi_notify_handler) ( acpi_handle device, u32 value, void *context);/* Address Spaces (Operation Regions */#define ACPI_READ_ADR_SPACE 1#define ACPI_WRITE_ADR_SPACE 2typedefacpi_status (*acpi_adr_space_handler) ( u32 function, ACPI_PHYSICAL_ADDRESS address, u32 bit_width, u32 *value, void *handler_context, void *region_context);#define ACPI_DEFAULT_HANDLER ((acpi_adr_space_handler) NULL)typedefacpi_status (*acpi_adr_space_setup) ( acpi_handle region_handle, u32 function, void *handler_context, void **region_context);#define ACPI_REGION_ACTIVATE 0#define ACPI_REGION_DEACTIVATE 1typedefacpi_status (*acpi_walk_callback) ( acpi_handle obj_handle, u32 nesting_level, void *context, void **return_value);/* Interrupt handler return values */#define INTERRUPT_NOT_HANDLED 0x00#define INTERRUPT_HANDLED 0x01/* Structure and flags for Acpi_get_device_info */#define ACPI_VALID_HID 0x1#define ACPI_VALID_UID 0x2#define ACPI_VALID_ADR 0x4#define ACPI_VALID_STA 0x8#define ACPI_COMMON_OBJ_INFO \ acpi_object_type type; /* ACPI object type */ \ acpi_name name /* ACPI object Name */typedef struct{ ACPI_COMMON_OBJ_INFO;} acpi_obj_info_header;typedef struct{ ACPI_COMMON_OBJ_INFO; u32 valid; /* Are the next bits legit? */ NATIVE_CHAR hardware_id[9]; /* _HID value if any */ NATIVE_CHAR unique_id[9]; /* _UID value if any */ acpi_integer address; /* _ADR value if any */ u32 current_status; /* _STA value */} acpi_device_info;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -