diff options
Diffstat (limited to 'include/acpi/aclocal.h')
-rw-r--r-- | include/acpi/aclocal.h | 112 |
1 files changed, 76 insertions, 36 deletions
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 9fba0fddda90..8361820d2970 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -276,6 +276,37 @@ struct acpi_create_field_info { | |||
276 | u8 field_type; | 276 | u8 field_type; |
277 | }; | 277 | }; |
278 | 278 | ||
279 | /* | ||
280 | * Bitmapped ACPI types. Used internally only | ||
281 | */ | ||
282 | #define ACPI_BTYPE_ANY 0x00000000 | ||
283 | #define ACPI_BTYPE_INTEGER 0x00000001 | ||
284 | #define ACPI_BTYPE_STRING 0x00000002 | ||
285 | #define ACPI_BTYPE_BUFFER 0x00000004 | ||
286 | #define ACPI_BTYPE_PACKAGE 0x00000008 | ||
287 | #define ACPI_BTYPE_FIELD_UNIT 0x00000010 | ||
288 | #define ACPI_BTYPE_DEVICE 0x00000020 | ||
289 | #define ACPI_BTYPE_EVENT 0x00000040 | ||
290 | #define ACPI_BTYPE_METHOD 0x00000080 | ||
291 | #define ACPI_BTYPE_MUTEX 0x00000100 | ||
292 | #define ACPI_BTYPE_REGION 0x00000200 | ||
293 | #define ACPI_BTYPE_POWER 0x00000400 | ||
294 | #define ACPI_BTYPE_PROCESSOR 0x00000800 | ||
295 | #define ACPI_BTYPE_THERMAL 0x00001000 | ||
296 | #define ACPI_BTYPE_BUFFER_FIELD 0x00002000 | ||
297 | #define ACPI_BTYPE_DDB_HANDLE 0x00004000 | ||
298 | #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 | ||
299 | #define ACPI_BTYPE_REFERENCE 0x00010000 | ||
300 | #define ACPI_BTYPE_RESOURCE 0x00020000 | ||
301 | |||
302 | #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) | ||
303 | |||
304 | #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) | ||
305 | #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) | ||
306 | #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) | ||
307 | #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ | ||
308 | #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF | ||
309 | |||
279 | /***************************************************************************** | 310 | /***************************************************************************** |
280 | * | 311 | * |
281 | * Event typedefs and structs | 312 | * Event typedefs and structs |
@@ -385,13 +416,13 @@ struct acpi_field_info { | |||
385 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 | 416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 |
386 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 | 417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 |
387 | 418 | ||
388 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ | 419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ |
389 | u8 data_type; /* To differentiate various internal objs */\ | 420 | u8 data_type; /* To differentiate various internal objs */\ |
390 | u8 flags; \ | 421 | u8 flags; \ |
391 | u16 value; \ | 422 | u16 value; \ |
392 | u16 state; \ | 423 | u16 state; \ |
393 | u16 reserved; \ | 424 | u16 reserved; \ |
394 | void *next; \ | 425 | void *next; |
395 | 426 | ||
396 | struct acpi_common_state { | 427 | struct acpi_common_state { |
397 | ACPI_STATE_COMMON}; | 428 | ACPI_STATE_COMMON}; |
@@ -544,8 +575,7 @@ union acpi_parse_value { | |||
544 | char aml_op_name[16]) /* Op name (debug only) */\ | 575 | char aml_op_name[16]) /* Op name (debug only) */\ |
545 | /* NON-DEBUG members below: */\ | 576 | /* NON-DEBUG members below: */\ |
546 | struct acpi_namespace_node *node; /* For use by interpreter */\ | 577 | struct acpi_namespace_node *node; /* For use by interpreter */\ |
547 | union acpi_parse_value value; /* Value or args associated with the opcode */\ | 578 | union acpi_parse_value value; /* Value or args associated with the opcode */ |
548 | |||
549 | 579 | ||
550 | #define ACPI_DASM_BUFFER 0x00 | 580 | #define ACPI_DASM_BUFFER 0x00 |
551 | #define ACPI_DASM_RESOURCE 0x01 | 581 | #define ACPI_DASM_RESOURCE 0x01 |
@@ -573,6 +603,8 @@ struct acpi_parse_obj_named { | |||
573 | 603 | ||
574 | /* The parse node is the fundamental element of the parse tree */ | 604 | /* The parse node is the fundamental element of the parse tree */ |
575 | 605 | ||
606 | #define ACPI_MAX_PARSEOP_NAME 20 | ||
607 | |||
576 | struct acpi_parse_obj_asl { | 608 | struct acpi_parse_obj_asl { |
577 | ACPI_PARSE_COMMON union acpi_parse_object *child; | 609 | ACPI_PARSE_COMMON union acpi_parse_object *child; |
578 | union acpi_parse_object *parent_method; | 610 | union acpi_parse_object *parent_method; |
@@ -597,7 +629,7 @@ struct acpi_parse_obj_asl { | |||
597 | u8 aml_opcode_length; | 629 | u8 aml_opcode_length; |
598 | u8 aml_pkg_len_bytes; | 630 | u8 aml_pkg_len_bytes; |
599 | u8 extra; | 631 | u8 extra; |
600 | char parse_op_name[12]; | 632 | char parse_op_name[ACPI_MAX_PARSEOP_NAME]; |
601 | }; | 633 | }; |
602 | 634 | ||
603 | union acpi_parse_object { | 635 | union acpi_parse_object { |
@@ -735,44 +767,52 @@ struct acpi_bit_register_info { | |||
735 | 767 | ||
736 | /* resource_type values */ | 768 | /* resource_type values */ |
737 | 769 | ||
738 | #define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0 | 770 | #define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0 |
739 | #define ACPI_RESOURCE_TYPE_IO_RANGE 1 | 771 | #define ACPI_ADDRESS_TYPE_IO_RANGE 1 |
740 | #define ACPI_RESOURCE_TYPE_BUS_NUMBER_RANGE 2 | 772 | #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 |
741 | 773 | ||
742 | /* Resource descriptor types and masks */ | 774 | /* Resource descriptor types and masks */ |
743 | 775 | ||
744 | #define ACPI_RDESC_TYPE_LARGE 0x80 | 776 | #define ACPI_RESOURCE_NAME_LARGE 0x80 |
745 | #define ACPI_RDESC_TYPE_SMALL 0x00 | 777 | #define ACPI_RESOURCE_NAME_SMALL 0x00 |
746 | 778 | ||
747 | #define ACPI_RDESC_TYPE_MASK 0x80 | 779 | #define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */ |
748 | #define ACPI_RDESC_SMALL_MASK 0x78 /* Only bits 6:3 contain the type */ | 780 | #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */ |
781 | #define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */ | ||
749 | 782 | ||
750 | /* | 783 | /* |
751 | * Small resource descriptor types | 784 | * Small resource descriptor "names" as defined by the ACPI specification. |
752 | * Note: The 3 length bits (2:0) must be zero | 785 | * Note: Bits 2:0 are used for the descriptor length |
753 | */ | 786 | */ |
754 | #define ACPI_RDESC_TYPE_IRQ_FORMAT 0x20 | 787 | #define ACPI_RESOURCE_NAME_IRQ 0x20 |
755 | #define ACPI_RDESC_TYPE_DMA_FORMAT 0x28 | 788 | #define ACPI_RESOURCE_NAME_DMA 0x28 |
756 | #define ACPI_RDESC_TYPE_START_DEPENDENT 0x30 | 789 | #define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 |
757 | #define ACPI_RDESC_TYPE_END_DEPENDENT 0x38 | 790 | #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 |
758 | #define ACPI_RDESC_TYPE_IO_PORT 0x40 | 791 | #define ACPI_RESOURCE_NAME_IO 0x40 |
759 | #define ACPI_RDESC_TYPE_FIXED_IO_PORT 0x48 | 792 | #define ACPI_RESOURCE_NAME_FIXED_IO 0x48 |
760 | #define ACPI_RDESC_TYPE_SMALL_VENDOR 0x70 | 793 | #define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 |
761 | #define ACPI_RDESC_TYPE_END_TAG 0x78 | 794 | #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 |
795 | #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 | ||
796 | #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 | ||
797 | #define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 | ||
798 | #define ACPI_RESOURCE_NAME_END_TAG 0x78 | ||
762 | 799 | ||
763 | /* | 800 | /* |
764 | * Large resource descriptor types | 801 | * Large resource descriptor "names" as defined by the ACPI specification. |
802 | * Note: includes the Large Descriptor bit in bit[7] | ||
765 | */ | 803 | */ |
766 | #define ACPI_RDESC_TYPE_MEMORY_24 0x81 | 804 | #define ACPI_RESOURCE_NAME_MEMORY24 0x81 |
767 | #define ACPI_RDESC_TYPE_GENERAL_REGISTER 0x82 | 805 | #define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 |
768 | #define ACPI_RDESC_TYPE_LARGE_VENDOR 0x84 | 806 | #define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 |
769 | #define ACPI_RDESC_TYPE_MEMORY_32 0x85 | 807 | #define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 |
770 | #define ACPI_RDESC_TYPE_FIXED_MEMORY_32 0x86 | 808 | #define ACPI_RESOURCE_NAME_MEMORY32 0x85 |
771 | #define ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE 0x87 | 809 | #define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 |
772 | #define ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE 0x88 | 810 | #define ACPI_RESOURCE_NAME_ADDRESS32 0x87 |
773 | #define ACPI_RDESC_TYPE_EXTENDED_XRUPT 0x89 | 811 | #define ACPI_RESOURCE_NAME_ADDRESS16 0x88 |
774 | #define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A | 812 | #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 |
775 | #define ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE 0x8B | 813 | #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A |
814 | #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B | ||
815 | #define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B | ||
776 | 816 | ||
777 | /***************************************************************************** | 817 | /***************************************************************************** |
778 | * | 818 | * |
@@ -780,7 +820,7 @@ struct acpi_bit_register_info { | |||
780 | * | 820 | * |
781 | ****************************************************************************/ | 821 | ****************************************************************************/ |
782 | 822 | ||
783 | #define ACPI_ASCII_ZERO 0x30 | 823 | #define ACPI_ASCII_ZERO 0x30 |
784 | 824 | ||
785 | /***************************************************************************** | 825 | /***************************************************************************** |
786 | * | 826 | * |