]> err.no Git - linux-2.6/blob - drivers/acpi/executer/exstore.c
d860f9c6172cc6a0b735911d16be2df5c679e977
[linux-2.6] / drivers / acpi / executer / exstore.c
1
2 /******************************************************************************
3  *
4  * Module Name: exstore - AML Interpreter object store support
5  *
6  *****************************************************************************/
7
8 /*
9  * Copyright (C) 2000 - 2007, R. Byron Moore
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions, and the following disclaimer,
17  *    without modification.
18  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19  *    substantially similar to the "NO WARRANTY" disclaimer below
20  *    ("Disclaimer") and any redistribution must be conditioned upon
21  *    including a substantially similar Disclaimer requirement for further
22  *    binary redistribution.
23  * 3. Neither the names of the above-listed copyright holders nor the names
24  *    of any contributors may be used to endorse or promote products derived
25  *    from this software without specific prior written permission.
26  *
27  * Alternatively, this software may be distributed under the terms of the
28  * GNU General Public License ("GPL") version 2 as published by the Free
29  * Software Foundation.
30  *
31  * NO WARRANTY
32  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42  * POSSIBILITY OF SUCH DAMAGES.
43  */
44
45 #include <acpi/acpi.h>
46 #include <acpi/acdispat.h>
47 #include <acpi/acinterp.h>
48 #include <acpi/amlcode.h>
49 #include <acpi/acnamesp.h>
50 #include <acpi/acparser.h>
51
52 #define _COMPONENT          ACPI_EXECUTER
53 ACPI_MODULE_NAME("exstore")
54
55 /* Local prototypes */
56 static void
57 acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
58                         u32 level, u32 index);
59
60 static acpi_status
61 acpi_ex_store_object_to_index(union acpi_operand_object *val_desc,
62                               union acpi_operand_object *dest_desc,
63                               struct acpi_walk_state *walk_state);
64
65 /*******************************************************************************
66  *
67  * FUNCTION:    acpi_ex_do_debug_object
68  *
69  * PARAMETERS:  source_desc         - Value to be stored
70  *              Level               - Indentation level (used for packages)
71  *              Index               - Current package element, zero if not pkg
72  *
73  * RETURN:      None
74  *
75  * DESCRIPTION: Handles stores to the Debug Object.
76  *
77  ******************************************************************************/
78
79 static void
80 acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
81                         u32 level, u32 index)
82 {
83         u32 i;
84
85         ACPI_FUNCTION_TRACE_PTR(ex_do_debug_object, source_desc);
86
87         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s",
88                               level, " "));
89
90         /* Display index for package output only */
91
92         if (index > 0) {
93                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
94                                       "(%.2u) ", index - 1));
95         }
96
97         if (!source_desc) {
98                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "<Null Object>\n"));
99                 return_VOID;
100         }
101
102         if (ACPI_GET_DESCRIPTOR_TYPE(source_desc) == ACPI_DESC_TYPE_OPERAND) {
103                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "%s: ",
104                                       acpi_ut_get_object_type_name
105                                       (source_desc)));
106
107                 if (!acpi_ut_valid_internal_object(source_desc)) {
108                         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
109                                               "%p, Invalid Internal Object!\n",
110                                               source_desc));
111                         return_VOID;
112                 }
113         } else if (ACPI_GET_DESCRIPTOR_TYPE(source_desc) ==
114                    ACPI_DESC_TYPE_NAMED) {
115                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "%s: %p\n",
116                                       acpi_ut_get_type_name(((struct
117                                                               acpi_namespace_node
118                                                               *)source_desc)->
119                                                             type),
120                                       source_desc));
121                 return_VOID;
122         } else {
123                 return_VOID;
124         }
125
126         /* source_desc is of type ACPI_DESC_TYPE_OPERAND */
127
128         switch (ACPI_GET_OBJECT_TYPE(source_desc)) {
129         case ACPI_TYPE_INTEGER:
130
131                 /* Output correct integer width */
132
133                 if (acpi_gbl_integer_byte_width == 4) {
134                         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "0x%8.8X\n",
135                                               (u32) source_desc->integer.
136                                               value));
137                 } else {
138                         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
139                                               "0x%8.8X%8.8X\n",
140                                               ACPI_FORMAT_UINT64(source_desc->
141                                                                  integer.
142                                                                  value)));
143                 }
144                 break;
145
146         case ACPI_TYPE_BUFFER:
147
148                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[0x%.2X]\n",
149                                       (u32) source_desc->buffer.length));
150                 ACPI_DUMP_BUFFER(source_desc->buffer.pointer,
151                                  (source_desc->buffer.length <
152                                   256) ? source_desc->buffer.length : 256);
153                 break;
154
155         case ACPI_TYPE_STRING:
156
157                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[0x%.2X] \"%s\"\n",
158                                       source_desc->string.length,
159                                       source_desc->string.pointer));
160                 break;
161
162         case ACPI_TYPE_PACKAGE:
163
164                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
165                                       "[0x%.2X Elements]\n",
166                                       source_desc->package.count));
167
168                 /* Output the entire contents of the package */
169
170                 for (i = 0; i < source_desc->package.count; i++) {
171                         acpi_ex_do_debug_object(source_desc->package.
172                                                 elements[i], level + 4, i + 1);
173                 }
174                 break;
175
176         case ACPI_TYPE_LOCAL_REFERENCE:
177
178                 if (source_desc->reference.opcode == AML_INDEX_OP) {
179                         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
180                                               "[%s, 0x%X]\n",
181                                               acpi_ps_get_opcode_name
182                                               (source_desc->reference.opcode),
183                                               source_desc->reference.offset));
184                 } else {
185                         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[%s]",
186                                               acpi_ps_get_opcode_name
187                                               (source_desc->reference.opcode)));
188                 }
189
190                 if (source_desc->reference.opcode == AML_LOAD_OP) {     /* Load and load_table */
191                         ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
192                                               " Table OwnerId %X\n",
193                                               source_desc->reference.object));
194                         break;
195                 }
196
197                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "\n"));
198                 if (source_desc->reference.object) {
199                         if (ACPI_GET_DESCRIPTOR_TYPE
200                             (source_desc->reference.object) ==
201                             ACPI_DESC_TYPE_NAMED) {
202                                 acpi_ex_do_debug_object(((struct
203                                                           acpi_namespace_node *)
204                                                          source_desc->reference.
205                                                          object)->object,
206                                                         level + 4, 0);
207                         } else {
208                                 acpi_ex_do_debug_object(source_desc->reference.
209                                                         object, level + 4, 0);
210                         }
211                 } else if (source_desc->reference.node) {
212                         if (ACPI_GET_DESCRIPTOR_TYPE
213                             (source_desc->reference.node) !=
214                             ACPI_DESC_TYPE_NAMED) {
215                                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT,
216                                                       " %p - Not a valid namespace node\n"));
217                         } else {
218                                 acpi_ex_do_debug_object((source_desc->reference.
219                                                          node)->object,
220                                                         level + 4, 0);
221                         }
222                 }
223                 break;
224
225         default:
226
227                 ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "%p %s\n",
228                                       source_desc,
229                                       acpi_ut_get_object_type_name
230                                       (source_desc)));
231                 break;
232         }
233
234         ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, "\n"));
235         return_VOID;
236 }
237
238 /*******************************************************************************
239  *
240  * FUNCTION:    acpi_ex_store
241  *
242  * PARAMETERS:  *source_desc        - Value to be stored
243  *              *dest_desc          - Where to store it.  Must be an NS node
244  *                                    or an union acpi_operand_object of type
245  *                                    Reference;
246  *              walk_state          - Current walk state
247  *
248  * RETURN:      Status
249  *
250  * DESCRIPTION: Store the value described by source_desc into the location
251  *              described by dest_desc. Called by various interpreter
252  *              functions to store the result of an operation into
253  *              the destination operand -- not just simply the actual "Store"
254  *              ASL operator.
255  *
256  ******************************************************************************/
257
258 acpi_status
259 acpi_ex_store(union acpi_operand_object *source_desc,
260               union acpi_operand_object *dest_desc,
261               struct acpi_walk_state *walk_state)
262 {
263         acpi_status status = AE_OK;
264         union acpi_operand_object *ref_desc = dest_desc;
265
266         ACPI_FUNCTION_TRACE_PTR(ex_store, dest_desc);
267
268         /* Validate parameters */
269
270         if (!source_desc || !dest_desc) {
271                 ACPI_ERROR((AE_INFO, "Null parameter"));
272                 return_ACPI_STATUS(AE_AML_NO_OPERAND);
273         }
274
275         /* dest_desc can be either a namespace node or an ACPI object */
276
277         if (ACPI_GET_DESCRIPTOR_TYPE(dest_desc) == ACPI_DESC_TYPE_NAMED) {
278                 /*
279                  * Dest is a namespace node,
280                  * Storing an object into a Named node.
281                  */
282                 status = acpi_ex_store_object_to_node(source_desc,
283                                                       (struct
284                                                        acpi_namespace_node *)
285                                                       dest_desc, walk_state,
286                                                       ACPI_IMPLICIT_CONVERSION);
287
288                 return_ACPI_STATUS(status);
289         }
290
291         /* Destination object must be a Reference or a Constant object */
292
293         switch (ACPI_GET_OBJECT_TYPE(dest_desc)) {
294         case ACPI_TYPE_LOCAL_REFERENCE:
295                 break;
296
297         case ACPI_TYPE_INTEGER:
298
299                 /* Allow stores to Constants -- a Noop as per ACPI spec */
300
301                 if (dest_desc->common.flags & AOPOBJ_AML_CONSTANT) {
302                         return_ACPI_STATUS(AE_OK);
303                 }
304
305                 /*lint -fallthrough */
306
307         default:
308
309                 /* Destination is not a Reference object */
310
311                 ACPI_ERROR((AE_INFO,
312                             "Target is not a Reference or Constant object - %s [%p]",
313                             acpi_ut_get_object_type_name(dest_desc),
314                             dest_desc));
315
316                 ACPI_DUMP_STACK_ENTRY(source_desc);
317                 ACPI_DUMP_STACK_ENTRY(dest_desc);
318                 ACPI_DUMP_OPERANDS(&dest_desc, ACPI_IMODE_EXECUTE, "ExStore",
319                                    2,
320                                    "Target is not a Reference or Constant object");
321
322                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
323         }
324
325         /*
326          * Examine the Reference opcode.  These cases are handled:
327          *
328          * 1) Store to Name (Change the object associated with a name)
329          * 2) Store to an indexed area of a Buffer or Package
330          * 3) Store to a Method Local or Arg
331          * 4) Store to the debug object
332          */
333         switch (ref_desc->reference.opcode) {
334         case AML_REF_OF_OP:
335
336                 /* Storing an object into a Name "container" */
337
338                 status = acpi_ex_store_object_to_node(source_desc,
339                                                       ref_desc->reference.
340                                                       object, walk_state,
341                                                       ACPI_IMPLICIT_CONVERSION);
342                 break;
343
344         case AML_INDEX_OP:
345
346                 /* Storing to an Index (pointer into a packager or buffer) */
347
348                 status =
349                     acpi_ex_store_object_to_index(source_desc, ref_desc,
350                                                   walk_state);
351                 break;
352
353         case AML_LOCAL_OP:
354         case AML_ARG_OP:
355
356                 /* Store to a method local/arg  */
357
358                 status =
359                     acpi_ds_store_object_to_local(ref_desc->reference.opcode,
360                                                   ref_desc->reference.offset,
361                                                   source_desc, walk_state);
362                 break;
363
364         case AML_DEBUG_OP:
365
366                 /*
367                  * Storing to the Debug object causes the value stored to be
368                  * displayed and otherwise has no effect -- see ACPI Specification
369                  */
370                 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
371                                   "**** Write to Debug Object: Object %p %s ****:\n\n",
372                                   source_desc,
373                                   acpi_ut_get_object_type_name(source_desc)));
374
375                 acpi_ex_do_debug_object(source_desc, 0, 0);
376                 break;
377
378         default:
379
380                 ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X",
381                             ref_desc->reference.opcode));
382                 ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR);
383
384                 status = AE_AML_INTERNAL;
385                 break;
386         }
387
388         return_ACPI_STATUS(status);
389 }
390
391 /*******************************************************************************
392  *
393  * FUNCTION:    acpi_ex_store_object_to_index
394  *
395  * PARAMETERS:  *source_desc            - Value to be stored
396  *              *dest_desc              - Named object to receive the value
397  *              walk_state              - Current walk state
398  *
399  * RETURN:      Status
400  *
401  * DESCRIPTION: Store the object to indexed Buffer or Package element
402  *
403  ******************************************************************************/
404
405 static acpi_status
406 acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
407                               union acpi_operand_object *index_desc,
408                               struct acpi_walk_state *walk_state)
409 {
410         acpi_status status = AE_OK;
411         union acpi_operand_object *obj_desc;
412         union acpi_operand_object *new_desc;
413         u8 value = 0;
414         u32 i;
415
416         ACPI_FUNCTION_TRACE(ex_store_object_to_index);
417
418         /*
419          * Destination must be a reference pointer, and
420          * must point to either a buffer or a package
421          */
422         switch (index_desc->reference.target_type) {
423         case ACPI_TYPE_PACKAGE:
424                 /*
425                  * Storing to a package element. Copy the object and replace
426                  * any existing object with the new object. No implicit
427                  * conversion is performed.
428                  *
429                  * The object at *(index_desc->Reference.Where) is the
430                  * element within the package that is to be modified.
431                  * The parent package object is at index_desc->Reference.Object
432                  */
433                 obj_desc = *(index_desc->reference.where);
434
435                 status =
436                     acpi_ut_copy_iobject_to_iobject(source_desc, &new_desc,
437                                                     walk_state);
438                 if (ACPI_FAILURE(status)) {
439                         return_ACPI_STATUS(status);
440                 }
441
442                 if (obj_desc) {
443
444                         /* Decrement reference count by the ref count of the parent package */
445
446                         for (i = 0; i < ((union acpi_operand_object *)
447                                          index_desc->reference.object)->common.
448                              reference_count; i++) {
449                                 acpi_ut_remove_reference(obj_desc);
450                         }
451                 }
452
453                 *(index_desc->reference.where) = new_desc;
454
455                 /* Increment ref count by the ref count of the parent package-1 */
456
457                 for (i = 1; i < ((union acpi_operand_object *)
458                                  index_desc->reference.object)->common.
459                      reference_count; i++) {
460                         acpi_ut_add_reference(new_desc);
461                 }
462
463                 break;
464
465         case ACPI_TYPE_BUFFER_FIELD:
466
467                 /*
468                  * Store into a Buffer or String (not actually a real buffer_field)
469                  * at a location defined by an Index.
470                  *
471                  * The first 8-bit element of the source object is written to the
472                  * 8-bit Buffer location defined by the Index destination object,
473                  * according to the ACPI 2.0 specification.
474                  */
475
476                 /*
477                  * Make sure the target is a Buffer or String. An error should
478                  * not happen here, since the reference_object was constructed
479                  * by the INDEX_OP code.
480                  */
481                 obj_desc = index_desc->reference.object;
482                 if ((ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_BUFFER) &&
483                     (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_STRING)) {
484                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
485                 }
486
487                 /*
488                  * The assignment of the individual elements will be slightly
489                  * different for each source type.
490                  */
491                 switch (ACPI_GET_OBJECT_TYPE(source_desc)) {
492                 case ACPI_TYPE_INTEGER:
493
494                         /* Use the least-significant byte of the integer */
495
496                         value = (u8) (source_desc->integer.value);
497                         break;
498
499                 case ACPI_TYPE_BUFFER:
500                 case ACPI_TYPE_STRING:
501
502                         /* Note: Takes advantage of common string/buffer fields */
503
504                         value = source_desc->buffer.pointer[0];
505                         break;
506
507                 default:
508
509                         /* All other types are invalid */
510
511                         ACPI_ERROR((AE_INFO,
512                                     "Source must be Integer/Buffer/String type, not %s",
513                                     acpi_ut_get_object_type_name(source_desc)));
514                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
515                 }
516
517                 /* Store the source value into the target buffer byte */
518
519                 obj_desc->buffer.pointer[index_desc->reference.offset] = value;
520                 break;
521
522         default:
523                 ACPI_ERROR((AE_INFO, "Target is not a Package or BufferField"));
524                 status = AE_AML_OPERAND_TYPE;
525                 break;
526         }
527
528         return_ACPI_STATUS(status);
529 }
530
531 /*******************************************************************************
532  *
533  * FUNCTION:    acpi_ex_store_object_to_node
534  *
535  * PARAMETERS:  source_desc             - Value to be stored
536  *              Node                    - Named object to receive the value
537  *              walk_state              - Current walk state
538  *              implicit_conversion     - Perform implicit conversion (yes/no)
539  *
540  * RETURN:      Status
541  *
542  * DESCRIPTION: Store the object to the named object.
543  *
544  *              The Assignment of an object to a named object is handled here
545  *              The value passed in will replace the current value (if any)
546  *              with the input value.
547  *
548  *              When storing into an object the data is converted to the
549  *              target object type then stored in the object.  This means
550  *              that the target object type (for an initialized target) will
551  *              not be changed by a store operation.
552  *
553  *              Assumes parameters are already validated.
554  *
555  ******************************************************************************/
556
557 acpi_status
558 acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
559                              struct acpi_namespace_node *node,
560                              struct acpi_walk_state *walk_state,
561                              u8 implicit_conversion)
562 {
563         acpi_status status = AE_OK;
564         union acpi_operand_object *target_desc;
565         union acpi_operand_object *new_desc;
566         acpi_object_type target_type;
567
568         ACPI_FUNCTION_TRACE_PTR(ex_store_object_to_node, source_desc);
569
570         /* Get current type of the node, and object attached to Node */
571
572         target_type = acpi_ns_get_type(node);
573         target_desc = acpi_ns_get_attached_object(node);
574
575         ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Storing %p(%s) into node %p(%s)\n",
576                           source_desc,
577                           acpi_ut_get_object_type_name(source_desc), node,
578                           acpi_ut_get_type_name(target_type)));
579
580         /*
581          * Resolve the source object to an actual value
582          * (If it is a reference object)
583          */
584         status = acpi_ex_resolve_object(&source_desc, target_type, walk_state);
585         if (ACPI_FAILURE(status)) {
586                 return_ACPI_STATUS(status);
587         }
588
589         /* If no implicit conversion, drop into the default case below */
590
591         if ((!implicit_conversion) || (walk_state->opcode == AML_COPY_OP)) {
592
593                 /* Force execution of default (no implicit conversion) */
594
595                 target_type = ACPI_TYPE_ANY;
596         }
597
598         /* Do the actual store operation */
599
600         switch (target_type) {
601         case ACPI_TYPE_BUFFER_FIELD:
602         case ACPI_TYPE_LOCAL_REGION_FIELD:
603         case ACPI_TYPE_LOCAL_BANK_FIELD:
604         case ACPI_TYPE_LOCAL_INDEX_FIELD:
605
606                 /* For fields, copy the source data to the target field. */
607
608                 status = acpi_ex_write_data_to_field(source_desc, target_desc,
609                                                      &walk_state->result_obj);
610                 break;
611
612         case ACPI_TYPE_INTEGER:
613         case ACPI_TYPE_STRING:
614         case ACPI_TYPE_BUFFER:
615
616                 /*
617                  * These target types are all of type Integer/String/Buffer, and
618                  * therefore support implicit conversion before the store.
619                  *
620                  * Copy and/or convert the source object to a new target object
621                  */
622                 status =
623                     acpi_ex_store_object_to_object(source_desc, target_desc,
624                                                    &new_desc, walk_state);
625                 if (ACPI_FAILURE(status)) {
626                         return_ACPI_STATUS(status);
627                 }
628
629                 if (new_desc != target_desc) {
630                         /*
631                          * Store the new new_desc as the new value of the Name, and set
632                          * the Name's type to that of the value being stored in it.
633                          * source_desc reference count is incremented by attach_object.
634                          *
635                          * Note: This may change the type of the node if an explicit store
636                          * has been performed such that the node/object type has been
637                          * changed.
638                          */
639                         status =
640                             acpi_ns_attach_object(node, new_desc,
641                                                   new_desc->common.type);
642
643                         ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
644                                           "Store %s into %s via Convert/Attach\n",
645                                           acpi_ut_get_object_type_name
646                                           (source_desc),
647                                           acpi_ut_get_object_type_name
648                                           (new_desc)));
649                 }
650                 break;
651
652         default:
653
654                 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
655                                   "Storing %s (%p) directly into node (%p) with no implicit conversion\n",
656                                   acpi_ut_get_object_type_name(source_desc),
657                                   source_desc, node));
658
659                 /* No conversions for all other types.  Just attach the source object */
660
661                 status = acpi_ns_attach_object(node, source_desc,
662                                                ACPI_GET_OBJECT_TYPE
663                                                (source_desc));
664                 break;
665         }
666
667         return_ACPI_STATUS(status);
668 }