exstore.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. /******************************************************************************
  2. *
  3. * Module Name: exstore - AML Interpreter object store support
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2005, 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 (
  53. union acpi_operand_object *source_desc,
  54. u32 level,
  55. u32 index);
  56. static acpi_status
  57. acpi_ex_store_object_to_index (
  58. union acpi_operand_object *val_desc,
  59. union acpi_operand_object *dest_desc,
  60. struct acpi_walk_state *walk_state);
  61. /*******************************************************************************
  62. *
  63. * FUNCTION: acpi_ex_do_debug_object
  64. *
  65. * PARAMETERS: source_desc - Value to be stored
  66. * Level - Indentation level (used for packages)
  67. * Index - Current package element, zero if not pkg
  68. *
  69. * RETURN: None
  70. *
  71. * DESCRIPTION: Handles stores to the Debug Object.
  72. *
  73. ******************************************************************************/
  74. static void
  75. acpi_ex_do_debug_object (
  76. union acpi_operand_object *source_desc,
  77. u32 level,
  78. u32 index)
  79. {
  80. u32 i;
  81. ACPI_FUNCTION_TRACE_PTR ("ex_do_debug_object", source_desc);
  82. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s",
  83. level, " "));
  84. /* Display index for package output only */
  85. if (index > 0) {
  86. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
  87. "(%.2u) ", index -1));
  88. }
  89. if (!source_desc) {
  90. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "<Null Object>\n"));
  91. return_VOID;
  92. }
  93. if (ACPI_GET_DESCRIPTOR_TYPE (source_desc) == ACPI_DESC_TYPE_OPERAND) {
  94. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s: ",
  95. acpi_ut_get_object_type_name (source_desc)));
  96. if (!acpi_ut_valid_internal_object (source_desc)) {
  97. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
  98. "%p, Invalid Internal Object!\n", source_desc));
  99. return_VOID;
  100. }
  101. }
  102. else if (ACPI_GET_DESCRIPTOR_TYPE (source_desc) == ACPI_DESC_TYPE_NAMED) {
  103. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s: %p\n",
  104. acpi_ut_get_type_name (((struct acpi_namespace_node *) source_desc)->type),
  105. source_desc));
  106. return_VOID;
  107. }
  108. else {
  109. return_VOID;
  110. }
  111. switch (ACPI_GET_OBJECT_TYPE (source_desc)) {
  112. case ACPI_TYPE_INTEGER:
  113. /* Output correct integer width */
  114. if (acpi_gbl_integer_byte_width == 4) {
  115. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X\n",
  116. (u32) source_desc->integer.value));
  117. }
  118. else {
  119. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X%8.8X\n",
  120. ACPI_FORMAT_UINT64 (source_desc->integer.value)));
  121. }
  122. break;
  123. case ACPI_TYPE_BUFFER:
  124. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X]",
  125. (u32) source_desc->buffer.length));
  126. ACPI_DUMP_BUFFER (source_desc->buffer.pointer,
  127. (source_desc->buffer.length < 32) ? source_desc->buffer.length : 32);
  128. break;
  129. case ACPI_TYPE_STRING:
  130. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X] \"%s\"\n",
  131. source_desc->string.length, source_desc->string.pointer));
  132. break;
  133. case ACPI_TYPE_PACKAGE:
  134. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X Elements]\n",
  135. source_desc->package.count));
  136. /* Output the entire contents of the package */
  137. for (i = 0; i < source_desc->package.count; i++) {
  138. acpi_ex_do_debug_object (source_desc->package.elements[i],
  139. level+4, i+1);
  140. }
  141. break;
  142. case ACPI_TYPE_LOCAL_REFERENCE:
  143. if (source_desc->reference.opcode == AML_INDEX_OP) {
  144. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[%s, 0x%X]\n",
  145. acpi_ps_get_opcode_name (source_desc->reference.opcode),
  146. source_desc->reference.offset));
  147. }
  148. else {
  149. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[%s]\n",
  150. acpi_ps_get_opcode_name (source_desc->reference.opcode)));
  151. }
  152. if (source_desc->reference.object) {
  153. if (ACPI_GET_DESCRIPTOR_TYPE (source_desc->reference.object) ==
  154. ACPI_DESC_TYPE_NAMED) {
  155. acpi_ex_do_debug_object (((struct acpi_namespace_node *)
  156. source_desc->reference.object)->object,
  157. level+4, 0);
  158. }
  159. else {
  160. acpi_ex_do_debug_object (source_desc->reference.object, level+4, 0);
  161. }
  162. }
  163. else if (source_desc->reference.node) {
  164. acpi_ex_do_debug_object ((source_desc->reference.node)->object,
  165. level+4, 0);
  166. }
  167. break;
  168. default:
  169. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%p %s\n",
  170. source_desc, acpi_ut_get_object_type_name (source_desc)));
  171. break;
  172. }
  173. ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "\n"));
  174. return_VOID;
  175. }
  176. /*******************************************************************************
  177. *
  178. * FUNCTION: acpi_ex_store
  179. *
  180. * PARAMETERS: *source_desc - Value to be stored
  181. * *dest_desc - Where to store it. Must be an NS node
  182. * or an union acpi_operand_object of type
  183. * Reference;
  184. * walk_state - Current walk state
  185. *
  186. * RETURN: Status
  187. *
  188. * DESCRIPTION: Store the value described by source_desc into the location
  189. * described by dest_desc. Called by various interpreter
  190. * functions to store the result of an operation into
  191. * the destination operand -- not just simply the actual "Store"
  192. * ASL operator.
  193. *
  194. ******************************************************************************/
  195. acpi_status
  196. acpi_ex_store (
  197. union acpi_operand_object *source_desc,
  198. union acpi_operand_object *dest_desc,
  199. struct acpi_walk_state *walk_state)
  200. {
  201. acpi_status status = AE_OK;
  202. union acpi_operand_object *ref_desc = dest_desc;
  203. ACPI_FUNCTION_TRACE_PTR ("ex_store", dest_desc);
  204. /* Validate parameters */
  205. if (!source_desc || !dest_desc) {
  206. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null parameter\n"));
  207. return_ACPI_STATUS (AE_AML_NO_OPERAND);
  208. }
  209. /* dest_desc can be either a namespace node or an ACPI object */
  210. if (ACPI_GET_DESCRIPTOR_TYPE (dest_desc) == ACPI_DESC_TYPE_NAMED) {
  211. /*
  212. * Dest is a namespace node,
  213. * Storing an object into a Named node.
  214. */
  215. status = acpi_ex_store_object_to_node (source_desc,
  216. (struct acpi_namespace_node *) dest_desc, walk_state,
  217. ACPI_IMPLICIT_CONVERSION);
  218. return_ACPI_STATUS (status);
  219. }
  220. /* Destination object must be a Reference or a Constant object */
  221. switch (ACPI_GET_OBJECT_TYPE (dest_desc)) {
  222. case ACPI_TYPE_LOCAL_REFERENCE:
  223. break;
  224. case ACPI_TYPE_INTEGER:
  225. /* Allow stores to Constants -- a Noop as per ACPI spec */
  226. if (dest_desc->common.flags & AOPOBJ_AML_CONSTANT) {
  227. return_ACPI_STATUS (AE_OK);
  228. }
  229. /*lint -fallthrough */
  230. default:
  231. /* Destination is not a Reference object */
  232. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  233. "Target is not a Reference or Constant object - %s [%p]\n",
  234. acpi_ut_get_object_type_name (dest_desc), dest_desc));
  235. ACPI_DUMP_STACK_ENTRY (source_desc);
  236. ACPI_DUMP_STACK_ENTRY (dest_desc);
  237. ACPI_DUMP_OPERANDS (&dest_desc, ACPI_IMODE_EXECUTE, "ex_store",
  238. 2, "Target is not a Reference or Constant object");
  239. return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
  240. }
  241. /*
  242. * Examine the Reference opcode. These cases are handled:
  243. *
  244. * 1) Store to Name (Change the object associated with a name)
  245. * 2) Store to an indexed area of a Buffer or Package
  246. * 3) Store to a Method Local or Arg
  247. * 4) Store to the debug object
  248. */
  249. switch (ref_desc->reference.opcode) {
  250. case AML_NAME_OP:
  251. case AML_REF_OF_OP:
  252. /* Storing an object into a Name "container" */
  253. status = acpi_ex_store_object_to_node (source_desc,
  254. ref_desc->reference.object,
  255. walk_state, ACPI_IMPLICIT_CONVERSION);
  256. break;
  257. case AML_INDEX_OP:
  258. /* Storing to an Index (pointer into a packager or buffer) */
  259. status = acpi_ex_store_object_to_index (source_desc, ref_desc, walk_state);
  260. break;
  261. case AML_LOCAL_OP:
  262. case AML_ARG_OP:
  263. /* Store to a method local/arg */
  264. status = acpi_ds_store_object_to_local (ref_desc->reference.opcode,
  265. ref_desc->reference.offset, source_desc, walk_state);
  266. break;
  267. case AML_DEBUG_OP:
  268. /*
  269. * Storing to the Debug object causes the value stored to be
  270. * displayed and otherwise has no effect -- see ACPI Specification
  271. */
  272. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  273. "**** Write to Debug Object: Object %p %s ****:\n\n",
  274. source_desc, acpi_ut_get_object_type_name (source_desc)));
  275. acpi_ex_do_debug_object (source_desc, 0, 0);
  276. break;
  277. default:
  278. ACPI_REPORT_ERROR (("ex_store: Unknown Reference opcode %X\n",
  279. ref_desc->reference.opcode));
  280. ACPI_DUMP_ENTRY (ref_desc, ACPI_LV_ERROR);
  281. status = AE_AML_INTERNAL;
  282. break;
  283. }
  284. return_ACPI_STATUS (status);
  285. }
  286. /*******************************************************************************
  287. *
  288. * FUNCTION: acpi_ex_store_object_to_index
  289. *
  290. * PARAMETERS: *source_desc - Value to be stored
  291. * *dest_desc - Named object to receive the value
  292. * walk_state - Current walk state
  293. *
  294. * RETURN: Status
  295. *
  296. * DESCRIPTION: Store the object to indexed Buffer or Package element
  297. *
  298. ******************************************************************************/
  299. static acpi_status
  300. acpi_ex_store_object_to_index (
  301. union acpi_operand_object *source_desc,
  302. union acpi_operand_object *index_desc,
  303. struct acpi_walk_state *walk_state)
  304. {
  305. acpi_status status = AE_OK;
  306. union acpi_operand_object *obj_desc;
  307. union acpi_operand_object *new_desc;
  308. u8 value = 0;
  309. u32 i;
  310. ACPI_FUNCTION_TRACE ("ex_store_object_to_index");
  311. /*
  312. * Destination must be a reference pointer, and
  313. * must point to either a buffer or a package
  314. */
  315. switch (index_desc->reference.target_type) {
  316. case ACPI_TYPE_PACKAGE:
  317. /*
  318. * Storing to a package element. Copy the object and replace
  319. * any existing object with the new object. No implicit
  320. * conversion is performed.
  321. *
  322. * The object at *(index_desc->Reference.Where) is the
  323. * element within the package that is to be modified.
  324. * The parent package object is at index_desc->Reference.Object
  325. */
  326. obj_desc = *(index_desc->reference.where);
  327. status = acpi_ut_copy_iobject_to_iobject (source_desc, &new_desc, walk_state);
  328. if (ACPI_FAILURE (status)) {
  329. return_ACPI_STATUS (status);
  330. }
  331. if (obj_desc) {
  332. /* Decrement reference count by the ref count of the parent package */
  333. for (i = 0;
  334. i < ((union acpi_operand_object *)
  335. index_desc->reference.object)->common.reference_count;
  336. i++) {
  337. acpi_ut_remove_reference (obj_desc);
  338. }
  339. }
  340. *(index_desc->reference.where) = new_desc;
  341. /* Increment ref count by the ref count of the parent package-1 */
  342. for (i = 1;
  343. i < ((union acpi_operand_object *)
  344. index_desc->reference.object)->common.reference_count;
  345. i++) {
  346. acpi_ut_add_reference (new_desc);
  347. }
  348. break;
  349. case ACPI_TYPE_BUFFER_FIELD:
  350. /*
  351. * Store into a Buffer or String (not actually a real buffer_field)
  352. * at a location defined by an Index.
  353. *
  354. * The first 8-bit element of the source object is written to the
  355. * 8-bit Buffer location defined by the Index destination object,
  356. * according to the ACPI 2.0 specification.
  357. */
  358. /*
  359. * Make sure the target is a Buffer or String. An error should
  360. * not happen here, since the reference_object was constructed
  361. * by the INDEX_OP code.
  362. */
  363. obj_desc = index_desc->reference.object;
  364. if ((ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_BUFFER) &&
  365. (ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_STRING)) {
  366. return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
  367. }
  368. /*
  369. * The assignment of the individual elements will be slightly
  370. * different for each source type.
  371. */
  372. switch (ACPI_GET_OBJECT_TYPE (source_desc)) {
  373. case ACPI_TYPE_INTEGER:
  374. /* Use the least-significant byte of the integer */
  375. value = (u8) (source_desc->integer.value);
  376. break;
  377. case ACPI_TYPE_BUFFER:
  378. case ACPI_TYPE_STRING:
  379. /* Note: Takes advantage of common string/buffer fields */
  380. value = source_desc->buffer.pointer[0];
  381. break;
  382. default:
  383. /* All other types are invalid */
  384. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  385. "Source must be Integer/Buffer/String type, not %s\n",
  386. acpi_ut_get_object_type_name (source_desc)));
  387. return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
  388. }
  389. /* Store the source value into the target buffer byte */
  390. obj_desc->buffer.pointer[index_desc->reference.offset] = value;
  391. break;
  392. default:
  393. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  394. "Target is not a Package or buffer_field\n"));
  395. status = AE_AML_OPERAND_TYPE;
  396. break;
  397. }
  398. return_ACPI_STATUS (status);
  399. }
  400. /*******************************************************************************
  401. *
  402. * FUNCTION: acpi_ex_store_object_to_node
  403. *
  404. * PARAMETERS: source_desc - Value to be stored
  405. * Node - Named object to receive the value
  406. * walk_state - Current walk state
  407. * implicit_conversion - Perform implicit conversion (yes/no)
  408. *
  409. * RETURN: Status
  410. *
  411. * DESCRIPTION: Store the object to the named object.
  412. *
  413. * The Assignment of an object to a named object is handled here
  414. * The value passed in will replace the current value (if any)
  415. * with the input value.
  416. *
  417. * When storing into an object the data is converted to the
  418. * target object type then stored in the object. This means
  419. * that the target object type (for an initialized target) will
  420. * not be changed by a store operation.
  421. *
  422. * Assumes parameters are already validated.
  423. *
  424. ******************************************************************************/
  425. acpi_status
  426. acpi_ex_store_object_to_node (
  427. union acpi_operand_object *source_desc,
  428. struct acpi_namespace_node *node,
  429. struct acpi_walk_state *walk_state,
  430. u8 implicit_conversion)
  431. {
  432. acpi_status status = AE_OK;
  433. union acpi_operand_object *target_desc;
  434. union acpi_operand_object *new_desc;
  435. acpi_object_type target_type;
  436. ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_node", source_desc);
  437. /* Get current type of the node, and object attached to Node */
  438. target_type = acpi_ns_get_type (node);
  439. target_desc = acpi_ns_get_attached_object (node);
  440. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Storing %p(%s) into node %p(%s)\n",
  441. source_desc, acpi_ut_get_object_type_name (source_desc),
  442. node, acpi_ut_get_type_name (target_type)));
  443. /*
  444. * Resolve the source object to an actual value
  445. * (If it is a reference object)
  446. */
  447. status = acpi_ex_resolve_object (&source_desc, target_type, walk_state);
  448. if (ACPI_FAILURE (status)) {
  449. return_ACPI_STATUS (status);
  450. }
  451. /* If no implicit conversion, drop into the default case below */
  452. if (!implicit_conversion) {
  453. /* Force execution of default (no implicit conversion) */
  454. target_type = ACPI_TYPE_ANY;
  455. }
  456. /* Do the actual store operation */
  457. switch (target_type) {
  458. case ACPI_TYPE_BUFFER_FIELD:
  459. case ACPI_TYPE_LOCAL_REGION_FIELD:
  460. case ACPI_TYPE_LOCAL_BANK_FIELD:
  461. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  462. /* For fields, copy the source data to the target field. */
  463. status = acpi_ex_write_data_to_field (source_desc, target_desc,
  464. &walk_state->result_obj);
  465. break;
  466. case ACPI_TYPE_INTEGER:
  467. case ACPI_TYPE_STRING:
  468. case ACPI_TYPE_BUFFER:
  469. /*
  470. * These target types are all of type Integer/String/Buffer, and
  471. * therefore support implicit conversion before the store.
  472. *
  473. * Copy and/or convert the source object to a new target object
  474. */
  475. status = acpi_ex_store_object_to_object (source_desc, target_desc,
  476. &new_desc, walk_state);
  477. if (ACPI_FAILURE (status)) {
  478. return_ACPI_STATUS (status);
  479. }
  480. if (new_desc != target_desc) {
  481. /*
  482. * Store the new new_desc as the new value of the Name, and set
  483. * the Name's type to that of the value being stored in it.
  484. * source_desc reference count is incremented by attach_object.
  485. *
  486. * Note: This may change the type of the node if an explicit store
  487. * has been performed such that the node/object type has been
  488. * changed.
  489. */
  490. status = acpi_ns_attach_object (node, new_desc, new_desc->common.type);
  491. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  492. "Store %s into %s via Convert/Attach\n",
  493. acpi_ut_get_object_type_name (source_desc),
  494. acpi_ut_get_object_type_name (new_desc)));
  495. }
  496. break;
  497. default:
  498. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  499. "Storing %s (%p) directly into node (%p), no implicit conversion\n",
  500. acpi_ut_get_object_type_name (source_desc), source_desc, node));
  501. /* No conversions for all other types. Just attach the source object */
  502. status = acpi_ns_attach_object (node, source_desc,
  503. ACPI_GET_OBJECT_TYPE (source_desc));
  504. break;
  505. }
  506. return_ACPI_STATUS (status);
  507. }