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 /drivers/acpi/executer/exmisc.c | |
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 'drivers/acpi/executer/exmisc.c')
-rw-r--r-- | drivers/acpi/executer/exmisc.c | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index 1899ab251393..00a25f8188f4 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
46 | #include <acpi/acinterp.h> | 46 | #include <acpi/acinterp.h> |
47 | #include <acpi/amlcode.h> | 47 | #include <acpi/amlcode.h> |
48 | #include <acpi/amlresrc.h> | ||
48 | 49 | ||
49 | #define _COMPONENT ACPI_EXECUTER | 50 | #define _COMPONENT ACPI_EXECUTER |
50 | ACPI_MODULE_NAME("exmisc") | 51 | ACPI_MODULE_NAME("exmisc") |
@@ -157,40 +158,52 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
157 | union acpi_operand_object **actual_return_desc, | 158 | union acpi_operand_object **actual_return_desc, |
158 | struct acpi_walk_state *walk_state) | 159 | struct acpi_walk_state *walk_state) |
159 | { | 160 | { |
161 | acpi_status status; | ||
160 | union acpi_operand_object *return_desc; | 162 | union acpi_operand_object *return_desc; |
161 | u8 *new_buf; | 163 | u8 *new_buf; |
162 | u8 *end_tag1; | 164 | u8 *end_tag; |
163 | u8 *end_tag2; | 165 | acpi_size length0; |
164 | acpi_size length1; | 166 | acpi_size length1; |
165 | acpi_size length2; | ||
166 | 167 | ||
167 | ACPI_FUNCTION_TRACE("ex_concat_template"); | 168 | ACPI_FUNCTION_TRACE("ex_concat_template"); |
168 | 169 | ||
169 | /* Find the end_tags in each resource template */ | 170 | /* |
171 | * Find the end_tag descriptor in each resource template. | ||
172 | * Note: returned pointers point TO the end_tag, not past it. | ||
173 | * | ||
174 | * Compute the length of each resource template | ||
175 | */ | ||
176 | status = acpi_ut_get_resource_end_tag(operand0, &end_tag); | ||
177 | if (ACPI_FAILURE(status)) { | ||
178 | return_ACPI_STATUS(status); | ||
179 | } | ||
170 | 180 | ||
171 | end_tag1 = acpi_ut_get_resource_end_tag(operand0); | 181 | length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer); |
172 | end_tag2 = acpi_ut_get_resource_end_tag(operand1); | 182 | |
173 | if (!end_tag1 || !end_tag2) { | 183 | status = acpi_ut_get_resource_end_tag(operand1, &end_tag); |
174 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 184 | if (ACPI_FAILURE(status)) { |
185 | return_ACPI_STATUS(status); | ||
175 | } | 186 | } |
176 | 187 | ||
177 | /* Compute the length of each part */ | 188 | /* Include the end_tag in the second template length */ |
178 | 189 | ||
179 | length1 = ACPI_PTR_DIFF(end_tag1, operand0->buffer.pointer); | 190 | length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer) + |
180 | length2 = ACPI_PTR_DIFF(end_tag2, operand1->buffer.pointer) + 2; /* Size of END_TAG */ | 191 | sizeof(struct aml_resource_end_tag); |
181 | 192 | ||
182 | /* Create a new buffer object for the result */ | 193 | /* Create a new buffer object for the result */ |
183 | 194 | ||
184 | return_desc = acpi_ut_create_buffer_object(length1 + length2); | 195 | return_desc = acpi_ut_create_buffer_object(length0 + length1); |
185 | if (!return_desc) { | 196 | if (!return_desc) { |
186 | return_ACPI_STATUS(AE_NO_MEMORY); | 197 | return_ACPI_STATUS(AE_NO_MEMORY); |
187 | } | 198 | } |
188 | 199 | ||
189 | /* Copy the templates to the new descriptor */ | 200 | /* |
190 | 201 | * Copy the templates to the new buffer, 0 first, then 1 follows. One | |
202 | * end_tag descriptor is copied from Operand1. | ||
203 | */ | ||
191 | new_buf = return_desc->buffer.pointer; | 204 | new_buf = return_desc->buffer.pointer; |
192 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length1); | 205 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); |
193 | ACPI_MEMCPY(new_buf + length1, operand1->buffer.pointer, length2); | 206 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); |
194 | 207 | ||
195 | /* Compute the new checksum */ | 208 | /* Compute the new checksum */ |
196 | 209 | ||
@@ -198,7 +211,7 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
198 | acpi_ut_generate_checksum(return_desc->buffer.pointer, | 211 | acpi_ut_generate_checksum(return_desc->buffer.pointer, |
199 | (return_desc->buffer.length - 1)); | 212 | (return_desc->buffer.length - 1)); |
200 | 213 | ||
201 | /* Return the completed template descriptor */ | 214 | /* Return the completed resource template */ |
202 | 215 | ||
203 | *actual_return_desc = return_desc; | 216 | *actual_return_desc = return_desc; |
204 | return_ACPI_STATUS(AE_OK); | 217 | return_ACPI_STATUS(AE_OK); |