diff options
author | Bob Moore <robert.moore@intel.com> | 2005-11-02 00:00:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-10 00:26:05 -0500 |
commit | 96db255c8f014ae3497507104e8df809785a619f (patch) | |
tree | 79d2c506644370fd6c10d94bd40c419cd3bad148 /include/acpi | |
parent | 0897831bb54eb36fd9e2a22da7f0f64be1b20d09 (diff) |
[ACPI] ACPICA 20051102
Modified the subsystem initialization sequence to improve
GPE support. The GPE initialization has been split into
two parts in order to defer execution of the _PRW methods
(Power Resources for Wake) until after the hardware is
fully initialized and the SCI handler is installed. This
allows the _PRW methods to access fields protected by the
Global Lock. This will fix systems where a NO_GLOBAL_LOCK
exception has been seen during initialization.
Fixed a regression with the ConcatenateResTemplate()
ASL operator introduced in the 20051021 release.
Implemented support for "local" internal ACPI object
types within the debugger "Object" command and the
acpi_walk_namespace() external interfaces. These local
types include RegionFields, BankFields, IndexFields, Alias,
and reference objects.
Moved common AML resource handling code into a new file,
"utresrc.c". This code is shared by both the Resource
Manager and the AML Debugger.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
-rw-r--r-- | include/acpi/acevents.h | 6 | ||||
-rw-r--r-- | include/acpi/acinterp.h | 46 | ||||
-rw-r--r-- | include/acpi/acresrc.h | 27 | ||||
-rw-r--r-- | include/acpi/acutils.h | 17 | ||||
-rw-r--r-- | include/acpi/amlresrc.h | 5 |
6 files changed, 76 insertions, 27 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 7676afec09a2..d371ec6b9812 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20051021 | 66 | #define ACPI_CA_VERSION 0x20051102 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index bfa54600ecd9..b40062c3ba7a 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h | |||
@@ -51,6 +51,8 @@ acpi_status acpi_ev_initialize_events(void); | |||
51 | 51 | ||
52 | acpi_status acpi_ev_install_xrupt_handlers(void); | 52 | acpi_status acpi_ev_install_xrupt_handlers(void); |
53 | 53 | ||
54 | acpi_status acpi_ev_install_fadt_gpes(void); | ||
55 | |||
54 | u32 acpi_ev_fixed_event_detect(void); | 56 | u32 acpi_ev_fixed_event_detect(void); |
55 | 57 | ||
56 | /* | 58 | /* |
@@ -105,6 +107,10 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
105 | u32 interrupt_number, | 107 | u32 interrupt_number, |
106 | struct acpi_gpe_block_info **return_gpe_block); | 108 | struct acpi_gpe_block_info **return_gpe_block); |
107 | 109 | ||
110 | acpi_status | ||
111 | acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, | ||
112 | struct acpi_gpe_block_info *gpe_block); | ||
113 | |||
108 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); | 114 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); |
109 | 115 | ||
110 | u32 | 116 | u32 |
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 2c9c1a1d1b7f..87e5e44572ca 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -44,7 +44,49 @@ | |||
44 | #ifndef __ACINTERP_H__ | 44 | #ifndef __ACINTERP_H__ |
45 | #define __ACINTERP_H__ | 45 | #define __ACINTERP_H__ |
46 | 46 | ||
47 | #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) | 47 | #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) |
48 | |||
49 | /* Macros for tables used for debug output */ | ||
50 | |||
51 | #define ACPI_EXD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_operand_object,f) | ||
52 | #define ACPI_EXD_NSOFFSET(f) (u8) ACPI_OFFSET (struct acpi_namespace_node,f) | ||
53 | #define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info)) | ||
54 | |||
55 | /* | ||
56 | * If possible, pack the following structure to byte alignment, since we | ||
57 | * don't care about performance for debug output | ||
58 | */ | ||
59 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | ||
60 | #pragma pack(1) | ||
61 | #endif | ||
62 | |||
63 | typedef const struct acpi_exdump_info { | ||
64 | u8 opcode; | ||
65 | u8 offset; | ||
66 | char *name; | ||
67 | |||
68 | } acpi_exdump_info; | ||
69 | |||
70 | /* Values for the Opcode field above */ | ||
71 | |||
72 | #define ACPI_EXD_INIT 0 | ||
73 | #define ACPI_EXD_TYPE 1 | ||
74 | #define ACPI_EXD_UINT8 2 | ||
75 | #define ACPI_EXD_UINT16 3 | ||
76 | #define ACPI_EXD_UINT32 4 | ||
77 | #define ACPI_EXD_UINT64 5 | ||
78 | #define ACPI_EXD_LITERAL 6 | ||
79 | #define ACPI_EXD_POINTER 7 | ||
80 | #define ACPI_EXD_ADDRESS 8 | ||
81 | #define ACPI_EXD_STRING 9 | ||
82 | #define ACPI_EXD_BUFFER 10 | ||
83 | #define ACPI_EXD_PACKAGE 11 | ||
84 | #define ACPI_EXD_FIELD 12 | ||
85 | #define ACPI_EXD_REFERENCE 13 | ||
86 | |||
87 | /* restore default alignment */ | ||
88 | |||
89 | #pragma pack() | ||
48 | 90 | ||
49 | /* | 91 | /* |
50 | * exconvrt - object conversion | 92 | * exconvrt - object conversion |
@@ -327,7 +369,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
327 | void | 369 | void |
328 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); | 370 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); |
329 | 371 | ||
330 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags); | 372 | void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags); |
331 | #endif /* ACPI_FUTURE_USAGE */ | 373 | #endif /* ACPI_FUTURE_USAGE */ |
332 | 374 | ||
333 | /* | 375 | /* |
diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h index 25cff0d5ba58..2bf53940f259 100644 --- a/include/acpi/acresrc.h +++ b/include/acpi/acresrc.h | |||
@@ -101,27 +101,11 @@ typedef const struct acpi_rsconvert_info { | |||
101 | #define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f) | 101 | #define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f) |
102 | #define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f) | 102 | #define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f) |
103 | 103 | ||
104 | /* | ||
105 | * Resource dispatch and info tables | ||
106 | */ | ||
107 | typedef const struct acpi_resource_info { | ||
108 | u8 length_type; | ||
109 | u8 minimum_aml_resource_length; | ||
110 | u8 minimum_internal_struct_length; | ||
111 | |||
112 | } acpi_resource_info; | ||
113 | |||
114 | /* Types for length_type above */ | ||
115 | |||
116 | #define ACPI_FIXED_LENGTH 0 | ||
117 | #define ACPI_VARIABLE_LENGTH 1 | ||
118 | #define ACPI_SMALL_VARIABLE_LENGTH 2 | ||
119 | |||
120 | typedef const struct acpi_rsdump_info { | 104 | typedef const struct acpi_rsdump_info { |
121 | u8 opcode; | 105 | u8 opcode; |
122 | u8 offset; | 106 | u8 offset; |
123 | char *name; | 107 | char *name; |
124 | const void *pointer; | 108 | const char **pointer; |
125 | 109 | ||
126 | } acpi_rsdump_info; | 110 | } acpi_rsdump_info; |
127 | 111 | ||
@@ -153,10 +137,9 @@ extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[]; | |||
153 | 137 | ||
154 | /* Resource tables indexed by raw AML resource descriptor type */ | 138 | /* Resource tables indexed by raw AML resource descriptor type */ |
155 | 139 | ||
156 | extern struct acpi_resource_info acpi_gbl_sm_resource_info[]; | 140 | extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[]; |
157 | extern struct acpi_resource_info acpi_gbl_lg_resource_info[]; | 141 | |
158 | extern struct acpi_rsconvert_info *acpi_gbl_sm_get_resource_dispatch[]; | 142 | extern const u8 acpi_gbl_resource_struct_sizes[]; |
159 | extern struct acpi_rsconvert_info *acpi_gbl_lg_get_resource_dispatch[]; | ||
160 | 143 | ||
161 | /* | 144 | /* |
162 | * rscreate | 145 | * rscreate |
@@ -272,8 +255,6 @@ void | |||
272 | acpi_rs_set_resource_length(acpi_rsdesc_size total_length, | 255 | acpi_rs_set_resource_length(acpi_rsdesc_size total_length, |
273 | union aml_resource *aml); | 256 | union aml_resource *aml); |
274 | 257 | ||
275 | struct acpi_resource_info *acpi_rs_get_resource_info(u8 resource_type); | ||
276 | |||
277 | /* | 258 | /* |
278 | * rsdump | 259 | * rsdump |
279 | */ | 260 | */ |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 7386eb81bd2a..4ff963323de3 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -44,6 +44,15 @@ | |||
44 | #ifndef _ACUTILS_H | 44 | #ifndef _ACUTILS_H |
45 | #define _ACUTILS_H | 45 | #define _ACUTILS_H |
46 | 46 | ||
47 | extern const u8 acpi_gbl_resource_aml_sizes[]; | ||
48 | |||
49 | /* Types for Resource descriptor entries */ | ||
50 | |||
51 | #define ACPI_INVALID_RESOURCE 0 | ||
52 | #define ACPI_FIXED_LENGTH 1 | ||
53 | #define ACPI_VARIABLE_LENGTH 2 | ||
54 | #define ACPI_SMALL_VARIABLE_LENGTH 3 | ||
55 | |||
47 | typedef | 56 | typedef |
48 | acpi_status(*acpi_pkg_callback) (u8 object_type, | 57 | acpi_status(*acpi_pkg_callback) (u8 object_type, |
49 | union acpi_operand_object * source_object, | 58 | union acpi_operand_object * source_object, |
@@ -418,13 +427,19 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); | |||
418 | 427 | ||
419 | #define ACPI_ANY_BASE 0 | 428 | #define ACPI_ANY_BASE 0 |
420 | 429 | ||
430 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); | ||
431 | |||
421 | u32 acpi_ut_get_descriptor_length(void *aml); | 432 | u32 acpi_ut_get_descriptor_length(void *aml); |
422 | 433 | ||
423 | u16 acpi_ut_get_resource_length(void *aml); | 434 | u16 acpi_ut_get_resource_length(void *aml); |
424 | 435 | ||
436 | u8 acpi_ut_get_resource_header_length(void *aml); | ||
437 | |||
425 | u8 acpi_ut_get_resource_type(void *aml); | 438 | u8 acpi_ut_get_resource_type(void *aml); |
426 | 439 | ||
427 | u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc); | 440 | acpi_status |
441 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, | ||
442 | u8 ** end_tag); | ||
428 | 443 | ||
429 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); | 444 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); |
430 | 445 | ||
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index 3112be527731..2e3382c1e5e3 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -92,6 +92,11 @@ struct asl_resource_node { | |||
92 | struct asl_resource_node *next; | 92 | struct asl_resource_node *next; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | /* Macros used to generate AML resource length fields */ | ||
96 | |||
97 | #define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (struct aml_resource_large_header)) | ||
98 | #define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (struct aml_resource_small_header)) | ||
99 | |||
95 | /* | 100 | /* |
96 | * Resource descriptors defined in the ACPI specification. | 101 | * Resource descriptors defined in the ACPI specification. |
97 | * | 102 | * |