Lines Matching full:object
4 * Module Name: utobject - ACPI object create/delete/size/cache routines
39 * type - ACPI Type of the new object
41 * RETURN: A new internal object, null on failure
43 * DESCRIPTION: Create and initialize a new internal object.
45 * NOTE: We always allocate the worst-case object descriptor because
48 * the most memory efficient, but the efficiency of the object
60 union acpi_operand_object *object; in acpi_ut_create_internal_object_dbg() local
66 /* Allocate the raw object descriptor */ in acpi_ut_create_internal_object_dbg()
68 object = in acpi_ut_create_internal_object_dbg()
71 if (!object) { in acpi_ut_create_internal_object_dbg()
74 kmemleak_not_leak(object); in acpi_ut_create_internal_object_dbg()
81 /* These types require a secondary object */ in acpi_ut_create_internal_object_dbg()
87 acpi_ut_delete_object_desc(object); in acpi_ut_create_internal_object_dbg()
94 /* Link the second object to the first */ in acpi_ut_create_internal_object_dbg()
96 object->common.next_object = second_object; in acpi_ut_create_internal_object_dbg()
101 /* All others have no secondary object */ in acpi_ut_create_internal_object_dbg()
105 /* Save the object type in the object descriptor */ in acpi_ut_create_internal_object_dbg()
107 object->common.type = (u8) type; in acpi_ut_create_internal_object_dbg()
111 object->common.reference_count = 1; in acpi_ut_create_internal_object_dbg()
115 return_PTR(object); in acpi_ut_create_internal_object_dbg()
124 * RETURN: Pointer to a new Package object, null on failure
126 * DESCRIPTION: Create a fully initialized package object
137 /* Create a new Package object */ in acpi_ut_create_package_object()
166 * RETURN: Pointer to a new Integer object, null on failure
168 * DESCRIPTION: Create an initialized integer object
178 /* Create and initialize a new integer object */ in acpi_ut_create_integer_object()
195 * RETURN: Pointer to a new Buffer object, null on failure
197 * DESCRIPTION: Create a fully initialized buffer object
208 /* Create a new Buffer object */ in acpi_ut_create_buffer_object()
231 /* Complete buffer object initialization */ in acpi_ut_create_buffer_object()
250 * RETURN: Pointer to a new String object
252 * DESCRIPTION: Create a fully initialized string object
263 /* Create a new String object */ in acpi_ut_create_string_object()
283 /* Complete string object initialization */ in acpi_ut_create_string_object()
297 * PARAMETERS: object - Object to be validated
299 * RETURN: TRUE if object is valid, FALSE otherwise
305 u8 acpi_ut_valid_internal_object(void *object) in acpi_ut_valid_internal_object() argument
312 if (!object) { in acpi_ut_valid_internal_object()
313 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "**** Null Object Ptr\n")); in acpi_ut_valid_internal_object()
319 switch (ACPI_GET_DESCRIPTOR_TYPE(object)) { in acpi_ut_valid_internal_object()
322 /* The object appears to be a valid union acpi_operand_object */ in acpi_ut_valid_internal_object()
330 object, acpi_ut_get_descriptor_name(object))); in acpi_ut_valid_internal_object()
345 * RETURN: Pointer to newly allocated object descriptor. Null on error
347 * DESCRIPTION: Allocate a new object descriptor. Gracefully handle
355 union acpi_operand_object *object; in acpi_ut_allocate_object_desc_dbg() local
359 object = acpi_os_acquire_object(acpi_gbl_operand_cache); in acpi_ut_allocate_object_desc_dbg()
360 if (!object) { in acpi_ut_allocate_object_desc_dbg()
362 "Could not allocate an object descriptor")); in acpi_ut_allocate_object_desc_dbg()
369 ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); in acpi_ut_allocate_object_desc_dbg()
372 object, (u32) sizeof(union acpi_operand_object))); in acpi_ut_allocate_object_desc_dbg()
374 return_PTR(object); in acpi_ut_allocate_object_desc_dbg()
381 * PARAMETERS: object - An Acpi internal object to be deleted
385 * DESCRIPTION: Free an ACPI object descriptor or add it to the object cache
389 void acpi_ut_delete_object_desc(union acpi_operand_object *object) in acpi_ut_delete_object_desc() argument
391 ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object); in acpi_ut_delete_object_desc()
393 /* Object must be of type union acpi_operand_object */ in acpi_ut_delete_object_desc()
395 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { in acpi_ut_delete_object_desc()
397 "%p is not an ACPI Operand object [%s]", object, in acpi_ut_delete_object_desc()
398 acpi_ut_get_descriptor_name(object))); in acpi_ut_delete_object_desc()
402 (void)acpi_os_release_object(acpi_gbl_operand_cache, object); in acpi_ut_delete_object_desc()
410 * PARAMETERS: internal_object - An ACPI operand object
416 * contain a simple object for return to an external user.
418 * The length includes the object structure plus any additional
433 /* Start with the length of the (external) Acpi object */ in acpi_ut_get_simple_object_size()
437 /* A NULL object is allowed, can be a legal uninitialized package element */ in acpi_ut_get_simple_object_size()
441 * Object is NULL, just return the length of union acpi_object in acpi_ut_get_simple_object_size()
442 * (A NULL union acpi_object is an object of all zeroes.) in acpi_ut_get_simple_object_size()
456 "where an operand object is required", in acpi_ut_get_simple_object_size()
463 * The final length depends on the object type in acpi_ut_get_simple_object_size()
464 * Strings and Buffers are packed right up against the parent object and in acpi_ut_get_simple_object_size()
492 * Get the actual length of the full pathname to this object. in acpi_ut_get_simple_object_size()
493 * The reference will be converted to the pathname to the object in acpi_ut_get_simple_object_size()
512 "Cannot convert to external object - " in acpi_ut_get_simple_object_size()
513 "unsupported Reference Class [%s] 0x%X in object %p", in acpi_ut_get_simple_object_size()
524 ACPI_ERROR((AE_INFO, "Cannot convert to external object - " in acpi_ut_get_simple_object_size()
525 "unsupported type [%s] 0x%X in object %p", in acpi_ut_get_simple_object_size()
533 * Account for the space required by the object rounded up to the next in acpi_ut_get_simple_object_size()
534 * multiple of the machine word size. This keeps each object aligned in acpi_ut_get_simple_object_size()
566 * Simple object - just get the size (Null object/entry is handled in acpi_ut_get_element_length()
581 /* Package object - nothing much to do here, let the walk handle it */ in acpi_ut_get_element_length()
601 * PARAMETERS: internal_object - An ACPI internal object
607 * contain a package object for return to an external user.
653 * PARAMETERS: internal_object - An ACPI internal object
659 * contain an object for return to an API user.