Go to the documentation of this file.
49 #define ACPI_SERIALIZED 0xFF
52 #define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1)
56 #define AML_NUM_OPCODES 0x81
61 struct acpi_obj_mutex;
80 #define ACPI_MTX_INTERPRETER 0
81 #define ACPI_MTX_NAMESPACE 1
82 #define ACPI_MTX_TABLES 2
83 #define ACPI_MTX_EVENTS 3
84 #define ACPI_MTX_CACHES 4
85 #define ACPI_MTX_MEMORY 5
86 #define ACPI_MTX_DEBUG_CMD_COMPLETE 6
87 #define ACPI_MTX_DEBUG_CMD_READY 7
89 #define ACPI_MAX_MUTEX 7
90 #define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1
104 #define ACPI_LOCK_GPES 0
105 #define ACPI_LOCK_HARDWARE 1
107 #define ACPI_MAX_LOCK 1
108 #define ACPI_NUM_LOCK ACPI_MAX_LOCK+1
112 #define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0
124 #define ACPI_MTX_DO_NOT_LOCK 0
125 #define ACPI_MTX_LOCK 1
129 #define ACPI_FIELD_BYTE_GRANULARITY 1
130 #define ACPI_FIELD_WORD_GRANULARITY 2
131 #define ACPI_FIELD_DWORD_GRANULARITY 4
132 #define ACPI_FIELD_QWORD_GRANULARITY 8
134 #define ACPI_ENTRY_NOT_FOUND NULL
175 #ifdef ACPI_LARGE_NAMESPACE_NODE
184 #define ANOBJ_RESERVED 0x01
185 #define ANOBJ_TEMPORARY 0x02
186 #define ANOBJ_METHOD_ARG 0x04
187 #define ANOBJ_METHOD_LOCAL 0x08
188 #define ANOBJ_SUBTREE_HAS_INI 0x10
189 #define ANOBJ_EVALUATED 0x20
190 #define ANOBJ_ALLOCATED_BUFFER 0x40
192 #define ANOBJ_IS_EXTERNAL 0x08
193 #define ANOBJ_METHOD_NO_RETVAL 0x10
194 #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20
195 #define ANOBJ_IS_BIT_OFFSET 0x40
196 #define ANOBJ_IS_REFERENCED 0x80
209 #define ACPI_ROOT_ORIGIN_UNKNOWN (0)
210 #define ACPI_ROOT_ORIGIN_ALLOCATED (1)
211 #define ACPI_ROOT_ALLOW_RESIZE (2)
215 #define ACPI_TABLE_INDEX_DSDT (0)
216 #define ACPI_TABLE_INDEX_FACS (1)
230 #define ACPI_COPY_TYPE_SIMPLE 0
231 #define ACPI_COPY_TYPE_PACKAGE 1
270 #define ACPI_BTYPE_ANY 0x00000000
271 #define ACPI_BTYPE_INTEGER 0x00000001
272 #define ACPI_BTYPE_STRING 0x00000002
273 #define ACPI_BTYPE_BUFFER 0x00000004
274 #define ACPI_BTYPE_PACKAGE 0x00000008
275 #define ACPI_BTYPE_FIELD_UNIT 0x00000010
276 #define ACPI_BTYPE_DEVICE 0x00000020
277 #define ACPI_BTYPE_EVENT 0x00000040
278 #define ACPI_BTYPE_METHOD 0x00000080
279 #define ACPI_BTYPE_MUTEX 0x00000100
280 #define ACPI_BTYPE_REGION 0x00000200
281 #define ACPI_BTYPE_POWER 0x00000400
282 #define ACPI_BTYPE_PROCESSOR 0x00000800
283 #define ACPI_BTYPE_THERMAL 0x00001000
284 #define ACPI_BTYPE_BUFFER_FIELD 0x00002000
285 #define ACPI_BTYPE_DDB_HANDLE 0x00004000
286 #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000
287 #define ACPI_BTYPE_REFERENCE 0x00010000
288 #define ACPI_BTYPE_RESOURCE 0x00020000
290 #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
292 #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE)
293 #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
294 #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
295 #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF
296 #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF
372 #define ACPI_OBJECT_REPAIRED 1
373 #define ACPI_OBJECT_WRAPPED 2
380 #define ACPI_RTYPE_ANY 0x00
381 #define ACPI_RTYPE_NONE 0x01
382 #define ACPI_RTYPE_INTEGER 0x02
383 #define ACPI_RTYPE_STRING 0x04
384 #define ACPI_RTYPE_BUFFER 0x08
385 #define ACPI_RTYPE_PACKAGE 0x10
386 #define ACPI_RTYPE_REFERENCE 0x20
387 #define ACPI_RTYPE_ALL 0x3F
389 #define ACPI_NUM_RTYPES 5
520 #define ACPI_CONTROL_NORMAL 0xC0
521 #define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1
522 #define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2
523 #define ACPI_CONTROL_PREDICATE_FALSE 0xC3
524 #define ACPI_CONTROL_PREDICATE_TRUE 0xC4
526 #define ACPI_STATE_COMMON \
528 u8 descriptor_type; \
669 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
689 #ifdef ACPI_DISASSEMBLER
690 #define ACPI_DISASM_ONLY_MEMBERS(a) a;
692 #define ACPI_DISASM_ONLY_MEMBERS(a)
695 #define ACPI_PARSE_COMMON \
696 union acpi_parse_object *parent; \
697 u8 descriptor_type; \
701 union acpi_parse_object *next; \
702 struct acpi_namespace_node *node; \
703 union acpi_parse_value value; \
704 u8 arg_list_length; \
705 ACPI_DISASM_ONLY_MEMBERS (\
708 char aml_op_name[16])
712 #define ACPI_DASM_BUFFER 0x00
713 #define ACPI_DASM_RESOURCE 0x01
714 #define ACPI_DASM_STRING 0x02
715 #define ACPI_DASM_UNICODE 0x03
716 #define ACPI_DASM_PLD_METHOD 0x04
717 #define ACPI_DASM_EISAID 0x05
718 #define ACPI_DASM_MATCHOP 0x06
719 #define ACPI_DASM_LNOT_PREFIX 0x07
720 #define ACPI_DASM_LNOT_SUFFIX 0x08
721 #define ACPI_DASM_IGNORE 0x09
742 #define ACPI_MAX_PARSEOP_NAME 20
796 #define ACPI_PARSEOP_GENERIC 0x01
797 #define ACPI_PARSEOP_NAMED 0x02
798 #define ACPI_PARSEOP_DEFERRED 0x04
799 #define ACPI_PARSEOP_BYTELIST 0x08
800 #define ACPI_PARSEOP_IN_STACK 0x10
801 #define ACPI_PARSEOP_TARGET 0x20
802 #define ACPI_PARSEOP_IN_CACHE 0x80
806 #define ACPI_PARSEOP_IGNORE 0x01
807 #define ACPI_PARSEOP_PARAMLIST 0x02
808 #define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
809 #define ACPI_PARSEOP_PREDEF_CHECKED 0x08
810 #define ACPI_PARSEOP_SPECIAL 0x10
828 #define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800
832 #define ACPI_PM1_CONTROL_WRITEONLY_BITS 0x2004
844 #define ACPI_PM1_CONTROL_IGNORED_BITS 0x0200
845 #define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8
846 #define ACPI_PM1_CONTROL_PRESERVED_BITS \
847 (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
849 #define ACPI_PM2_CONTROL_PRESERVED_BITS 0xFFFFFFFE
855 #define ACPI_REGISTER_PM1_STATUS 0x01
856 #define ACPI_REGISTER_PM1_ENABLE 0x02
857 #define ACPI_REGISTER_PM1_CONTROL 0x03
858 #define ACPI_REGISTER_PM2_CONTROL 0x04
859 #define ACPI_REGISTER_PM_TIMER 0x05
860 #define ACPI_REGISTER_PROCESSOR_BLOCK 0x06
861 #define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x07
865 #define ACPI_BITMASK_TIMER_STATUS 0x0001
866 #define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010
867 #define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020
868 #define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100
869 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200
870 #define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400
871 #define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000
872 #define ACPI_BITMASK_WAKE_STATUS 0x8000
874 #define ACPI_BITMASK_ALL_FIXED_STATUS (\
875 ACPI_BITMASK_TIMER_STATUS | \
876 ACPI_BITMASK_BUS_MASTER_STATUS | \
877 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
878 ACPI_BITMASK_POWER_BUTTON_STATUS | \
879 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
880 ACPI_BITMASK_RT_CLOCK_STATUS | \
881 ACPI_BITMASK_PCIEXP_WAKE_STATUS | \
882 ACPI_BITMASK_WAKE_STATUS)
884 #define ACPI_BITMASK_TIMER_ENABLE 0x0001
885 #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020
886 #define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100
887 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200
888 #define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400
889 #define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000
891 #define ACPI_BITMASK_SCI_ENABLE 0x0001
892 #define ACPI_BITMASK_BUS_MASTER_RLD 0x0002
893 #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004
894 #define ACPI_BITMASK_SLEEP_TYPE 0x1C00
895 #define ACPI_BITMASK_SLEEP_ENABLE 0x2000
897 #define ACPI_BITMASK_ARB_DISABLE 0x0001
901 #define ACPI_BITPOSITION_TIMER_STATUS 0x00
902 #define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04
903 #define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05
904 #define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08
905 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09
906 #define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A
907 #define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E
908 #define ACPI_BITPOSITION_WAKE_STATUS 0x0F
910 #define ACPI_BITPOSITION_TIMER_ENABLE 0x00
911 #define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05
912 #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08
913 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09
914 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A
915 #define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E
917 #define ACPI_BITPOSITION_SCI_ENABLE 0x00
918 #define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01
919 #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02
920 #define ACPI_BITPOSITION_SLEEP_TYPE 0x0A
921 #define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D
923 #define ACPI_BITPOSITION_ARB_DISABLE 0x00
927 #define ACPI_OSI_WIN_2000 0x01
928 #define ACPI_OSI_WIN_XP 0x02
929 #define ACPI_OSI_WIN_XP_SP1 0x03
930 #define ACPI_OSI_WINSRV_2003 0x04
931 #define ACPI_OSI_WIN_XP_SP2 0x05
932 #define ACPI_OSI_WINSRV_2003_SP1 0x06
933 #define ACPI_OSI_WIN_VISTA 0x07
934 #define ACPI_OSI_WINSRV_2008 0x08
935 #define ACPI_OSI_WIN_VISTA_SP1 0x09
936 #define ACPI_OSI_WIN_VISTA_SP2 0x0A
937 #define ACPI_OSI_WIN_7 0x0B
938 #define ACPI_OSI_WIN_8 0x0C
940 #define ACPI_ALWAYS_ILLEGAL 0x00
949 #define ACPI_OSI_INVALID 0x01
950 #define ACPI_OSI_DYNAMIC 0x02
967 #define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0
968 #define ACPI_ADDRESS_TYPE_IO_RANGE 1
969 #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2
973 #define ACPI_RESOURCE_NAME_LARGE 0x80
974 #define ACPI_RESOURCE_NAME_SMALL 0x00
976 #define ACPI_RESOURCE_NAME_SMALL_MASK 0x78
977 #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07
978 #define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F
984 #define ACPI_RESOURCE_NAME_IRQ 0x20
985 #define ACPI_RESOURCE_NAME_DMA 0x28
986 #define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30
987 #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38
988 #define ACPI_RESOURCE_NAME_IO 0x40
989 #define ACPI_RESOURCE_NAME_FIXED_IO 0x48
990 #define ACPI_RESOURCE_NAME_FIXED_DMA 0x50
991 #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58
992 #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60
993 #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68
994 #define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70
995 #define ACPI_RESOURCE_NAME_END_TAG 0x78
1001 #define ACPI_RESOURCE_NAME_MEMORY24 0x81
1002 #define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82
1003 #define ACPI_RESOURCE_NAME_RESERVED_L1 0x83
1004 #define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84
1005 #define ACPI_RESOURCE_NAME_MEMORY32 0x85
1006 #define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86
1007 #define ACPI_RESOURCE_NAME_ADDRESS32 0x87
1008 #define ACPI_RESOURCE_NAME_ADDRESS16 0x88
1009 #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89
1010 #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A
1011 #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B
1012 #define ACPI_RESOURCE_NAME_GPIO 0x8C
1013 #define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E
1014 #define ACPI_RESOURCE_NAME_LARGE_MAX 0x8E
1022 #define ACPI_ASCII_ZERO 0x30
1063 #define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
1064 #define ACPI_DB_CONSOLE_OUTPUT 0x02
1065 #define ACPI_DB_DUPLICATE_OUTPUT 0x03
1075 #define ACPI_MEM_MALLOC 0
1076 #define ACPI_MEM_CALLOC 1
1077 #define ACPI_MAX_MODULE_NAME 16
1079 #define ACPI_COMMON_DEBUG_MEM_HEADER \
1080 struct acpi_debug_mem_block *previous; \
1081 struct acpi_debug_mem_block *next; \
1085 char module[ACPI_MAX_MODULE_NAME]; \
1095 #define ACPI_MEM_LIST_GLOBAL 0
1096 #define ACPI_MEM_LIST_NSNODE 1
1097 #define ACPI_MEM_LIST_MAX 1
1098 #define ACPI_NUM_MEM_LISTS 2
1109 #ifndef ACPI_ASL_COMPILER