Path: blob/main/sys/contrib/dev/acpica/components/executer/exstore.c
48521 views
/******************************************************************************1*2* Module Name: exstore - AML Interpreter object store support3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#include <contrib/dev/acpica/include/acpi.h>152#include <contrib/dev/acpica/include/accommon.h>153#include <contrib/dev/acpica/include/acdispat.h>154#include <contrib/dev/acpica/include/acinterp.h>155#include <contrib/dev/acpica/include/amlcode.h>156#include <contrib/dev/acpica/include/acnamesp.h>157158159#define _COMPONENT ACPI_EXECUTER160ACPI_MODULE_NAME ("exstore")161162/* Local prototypes */163164static ACPI_STATUS165AcpiExStoreObjectToIndex (166ACPI_OPERAND_OBJECT *ValDesc,167ACPI_OPERAND_OBJECT *DestDesc,168ACPI_WALK_STATE *WalkState);169170static ACPI_STATUS171AcpiExStoreDirectToNode (172ACPI_OPERAND_OBJECT *SourceDesc,173ACPI_NAMESPACE_NODE *Node,174ACPI_WALK_STATE *WalkState);175176177/*******************************************************************************178*179* FUNCTION: AcpiExStore180*181* PARAMETERS: *SourceDesc - Value to be stored182* *DestDesc - Where to store it. Must be an NS node183* or ACPI_OPERAND_OBJECT of type184* Reference;185* WalkState - Current walk state186*187* RETURN: Status188*189* DESCRIPTION: Store the value described by SourceDesc into the location190* described by DestDesc. Called by various interpreter191* functions to store the result of an operation into192* the destination operand -- not just simply the actual "Store"193* ASL operator.194*195******************************************************************************/196197ACPI_STATUS198AcpiExStore (199ACPI_OPERAND_OBJECT *SourceDesc,200ACPI_OPERAND_OBJECT *DestDesc,201ACPI_WALK_STATE *WalkState)202{203ACPI_STATUS Status = AE_OK;204ACPI_OPERAND_OBJECT *RefDesc = DestDesc;205206207ACPI_FUNCTION_TRACE_PTR (ExStore, DestDesc);208209210/* Validate parameters */211212if (!SourceDesc || !DestDesc)213{214ACPI_ERROR ((AE_INFO, "Null parameter"));215return_ACPI_STATUS (AE_AML_NO_OPERAND);216}217218/* DestDesc can be either a namespace node or an ACPI object */219220if (ACPI_GET_DESCRIPTOR_TYPE (DestDesc) == ACPI_DESC_TYPE_NAMED)221{222/*223* Dest is a namespace node,224* Storing an object into a Named node.225*/226Status = AcpiExStoreObjectToNode (SourceDesc,227(ACPI_NAMESPACE_NODE *) DestDesc, WalkState,228ACPI_IMPLICIT_CONVERSION);229230return_ACPI_STATUS (Status);231}232233/* Destination object must be a Reference or a Constant object */234235switch (DestDesc->Common.Type)236{237case ACPI_TYPE_LOCAL_REFERENCE:238239break;240241case ACPI_TYPE_INTEGER:242243/* Allow stores to Constants -- a Noop as per ACPI spec */244245if (DestDesc->Common.Flags & AOPOBJ_AML_CONSTANT)246{247return_ACPI_STATUS (AE_OK);248}249250ACPI_FALLTHROUGH;251252default:253254/* Destination is not a Reference object */255256ACPI_ERROR ((AE_INFO,257"Target is not a Reference or Constant object - [%s] %p",258AcpiUtGetObjectTypeName (DestDesc), DestDesc));259260return_ACPI_STATUS (AE_AML_OPERAND_TYPE);261}262263/*264* Examine the Reference class. These cases are handled:265*266* 1) Store to Name (Change the object associated with a name)267* 2) Store to an indexed area of a Buffer or Package268* 3) Store to a Method Local or Arg269* 4) Store to the debug object270*/271switch (RefDesc->Reference.Class)272{273case ACPI_REFCLASS_REFOF:274275/* Storing an object into a Name "container" */276277Status = AcpiExStoreObjectToNode (SourceDesc,278RefDesc->Reference.Object,279WalkState, ACPI_IMPLICIT_CONVERSION);280break;281282case ACPI_REFCLASS_INDEX:283284/* Storing to an Index (pointer into a packager or buffer) */285286Status = AcpiExStoreObjectToIndex (SourceDesc, RefDesc, WalkState);287break;288289case ACPI_REFCLASS_LOCAL:290case ACPI_REFCLASS_ARG:291292/* Store to a method local/arg */293294Status = AcpiDsStoreObjectToLocal (RefDesc->Reference.Class,295RefDesc->Reference.Value, SourceDesc, WalkState);296break;297298case ACPI_REFCLASS_DEBUG:299/*300* Storing to the Debug object causes the value stored to be301* displayed and otherwise has no effect -- see ACPI Specification302*/303ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,304"**** Write to Debug Object: Object %p [%s] ****:\n\n",305SourceDesc, AcpiUtGetObjectTypeName (SourceDesc)));306307ACPI_DEBUG_OBJECT (SourceDesc, 0, 0);308break;309310default:311312ACPI_ERROR ((AE_INFO, "Unknown Reference Class 0x%2.2X",313RefDesc->Reference.Class));314ACPI_DUMP_ENTRY (RefDesc, ACPI_LV_INFO);315316Status = AE_AML_INTERNAL;317break;318}319320return_ACPI_STATUS (Status);321}322323324/*******************************************************************************325*326* FUNCTION: AcpiExStoreObjectToIndex327*328* PARAMETERS: *SourceDesc - Value to be stored329* *DestDesc - Named object to receive the value330* WalkState - Current walk state331*332* RETURN: Status333*334* DESCRIPTION: Store the object to indexed Buffer or Package element335*336******************************************************************************/337338static ACPI_STATUS339AcpiExStoreObjectToIndex (340ACPI_OPERAND_OBJECT *SourceDesc,341ACPI_OPERAND_OBJECT *IndexDesc,342ACPI_WALK_STATE *WalkState)343{344ACPI_STATUS Status = AE_OK;345ACPI_OPERAND_OBJECT *ObjDesc;346ACPI_OPERAND_OBJECT *NewDesc;347UINT8 Value = 0;348UINT32 i;349350351ACPI_FUNCTION_TRACE (ExStoreObjectToIndex);352353354/*355* Destination must be a reference pointer, and356* must point to either a buffer or a package357*/358switch (IndexDesc->Reference.TargetType)359{360case ACPI_TYPE_PACKAGE:361/*362* Storing to a package element. Copy the object and replace363* any existing object with the new object. No implicit364* conversion is performed.365*366* The object at *(IndexDesc->Reference.Where) is the367* element within the package that is to be modified.368* The parent package object is at IndexDesc->Reference.Object369*/370ObjDesc = *(IndexDesc->Reference.Where);371372if (SourceDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE &&373SourceDesc->Reference.Class == ACPI_REFCLASS_TABLE)374{375/* This is a DDBHandle, just add a reference to it */376377AcpiUtAddReference (SourceDesc);378NewDesc = SourceDesc;379}380else381{382/* Normal object, copy it */383384Status = AcpiUtCopyIobjectToIobject (385SourceDesc, &NewDesc, WalkState);386if (ACPI_FAILURE (Status))387{388return_ACPI_STATUS (Status);389}390}391392if (ObjDesc)393{394/* Decrement reference count by the ref count of the parent package */395396for (i = 0;397i < ((ACPI_OPERAND_OBJECT *)398IndexDesc->Reference.Object)->Common.ReferenceCount;399i++)400{401AcpiUtRemoveReference (ObjDesc);402}403}404405*(IndexDesc->Reference.Where) = NewDesc;406407/* Increment ref count by the ref count of the parent package-1 */408409for (i = 1;410i < ((ACPI_OPERAND_OBJECT *)411IndexDesc->Reference.Object)->Common.ReferenceCount;412i++)413{414AcpiUtAddReference (NewDesc);415}416417break;418419case ACPI_TYPE_BUFFER_FIELD:420/*421* Store into a Buffer or String (not actually a real BufferField)422* at a location defined by an Index.423*424* The first 8-bit element of the source object is written to the425* 8-bit Buffer location defined by the Index destination object,426* according to the ACPI 2.0 specification.427*/428429/*430* Make sure the target is a Buffer or String. An error should431* not happen here, since the ReferenceObject was constructed432* by the INDEX_OP code.433*/434ObjDesc = IndexDesc->Reference.Object;435if ((ObjDesc->Common.Type != ACPI_TYPE_BUFFER) &&436(ObjDesc->Common.Type != ACPI_TYPE_STRING))437{438return_ACPI_STATUS (AE_AML_OPERAND_TYPE);439}440441/*442* The assignment of the individual elements will be slightly443* different for each source type.444*/445switch (SourceDesc->Common.Type)446{447case ACPI_TYPE_INTEGER:448449/* Use the least-significant byte of the integer */450451Value = (UINT8) (SourceDesc->Integer.Value);452break;453454case ACPI_TYPE_BUFFER:455case ACPI_TYPE_STRING:456457/* Note: Takes advantage of common string/buffer fields */458459Value = SourceDesc->Buffer.Pointer[0];460break;461462default:463464/* All other types are invalid */465466ACPI_ERROR ((AE_INFO,467"Source must be type [Integer/Buffer/String], found [%s]",468AcpiUtGetObjectTypeName (SourceDesc)));469return_ACPI_STATUS (AE_AML_OPERAND_TYPE);470}471472/* Store the source value into the target buffer byte */473474ObjDesc->Buffer.Pointer[IndexDesc->Reference.Value] = Value;475break;476477default:478ACPI_ERROR ((AE_INFO,479"Target is not of type [Package/BufferField]"));480Status = AE_AML_TARGET_TYPE;481break;482}483484return_ACPI_STATUS (Status);485}486487488/*******************************************************************************489*490* FUNCTION: AcpiExStoreObjectToNode491*492* PARAMETERS: SourceDesc - Value to be stored493* Node - Named object to receive the value494* WalkState - Current walk state495* ImplicitConversion - Perform implicit conversion (yes/no)496*497* RETURN: Status498*499* DESCRIPTION: Store the object to the named object.500*501* The assignment of an object to a named object is handled here.502* The value passed in will replace the current value (if any)503* with the input value.504*505* When storing into an object the data is converted to the506* target object type then stored in the object. This means507* that the target object type (for an initialized target) will508* not be changed by a store operation. A CopyObject can change509* the target type, however.510*511* The ImplicitConversion flag is set to NO/FALSE only when512* storing to an ArgX -- as per the rules of the ACPI spec.513*514* Assumes parameters are already validated.515*516******************************************************************************/517518ACPI_STATUS519AcpiExStoreObjectToNode (520ACPI_OPERAND_OBJECT *SourceDesc,521ACPI_NAMESPACE_NODE *Node,522ACPI_WALK_STATE *WalkState,523UINT8 ImplicitConversion)524{525ACPI_STATUS Status = AE_OK;526ACPI_OPERAND_OBJECT *TargetDesc;527ACPI_OPERAND_OBJECT *NewDesc;528ACPI_OBJECT_TYPE TargetType;529530531ACPI_FUNCTION_TRACE_PTR (ExStoreObjectToNode, SourceDesc);532533534/* Get current type of the node, and object attached to Node */535536TargetType = AcpiNsGetType (Node);537TargetDesc = AcpiNsGetAttachedObject (Node);538539ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Storing %p [%s] to node %p [%s]\n",540SourceDesc, AcpiUtGetObjectTypeName (SourceDesc),541Node, AcpiUtGetTypeName (TargetType)));542543/* Only limited target types possible for everything except CopyObject */544545if (WalkState->Opcode != AML_COPY_OBJECT_OP)546{547/*548* Only CopyObject allows all object types to be overwritten. For549* TargetRef(s), there are restrictions on the object types that550* are allowed.551*552* Allowable operations/typing for Store:553*554* 1) Simple Store555* Integer --> Integer (Named/Local/Arg)556* String --> String (Named/Local/Arg)557* Buffer --> Buffer (Named/Local/Arg)558* Package --> Package (Named/Local/Arg)559*560* 2) Store with implicit conversion561* Integer --> String or Buffer (Named)562* String --> Integer or Buffer (Named)563* Buffer --> Integer or String (Named)564*/565switch (TargetType)566{567case ACPI_TYPE_PACKAGE:568/*569* Here, can only store a package to an existing package.570* Storing a package to a Local/Arg is OK, and handled571* elsewhere.572*/573if (WalkState->Opcode == AML_STORE_OP)574{575if (SourceDesc->Common.Type != ACPI_TYPE_PACKAGE)576{577ACPI_ERROR ((AE_INFO,578"Cannot assign type [%s] to [Package] "579"(source must be type Pkg)",580AcpiUtGetObjectTypeName (SourceDesc)));581582return_ACPI_STATUS (AE_AML_TARGET_TYPE);583}584break;585}586587ACPI_FALLTHROUGH;588589case ACPI_TYPE_DEVICE:590case ACPI_TYPE_EVENT:591case ACPI_TYPE_MUTEX:592case ACPI_TYPE_REGION:593case ACPI_TYPE_POWER:594case ACPI_TYPE_PROCESSOR:595case ACPI_TYPE_THERMAL:596597ACPI_ERROR ((AE_INFO,598"Target must be [Buffer/Integer/String/Reference]"599", found [%s] (%4.4s)",600AcpiUtGetTypeName (Node->Type), Node->Name.Ascii));601602return_ACPI_STATUS (AE_AML_TARGET_TYPE);603604default:605break;606}607}608609/*610* Resolve the source object to an actual value611* (If it is a reference object)612*/613Status = AcpiExResolveObject (&SourceDesc, TargetType, WalkState);614if (ACPI_FAILURE (Status))615{616return_ACPI_STATUS (Status);617}618619/* Do the actual store operation */620621switch (TargetType)622{623/*624* The simple data types all support implicit source operand625* conversion before the store.626*/627case ACPI_TYPE_INTEGER:628case ACPI_TYPE_STRING:629case ACPI_TYPE_BUFFER:630631if ((WalkState->Opcode == AML_COPY_OBJECT_OP) ||632!ImplicitConversion)633{634/*635* However, CopyObject and Stores to ArgX do not perform636* an implicit conversion, as per the ACPI specification.637* A direct store is performed instead.638*/639Status = AcpiExStoreDirectToNode (SourceDesc, Node, WalkState);640break;641}642643/* Store with implicit source operand conversion support */644645Status = AcpiExStoreObjectToObject (SourceDesc, TargetDesc,646&NewDesc, WalkState);647if (ACPI_FAILURE (Status))648{649return_ACPI_STATUS (Status);650}651652if (NewDesc != TargetDesc)653{654/*655* Store the new NewDesc as the new value of the Name, and set656* the Name's type to that of the value being stored in it.657* SourceDesc reference count is incremented by AttachObject.658*659* Note: This may change the type of the node if an explicit660* store has been performed such that the node/object type661* has been changed.662*/663Status = AcpiNsAttachObject (664Node, NewDesc, NewDesc->Common.Type);665666ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,667"Store type [%s] into [%s] via Convert/Attach\n",668AcpiUtGetObjectTypeName (SourceDesc),669AcpiUtGetObjectTypeName (NewDesc)));670}671break;672673case ACPI_TYPE_BUFFER_FIELD:674case ACPI_TYPE_LOCAL_REGION_FIELD:675case ACPI_TYPE_LOCAL_BANK_FIELD:676case ACPI_TYPE_LOCAL_INDEX_FIELD:677/*678* For all fields, always write the source data to the target679* field. Any required implicit source operand conversion is680* performed in the function below as necessary. Note, field681* objects must retain their original type permanently.682*/683Status = AcpiExWriteDataToField (SourceDesc, TargetDesc,684&WalkState->ResultObj);685break;686687default:688/*689* CopyObject operator: No conversions for all other types.690* Instead, directly store a copy of the source object.691*692* This is the ACPI spec-defined behavior for the CopyObject693* operator. (Note, for this default case, all normal694* Store/Target operations exited above with an error).695*/696Status = AcpiExStoreDirectToNode (SourceDesc, Node, WalkState);697break;698}699700return_ACPI_STATUS (Status);701}702703704/*******************************************************************************705*706* FUNCTION: AcpiExStoreDirectToNode707*708* PARAMETERS: SourceDesc - Value to be stored709* Node - Named object to receive the value710* WalkState - Current walk state711*712* RETURN: Status713*714* DESCRIPTION: "Store" an object directly to a node. This involves a copy715* and an attach.716*717******************************************************************************/718719static ACPI_STATUS720AcpiExStoreDirectToNode (721ACPI_OPERAND_OBJECT *SourceDesc,722ACPI_NAMESPACE_NODE *Node,723ACPI_WALK_STATE *WalkState)724{725ACPI_STATUS Status;726ACPI_OPERAND_OBJECT *NewDesc;727728729ACPI_FUNCTION_TRACE (ExStoreDirectToNode);730731732ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,733"Storing [%s] (%p) directly into node [%s] (%p)"734" with no implicit conversion\n",735AcpiUtGetObjectTypeName (SourceDesc), SourceDesc,736AcpiUtGetTypeName (Node->Type), Node));737738/* Copy the source object to a new object */739740Status = AcpiUtCopyIobjectToIobject (SourceDesc, &NewDesc, WalkState);741if (ACPI_FAILURE (Status))742{743return_ACPI_STATUS (Status);744}745746/* Attach the new object to the node */747748Status = AcpiNsAttachObject (Node, NewDesc, NewDesc->Common.Type);749AcpiUtRemoveReference (NewDesc);750return_ACPI_STATUS (Status);751}752753754