exstore.c 19 KB

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