summaryrefslogtreecommitdiffstats
path: root/include/acpi/amlresrc.h
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2005-09-16 22:51:15 +0200
committerLen Brown <len.brown@intel.com>2005-09-22 05:51:39 +0200
commitbda663d36b94c723153246a4231bbc0f1cd1836e (patch)
treecc9f75c1d010d1b99d29f13acd600b21eda5eec5 /include/acpi/amlresrc.h
parent[PATCH] uml: fix compile warning after consolidation patch (diff)
downloadlinux-bda663d36b94c723153246a4231bbc0f1cd1836e.tar.xz
linux-bda663d36b94c723153246a4231bbc0f1cd1836e.zip
[ACPI] ACPICA 20050916
Fixed a problem within the Resource Manager where support for the Generic Register descriptor was not fully implemented. This descriptor is now fully recognized, parsed, disassembled, and displayed. Restructured the Resource Manager code to utilize table-driven dispatch and lookup, eliminating many of the large switch() statements. This reduces overall subsystem code size and code complexity. Affects the resource parsing and construction, disassembly, and debug dump output. Cleaned up and restructured the debug dump output for all resource descriptors. Improved readability of the output and reduced code size. Fixed a problem where changes to internal data structures caused the optional ACPI_MUTEX_DEBUG code to fail compilation if specified. Signed-off-by: Robert Moore <Robert.Moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/amlresrc.h')
-rw-r--r--include/acpi/amlresrc.h56
1 files changed, 22 insertions, 34 deletions
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h
index 051786e4b210..a3c46ba6358d 100644
--- a/include/acpi/amlresrc.h
+++ b/include/acpi/amlresrc.h
@@ -157,10 +157,15 @@ struct asl_end_tag_desc {
/* LARGE descriptors */
+#define ASL_LARGE_HEADER_COMMON \
+ u8 descriptor_type;\
+ u16 length;
+
+struct asl_large_header {
+ASL_LARGE_HEADER_COMMON};
+
struct asl_memory_24_desc {
- u8 descriptor_type;
- u16 length;
- u8 information;
+ ASL_LARGE_HEADER_COMMON u8 information;
u16 address_min;
u16 address_max;
u16 alignment;
@@ -168,15 +173,11 @@ struct asl_memory_24_desc {
};
struct asl_large_vendor_desc {
- u8 descriptor_type;
- u16 length;
- u8 vendor_defined[1];
+ ASL_LARGE_HEADER_COMMON u8 vendor_defined[1];
};
struct asl_memory_32_desc {
- u8 descriptor_type;
- u16 length;
- u8 information;
+ ASL_LARGE_HEADER_COMMON u8 information;
u32 address_min;
u32 address_max;
u32 alignment;
@@ -184,17 +185,13 @@ struct asl_memory_32_desc {
};
struct asl_fixed_memory_32_desc {
- u8 descriptor_type;
- u16 length;
- u8 information;
+ ASL_LARGE_HEADER_COMMON u8 information;
u32 base_address;
u32 range_length;
};
struct asl_extended_address_desc {
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
+ ASL_LARGE_HEADER_COMMON u8 resource_type;
u8 flags;
u8 specific_flags;
u8 revision_iD;
@@ -211,9 +208,7 @@ struct asl_extended_address_desc {
#define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */
struct asl_qword_address_desc {
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
+ ASL_LARGE_HEADER_COMMON u8 resource_type;
u8 flags;
u8 specific_flags;
u64 granularity;
@@ -225,9 +220,7 @@ struct asl_qword_address_desc {
};
struct asl_dword_address_desc {
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
+ ASL_LARGE_HEADER_COMMON u8 resource_type;
u8 flags;
u8 specific_flags;
u32 granularity;
@@ -239,9 +232,7 @@ struct asl_dword_address_desc {
};
struct asl_word_address_desc {
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
+ ASL_LARGE_HEADER_COMMON u8 resource_type;
u8 flags;
u8 specific_flags;
u16 granularity;
@@ -253,18 +244,14 @@ struct asl_word_address_desc {
};
struct asl_extended_xrupt_desc {
- u8 descriptor_type;
- u16 length;
- u8 flags;
+ ASL_LARGE_HEADER_COMMON 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;
+struct asl_generic_register_desc {
+ ASL_LARGE_HEADER_COMMON u8 address_space_id;
u8 bit_width;
u8 bit_offset;
u8 access_size; /* ACPI 3.0, was Reserved */
@@ -280,13 +267,14 @@ struct asl_general_register_desc {
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_start_dependent_desc std;
+ struct asl_end_dependent_desc end;
struct asl_small_vendor_desc smv;
struct asl_end_tag_desc et;
+ struct asl_large_header lhd;
struct asl_memory_24_desc M24;
struct asl_large_vendor_desc lgv;
struct asl_memory_32_desc M32;
@@ -296,7 +284,7 @@ union asl_resource_desc {
struct asl_word_address_desc was;
struct asl_extended_address_desc eas;
struct asl_extended_xrupt_desc exx;
- struct asl_general_register_desc grg;
+ struct asl_generic_register_desc grg;
u32 u32_item;
u16 u16_item;
u8 U8item;