utobject.c (cb5629b10d64a8006622ce3a52bc887d91057d69) utobject.c (3371c19c294a4cb3649aa4e84606be8a1d999e61)
1/******************************************************************************
2 *
3 * Module Name: utobject - ACPI object create/delete/size/cache routines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.

--- 443 unchanged lines hidden (view full) ---

452 }
453
454 /*
455 * The final length depends on the object type
456 * Strings and Buffers are packed right up against the parent object and
457 * must be accessed bytewise or there may be alignment problems on
458 * certain processors
459 */
1/******************************************************************************
2 *
3 * Module Name: utobject - ACPI object create/delete/size/cache routines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2008, Intel Corp.

--- 443 unchanged lines hidden (view full) ---

452 }
453
454 /*
455 * The final length depends on the object type
456 * Strings and Buffers are packed right up against the parent object and
457 * must be accessed bytewise or there may be alignment problems on
458 * certain processors
459 */
460 switch (ACPI_GET_OBJECT_TYPE(internal_object)) {
460 switch (internal_object->common.type) {
461 case ACPI_TYPE_STRING:
462
463 length += (acpi_size) internal_object->string.length + 1;
464 break;
465
466 case ACPI_TYPE_BUFFER:
467
468 length += (acpi_size) internal_object->buffer.length;

--- 44 unchanged lines hidden (view full) ---

513 }
514 break;
515
516 default:
517
518 ACPI_ERROR((AE_INFO, "Cannot convert to external object - "
519 "unsupported type [%s] %X in object %p",
520 acpi_ut_get_object_type_name(internal_object),
461 case ACPI_TYPE_STRING:
462
463 length += (acpi_size) internal_object->string.length + 1;
464 break;
465
466 case ACPI_TYPE_BUFFER:
467
468 length += (acpi_size) internal_object->buffer.length;

--- 44 unchanged lines hidden (view full) ---

513 }
514 break;
515
516 default:
517
518 ACPI_ERROR((AE_INFO, "Cannot convert to external object - "
519 "unsupported type [%s] %X in object %p",
520 acpi_ut_get_object_type_name(internal_object),
521 ACPI_GET_OBJECT_TYPE(internal_object),
522 internal_object));
521 internal_object->common.type, internal_object));
523 status = AE_TYPE;
524 break;
525 }
526
527 /*
528 * Account for the space required by the object rounded up to the next
529 * multiple of the machine word size. This keeps each object aligned
530 * on a machine word boundary. (preventing alignment faults on some

--- 128 unchanged lines hidden (view full) ---

659 acpi_size * obj_length)
660{
661 acpi_status status;
662
663 ACPI_FUNCTION_ENTRY();
664
665 if ((ACPI_GET_DESCRIPTOR_TYPE(internal_object) ==
666 ACPI_DESC_TYPE_OPERAND)
522 status = AE_TYPE;
523 break;
524 }
525
526 /*
527 * Account for the space required by the object rounded up to the next
528 * multiple of the machine word size. This keeps each object aligned
529 * on a machine word boundary. (preventing alignment faults on some

--- 128 unchanged lines hidden (view full) ---

658 acpi_size * obj_length)
659{
660 acpi_status status;
661
662 ACPI_FUNCTION_ENTRY();
663
664 if ((ACPI_GET_DESCRIPTOR_TYPE(internal_object) ==
665 ACPI_DESC_TYPE_OPERAND)
667 && (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE)) {
666 && (internal_object->common.type == ACPI_TYPE_PACKAGE)) {
668 status =
669 acpi_ut_get_package_object_size(internal_object,
670 obj_length);
671 } else {
672 status =
673 acpi_ut_get_simple_object_size(internal_object, obj_length);
674 }
675
676 return (status);
677}
667 status =
668 acpi_ut_get_package_object_size(internal_object,
669 obj_length);
670 } else {
671 status =
672 acpi_ut_get_simple_object_size(internal_object, obj_length);
673 }
674
675 return (status);
676}