diff options
author | Bob Moore <robert.moore@intel.com> | 2006-02-17 00:00:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-04-01 01:23:23 -0500 |
commit | ea936b78f46cbe089a4ac363e1682dee7d427096 (patch) | |
tree | c444b65c3d02b05934497caefcdcbbe675a00bdf /drivers/acpi/resources/rsutils.c | |
parent | 52fc0b026e99b5d5d585095148d997d5634bbc25 (diff) |
ACPI: ACPICA 20060217
Implemented a change to the IndexField support to match
the behavior of the Microsoft AML interpreter. The value
written to the Index register is now a byte offset,
no longer an index based upon the width of the Data
register. This should fix IndexField problems seen on
some machines where the Data register is not exactly one
byte wide. The ACPI specification will be clarified on
this point.
Fixed a problem where several resource descriptor
types could overrun the internal descriptor buffer due
to size miscalculation: VendorShort, VendorLong, and
Interrupt. This was noticed on IA64 machines, but could
affect all platforms.
Fixed a problem where individual resource descriptors were
misaligned within the internal buffer, causing alignment
faults on IA64 platforms.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/resources/rsutils.c')
-rw-r--r-- | drivers/acpi/resources/rsutils.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c index c5f7014929b4..9bcf0b637d22 100644 --- a/drivers/acpi/resources/rsutils.c +++ b/drivers/acpi/resources/rsutils.c | |||
@@ -299,7 +299,8 @@ static u16 acpi_rs_strcpy(char *destination, char *source) | |||
299 | * string_ptr - (optional) where to store the actual | 299 | * string_ptr - (optional) where to store the actual |
300 | * resource_source string | 300 | * resource_source string |
301 | * | 301 | * |
302 | * RETURN: Length of the string plus NULL terminator, rounded up to 32 bit | 302 | * RETURN: Length of the string plus NULL terminator, rounded up to native |
303 | * word boundary | ||
303 | * | 304 | * |
304 | * DESCRIPTION: Copy the optional resource_source data from a raw AML descriptor | 305 | * DESCRIPTION: Copy the optional resource_source data from a raw AML descriptor |
305 | * to an internal resource descriptor | 306 | * to an internal resource descriptor |
@@ -346,18 +347,16 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, | |||
346 | } | 347 | } |
347 | 348 | ||
348 | /* | 349 | /* |
349 | * In order for the struct_size to fall on a 32-bit boundary, calculate | 350 | * In order for the Resource length to be a multiple of the native |
350 | * the length of the string (+1 for the NULL terminator) and expand the | 351 | * word, calculate the length of the string (+1 for NULL terminator) |
351 | * struct_size to the next 32-bit boundary. | 352 | * and expand to the next word multiple. |
352 | * | 353 | * |
353 | * Zero the entire area of the buffer. | 354 | * Zero the entire area of the buffer. |
354 | */ | 355 | */ |
355 | total_length = | 356 | total_length = |
356 | (u32) | 357 | ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + |
357 | ACPI_ROUND_UP_to_32_bITS(ACPI_STRLEN | 358 | 1; |
358 | (ACPI_CAST_PTR | 359 | total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); |
359 | (char, | ||
360 | &aml_resource_source[1])) + 1); | ||
361 | 360 | ||
362 | ACPI_MEMSET(resource_source->string_ptr, 0, total_length); | 361 | ACPI_MEMSET(resource_source->string_ptr, 0, total_length); |
363 | 362 | ||