Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Module Name: exstoren - AML Interpreter object store support,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *                        Store to Node (namespace object)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * Copyright (C) 2000 - 2020, Intel Corp.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  *****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <acpi/acpi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include "accommon.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include "acinterp.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include "amlcode.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #define _COMPONENT          ACPI_EXECUTER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) ACPI_MODULE_NAME("exstoren")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * FUNCTION:    acpi_ex_resolve_object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)  * PARAMETERS:  source_desc_ptr     - Pointer to the source object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)  *              target_type         - Current type of the target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25)  *              walk_state          - Current walk state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)  * RETURN:      Status, resolved object in source_desc_ptr.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)  * DESCRIPTION: Resolve an object. If the object is a reference, dereference
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)  *              it and return the actual object in the source_desc_ptr.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 		       acpi_object_type target_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		       struct acpi_walk_state *walk_state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	union acpi_operand_object *source_desc = *source_desc_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	acpi_status status = AE_OK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	ACPI_FUNCTION_TRACE(ex_resolve_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	/* Ensure we have a Target that can be stored to */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	switch (target_type) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	case ACPI_TYPE_BUFFER_FIELD:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	case ACPI_TYPE_LOCAL_REGION_FIELD:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	case ACPI_TYPE_LOCAL_BANK_FIELD:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	case ACPI_TYPE_LOCAL_INDEX_FIELD:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		 * These cases all require only Integers or values that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		 * can be converted to Integers (Strings or Buffers)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	case ACPI_TYPE_INTEGER:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	case ACPI_TYPE_STRING:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	case ACPI_TYPE_BUFFER:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		 * Stores into a Field/Region or into a Integer/Buffer/String
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		 * are all essentially the same. This case handles the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		 * "interchangeable" types Integer, String, and Buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		if (source_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 			/* Resolve a reference object first */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 			status =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 			    acpi_ex_resolve_to_value(source_desc_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 						     walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 			if (ACPI_FAILURE(status)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 				break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		/* For copy_object, no further validation necessary */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		if (walk_state->opcode == AML_COPY_OBJECT_OP) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		/* Must have a Integer, Buffer, or String */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		if ((source_desc->common.type != ACPI_TYPE_INTEGER) &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 		    (source_desc->common.type != ACPI_TYPE_BUFFER) &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		    (source_desc->common.type != ACPI_TYPE_STRING) &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		    !((source_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		      (source_desc->reference.class == ACPI_REFCLASS_TABLE))) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 			/* Conversion successful but still not a valid type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 			ACPI_ERROR((AE_INFO,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 				    "Cannot assign type [%s] to [%s] (must be type Int/Str/Buf)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 				    acpi_ut_get_object_type_name(source_desc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 				    acpi_ut_get_type_name(target_type)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 			status = AE_AML_OPERAND_TYPE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	case ACPI_TYPE_LOCAL_ALIAS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	case ACPI_TYPE_LOCAL_METHOD_ALIAS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		 * All aliases should have been resolved earlier, during the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		 * operand resolution phase.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		ACPI_ERROR((AE_INFO, "Store into an unresolved Alias object"));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		status = AE_AML_INTERNAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	case ACPI_TYPE_PACKAGE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		 * All other types than Alias and the various Fields come here,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		 * including the untyped case - ACPI_TYPE_ANY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	return_ACPI_STATUS(status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)  * FUNCTION:    acpi_ex_store_object_to_object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)  * PARAMETERS:  source_desc         - Object to store
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)  *              dest_desc           - Object to receive a copy of the source
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)  *              new_desc            - New object if dest_desc is obsoleted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)  *              walk_state          - Current walk state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)  * RETURN:      Status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)  * DESCRIPTION: "Store" an object to another object. This may include
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)  *              converting the source type to the target type (implicit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)  *              conversion), and a copy of the value of the source to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)  *              the target.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)  *              The Assignment of an object to another (not named) object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)  *              is handled here.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)  *              The Source passed in will replace the current value (if any)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)  *              with the input value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)  *              When storing into an object the data is converted to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)  *              target object type then stored in the object. This means
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)  *              that the target object type (for an initialized target) will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)  *              not be changed by a store operation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)  *              This module allows destination types of Number, String,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)  *              Buffer, and Package.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)  *              Assumes parameters are already validated. NOTE: source_desc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)  *              resolution (from a reference object) must be performed by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)  *              the caller if necessary.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) acpi_ex_store_object_to_object(union acpi_operand_object *source_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 			       union acpi_operand_object *dest_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 			       union acpi_operand_object **new_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 			       struct acpi_walk_state *walk_state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	union acpi_operand_object *actual_src_desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	acpi_status status = AE_OK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	ACPI_FUNCTION_TRACE_PTR(ex_store_object_to_object, source_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	actual_src_desc = source_desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	if (!dest_desc) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		 * There is no destination object (An uninitialized node or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		 * package element), so we can simply copy the source object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		 * creating a new destination object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		status =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		    acpi_ut_copy_iobject_to_iobject(actual_src_desc, new_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 						    walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 		return_ACPI_STATUS(status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	if (source_desc->common.type != dest_desc->common.type) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		 * The source type does not match the type of the destination.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		 * Perform the "implicit conversion" of the source to the current type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		 * of the target as per the ACPI specification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		 * If no conversion performed, actual_src_desc = source_desc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		 * Otherwise, actual_src_desc is a temporary object to hold the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		 * converted object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		status = acpi_ex_convert_to_target_type(dest_desc->common.type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 							source_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 							&actual_src_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 							walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		if (ACPI_FAILURE(status)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 			return_ACPI_STATUS(status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		if (source_desc == actual_src_desc) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 			/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 			 * No conversion was performed. Return the source_desc as the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 			 * new object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 			 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 			*new_desc = source_desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 			return_ACPI_STATUS(AE_OK);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	 * We now have two objects of identical types, and we can perform a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	 * copy of the *value* of the source object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	switch (dest_desc->common.type) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	case ACPI_TYPE_INTEGER:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		dest_desc->integer.value = actual_src_desc->integer.value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		/* Truncate value if we are executing from a 32-bit ACPI table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 		(void)acpi_ex_truncate_for32bit_table(dest_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	case ACPI_TYPE_STRING:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 		status =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 		    acpi_ex_store_string_to_string(actual_src_desc, dest_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	case ACPI_TYPE_BUFFER:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		status =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 		    acpi_ex_store_buffer_to_buffer(actual_src_desc, dest_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	case ACPI_TYPE_PACKAGE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 		status =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 		    acpi_ut_copy_iobject_to_iobject(actual_src_desc, &dest_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 						    walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 		 * All other types come here.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 		ACPI_WARNING((AE_INFO, "Store into type [%s] not implemented",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 			      acpi_ut_get_object_type_name(dest_desc)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 		status = AE_NOT_IMPLEMENTED;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	if (actual_src_desc != source_desc) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 		/* Delete the intermediate (temporary) source object */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 		acpi_ut_remove_reference(actual_src_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	*new_desc = dest_desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	return_ACPI_STATUS(status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) }