1 /******************************************************************************
3 * Name: aclocal.h - Internal data types used across the ACPI subsystem
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2004, R. Byron Moore
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
48 #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
50 typedef void * acpi_mutex;
51 typedef u32 acpi_mutex_handle;
54 /* Total number of aml opcodes defined */
56 #define AML_NUM_OPCODES 0x7E
59 /*****************************************************************************
61 * Mutex typedefs and structs
63 ****************************************************************************/
67 * Predefined handles for the mutex objects used within the subsystem
68 * All mutex objects are automatically created by acpi_ut_mutex_initialize.
70 * The acquire/release ordering protocol is implied via this list. Mutexes
71 * with a lower value must be acquired before mutexes with a higher value.
73 * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also!
76 #define ACPI_MTX_EXECUTE 0
77 #define ACPI_MTX_INTERPRETER 1
78 #define ACPI_MTX_PARSER 2
79 #define ACPI_MTX_DISPATCHER 3
80 #define ACPI_MTX_TABLES 4
81 #define ACPI_MTX_OP_REGIONS 5
82 #define ACPI_MTX_NAMESPACE 6
83 #define ACPI_MTX_EVENTS 7
84 #define ACPI_MTX_HARDWARE 8
85 #define ACPI_MTX_CACHES 9
86 #define ACPI_MTX_MEMORY 10
87 #define ACPI_MTX_DEBUG_CMD_COMPLETE 11
88 #define ACPI_MTX_DEBUG_CMD_READY 12
91 #define NUM_MUTEX MAX_MUTEX+1
94 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
95 #ifdef DEFINE_ACPI_GLOBALS
97 /* Names for the mutexes used in the subsystem */
99 static char *acpi_gbl_mutex_names[] =
102 "ACPI_MTX_Interpreter",
104 "ACPI_MTX_Dispatcher",
106 "ACPI_MTX_op_regions",
107 "ACPI_MTX_Namespace",
112 "ACPI_MTX_debug_cmd_complete",
113 "ACPI_MTX_debug_cmd_ready",
120 /* Table for the global mutexes */
122 struct acpi_mutex_info
129 /* This owner ID means that the mutex is not in use (unlocked) */
131 #define ACPI_MUTEX_NOT_ACQUIRED (u32) (-1)
134 /* Lock flag parameter for various interfaces */
136 #define ACPI_MTX_DO_NOT_LOCK 0
137 #define ACPI_MTX_LOCK 1
140 typedef u16 acpi_owner_id;
141 #define ACPI_OWNER_TYPE_TABLE 0x0
142 #define ACPI_OWNER_TYPE_METHOD 0x1
143 #define ACPI_FIRST_METHOD_ID 0x0001
144 #define ACPI_FIRST_TABLE_ID 0xF000
147 /* Field access granularities */
149 #define ACPI_FIELD_BYTE_GRANULARITY 1
150 #define ACPI_FIELD_WORD_GRANULARITY 2
151 #define ACPI_FIELD_DWORD_GRANULARITY 4
152 #define ACPI_FIELD_QWORD_GRANULARITY 8
154 /*****************************************************************************
156 * Namespace typedefs and structs
158 ****************************************************************************/
161 /* Operational modes of the AML interpreter/scanner */
165 ACPI_IMODE_LOAD_PASS1 = 0x01,
166 ACPI_IMODE_LOAD_PASS2 = 0x02,
167 ACPI_IMODE_EXECUTE = 0x0E
169 } acpi_interpreter_mode;
173 * The Node describes a named object that appears in the AML
174 * An acpi_node is used to store Nodes.
176 * data_type is used to differentiate between internal descriptors, and MUST
177 * be the first byte in this structure.
180 union acpi_name_union
186 struct acpi_namespace_node
188 u8 descriptor; /* Used to differentiate object descriptor types */
189 u8 type; /* Type associated with this name */
191 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
194 union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */
195 struct acpi_namespace_node *child; /* First child */
196 struct acpi_namespace_node *peer; /* Next peer*/
197 u16 reference_count; /* Current count of references and children */
202 #define ACPI_ENTRY_NOT_FOUND NULL
207 #define ANOBJ_RESERVED 0x01
208 #define ANOBJ_END_OF_PEER_LIST 0x02
209 #define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */
210 #define ANOBJ_METHOD_ARG 0x08
211 #define ANOBJ_METHOD_LOCAL 0x10
212 #define ANOBJ_METHOD_NO_RETVAL 0x20
213 #define ANOBJ_METHOD_SOME_NO_RETVAL 0x40
215 #define ANOBJ_IS_BIT_OFFSET 0x80
219 * ACPI Table Descriptor. One per ACPI table
221 struct acpi_table_desc
223 struct acpi_table_desc *prev;
224 struct acpi_table_desc *next;
225 struct acpi_table_desc *installed_desc;
226 struct acpi_table_header *pointer;
228 u64 physical_address;
231 acpi_owner_id table_id;
234 u8 loaded_into_namespace;
237 struct acpi_table_list
239 struct acpi_table_desc *next;
244 struct acpi_find_context
252 struct acpi_ns_search_data
254 struct acpi_namespace_node *node;
259 * Predefined Namespace items
261 struct acpi_predefined_names
269 /* Object types used during package copies */
272 #define ACPI_COPY_TYPE_SIMPLE 0
273 #define ACPI_COPY_TYPE_PACKAGE 1
275 /* Info structure used to convert external<->internal namestrings */
277 struct acpi_namestring_info
280 char *next_external_char;
289 /* Field creation info */
291 struct acpi_create_field_info
293 struct acpi_namespace_node *region_node;
294 struct acpi_namespace_node *field_node;
295 struct acpi_namespace_node *register_node;
296 struct acpi_namespace_node *data_register_node;
298 u32 field_bit_position;
299 u32 field_bit_length;
306 /*****************************************************************************
308 * Event typedefs and structs
310 ****************************************************************************/
312 /* Information about a GPE, one per each GPE in an array */
314 struct acpi_gpe_event_info
316 struct acpi_namespace_node *method_node; /* Method node for this GPE level */
317 acpi_gpe_handler handler; /* Address of handler, if any */
318 void *context; /* Context to be passed to handler */
319 struct acpi_gpe_register_info *register_info; /* Backpointer to register info */
320 u8 flags; /* Level or Edge */
321 u8 bit_mask; /* This GPE within the register */
324 /* Information about a GPE register pair, one per each status/enable pair in an array */
326 struct acpi_gpe_register_info
328 struct acpi_generic_address status_address; /* Address of status reg */
329 struct acpi_generic_address enable_address; /* Address of enable reg */
330 u8 status; /* Current value of status reg */
331 u8 enable; /* Current value of enable reg */
332 u8 wake_enable; /* Mask of bits to keep enabled when sleeping */
333 u8 base_gpe_number; /* Base GPE number for this register */
337 * Information about a GPE register block, one per each installed block --
338 * GPE0, GPE1, and one per each installed GPE Block Device.
340 struct acpi_gpe_block_info
342 struct acpi_gpe_block_info *previous;
343 struct acpi_gpe_block_info *next;
344 struct acpi_gpe_xrupt_info *xrupt_block; /* Backpointer to interrupt block */
345 struct acpi_gpe_register_info *register_info; /* One per GPE register pair */
346 struct acpi_gpe_event_info *event_info; /* One for each GPE */
347 struct acpi_generic_address block_address; /* Base address of the block */
348 u32 register_count; /* Number of register pairs in block */
349 u8 block_base_number;/* Base GPE number for this block */
352 /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */
354 struct acpi_gpe_xrupt_info
356 struct acpi_gpe_xrupt_info *previous;
357 struct acpi_gpe_xrupt_info *next;
358 struct acpi_gpe_block_info *gpe_block_list_head; /* List of GPE blocks for this xrupt */
359 u32 interrupt_level; /* System interrupt level */
363 struct acpi_gpe_walk_info
365 struct acpi_namespace_node *gpe_device;
366 struct acpi_gpe_block_info *gpe_block;
370 typedef acpi_status (*ACPI_GPE_CALLBACK) (
371 struct acpi_gpe_xrupt_info *gpe_xrupt_info,
372 struct acpi_gpe_block_info *gpe_block);
375 /* Information about each particular fixed event */
377 struct acpi_fixed_event_handler
379 acpi_event_handler handler; /* Address of handler. */
380 void *context; /* Context to be passed to handler */
383 struct acpi_fixed_event_info
385 u8 status_register_id;
386 u8 enable_register_id;
391 /* Information used during field processing */
393 struct acpi_field_info
401 /*****************************************************************************
403 * Generic "state" object for stacks
405 ****************************************************************************/
408 #define ACPI_CONTROL_NORMAL 0xC0
409 #define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1
410 #define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2
411 #define ACPI_CONTROL_PREDICATE_FALSE 0xC3
412 #define ACPI_CONTROL_PREDICATE_TRUE 0xC4
415 /* Forward declarations */
416 struct acpi_walk_state ;
417 struct acpi_obj_mutex;
418 union acpi_parse_object ;
421 #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
422 u8 data_type; /* To differentiate various internal objs */\
429 struct acpi_common_state
436 * Update state - used to traverse complex objects such as packages
438 struct acpi_update_state
441 union acpi_operand_object *object;
446 * Pkg state - used to traverse nested package structures
448 struct acpi_pkg_state
451 union acpi_operand_object *source_object;
452 union acpi_operand_object *dest_object;
453 struct acpi_walk_state *walk_state;
454 void *this_target_obj;
461 * Control state - one per if/else and while constructs.
462 * Allows nesting of these constructs
464 struct acpi_control_state
467 union acpi_parse_object *predicate_op;
468 u8 *aml_predicate_start; /* Start of if/while predicate */
469 u8 *package_end; /* End of if/while block */
475 * Scope state - current scope during namespace lookups
477 struct acpi_scope_state
480 struct acpi_namespace_node *node;
484 struct acpi_pscope_state
487 union acpi_parse_object *op; /* Current op being parsed */
488 u8 *arg_end; /* Current argument end */
489 u8 *pkg_end; /* Current package end */
490 u32 arg_list; /* Next argument to parse */
491 u32 arg_count; /* Number of fixed arguments */
496 * Thread state - one per thread across multiple walk states. Multiple walk
497 * states are created when there are nested control methods executing.
499 struct acpi_thread_state
502 struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
503 union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
504 u32 thread_id; /* Running thread ID */
505 u16 current_sync_level; /* Mutex Sync (nested acquire) level */
510 * Result values - used to accumulate the results of nested
513 struct acpi_result_values
516 union acpi_operand_object *obj_desc [ACPI_OBJ_NUM_OPERANDS];
523 acpi_status (*acpi_parse_downwards) (
524 struct acpi_walk_state *walk_state,
525 union acpi_parse_object **out_op);
528 acpi_status (*acpi_parse_upwards) (
529 struct acpi_walk_state *walk_state);
533 * Notify info - used to pass info to the deferred notify
534 * handler/dispatcher.
536 struct acpi_notify_info
539 struct acpi_namespace_node *node;
540 union acpi_operand_object *handler_obj;
544 /* Generic state is union of structs above */
546 union acpi_generic_state
548 struct acpi_common_state common;
549 struct acpi_control_state control;
550 struct acpi_update_state update;
551 struct acpi_scope_state scope;
552 struct acpi_pscope_state parse_scope;
553 struct acpi_pkg_state pkg;
554 struct acpi_thread_state thread;
555 struct acpi_result_values results;
556 struct acpi_notify_info notify;
560 /*****************************************************************************
562 * Interpreter typedefs and structs
564 ****************************************************************************/
567 acpi_status (*ACPI_EXECUTE_OP) (
568 struct acpi_walk_state *walk_state);
571 /*****************************************************************************
573 * Parser typedefs and structs
575 ****************************************************************************/
578 * AML opcode, name, and argument layout
580 struct acpi_opcode_info
582 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
583 char *name; /* Opcode name (disassembler/debug only) */
585 u32 parse_args; /* Grammar/Parse time arguments */
586 u32 runtime_args; /* Interpret time arguments */
587 u32 flags; /* Misc flags */
588 u8 object_type; /* Corresponding internal object type */
589 u8 class; /* Opcode class */
590 u8 type; /* Opcode type */
594 union acpi_parse_value
596 acpi_integer integer; /* Integer constant (Up to 64 bits) */
597 struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
598 u32 size; /* bytelist or field size */
599 char *string; /* NULL terminated string */
600 u8 *buffer; /* buffer or string */
601 char *name; /* NULL terminated string */
602 union acpi_parse_object *arg; /* arguments and contained ops */
606 #define ACPI_PARSE_COMMON \
607 u8 data_type; /* To differentiate various internal objs */\
608 u8 flags; /* Type of Op */\
609 u16 aml_opcode; /* AML opcode */\
610 u32 aml_offset; /* Offset of declaration in AML */\
611 union acpi_parse_object *parent; /* Parent op */\
612 union acpi_parse_object *next; /* Next op */\
613 ACPI_DISASM_ONLY_MEMBERS (\
614 u8 disasm_flags; /* Used during AML disassembly */\
615 u8 disasm_opcode; /* Subtype used for disassembly */\
616 char aml_op_name[16]) /* Op name (debug only) */\
617 /* NON-DEBUG members below: */\
618 struct acpi_namespace_node *node; /* For use by interpreter */\
619 union acpi_parse_value value; /* Value or args associated with the opcode */\
622 #define ACPI_DASM_BUFFER 0x00
623 #define ACPI_DASM_RESOURCE 0x01
624 #define ACPI_DASM_STRING 0x02
625 #define ACPI_DASM_UNICODE 0x03
626 #define ACPI_DASM_EISAID 0x04
627 #define ACPI_DASM_MATCHOP 0x05
630 * generic operation (for example: If, While, Store)
632 struct acpi_parse_obj_common
639 * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
642 struct acpi_parse_obj_named
646 u8 *data; /* AML body or bytelist data */
647 u32 length; /* AML length */
648 u32 name; /* 4-byte name or zero if no name */
652 /* The parse node is the fundamental element of the parse tree */
654 struct acpi_parse_obj_asl
657 union acpi_parse_object *child;
658 union acpi_parse_object *parent_method;
666 u32 logical_line_number;
667 u32 logical_byte_offset;
669 u32 end_logical_line;
672 u32 aml_subtree_length;
673 u32 final_aml_length;
674 u32 final_aml_offset;
677 u8 aml_opcode_length;
678 u8 aml_pkg_len_bytes;
680 char parse_op_name[12];
684 union acpi_parse_object
686 struct acpi_parse_obj_common common;
687 struct acpi_parse_obj_named named;
688 struct acpi_parse_obj_asl asl;
693 * Parse state - one state per parser invocation and each control
696 struct acpi_parse_state
699 u8 *aml_start; /* First AML byte */
700 u8 *aml; /* Next AML byte */
701 u8 *aml_end; /* (last + 1) AML byte */
702 u8 *pkg_start; /* Current package begin */
703 u8 *pkg_end; /* Current package end */
704 union acpi_parse_object *start_op; /* Root of parse tree */
705 struct acpi_namespace_node *start_node;
706 union acpi_generic_state *scope; /* Current scope */
707 union acpi_parse_object *start_scope;
711 /* Parse object flags */
713 #define ACPI_PARSEOP_GENERIC 0x01
714 #define ACPI_PARSEOP_NAMED 0x02
715 #define ACPI_PARSEOP_DEFERRED 0x04
716 #define ACPI_PARSEOP_BYTELIST 0x08
717 #define ACPI_PARSEOP_IN_CACHE 0x80
719 /* Parse object disasm_flags */
721 #define ACPI_PARSEOP_IGNORE 0x01
722 #define ACPI_PARSEOP_PARAMLIST 0x02
723 #define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
724 #define ACPI_PARSEOP_SPECIAL 0x10
727 /*****************************************************************************
729 * Hardware (ACPI registers) and PNP
731 ****************************************************************************/
733 #define PCI_ROOT_HID_STRING "PNP0A03"
735 struct acpi_bit_register_info
745 * These are the full ACPI registers
747 #define ACPI_REGISTER_PM1_STATUS 0x01
748 #define ACPI_REGISTER_PM1_ENABLE 0x02
749 #define ACPI_REGISTER_PM1_CONTROL 0x03
750 #define ACPI_REGISTER_PM1A_CONTROL 0x04
751 #define ACPI_REGISTER_PM1B_CONTROL 0x05
752 #define ACPI_REGISTER_PM2_CONTROL 0x06
753 #define ACPI_REGISTER_PM_TIMER 0x07
754 #define ACPI_REGISTER_PROCESSOR_BLOCK 0x08
755 #define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x09
758 /* Masks used to access the bit_registers */
760 #define ACPI_BITMASK_TIMER_STATUS 0x0001
761 #define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010
762 #define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020
763 #define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100
764 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200
765 #define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400
766 #define ACPI_BITMASK_WAKE_STATUS 0x8000
768 #define ACPI_BITMASK_ALL_FIXED_STATUS (ACPI_BITMASK_TIMER_STATUS | \
769 ACPI_BITMASK_BUS_MASTER_STATUS | \
770 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
771 ACPI_BITMASK_POWER_BUTTON_STATUS | \
772 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
773 ACPI_BITMASK_RT_CLOCK_STATUS | \
774 ACPI_BITMASK_WAKE_STATUS)
776 #define ACPI_BITMASK_TIMER_ENABLE 0x0001
777 #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020
778 #define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100
779 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200
780 #define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400
782 #define ACPI_BITMASK_SCI_ENABLE 0x0001
783 #define ACPI_BITMASK_BUS_MASTER_RLD 0x0002
784 #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004
785 #define ACPI_BITMASK_SLEEP_TYPE_X 0x1C00
786 #define ACPI_BITMASK_SLEEP_ENABLE 0x2000
788 #define ACPI_BITMASK_ARB_DISABLE 0x0001
791 /* Raw bit position of each bit_register */
793 #define ACPI_BITPOSITION_TIMER_STATUS 0x00
794 #define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04
795 #define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05
796 #define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08
797 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09
798 #define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A
799 #define ACPI_BITPOSITION_WAKE_STATUS 0x0F
801 #define ACPI_BITPOSITION_TIMER_ENABLE 0x00
802 #define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05
803 #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08
804 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09
805 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A
807 #define ACPI_BITPOSITION_SCI_ENABLE 0x00
808 #define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01
809 #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02
810 #define ACPI_BITPOSITION_SLEEP_TYPE_X 0x0A
811 #define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D
813 #define ACPI_BITPOSITION_ARB_DISABLE 0x00
816 /*****************************************************************************
818 * Resource descriptors
820 ****************************************************************************/
823 /* resource_type values */
825 #define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0
826 #define ACPI_RESOURCE_TYPE_IO_RANGE 1
827 #define ACPI_RESOURCE_TYPE_BUS_NUMBER_RANGE 2
829 /* Resource descriptor types and masks */
831 #define ACPI_RDESC_TYPE_LARGE 0x80
832 #define ACPI_RDESC_TYPE_SMALL 0x00
834 #define ACPI_RDESC_TYPE_MASK 0x80
835 #define ACPI_RDESC_SMALL_MASK 0x78 /* Only bits 6:3 contain the type */
839 * Small resource descriptor types
840 * Note: The 3 length bits (2:0) must be zero
842 #define ACPI_RDESC_TYPE_IRQ_FORMAT 0x20
843 #define ACPI_RDESC_TYPE_DMA_FORMAT 0x28
844 #define ACPI_RDESC_TYPE_START_DEPENDENT 0x30
845 #define ACPI_RDESC_TYPE_END_DEPENDENT 0x38
846 #define ACPI_RDESC_TYPE_IO_PORT 0x40
847 #define ACPI_RDESC_TYPE_FIXED_IO_PORT 0x48
848 #define ACPI_RDESC_TYPE_SMALL_VENDOR 0x70
849 #define ACPI_RDESC_TYPE_END_TAG 0x78
852 * Large resource descriptor types
855 #define ACPI_RDESC_TYPE_MEMORY_24 0x81
856 #define ACPI_RDESC_TYPE_GENERAL_REGISTER 0x82
857 #define ACPI_RDESC_TYPE_LARGE_VENDOR 0x84
858 #define ACPI_RDESC_TYPE_MEMORY_32 0x85
859 #define ACPI_RDESC_TYPE_FIXED_MEMORY_32 0x86
860 #define ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE 0x87
861 #define ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE 0x88
862 #define ACPI_RDESC_TYPE_EXTENDED_XRUPT 0x89
863 #define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A
866 /*****************************************************************************
870 ****************************************************************************/
872 #define ACPI_ASCII_ZERO 0x30
875 /*****************************************************************************
879 ****************************************************************************/
881 struct acpi_db_method_info
883 acpi_handle thread_gate;
891 struct acpi_integrity_info
898 #define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
899 #define ACPI_DB_CONSOLE_OUTPUT 0x02
900 #define ACPI_DB_DUPLICATE_OUTPUT 0x03
903 /*****************************************************************************
907 ****************************************************************************/
909 struct acpi_debug_print_info
917 /* Entry for a memory allocation (debug only) */
919 #define ACPI_MEM_MALLOC 0
920 #define ACPI_MEM_CALLOC 1
921 #define ACPI_MAX_MODULE_NAME 16
923 #define ACPI_COMMON_DEBUG_MEM_HEADER \
924 struct acpi_debug_mem_block *previous; \
925 struct acpi_debug_mem_block *next; \
929 char module[ACPI_MAX_MODULE_NAME]; \
932 struct acpi_debug_mem_header
934 ACPI_COMMON_DEBUG_MEM_HEADER
937 struct acpi_debug_mem_block
939 ACPI_COMMON_DEBUG_MEM_HEADER
944 #define ACPI_MEM_LIST_GLOBAL 0
945 #define ACPI_MEM_LIST_NSNODE 1
947 #define ACPI_MEM_LIST_FIRST_CACHE_LIST 2
948 #define ACPI_MEM_LIST_STATE 2
949 #define ACPI_MEM_LIST_PSNODE 3
950 #define ACPI_MEM_LIST_PSNODE_EXT 4
951 #define ACPI_MEM_LIST_OPERAND 5
952 #define ACPI_MEM_LIST_WALK 6
953 #define ACPI_MEM_LIST_MAX 6
954 #define ACPI_NUM_MEM_LISTS 7
957 struct acpi_memory_list
965 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
967 /* Statistics for debug memory tracking only */
971 u32 current_total_size;
979 #endif /* __ACLOCAL_H__ */