diff options
author | Robert Moore <robert.moore@intel.com> | 2005-05-13 00:00:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-13 16:29:07 -0400 |
commit | 6f42ccf2fc50ecee8ea170040627f268430c1648 (patch) | |
tree | 5b6690d86adfc17e7960b2e113855079fe19c541 /drivers/acpi/utilities | |
parent | d8683a0cb5d09cb7f19feefa708424a84577e68f (diff) |
ACPICA from Bob Moore <robert.moore@intel.com>
Implemented support for PCI Express root bridges
-- added support for device PNP0A08 in the root
bridge search within AcpiEvPciConfigRegionSetup.
acpi_ev_pci_config_region_setup().
The interpreter now automatically truncates incoming
64-bit constants to 32 bits if currently executing out
of a 32-bit ACPI table (Revision < 2). This also affects
the iASL compiler constant folding. (Note: as per below,
the iASL compiler no longer allows 64-bit constants within
32-bit tables.)
Fixed a problem where string and buffer objects with
"static" pointers (pointers to initialization data within
an ACPI table) were not handled consistently. The internal
object copy operation now always copies the data to a newly
allocated buffer, regardless of whether the source object
is static or not.
Fixed a problem with the FromBCD operator where an
implicit result conversion was improperly performed while
storing the result to the target operand. Since this is an
"explicit conversion" operator, the implicit conversion
should never be performed on the output.
Fixed a problem with the CopyObject operator where a copy
to an existing named object did not always completely
overwrite the existing object stored at name. Specifically,
a buffer-to-buffer copy did not delete the existing buffer.
Replaced "interrupt_level" with "interrupt_number" in all
GPE interfaces and structs for consistency.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r-- | drivers/acpi/utilities/utcopy.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 11e88495716..31c30a32e5c 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -694,58 +694,50 @@ acpi_ut_copy_simple_object ( dest_desc->common.reference_count = reference_count; dest_desc->common.next_object = next_object; + /* New object is not static, regardless of source */ + + dest_desc->common.flags &= ~AOPOBJ_STATIC_POINTER; + /* Handle the objects with extra data */ switch (ACPI_GET_OBJECT_TYPE (dest_desc)) { case ACPI_TYPE_BUFFER: - - dest_desc->buffer.node = NULL; - dest_desc->common.flags = source_desc->common.flags; - /* * Allocate and copy the actual buffer if and only if: * 1) There is a valid buffer pointer - * 2) The buffer is not static (not in an ACPI table) (in this case, - * the actual pointer was already copied above) + * 2) The buffer has a length > 0 */ if ((source_desc->buffer.pointer) && - (!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) { - dest_desc->buffer.pointer = NULL; - - /* Create an actual buffer only if length > 0 */ - - if (source_desc->buffer.length) { - dest_desc->buffer.pointer = - ACPI_MEM_ALLOCATE (source_desc->buffer.length); - if (!dest_desc->buffer.pointer) { - return (AE_NO_MEMORY); - } + (source_desc->buffer.length)) { + dest_desc->buffer.pointer = + ACPI_MEM_ALLOCATE (source_desc->buffer.length); + if (!dest_desc->buffer.pointer) { + return (AE_NO_MEMORY); + } - /* Copy the actual buffer data */ + /* Copy the actual buffer data */ - ACPI_MEMCPY (dest_desc->buffer.pointer, - source_desc->buffer.pointer, - source_desc->buffer.length); - } + ACPI_MEMCPY (dest_desc->buffer.pointer, + source_desc->buffer.pointer, + source_desc->buffer.length); } break; case ACPI_TYPE_STRING: - /* * Allocate and copy the actual string if and only if: * 1) There is a valid string pointer - * 2) The string is not static (not in an ACPI table) (in this case, - * the actual pointer was already copied above) + * (Pointer to a NULL string is allowed) */ - if ((source_desc->string.pointer) && - (!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) { + if (source_desc->string.pointer) { dest_desc->string.pointer = ACPI_MEM_ALLOCATE ((acpi_size) source_desc->string.length + 1); if (!dest_desc->string.pointer) { return (AE_NO_MEMORY); } + /* Copy the actual string data */ + ACPI_MEMCPY (dest_desc->string.pointer, source_desc->string.pointer, (acpi_size) source_desc->string.length + 1); } |