uteval.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. /******************************************************************************
  2. *
  3. * Module Name: uteval - Object evaluation
  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/acnamesp.h>
  44. #include <acpi/acinterp.h>
  45. #define _COMPONENT ACPI_UTILITIES
  46. ACPI_MODULE_NAME ("uteval")
  47. /* Local prototypes */
  48. static void
  49. acpi_ut_copy_id_string (
  50. char *destination,
  51. char *source,
  52. acpi_size max_length);
  53. static acpi_status
  54. acpi_ut_translate_one_cid (
  55. union acpi_operand_object *obj_desc,
  56. struct acpi_compatible_id *one_cid);
  57. /*******************************************************************************
  58. *
  59. * FUNCTION: acpi_ut_osi_implementation
  60. *
  61. * PARAMETERS: walk_state - Current walk state
  62. *
  63. * RETURN: Status
  64. *
  65. * DESCRIPTION: Implementation of _OSI predefined control method
  66. * Supported = _OSI (String)
  67. *
  68. ******************************************************************************/
  69. acpi_status
  70. acpi_ut_osi_implementation (
  71. struct acpi_walk_state *walk_state)
  72. {
  73. union acpi_operand_object *string_desc;
  74. union acpi_operand_object *return_desc;
  75. acpi_native_uint i;
  76. ACPI_FUNCTION_TRACE ("ut_osi_implementation");
  77. /* Validate the string input argument */
  78. string_desc = walk_state->arguments[0].object;
  79. if (!string_desc || (string_desc->common.type != ACPI_TYPE_STRING)) {
  80. return_ACPI_STATUS (AE_TYPE);
  81. }
  82. /* Create a return object (Default value = 0) */
  83. return_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER);
  84. if (!return_desc) {
  85. return_ACPI_STATUS (AE_NO_MEMORY);
  86. }
  87. /* Compare input string to table of supported strings */
  88. for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) {
  89. if (!ACPI_STRCMP (string_desc->string.pointer,
  90. (char *) acpi_gbl_valid_osi_strings[i])) {
  91. /* This string is supported */
  92. return_desc->integer.value = 0xFFFFFFFF;
  93. break;
  94. }
  95. }
  96. walk_state->return_desc = return_desc;
  97. return_ACPI_STATUS (AE_CTRL_TERMINATE);
  98. }
  99. /*******************************************************************************
  100. *
  101. * FUNCTION: acpi_ut_evaluate_object
  102. *
  103. * PARAMETERS: prefix_node - Starting node
  104. * Path - Path to object from starting node
  105. * expected_return_types - Bitmap of allowed return types
  106. * return_desc - Where a return value is stored
  107. *
  108. * RETURN: Status
  109. *
  110. * DESCRIPTION: Evaluates a namespace object and verifies the type of the
  111. * return object. Common code that simplifies accessing objects
  112. * that have required return objects of fixed types.
  113. *
  114. * NOTE: Internal function, no parameter validation
  115. *
  116. ******************************************************************************/
  117. acpi_status
  118. acpi_ut_evaluate_object (
  119. struct acpi_namespace_node *prefix_node,
  120. char *path,
  121. u32 expected_return_btypes,
  122. union acpi_operand_object **return_desc)
  123. {
  124. struct acpi_parameter_info info;
  125. acpi_status status;
  126. u32 return_btype;
  127. ACPI_FUNCTION_TRACE ("ut_evaluate_object");
  128. info.node = prefix_node;
  129. info.parameters = NULL;
  130. info.parameter_type = ACPI_PARAM_ARGS;
  131. /* Evaluate the object/method */
  132. status = acpi_ns_evaluate_relative (path, &info);
  133. if (ACPI_FAILURE (status)) {
  134. if (status == AE_NOT_FOUND) {
  135. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s.%s] was not found\n",
  136. acpi_ut_get_node_name (prefix_node), path));
  137. }
  138. else {
  139. ACPI_REPORT_METHOD_ERROR ("Method execution failed",
  140. prefix_node, path, status);
  141. }
  142. return_ACPI_STATUS (status);
  143. }
  144. /* Did we get a return object? */
  145. if (!info.return_object) {
  146. if (expected_return_btypes) {
  147. ACPI_REPORT_METHOD_ERROR ("No object was returned from",
  148. prefix_node, path, AE_NOT_EXIST);
  149. return_ACPI_STATUS (AE_NOT_EXIST);
  150. }
  151. return_ACPI_STATUS (AE_OK);
  152. }
  153. /* Map the return object type to the bitmapped type */
  154. switch (ACPI_GET_OBJECT_TYPE (info.return_object)) {
  155. case ACPI_TYPE_INTEGER:
  156. return_btype = ACPI_BTYPE_INTEGER;
  157. break;
  158. case ACPI_TYPE_BUFFER:
  159. return_btype = ACPI_BTYPE_BUFFER;
  160. break;
  161. case ACPI_TYPE_STRING:
  162. return_btype = ACPI_BTYPE_STRING;
  163. break;
  164. case ACPI_TYPE_PACKAGE:
  165. return_btype = ACPI_BTYPE_PACKAGE;
  166. break;
  167. default:
  168. return_btype = 0;
  169. break;
  170. }
  171. if ((acpi_gbl_enable_interpreter_slack) &&
  172. (!expected_return_btypes)) {
  173. /*
  174. * We received a return object, but one was not expected. This can
  175. * happen frequently if the "implicit return" feature is enabled.
  176. * Just delete the return object and return AE_OK.
  177. */
  178. acpi_ut_remove_reference (info.return_object);
  179. return_ACPI_STATUS (AE_OK);
  180. }
  181. /* Is the return object one of the expected types? */
  182. if (!(expected_return_btypes & return_btype)) {
  183. ACPI_REPORT_METHOD_ERROR ("Return object type is incorrect",
  184. prefix_node, path, AE_TYPE);
  185. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  186. "Type returned from %s was incorrect: %s, expected Btypes: %X\n",
  187. path, acpi_ut_get_object_type_name (info.return_object),
  188. expected_return_btypes));
  189. /* On error exit, we must delete the return object */
  190. acpi_ut_remove_reference (info.return_object);
  191. return_ACPI_STATUS (AE_TYPE);
  192. }
  193. /* Object type is OK, return it */
  194. *return_desc = info.return_object;
  195. return_ACPI_STATUS (AE_OK);
  196. }
  197. /*******************************************************************************
  198. *
  199. * FUNCTION: acpi_ut_evaluate_numeric_object
  200. *
  201. * PARAMETERS: object_name - Object name to be evaluated
  202. * device_node - Node for the device
  203. * Address - Where the value is returned
  204. *
  205. * RETURN: Status
  206. *
  207. * DESCRIPTION: Evaluates a numeric namespace object for a selected device
  208. * and stores result in *Address.
  209. *
  210. * NOTE: Internal function, no parameter validation
  211. *
  212. ******************************************************************************/
  213. acpi_status
  214. acpi_ut_evaluate_numeric_object (
  215. char *object_name,
  216. struct acpi_namespace_node *device_node,
  217. acpi_integer *address)
  218. {
  219. union acpi_operand_object *obj_desc;
  220. acpi_status status;
  221. ACPI_FUNCTION_TRACE ("ut_evaluate_numeric_object");
  222. status = acpi_ut_evaluate_object (device_node, object_name,
  223. ACPI_BTYPE_INTEGER, &obj_desc);
  224. if (ACPI_FAILURE (status)) {
  225. return_ACPI_STATUS (status);
  226. }
  227. /* Get the returned Integer */
  228. *address = obj_desc->integer.value;
  229. /* On exit, we must delete the return object */
  230. acpi_ut_remove_reference (obj_desc);
  231. return_ACPI_STATUS (status);
  232. }
  233. /*******************************************************************************
  234. *
  235. * FUNCTION: acpi_ut_copy_id_string
  236. *
  237. * PARAMETERS: Destination - Where to copy the string
  238. * Source - Source string
  239. * max_length - Length of the destination buffer
  240. *
  241. * RETURN: None
  242. *
  243. * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods.
  244. * Performs removal of a leading asterisk if present -- workaround
  245. * for a known issue on a bunch of machines.
  246. *
  247. ******************************************************************************/
  248. static void
  249. acpi_ut_copy_id_string (
  250. char *destination,
  251. char *source,
  252. acpi_size max_length)
  253. {
  254. /*
  255. * Workaround for ID strings that have a leading asterisk. This construct
  256. * is not allowed by the ACPI specification (ID strings must be
  257. * alphanumeric), but enough existing machines have this embedded in their
  258. * ID strings that the following code is useful.
  259. */
  260. if (*source == '*') {
  261. source++;
  262. }
  263. /* Do the actual copy */
  264. ACPI_STRNCPY (destination, source, max_length);
  265. }
  266. /*******************************************************************************
  267. *
  268. * FUNCTION: acpi_ut_execute_HID
  269. *
  270. * PARAMETERS: device_node - Node for the device
  271. * Hid - Where the HID is returned
  272. *
  273. * RETURN: Status
  274. *
  275. * DESCRIPTION: Executes the _HID control method that returns the hardware
  276. * ID of the device.
  277. *
  278. * NOTE: Internal function, no parameter validation
  279. *
  280. ******************************************************************************/
  281. acpi_status
  282. acpi_ut_execute_HID (
  283. struct acpi_namespace_node *device_node,
  284. struct acpi_device_id *hid)
  285. {
  286. union acpi_operand_object *obj_desc;
  287. acpi_status status;
  288. ACPI_FUNCTION_TRACE ("ut_execute_HID");
  289. status = acpi_ut_evaluate_object (device_node, METHOD_NAME__HID,
  290. ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &obj_desc);
  291. if (ACPI_FAILURE (status)) {
  292. return_ACPI_STATUS (status);
  293. }
  294. if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
  295. /* Convert the Numeric HID to string */
  296. acpi_ex_eisa_id_to_string ((u32) obj_desc->integer.value, hid->value);
  297. }
  298. else {
  299. /* Copy the String HID from the returned object */
  300. acpi_ut_copy_id_string (hid->value, obj_desc->string.pointer,
  301. sizeof (hid->value));
  302. }
  303. /* On exit, we must delete the return object */
  304. acpi_ut_remove_reference (obj_desc);
  305. return_ACPI_STATUS (status);
  306. }
  307. /*******************************************************************************
  308. *
  309. * FUNCTION: acpi_ut_translate_one_cid
  310. *
  311. * PARAMETERS: obj_desc - _CID object, must be integer or string
  312. * one_cid - Where the CID string is returned
  313. *
  314. * RETURN: Status
  315. *
  316. * DESCRIPTION: Return a numeric or string _CID value as a string.
  317. * (Compatible ID)
  318. *
  319. * NOTE: Assumes a maximum _CID string length of
  320. * ACPI_MAX_CID_LENGTH.
  321. *
  322. ******************************************************************************/
  323. static acpi_status
  324. acpi_ut_translate_one_cid (
  325. union acpi_operand_object *obj_desc,
  326. struct acpi_compatible_id *one_cid)
  327. {
  328. switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
  329. case ACPI_TYPE_INTEGER:
  330. /* Convert the Numeric CID to string */
  331. acpi_ex_eisa_id_to_string ((u32) obj_desc->integer.value, one_cid->value);
  332. return (AE_OK);
  333. case ACPI_TYPE_STRING:
  334. if (obj_desc->string.length > ACPI_MAX_CID_LENGTH) {
  335. return (AE_AML_STRING_LIMIT);
  336. }
  337. /* Copy the String CID from the returned object */
  338. acpi_ut_copy_id_string (one_cid->value, obj_desc->string.pointer,
  339. ACPI_MAX_CID_LENGTH);
  340. return (AE_OK);
  341. default:
  342. return (AE_TYPE);
  343. }
  344. }
  345. /*******************************************************************************
  346. *
  347. * FUNCTION: acpi_ut_execute_CID
  348. *
  349. * PARAMETERS: device_node - Node for the device
  350. * return_cid_list - Where the CID list is returned
  351. *
  352. * RETURN: Status
  353. *
  354. * DESCRIPTION: Executes the _CID control method that returns one or more
  355. * compatible hardware IDs for the device.
  356. *
  357. * NOTE: Internal function, no parameter validation
  358. *
  359. ******************************************************************************/
  360. acpi_status
  361. acpi_ut_execute_CID (
  362. struct acpi_namespace_node *device_node,
  363. struct acpi_compatible_id_list **return_cid_list)
  364. {
  365. union acpi_operand_object *obj_desc;
  366. acpi_status status;
  367. u32 count;
  368. u32 size;
  369. struct acpi_compatible_id_list *cid_list;
  370. acpi_native_uint i;
  371. ACPI_FUNCTION_TRACE ("ut_execute_CID");
  372. /* Evaluate the _CID method for this device */
  373. status = acpi_ut_evaluate_object (device_node, METHOD_NAME__CID,
  374. ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_PACKAGE,
  375. &obj_desc);
  376. if (ACPI_FAILURE (status)) {
  377. return_ACPI_STATUS (status);
  378. }
  379. /* Get the number of _CIDs returned */
  380. count = 1;
  381. if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_PACKAGE) {
  382. count = obj_desc->package.count;
  383. }
  384. /* Allocate a worst-case buffer for the _CIDs */
  385. size = (((count - 1) * sizeof (struct acpi_compatible_id)) +
  386. sizeof (struct acpi_compatible_id_list));
  387. cid_list = ACPI_MEM_CALLOCATE ((acpi_size) size);
  388. if (!cid_list) {
  389. return_ACPI_STATUS (AE_NO_MEMORY);
  390. }
  391. /* Init CID list */
  392. cid_list->count = count;
  393. cid_list->size = size;
  394. /*
  395. * A _CID can return either a single compatible ID or a package of
  396. * compatible IDs. Each compatible ID can be one of the following:
  397. * 1) Integer (32 bit compressed EISA ID) or
  398. * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss")
  399. */
  400. /* The _CID object can be either a single CID or a package (list) of CIDs */
  401. if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_PACKAGE) {
  402. /* Translate each package element */
  403. for (i = 0; i < count; i++) {
  404. status = acpi_ut_translate_one_cid (obj_desc->package.elements[i],
  405. &cid_list->id[i]);
  406. if (ACPI_FAILURE (status)) {
  407. break;
  408. }
  409. }
  410. }
  411. else {
  412. /* Only one CID, translate to a string */
  413. status = acpi_ut_translate_one_cid (obj_desc, cid_list->id);
  414. }
  415. /* Cleanup on error */
  416. if (ACPI_FAILURE (status)) {
  417. ACPI_MEM_FREE (cid_list);
  418. }
  419. else {
  420. *return_cid_list = cid_list;
  421. }
  422. /* On exit, we must delete the _CID return object */
  423. acpi_ut_remove_reference (obj_desc);
  424. return_ACPI_STATUS (status);
  425. }
  426. /*******************************************************************************
  427. *
  428. * FUNCTION: acpi_ut_execute_UID
  429. *
  430. * PARAMETERS: device_node - Node for the device
  431. * Uid - Where the UID is returned
  432. *
  433. * RETURN: Status
  434. *
  435. * DESCRIPTION: Executes the _UID control method that returns the hardware
  436. * ID of the device.
  437. *
  438. * NOTE: Internal function, no parameter validation
  439. *
  440. ******************************************************************************/
  441. acpi_status
  442. acpi_ut_execute_UID (
  443. struct acpi_namespace_node *device_node,
  444. struct acpi_device_id *uid)
  445. {
  446. union acpi_operand_object *obj_desc;
  447. acpi_status status;
  448. ACPI_FUNCTION_TRACE ("ut_execute_UID");
  449. status = acpi_ut_evaluate_object (device_node, METHOD_NAME__UID,
  450. ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &obj_desc);
  451. if (ACPI_FAILURE (status)) {
  452. return_ACPI_STATUS (status);
  453. }
  454. if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
  455. /* Convert the Numeric UID to string */
  456. acpi_ex_unsigned_integer_to_string (obj_desc->integer.value, uid->value);
  457. }
  458. else {
  459. /* Copy the String UID from the returned object */
  460. acpi_ut_copy_id_string (uid->value, obj_desc->string.pointer,
  461. sizeof (uid->value));
  462. }
  463. /* On exit, we must delete the return object */
  464. acpi_ut_remove_reference (obj_desc);
  465. return_ACPI_STATUS (status);
  466. }
  467. /*******************************************************************************
  468. *
  469. * FUNCTION: acpi_ut_execute_STA
  470. *
  471. * PARAMETERS: device_node - Node for the device
  472. * Flags - Where the status flags are returned
  473. *
  474. * RETURN: Status
  475. *
  476. * DESCRIPTION: Executes _STA for selected device and stores results in
  477. * *Flags.
  478. *
  479. * NOTE: Internal function, no parameter validation
  480. *
  481. ******************************************************************************/
  482. acpi_status
  483. acpi_ut_execute_STA (
  484. struct acpi_namespace_node *device_node,
  485. u32 *flags)
  486. {
  487. union acpi_operand_object *obj_desc;
  488. acpi_status status;
  489. ACPI_FUNCTION_TRACE ("ut_execute_STA");
  490. status = acpi_ut_evaluate_object (device_node, METHOD_NAME__STA,
  491. ACPI_BTYPE_INTEGER, &obj_desc);
  492. if (ACPI_FAILURE (status)) {
  493. if (AE_NOT_FOUND == status) {
  494. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  495. "_STA on %4.4s was not found, assuming device is present\n",
  496. acpi_ut_get_node_name (device_node)));
  497. *flags = 0x0F;
  498. status = AE_OK;
  499. }
  500. return_ACPI_STATUS (status);
  501. }
  502. /* Extract the status flags */
  503. *flags = (u32) obj_desc->integer.value;
  504. /* On exit, we must delete the return object */
  505. acpi_ut_remove_reference (obj_desc);
  506. return_ACPI_STATUS (status);
  507. }
  508. /*******************************************************************************
  509. *
  510. * FUNCTION: acpi_ut_execute_Sxds
  511. *
  512. * PARAMETERS: device_node - Node for the device
  513. * Flags - Where the status flags are returned
  514. *
  515. * RETURN: Status
  516. *
  517. * DESCRIPTION: Executes _STA for selected device and stores results in
  518. * *Flags.
  519. *
  520. * NOTE: Internal function, no parameter validation
  521. *
  522. ******************************************************************************/
  523. acpi_status
  524. acpi_ut_execute_sxds (
  525. struct acpi_namespace_node *device_node,
  526. u8 *highest)
  527. {
  528. union acpi_operand_object *obj_desc;
  529. acpi_status status;
  530. u32 i;
  531. ACPI_FUNCTION_TRACE ("ut_execute_Sxds");
  532. for (i = 0; i < 4; i++) {
  533. highest[i] = 0xFF;
  534. status = acpi_ut_evaluate_object (device_node,
  535. (char *) acpi_gbl_highest_dstate_names[i],
  536. ACPI_BTYPE_INTEGER, &obj_desc);
  537. if (ACPI_FAILURE (status)) {
  538. if (status != AE_NOT_FOUND) {
  539. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  540. "%s on Device %4.4s, %s\n",
  541. (char *) acpi_gbl_highest_dstate_names[i],
  542. acpi_ut_get_node_name (device_node),
  543. acpi_format_exception (status)));
  544. return_ACPI_STATUS (status);
  545. }
  546. }
  547. else {
  548. /* Extract the Dstate value */
  549. highest[i] = (u8) obj_desc->integer.value;
  550. /* Delete the return object */
  551. acpi_ut_remove_reference (obj_desc);
  552. }
  553. }
  554. return_ACPI_STATUS (AE_OK);
  555. }