diff options
author | Bob Moore <robert.moore@intel.com> | 2005-11-17 13:07:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-10 00:27:56 -0500 |
commit | c51a4de85de720670f2fbc592a6f8040af72ad87 (patch) | |
tree | ccaa60c483fcc904abd63d936ff7dc380bf28e7b /drivers/acpi/executer/exmisc.c | |
parent | 96db255c8f014ae3497507104e8df809785a619f (diff) |
[ACPI] ACPICA 20051117
Fixed a problem in the AML parser where the method thread
count could be decremented below zero if any errors
occurred during the method parse phase. This should
eliminate AE_AML_METHOD_LIMIT exceptions seen on some
machines. This also fixed a related regression with the
mechanism that detects and corrects methods that cannot
properly handle reentrancy (related to the deployment of
the new OwnerId mechanism.)
Eliminated the pre-parsing of control methods (to detect
errors) during table load. Related to the problem above,
this was causing unwind issues if any errors occurred
during the parse, and it seemed to be overkill. A table
load should not be aborted if there are problems with
any single control method, thus rendering this feature
rather pointless.
Fixed a problem with the new table-driven resource manager
where an internal buffer overflow could occur for small
resource templates.
Implemented a new external interface, acpi_get_vendor_resource()
This interface will find and return a vendor-defined
resource descriptor within a _CRS or _PRS
method via an ACPI 3.0 UUID match. (from Bjorn Helgaas)
Removed the length limit (200) on string objects as
per the upcoming ACPI 3.0A specification. This affects
the following areas of the interpreter: 1) any implicit
conversion of a Buffer to a String, 2) a String object
result of the ASL Concatentate operator, 3) the String
object result of the ASL ToString operator.
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 | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index 00a25f8188f4..0778bff632bf 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.c | |||
@@ -205,11 +205,9 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
205 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); | 205 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); |
206 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); | 206 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); |
207 | 207 | ||
208 | /* Compute the new checksum */ | 208 | /* Set the end_tag checksum to zero, means "ignore checksum" */ |
209 | 209 | ||
210 | new_buf[return_desc->buffer.length - 1] = | 210 | new_buf[return_desc->buffer.length - 1] = 0; |
211 | acpi_ut_generate_checksum(return_desc->buffer.pointer, | ||
212 | (return_desc->buffer.length - 1)); | ||
213 | 211 | ||
214 | /* Return the completed resource template */ | 212 | /* Return the completed resource template */ |
215 | 213 | ||
@@ -242,7 +240,6 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
242 | union acpi_operand_object *return_desc; | 240 | union acpi_operand_object *return_desc; |
243 | char *new_buf; | 241 | char *new_buf; |
244 | acpi_status status; | 242 | acpi_status status; |
245 | acpi_size new_length; | ||
246 | 243 | ||
247 | ACPI_FUNCTION_TRACE("ex_do_concatenate"); | 244 | ACPI_FUNCTION_TRACE("ex_do_concatenate"); |
248 | 245 | ||
@@ -269,7 +266,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
269 | break; | 266 | break; |
270 | 267 | ||
271 | default: | 268 | default: |
272 | ACPI_REPORT_ERROR(("Concat - invalid obj type: %X\n", | 269 | ACPI_REPORT_ERROR(("Concatanate - invalid object type: %X\n", |
273 | ACPI_GET_OBJECT_TYPE(operand0))); | 270 | ACPI_GET_OBJECT_TYPE(operand0))); |
274 | status = AE_AML_INTERNAL; | 271 | status = AE_AML_INTERNAL; |
275 | } | 272 | } |
@@ -309,8 +306,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
309 | 306 | ||
310 | /* Copy the first integer, LSB first */ | 307 | /* Copy the first integer, LSB first */ |
311 | 308 | ||
312 | ACPI_MEMCPY(new_buf, | 309 | ACPI_MEMCPY(new_buf, &operand0->integer.value, |
313 | &operand0->integer.value, | ||
314 | acpi_gbl_integer_byte_width); | 310 | acpi_gbl_integer_byte_width); |
315 | 311 | ||
316 | /* Copy the second integer (LSB first) after the first */ | 312 | /* Copy the second integer (LSB first) after the first */ |
@@ -324,14 +320,11 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
324 | 320 | ||
325 | /* Result of two Strings is a String */ | 321 | /* Result of two Strings is a String */ |
326 | 322 | ||
327 | new_length = (acpi_size) operand0->string.length + | 323 | return_desc = acpi_ut_create_string_object((acpi_size) |
328 | (acpi_size) local_operand1->string.length; | 324 | (operand0->string. |
329 | if (new_length > ACPI_MAX_STRING_CONVERSION) { | 325 | length + |
330 | status = AE_AML_STRING_LIMIT; | 326 | local_operand1-> |
331 | goto cleanup; | 327 | string.length)); |
332 | } | ||
333 | |||
334 | return_desc = acpi_ut_create_string_object(new_length); | ||
335 | if (!return_desc) { | 328 | if (!return_desc) { |
336 | status = AE_NO_MEMORY; | 329 | status = AE_NO_MEMORY; |
337 | goto cleanup; | 330 | goto cleanup; |
@@ -351,11 +344,10 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
351 | /* Result of two Buffers is a Buffer */ | 344 | /* Result of two Buffers is a Buffer */ |
352 | 345 | ||
353 | return_desc = acpi_ut_create_buffer_object((acpi_size) | 346 | return_desc = acpi_ut_create_buffer_object((acpi_size) |
354 | operand0->buffer. | 347 | (operand0->buffer. |
355 | length + | 348 | length + |
356 | (acpi_size) | 349 | local_operand1-> |
357 | local_operand1-> | 350 | buffer.length)); |
358 | buffer.length); | ||
359 | if (!return_desc) { | 351 | if (!return_desc) { |
360 | status = AE_NO_MEMORY; | 352 | status = AE_NO_MEMORY; |
361 | goto cleanup; | 353 | goto cleanup; |
@@ -365,8 +357,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
365 | 357 | ||
366 | /* Concatenate the buffers */ | 358 | /* Concatenate the buffers */ |
367 | 359 | ||
368 | ACPI_MEMCPY(new_buf, | 360 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, |
369 | operand0->buffer.pointer, operand0->buffer.length); | 361 | operand0->buffer.length); |
370 | ACPI_MEMCPY(new_buf + operand0->buffer.length, | 362 | ACPI_MEMCPY(new_buf + operand0->buffer.length, |
371 | local_operand1->buffer.pointer, | 363 | local_operand1->buffer.pointer, |
372 | local_operand1->buffer.length); | 364 | local_operand1->buffer.length); |