diff options
| author | Andy Grover <agrover@groveronline.com> | 2003-05-23 02:02:01 -0700 |
|---|---|---|
| committer | Andy Grover <agrover@groveronline.com> | 2003-05-23 02:02:01 -0700 |
| commit | ce7d8354d8e58305f7dac0fa3d3dda22a577016d (patch) | |
| tree | 8588d9fdf535cc40033d13b1494a6dce4a267764 /include | |
| parent | 17d0e4f44ecea34ef66cd1c11dd0b735fd3cde51 (diff) | |
ACPI: update to 20030522
Found and fixed a reported problem where an AE_NOT_FOUND error occurred occasionally
during _BST evaluation. This turned out to be an Owner ID allocation issue where a
called method did not get a new ID assigned to it. Eventually, (after 64k calls), the
Owner ID UINT16 would wraparound so that the ID would be the same as the caller's and the
called method would delete the caller's namespace.
Implemented extended error reporting for control methods that are aborted due to a
run-time exception. Output includes the exact AML instruction that caused the method
abort, a dump of the method locals and arguments at the time of the abort, and a trace of
all nested control method calls.
Modified the interpreter to allow the creation of buffers of zero length from the AML
code. Implemented new code to ensure that no attempt is made to actually allocate a
memory buffer (of length zero), only a buffer object with a NULL buffer pointer and
length zero. A warning is no longer issued when the AML attempts to create a zero-length
buffer.
Implemented a workaround for the "leading asterisk problem" in _HIDs, _UIDs, and _CIDs.
One leading asterisk is automatically removed if present in all HID, UID, and CID
strings.
Implemented full support for _CID methods that return a package of multiple CIDs. The
AcpiGetObjectInfo interface now returns a device _HID, _UID, and _CID list if present.
This required a change to the external interface to pass an ACPI_BUFFER object as a
parameter, since the _CID list is of variable length.
Fixed a problem with the new AE_SAME_HANDLER exception where handler initialization code
did not know about this exception.
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/acconfig.h | 7 | ||||
| -rw-r--r-- | include/acpi/acdebug.h | 17 | ||||
| -rw-r--r-- | include/acpi/acdisasm.h | 406 | ||||
| -rw-r--r-- | include/acpi/aclocal.h | 10 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 4 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 46 | ||||
| -rw-r--r-- | include/acpi/acutils.h | 2 | ||||
| -rw-r--r-- | include/acpi/amlresrc.h | 329 |
8 files changed, 784 insertions, 37 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index e2bd8e6214d2..3fda218d6de3 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -64,7 +64,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20030509 +#define ACPI_CA_VERSION 0x20030522 /* Maximum objects in the various object caches */ @@ -133,6 +133,11 @@ #define ACPI_MAX_STRING_CONVERSION 200 +/* Length of _HID, _UID, and _CID values */ + +#define ACPI_DEVICE_ID_LENGTH 0x09 +#define ACPI_MAX_CID_LENGTH 48 + /* * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG */ diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h index 65c18eba57a6..60cf6eac7a07 100644 --- a/include/acpi/acdebug.h +++ b/include/acpi/acdebug.h @@ -230,10 +230,6 @@ acpi_db_decode_and_display_object ( char *output_type); void -acpi_db_decode_node ( - struct acpi_namespace_node *node); - -void acpi_db_display_result_object ( union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state); @@ -243,11 +239,6 @@ acpi_db_display_all_methods ( char *display_count_arg); void -acpi_db_display_internal_object ( - union acpi_operand_object *obj_desc, - struct acpi_walk_state *walk_state); - -void acpi_db_display_arguments ( void); @@ -264,6 +255,10 @@ acpi_db_display_calling_tree ( void); void +acpi_db_display_object_type ( + char *object_arg); + +void acpi_db_display_argument_object ( union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state); @@ -276,10 +271,6 @@ void * acpi_db_get_pointer ( void *target); -void -acpi_db_decode_internal_object ( - union acpi_operand_object *obj_desc); - /* * dbexec - debugger control method execution diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h new file mode 100644 index 000000000000..e2938c593e2c --- /dev/null +++ b/include/acpi/acdisasm.h @@ -0,0 +1,406 @@ +/****************************************************************************** + * + * Name: acdisasm.h - AML disassembler + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef __ACDISASM_H__ +#define __ACDISASM_H__ + +#include "amlresrc.h" + + +#define BLOCK_NONE 0 +#define BLOCK_PAREN 1 +#define BLOCK_BRACE 2 +#define BLOCK_COMMA_LIST 4 + +extern const char *acpi_gbl_io_decode[2]; +extern const char *acpi_gbl_word_decode[4]; +extern const char *acpi_gbl_consume_decode[2]; +extern const char *acpi_gbl_min_decode[2]; +extern const char *acpi_gbl_max_decode[2]; +extern const char *acpi_gbl_DECdecode[2]; +extern const char *acpi_gbl_RNGdecode[4]; +extern const char *acpi_gbl_MEMdecode[4]; +extern const char *acpi_gbl_RWdecode[2]; +extern const char *acpi_gbl_irq_decode[2]; +extern const char *acpi_gbl_HEdecode[2]; +extern const char *acpi_gbl_LLdecode[2]; +extern const char *acpi_gbl_SHRdecode[2]; +extern const char *acpi_gbl_TYPdecode[4]; +extern const char *acpi_gbl_BMdecode[2]; +extern const char *acpi_gbl_SIZdecode[4]; +extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; +extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; +extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; +extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS]; + + +struct acpi_op_walk_info +{ + u32 level; + u32 bit_offset; +}; + +typedef +acpi_status (*asl_walk_callback) ( + union acpi_parse_object *op, + u32 level, + void *context); + + +/* + * dmwalk + */ + +void +acpi_dm_walk_parse_tree ( + union acpi_parse_object *op, + asl_walk_callback descending_callback, + asl_walk_callback ascending_callback, + void *context); + +acpi_status +acpi_dm_descending_op ( + union acpi_parse_object *op, + u32 level, + void *context); + +acpi_status +acpi_dm_ascending_op ( + union acpi_parse_object *op, + u32 level, + void *context); + + +/* + * dmopcode + */ + +void +acpi_dm_validate_name ( + char *name, + union acpi_parse_object *op); + +u32 +acpi_dm_dump_name ( + char *name); + +void +acpi_dm_unicode ( + union acpi_parse_object *op); + +void +acpi_dm_disassemble ( + struct acpi_walk_state *walk_state, + union acpi_parse_object *origin, + u32 num_opcodes); + +void +acpi_dm_namestring ( + char *name); + +void +acpi_dm_display_path ( + union acpi_parse_object *op); + +void +acpi_dm_disassemble_one_op ( + struct acpi_walk_state *walk_state, + struct acpi_op_walk_info *info, + union acpi_parse_object *op); + +void +acpi_dm_decode_internal_object ( + union acpi_operand_object *obj_desc); + +void +acpi_dm_decode_node ( + struct acpi_namespace_node *node); + +u32 +acpi_dm_block_type ( + union acpi_parse_object *op); + +u32 +acpi_dm_list_type ( + union acpi_parse_object *op); + +acpi_status +acpi_ps_display_object_pathname ( + struct acpi_walk_state *walk_state, + union acpi_parse_object *op); + +void +acpi_dm_method_flags ( + union acpi_parse_object *op); + +void +acpi_dm_field_flags ( + union acpi_parse_object *op); + +void +acpi_dm_address_space ( + u8 space_id); + +void +acpi_dm_region_flags ( + union acpi_parse_object *op); + +void +acpi_dm_match_op ( + union acpi_parse_object *op); + +void +acpi_dm_match_keyword ( + union acpi_parse_object *op); + +u8 +acpi_dm_comma_if_list_member ( + union acpi_parse_object *op); + +void +acpi_dm_comma_if_field_member ( + union acpi_parse_object *op); + + +/* + * dmobject + */ + +void +acpi_dm_decode_node ( + struct acpi_namespace_node *node); + +void +acpi_dm_display_internal_object ( + union acpi_operand_object *obj_desc, + struct acpi_walk_state *walk_state); + +void +acpi_dm_display_arguments ( + struct acpi_walk_state *walk_state); + +void +acpi_dm_display_locals ( + struct acpi_walk_state *walk_state); + +void +acpi_dm_dump_method_info ( + acpi_status status, + struct acpi_walk_state *walk_state, + union acpi_parse_object *op); + + +/* + * dmbuffer + */ + +void +acpi_is_eisa_id ( + union acpi_parse_object *op); + +void +acpi_dm_eisa_id ( + u32 encoded_id); + +u8 +acpi_dm_is_unicode_buffer ( + union acpi_parse_object *op); + +u8 +acpi_dm_is_string_buffer ( + union acpi_parse_object *op); + + +/* + * dmresrc + */ + +void +acpi_dm_disasm_byte_list ( + u32 level, + u8 *byte_data, + u32 byte_count); + +void +acpi_dm_byte_list ( + struct acpi_op_walk_info *info, + union acpi_parse_object *op); + +void +acpi_dm_resource_descriptor ( + struct acpi_op_walk_info *info, + u8 *byte_data, + u32 byte_count); + +u8 +acpi_dm_is_resource_descriptor ( + union acpi_parse_object *op); + +void +acpi_dm_indent ( + u32 level); + +void +acpi_dm_bit_list ( + u16 mask); + +void +acpi_dm_decode_attribute ( + u8 attribute); + +/* + * dmresrcl + */ + +void +acpi_dm_io_flags ( + u8 flags); + +void +acpi_dm_memory_flags ( + u8 flags, + u8 specific_flags); + +void +acpi_dm_word_descriptor ( + struct asl_word_address_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_dword_descriptor ( + struct asl_dword_address_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_qword_descriptor ( + struct asl_qword_address_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_memory24_descriptor ( + struct asl_memory_24_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_memory32_descriptor ( + struct asl_memory_32_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_fixed_mem32_descriptor ( + struct asl_fixed_memory_32_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_generic_register_descriptor ( + struct asl_general_register_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_interrupt_descriptor ( + struct asl_extended_xrupt_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_vendor_large_descriptor ( + struct asl_large_vendor_desc *resource, + u32 length, + u32 level); + + +/* + * dmresrcs + */ + +void +acpi_dm_irq_descriptor ( + struct asl_irq_format_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_dma_descriptor ( + struct asl_dma_format_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_io_descriptor ( + struct asl_io_port_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_fixed_io_descriptor ( + struct asl_fixed_io_port_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_start_dependent_descriptor ( + struct asl_start_dependent_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_end_dependent_descriptor ( + struct asl_start_dependent_desc *resource, + u32 length, + u32 level); + +void +acpi_dm_vendor_small_descriptor ( + struct asl_small_vendor_desc *resource, + u32 length, + u32 level); + + +#endif /* __ACDISASM_H__ */ diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 63eddd3290ab..d0387af6169d 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h @@ -856,16 +856,6 @@ struct acpi_bit_register_info #define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A -/* String version of device HIDs and UIDs */ - -#define ACPI_DEVICE_ID_LENGTH 0x09 - -struct acpi_device_id -{ - char buffer[ACPI_DEVICE_ID_LENGTH]; -}; - - /***************************************************************************** * * Miscellaneous diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index aa97e22aeb0d..cd4979869007 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -228,8 +228,8 @@ acpi_evaluate_object_typed ( acpi_status acpi_get_object_info ( - acpi_handle device, - struct acpi_device_info *info); + acpi_handle handle, + struct acpi_buffer *return_buffer); acpi_status acpi_get_next_object ( diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 1d536c0cbcde..875bee2947a8 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -832,12 +832,35 @@ acpi_status (*acpi_walk_callback) ( #define ACPI_INTERRUPT_HANDLED 0x01 -/* Structure and flags for acpi_get_device_info */ +/* Common string version of device HIDs and UIDs */ -#define ACPI_VALID_HID 0x1 -#define ACPI_VALID_UID 0x2 -#define ACPI_VALID_ADR 0x4 -#define ACPI_VALID_STA 0x8 +struct acpi_device_id +{ + char value[ACPI_DEVICE_ID_LENGTH]; +}; + +/* Common string version of device CIDs */ + +struct acpi_compatible_id +{ + char value[ACPI_MAX_CID_LENGTH]; +}; + +struct acpi_compatible_id_list +{ + u32 count; + u32 size; + struct acpi_compatible_id id[1]; +}; + + +/* Structure and flags for acpi_get_object_info */ + +#define ACPI_VALID_STA 0x0001 +#define ACPI_VALID_ADR 0x0002 +#define ACPI_VALID_HID 0x0004 +#define ACPI_VALID_UID 0x0008 +#define ACPI_VALID_CID 0x0010 #define ACPI_COMMON_OBJ_INFO \ @@ -851,15 +874,18 @@ struct acpi_obj_info_header }; +/* Structure returned from Get Object Info */ + struct acpi_device_info { ACPI_COMMON_OBJ_INFO; - u32 valid; /* Are the next bits legit? */ - char hardware_id[9]; /* _HID value if any */ - char unique_id[9]; /* _UID value if any */ - acpi_integer address; /* _ADR value if any */ - u32 current_status; /* _STA value */ + u32 valid; /* Indicates which fields are valid */ + u32 current_status; /* _STA value */ + acpi_integer address; /* _ADR value if any */ + struct acpi_device_id hardware_id; /* _HID value if any */ + struct acpi_device_id unique_id; /* _UID value if any */ + struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ }; diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 576ad04ca41f..6c79df2c46ac 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h @@ -488,7 +488,7 @@ acpi_ut_execute_HID ( acpi_status acpi_ut_execute_CID ( struct acpi_namespace_node *device_node, - struct acpi_device_id *cid); + struct acpi_compatible_id_list **return_cid_list); acpi_status acpi_ut_execute_STA ( diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h new file mode 100644 index 000000000000..cdaa4689f36e --- /dev/null +++ b/include/acpi/amlresrc.h @@ -0,0 +1,329 @@ + +/****************************************************************************** + * + * Module Name: amlresrc.h - AML resource descriptors + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + + +#ifndef __AMLRESRC_H +#define __AMLRESRC_H + + +#define ASL_RESNAME_ADDRESS "_ADR" +#define ASL_RESNAME_ALIGNMENT "_ALN" +#define ASL_RESNAME_ADDRESSSPACE "_ASI" +#define ASL_RESNAME_BASEADDRESS "_BAS" +#define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */ +#define ASL_RESNAME_DECODE "_DEC" +#define ASL_RESNAME_DMA "_DMA" +#define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ +#define ASL_RESNAME_GRANULARITY "_GRA" +#define ASL_RESNAME_INTERRUPT "_INT" +#define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ +#define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ +#define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ +#define ASL_RESNAME_LENGTH "_LEN" +#define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ +#define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ +#define ASL_RESNAME_MAXADDR "_MAX" +#define ASL_RESNAME_MINADDR "_MIN" +#define ASL_RESNAME_MAXTYPE "_MAF" +#define ASL_RESNAME_MINTYPE "_MIF" +#define ASL_RESNAME_REGISTERBITOFFSET "_RBO" +#define ASL_RESNAME_REGISTERBITWIDTH "_RBW" +#define ASL_RESNAME_RANGETYPE "_RNG" +#define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ +#define ASL_RESNAME_TRANSLATION "_TRA" +#define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ +#define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ +#define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ + + +/* Default sizes for "small" resource descriptors */ + +#define ASL_RDESC_IRQ_SIZE 0x02 +#define ASL_RDESC_DMA_SIZE 0x02 +#define ASL_RDESC_ST_DEPEND_SIZE 0x00 +#define ASL_RDESC_END_DEPEND_SIZE 0x00 +#define ASL_RDESC_IO_SIZE 0x07 +#define ASL_RDESC_FIXED_IO_SIZE 0x03 +#define ASL_RDESC_END_TAG_SIZE 0x01 + + +struct asl_resource_node +{ + u32 buffer_length; + void *buffer; + struct asl_resource_node *next; +}; + + +/* + * Resource descriptors defined in the ACPI specification. + * + * Alignment must be BYTE because these descriptors + * are used to overlay the AML byte stream. + */ +#pragma pack(1) + +struct asl_irq_format_desc +{ + u8 descriptor_type; + u16 irq_mask; + u8 flags; +}; + + +struct asl_irq_noflags_desc +{ + u8 descriptor_type; + u16 irq_mask; +}; + + +struct asl_dma_format_desc +{ + u8 descriptor_type; + u8 dma_channel_mask; + u8 flags; +}; + + +struct asl_start_dependent_desc +{ + u8 descriptor_type; + u8 flags; +}; + + +struct asl_start_dependent_noprio_desc +{ + u8 descriptor_type; +}; + + +struct asl_end_dependent_desc +{ + u8 descriptor_type; +}; + + +struct asl_io_port_desc +{ + u8 descriptor_type; + u8 information; + u16 address_min; + u16 address_max; + u8 alignment; + u8 length; +}; + + +struct asl_fixed_io_port_desc +{ + u8 descriptor_type; + u16 base_address; + u8 length; +}; + + +struct asl_small_vendor_desc +{ + u8 descriptor_type; + u8 vendor_defined[7]; +}; + + +struct asl_end_tag_desc +{ + u8 descriptor_type; + u8 checksum; +}; + + +/* LARGE descriptors */ + +struct asl_memory_24_desc +{ + u8 descriptor_type; + u16 length; + u8 information; + u16 address_min; + u16 address_max; + u16 alignment; + u16 range_length; +}; + + +struct asl_large_vendor_desc +{ + u8 descriptor_type; + u16 length; + u8 vendor_defined[1]; +}; + + +struct asl_memory_32_desc +{ + u8 descriptor_type; + u16 length; + u8 information; + u32 address_min; + u32 address_max; + u32 alignment; + u32 range_length; +}; + + +struct asl_fixed_memory_32_desc +{ + u8 descriptor_type; + u16 length; + u8 information; + u32 base_address; + u32 range_length; +}; + + +struct asl_qword_address_desc +{ + u8 descriptor_type; + u16 length; + u8 resource_type; + u8 flags; + u8 specific_flags; + u64 granularity; + u64 address_min; + u64 address_max; + u64 translation_offset; + u64 address_length; + u8 optional_fields[2]; +}; + + +struct asl_dword_address_desc +{ + u8 descriptor_type; + u16 length; + u8 resource_type; + u8 flags; + u8 specific_flags; + u32 granularity; + u32 address_min; + u32 address_max; + u32 translation_offset; + u32 address_length; + u8 optional_fields[2]; +}; + + +struct asl_word_address_desc +{ + u8 descriptor_type; + u16 length; + u8 resource_type; + u8 flags; + u8 specific_flags; + u16 granularity; + u16 address_min; + u16 address_max; + u16 translation_offset; + u16 address_length; + u8 optional_fields[2]; +}; + + +struct asl_extended_xrupt_desc +{ + u8 descriptor_type; + u16 length; + u8 flags; + u8 table_length; + u32 interrupt_number[1]; + /* res_source_index, res_source optional fields follow */ +}; + + +struct asl_general_register_desc +{ + u8 descriptor_type; + u16 length; + u8 address_space_id; + u8 bit_width; + u8 bit_offset; + u8 reserved; + u64 address; +}; + +/* restore default alignment */ + +#pragma pack() + +/* Union of all resource descriptors, sow we can allocate the worst case */ + +union asl_resource_desc +{ + struct asl_irq_format_desc irq; + struct asl_dma_format_desc dma; + struct asl_start_dependent_desc std; + struct asl_end_dependent_desc end; + struct asl_io_port_desc iop; + struct asl_fixed_io_port_desc fio; + struct asl_small_vendor_desc smv; + struct asl_end_tag_desc et; + + struct asl_memory_24_desc M24; + struct asl_large_vendor_desc lgv; + struct asl_memory_32_desc M32; + struct asl_fixed_memory_32_desc F32; + struct asl_qword_address_desc qas; + struct asl_dword_address_desc das; + struct asl_word_address_desc was; + struct asl_extended_xrupt_desc exx; + struct asl_general_register_desc grg; + u32 u32_item; + u16 u16_item; + u8 U8item; +}; + + +#endif + |
