/* * These cases may never happen here, but just in case.. */ 
/* These cases may never happen here, but just in case.. */  
acpi_ex_resolve_object_to_value (	union acpi_operand_object       **stack_ptr,	struct acpi_walk_state          *walk_state){	acpi_status                     status = AE_OK;	union acpi_operand_object       *stack_desc;	void                            *temp_node;	union acpi_operand_object       *obj_desc;	u16                             opcode;	ACPI_FUNCTION_TRACE ("ex_resolve_object_to_value");	stack_desc = *stack_ptr;	/* This is an union acpi_operand_object    */	switch (ACPI_GET_OBJECT_TYPE (stack_desc)) {	case ACPI_TYPE_LOCAL_REFERENCE:		opcode = stack_desc->reference.opcode;		switch (opcode) {		case AML_NAME_OP:			/*			 * Convert indirect name ptr to a direct name ptr.			 * Then, acpi_ex_resolve_node_to_value can be used to get the value			 */			temp_node = stack_desc->reference.object;			/* Delete the Reference Object */			acpi_ut_remove_reference (stack_desc);			/* Put direct name pointer onto stack and exit */			(*stack_ptr) = temp_node;			break;		case AML_LOCAL_OP:		case AML_ARG_OP:			/*			 * Get the local from the method's state info			 * Note: this increments the local's object reference count			 */			status = acpi_ds_method_data_get_value (opcode,					  stack_desc->reference.offset, walk_state, &obj_desc);			if (ACPI_FAILURE (status)) {				return_ACPI_STATUS (status);			}			ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Arg/Local %X] value_obj is %p\n",				stack_desc->reference.offset, obj_desc));			/*			 * Now we can delete the original Reference Object and			 * replace it with the resolved value			 */			acpi_ut_remove_reference (stack_desc);			*stack_ptr = obj_desc;			break;		case AML_INDEX_OP:			switch (stack_desc->reference.target_type) {			case ACPI_TYPE_BUFFER_FIELD:				/* Just return - leave the Reference on the stack */				break;			case ACPI_TYPE_PACKAGE:				obj_desc = *stack_desc->reference.where;				if (obj_desc) {					/*					 * Valid obj descriptor, copy pointer to return value					 * (i.e., dereference the package index)					 * Delete the ref object, increment the returned object					 */					acpi_ut_remove_reference (stack_desc);					acpi_ut_add_reference (obj_desc);					*stack_ptr = obj_desc;				}				else {					/*					 * A NULL object descriptor means an unitialized element of					 * the package, can't dereference it					 */					ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,						"Attempt to deref an Index to NULL pkg element Idx=%p\n",						stack_desc));					status = AE_AML_UNINITIALIZED_ELEMENT;				}				break;			default:				/* Invalid reference object */				ACPI_REPORT_ERROR ((					"During resolve, Unknown target_type %X in Index/Reference obj %p\n",					stack_desc->reference.target_type, stack_desc));				status = AE_AML_INTERNAL;				break;			}			break;		case AML_REF_OF_OP:		case AML_DEBUG_OP:		case AML_LOAD_OP:			/* Just leave the object as-is */			break;		default:			ACPI_REPORT_ERROR (("During resolve, Unknown Reference opcode %X (%s) in %p\n",				opcode, acpi_ps_get_opcode_name (opcode), stack_desc));			status = AE_AML_INTERNAL;			break;		}		break;	case ACPI_TYPE_BUFFER:		status = acpi_ds_get_buffer_arguments (stack_desc);		break;	case ACPI_TYPE_PACKAGE:		status = acpi_ds_get_package_arguments (stack_desc);		break;	/*	 * These cases may never happen here, but just in case..	 */	case ACPI_TYPE_BUFFER_FIELD:	case ACPI_TYPE_LOCAL_REGION_FIELD:	case ACPI_TYPE_LOCAL_BANK_FIELD:	case ACPI_TYPE_LOCAL_INDEX_FIELD:		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "field_read source_desc=%p Type=%X\n",			stack_desc, ACPI_GET_OBJECT_TYPE (stack_desc)));		status = acpi_ex_read_data_from_field (walk_state, stack_desc, &obj_desc);		*stack_ptr = (void *) obj_desc;		break;	default:		break;	}	return_ACPI_STATUS (status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/44f6c01242da4e162f28d8e1216a8c7a91174605/exresolv.c/buggy/drivers/acpi/executer/exresolv.c