dswload2.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. /******************************************************************************
  2. *
  3. * Module Name: dswload2 - Dispatcher second pass namespace load callbacks
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2012, Intel Corp.
  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 "accommon.h"
  44. #include "acparser.h"
  45. #include "amlcode.h"
  46. #include "acdispat.h"
  47. #include "acinterp.h"
  48. #include "acnamesp.h"
  49. #include "acevents.h"
  50. #define _COMPONENT ACPI_DISPATCHER
  51. ACPI_MODULE_NAME("dswload2")
  52. /*******************************************************************************
  53. *
  54. * FUNCTION: acpi_ds_load2_begin_op
  55. *
  56. * PARAMETERS: walk_state - Current state of the parse tree walk
  57. * out_op - Wher to return op if a new one is created
  58. *
  59. * RETURN: Status
  60. *
  61. * DESCRIPTION: Descending callback used during the loading of ACPI tables.
  62. *
  63. ******************************************************************************/
  64. acpi_status
  65. acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
  66. union acpi_parse_object **out_op)
  67. {
  68. union acpi_parse_object *op;
  69. struct acpi_namespace_node *node;
  70. acpi_status status;
  71. acpi_object_type object_type;
  72. char *buffer_ptr;
  73. u32 flags;
  74. ACPI_FUNCTION_TRACE(ds_load2_begin_op);
  75. op = walk_state->op;
  76. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Op=%p State=%p\n", op,
  77. walk_state));
  78. if (op) {
  79. if ((walk_state->control_state) &&
  80. (walk_state->control_state->common.state ==
  81. ACPI_CONTROL_CONDITIONAL_EXECUTING)) {
  82. /* We are executing a while loop outside of a method */
  83. status = acpi_ds_exec_begin_op(walk_state, out_op);
  84. return_ACPI_STATUS(status);
  85. }
  86. /* We only care about Namespace opcodes here */
  87. if ((!(walk_state->op_info->flags & AML_NSOPCODE) &&
  88. (walk_state->opcode != AML_INT_NAMEPATH_OP)) ||
  89. (!(walk_state->op_info->flags & AML_NAMED))) {
  90. return_ACPI_STATUS(AE_OK);
  91. }
  92. /* Get the name we are going to enter or lookup in the namespace */
  93. if (walk_state->opcode == AML_INT_NAMEPATH_OP) {
  94. /* For Namepath op, get the path string */
  95. buffer_ptr = op->common.value.string;
  96. if (!buffer_ptr) {
  97. /* No name, just exit */
  98. return_ACPI_STATUS(AE_OK);
  99. }
  100. } else {
  101. /* Get name from the op */
  102. buffer_ptr = ACPI_CAST_PTR(char, &op->named.name);
  103. }
  104. } else {
  105. /* Get the namestring from the raw AML */
  106. buffer_ptr =
  107. acpi_ps_get_next_namestring(&walk_state->parser_state);
  108. }
  109. /* Map the opcode into an internal object type */
  110. object_type = walk_state->op_info->object_type;
  111. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  112. "State=%p Op=%p Type=%X\n", walk_state, op,
  113. object_type));
  114. switch (walk_state->opcode) {
  115. case AML_FIELD_OP:
  116. case AML_BANK_FIELD_OP:
  117. case AML_INDEX_FIELD_OP:
  118. node = NULL;
  119. status = AE_OK;
  120. break;
  121. case AML_INT_NAMEPATH_OP:
  122. /*
  123. * The name_path is an object reference to an existing object.
  124. * Don't enter the name into the namespace, but look it up
  125. * for use later.
  126. */
  127. status =
  128. acpi_ns_lookup(walk_state->scope_info, buffer_ptr,
  129. object_type, ACPI_IMODE_EXECUTE,
  130. ACPI_NS_SEARCH_PARENT, walk_state, &(node));
  131. break;
  132. case AML_SCOPE_OP:
  133. /* Special case for Scope(\) -> refers to the Root node */
  134. if (op && (op->named.node == acpi_gbl_root_node)) {
  135. node = op->named.node;
  136. status =
  137. acpi_ds_scope_stack_push(node, object_type,
  138. walk_state);
  139. if (ACPI_FAILURE(status)) {
  140. return_ACPI_STATUS(status);
  141. }
  142. } else {
  143. /*
  144. * The Path is an object reference to an existing object.
  145. * Don't enter the name into the namespace, but look it up
  146. * for use later.
  147. */
  148. status =
  149. acpi_ns_lookup(walk_state->scope_info, buffer_ptr,
  150. object_type, ACPI_IMODE_EXECUTE,
  151. ACPI_NS_SEARCH_PARENT, walk_state,
  152. &(node));
  153. if (ACPI_FAILURE(status)) {
  154. #ifdef ACPI_ASL_COMPILER
  155. if (status == AE_NOT_FOUND) {
  156. status = AE_OK;
  157. } else {
  158. ACPI_ERROR_NAMESPACE(buffer_ptr,
  159. status);
  160. }
  161. #else
  162. ACPI_ERROR_NAMESPACE(buffer_ptr, status);
  163. #endif
  164. return_ACPI_STATUS(status);
  165. }
  166. }
  167. /*
  168. * We must check to make sure that the target is
  169. * one of the opcodes that actually opens a scope
  170. */
  171. switch (node->type) {
  172. case ACPI_TYPE_ANY:
  173. case ACPI_TYPE_LOCAL_SCOPE: /* Scope */
  174. case ACPI_TYPE_DEVICE:
  175. case ACPI_TYPE_POWER:
  176. case ACPI_TYPE_PROCESSOR:
  177. case ACPI_TYPE_THERMAL:
  178. /* These are acceptable types */
  179. break;
  180. case ACPI_TYPE_INTEGER:
  181. case ACPI_TYPE_STRING:
  182. case ACPI_TYPE_BUFFER:
  183. /*
  184. * These types we will allow, but we will change the type.
  185. * This enables some existing code of the form:
  186. *
  187. * Name (DEB, 0)
  188. * Scope (DEB) { ... }
  189. */
  190. ACPI_WARNING((AE_INFO,
  191. "Type override - [%4.4s] had invalid type (%s) "
  192. "for Scope operator, changed to type ANY\n",
  193. acpi_ut_get_node_name(node),
  194. acpi_ut_get_type_name(node->type)));
  195. node->type = ACPI_TYPE_ANY;
  196. walk_state->scope_info->common.value = ACPI_TYPE_ANY;
  197. break;
  198. default:
  199. /* All other types are an error */
  200. ACPI_ERROR((AE_INFO,
  201. "Invalid type (%s) for target of "
  202. "Scope operator [%4.4s] (Cannot override)",
  203. acpi_ut_get_type_name(node->type),
  204. acpi_ut_get_node_name(node)));
  205. return (AE_AML_OPERAND_TYPE);
  206. }
  207. break;
  208. default:
  209. /* All other opcodes */
  210. if (op && op->common.node) {
  211. /* This op/node was previously entered into the namespace */
  212. node = op->common.node;
  213. if (acpi_ns_opens_scope(object_type)) {
  214. status =
  215. acpi_ds_scope_stack_push(node, object_type,
  216. walk_state);
  217. if (ACPI_FAILURE(status)) {
  218. return_ACPI_STATUS(status);
  219. }
  220. }
  221. return_ACPI_STATUS(AE_OK);
  222. }
  223. /*
  224. * Enter the named type into the internal namespace. We enter the name
  225. * as we go downward in the parse tree. Any necessary subobjects that
  226. * involve arguments to the opcode must be created as we go back up the
  227. * parse tree later.
  228. *
  229. * Note: Name may already exist if we are executing a deferred opcode.
  230. */
  231. if (walk_state->deferred_node) {
  232. /* This name is already in the namespace, get the node */
  233. node = walk_state->deferred_node;
  234. status = AE_OK;
  235. break;
  236. }
  237. flags = ACPI_NS_NO_UPSEARCH;
  238. if (walk_state->pass_number == ACPI_IMODE_EXECUTE) {
  239. /* Execution mode, node cannot already exist, node is temporary */
  240. flags |= ACPI_NS_ERROR_IF_FOUND;
  241. if (!
  242. (walk_state->
  243. parse_flags & ACPI_PARSE_MODULE_LEVEL)) {
  244. flags |= ACPI_NS_TEMPORARY;
  245. }
  246. }
  247. /* Add new entry or lookup existing entry */
  248. status =
  249. acpi_ns_lookup(walk_state->scope_info, buffer_ptr,
  250. object_type, ACPI_IMODE_LOAD_PASS2, flags,
  251. walk_state, &node);
  252. if (ACPI_SUCCESS(status) && (flags & ACPI_NS_TEMPORARY)) {
  253. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  254. "***New Node [%4.4s] %p is temporary\n",
  255. acpi_ut_get_node_name(node), node));
  256. }
  257. break;
  258. }
  259. if (ACPI_FAILURE(status)) {
  260. ACPI_ERROR_NAMESPACE(buffer_ptr, status);
  261. return_ACPI_STATUS(status);
  262. }
  263. if (!op) {
  264. /* Create a new op */
  265. op = acpi_ps_alloc_op(walk_state->opcode);
  266. if (!op) {
  267. return_ACPI_STATUS(AE_NO_MEMORY);
  268. }
  269. /* Initialize the new op */
  270. if (node) {
  271. op->named.name = node->name.integer;
  272. }
  273. *out_op = op;
  274. }
  275. /*
  276. * Put the Node in the "op" object that the parser uses, so we
  277. * can get it again quickly when this scope is closed
  278. */
  279. op->common.node = node;
  280. return_ACPI_STATUS(status);
  281. }
  282. /*******************************************************************************
  283. *
  284. * FUNCTION: acpi_ds_load2_end_op
  285. *
  286. * PARAMETERS: walk_state - Current state of the parse tree walk
  287. *
  288. * RETURN: Status
  289. *
  290. * DESCRIPTION: Ascending callback used during the loading of the namespace,
  291. * both control methods and everything else.
  292. *
  293. ******************************************************************************/
  294. acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
  295. {
  296. union acpi_parse_object *op;
  297. acpi_status status = AE_OK;
  298. acpi_object_type object_type;
  299. struct acpi_namespace_node *node;
  300. union acpi_parse_object *arg;
  301. struct acpi_namespace_node *new_node;
  302. #ifndef ACPI_NO_METHOD_EXECUTION
  303. u32 i;
  304. u8 region_space;
  305. #endif
  306. ACPI_FUNCTION_TRACE(ds_load2_end_op);
  307. op = walk_state->op;
  308. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Opcode [%s] Op %p State %p\n",
  309. walk_state->op_info->name, op, walk_state));
  310. /* Check if opcode had an associated namespace object */
  311. if (!(walk_state->op_info->flags & AML_NSOBJECT)) {
  312. return_ACPI_STATUS(AE_OK);
  313. }
  314. if (op->common.aml_opcode == AML_SCOPE_OP) {
  315. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  316. "Ending scope Op=%p State=%p\n", op,
  317. walk_state));
  318. }
  319. object_type = walk_state->op_info->object_type;
  320. /*
  321. * Get the Node/name from the earlier lookup
  322. * (It was saved in the *op structure)
  323. */
  324. node = op->common.node;
  325. /*
  326. * Put the Node on the object stack (Contains the ACPI Name of
  327. * this object)
  328. */
  329. walk_state->operands[0] = (void *)node;
  330. walk_state->num_operands = 1;
  331. /* Pop the scope stack */
  332. if (acpi_ns_opens_scope(object_type) &&
  333. (op->common.aml_opcode != AML_INT_METHODCALL_OP)) {
  334. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  335. "(%s) Popping scope for Op %p\n",
  336. acpi_ut_get_type_name(object_type), op));
  337. status = acpi_ds_scope_stack_pop(walk_state);
  338. if (ACPI_FAILURE(status)) {
  339. goto cleanup;
  340. }
  341. }
  342. /*
  343. * Named operations are as follows:
  344. *
  345. * AML_ALIAS
  346. * AML_BANKFIELD
  347. * AML_CREATEBITFIELD
  348. * AML_CREATEBYTEFIELD
  349. * AML_CREATEDWORDFIELD
  350. * AML_CREATEFIELD
  351. * AML_CREATEQWORDFIELD
  352. * AML_CREATEWORDFIELD
  353. * AML_DATA_REGION
  354. * AML_DEVICE
  355. * AML_EVENT
  356. * AML_FIELD
  357. * AML_INDEXFIELD
  358. * AML_METHOD
  359. * AML_METHODCALL
  360. * AML_MUTEX
  361. * AML_NAME
  362. * AML_NAMEDFIELD
  363. * AML_OPREGION
  364. * AML_POWERRES
  365. * AML_PROCESSOR
  366. * AML_SCOPE
  367. * AML_THERMALZONE
  368. */
  369. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  370. "Create-Load [%s] State=%p Op=%p NamedObj=%p\n",
  371. acpi_ps_get_opcode_name(op->common.aml_opcode),
  372. walk_state, op, node));
  373. /* Decode the opcode */
  374. arg = op->common.value.arg;
  375. switch (walk_state->op_info->type) {
  376. #ifndef ACPI_NO_METHOD_EXECUTION
  377. case AML_TYPE_CREATE_FIELD:
  378. /*
  379. * Create the field object, but the field buffer and index must
  380. * be evaluated later during the execution phase
  381. */
  382. status = acpi_ds_create_buffer_field(op, walk_state);
  383. break;
  384. case AML_TYPE_NAMED_FIELD:
  385. /*
  386. * If we are executing a method, initialize the field
  387. */
  388. if (walk_state->method_node) {
  389. status = acpi_ds_init_field_objects(op, walk_state);
  390. }
  391. switch (op->common.aml_opcode) {
  392. case AML_INDEX_FIELD_OP:
  393. status =
  394. acpi_ds_create_index_field(op,
  395. (acpi_handle) arg->
  396. common.node, walk_state);
  397. break;
  398. case AML_BANK_FIELD_OP:
  399. status =
  400. acpi_ds_create_bank_field(op, arg->common.node,
  401. walk_state);
  402. break;
  403. case AML_FIELD_OP:
  404. status =
  405. acpi_ds_create_field(op, arg->common.node,
  406. walk_state);
  407. break;
  408. default:
  409. /* All NAMED_FIELD opcodes must be handled above */
  410. break;
  411. }
  412. break;
  413. case AML_TYPE_NAMED_SIMPLE:
  414. status = acpi_ds_create_operands(walk_state, arg);
  415. if (ACPI_FAILURE(status)) {
  416. goto cleanup;
  417. }
  418. switch (op->common.aml_opcode) {
  419. case AML_PROCESSOR_OP:
  420. status = acpi_ex_create_processor(walk_state);
  421. break;
  422. case AML_POWER_RES_OP:
  423. status = acpi_ex_create_power_resource(walk_state);
  424. break;
  425. case AML_MUTEX_OP:
  426. status = acpi_ex_create_mutex(walk_state);
  427. break;
  428. case AML_EVENT_OP:
  429. status = acpi_ex_create_event(walk_state);
  430. break;
  431. case AML_ALIAS_OP:
  432. status = acpi_ex_create_alias(walk_state);
  433. break;
  434. default:
  435. /* Unknown opcode */
  436. status = AE_OK;
  437. goto cleanup;
  438. }
  439. /* Delete operands */
  440. for (i = 1; i < walk_state->num_operands; i++) {
  441. acpi_ut_remove_reference(walk_state->operands[i]);
  442. walk_state->operands[i] = NULL;
  443. }
  444. break;
  445. #endif /* ACPI_NO_METHOD_EXECUTION */
  446. case AML_TYPE_NAMED_COMPLEX:
  447. switch (op->common.aml_opcode) {
  448. #ifndef ACPI_NO_METHOD_EXECUTION
  449. case AML_REGION_OP:
  450. case AML_DATA_REGION_OP:
  451. if (op->common.aml_opcode == AML_REGION_OP) {
  452. region_space = (acpi_adr_space_type)
  453. ((op->common.value.arg)->common.value.
  454. integer);
  455. } else {
  456. region_space = ACPI_ADR_SPACE_DATA_TABLE;
  457. }
  458. /*
  459. * The op_region is not fully parsed at this time. The only valid
  460. * argument is the space_id. (We must save the address of the
  461. * AML of the address and length operands)
  462. *
  463. * If we have a valid region, initialize it. The namespace is
  464. * unlocked at this point.
  465. *
  466. * Need to unlock interpreter if it is locked (if we are running
  467. * a control method), in order to allow _REG methods to be run
  468. * during acpi_ev_initialize_region.
  469. */
  470. if (walk_state->method_node) {
  471. /*
  472. * Executing a method: initialize the region and unlock
  473. * the interpreter
  474. */
  475. status =
  476. acpi_ex_create_region(op->named.data,
  477. op->named.length,
  478. region_space,
  479. walk_state);
  480. if (ACPI_FAILURE(status)) {
  481. return (status);
  482. }
  483. acpi_ex_exit_interpreter();
  484. }
  485. status =
  486. acpi_ev_initialize_region
  487. (acpi_ns_get_attached_object(node), FALSE);
  488. if (walk_state->method_node) {
  489. acpi_ex_enter_interpreter();
  490. }
  491. if (ACPI_FAILURE(status)) {
  492. /*
  493. * If AE_NOT_EXIST is returned, it is not fatal
  494. * because many regions get created before a handler
  495. * is installed for said region.
  496. */
  497. if (AE_NOT_EXIST == status) {
  498. status = AE_OK;
  499. }
  500. }
  501. break;
  502. case AML_NAME_OP:
  503. status = acpi_ds_create_node(walk_state, node, op);
  504. break;
  505. case AML_METHOD_OP:
  506. /*
  507. * method_op pkg_length name_string method_flags term_list
  508. *
  509. * Note: We must create the method node/object pair as soon as we
  510. * see the method declaration. This allows later pass1 parsing
  511. * of invocations of the method (need to know the number of
  512. * arguments.)
  513. */
  514. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  515. "LOADING-Method: State=%p Op=%p NamedObj=%p\n",
  516. walk_state, op, op->named.node));
  517. if (!acpi_ns_get_attached_object(op->named.node)) {
  518. walk_state->operands[0] =
  519. ACPI_CAST_PTR(void, op->named.node);
  520. walk_state->num_operands = 1;
  521. status =
  522. acpi_ds_create_operands(walk_state,
  523. op->common.value.
  524. arg);
  525. if (ACPI_SUCCESS(status)) {
  526. status =
  527. acpi_ex_create_method(op->named.
  528. data,
  529. op->named.
  530. length,
  531. walk_state);
  532. }
  533. walk_state->operands[0] = NULL;
  534. walk_state->num_operands = 0;
  535. if (ACPI_FAILURE(status)) {
  536. return_ACPI_STATUS(status);
  537. }
  538. }
  539. break;
  540. #endif /* ACPI_NO_METHOD_EXECUTION */
  541. default:
  542. /* All NAMED_COMPLEX opcodes must be handled above */
  543. break;
  544. }
  545. break;
  546. case AML_CLASS_INTERNAL:
  547. /* case AML_INT_NAMEPATH_OP: */
  548. break;
  549. case AML_CLASS_METHOD_CALL:
  550. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  551. "RESOLVING-MethodCall: State=%p Op=%p NamedObj=%p\n",
  552. walk_state, op, node));
  553. /*
  554. * Lookup the method name and save the Node
  555. */
  556. status =
  557. acpi_ns_lookup(walk_state->scope_info,
  558. arg->common.value.string, ACPI_TYPE_ANY,
  559. ACPI_IMODE_LOAD_PASS2,
  560. ACPI_NS_SEARCH_PARENT |
  561. ACPI_NS_DONT_OPEN_SCOPE, walk_state,
  562. &(new_node));
  563. if (ACPI_SUCCESS(status)) {
  564. /*
  565. * Make sure that what we found is indeed a method
  566. * We didn't search for a method on purpose, to see if the name
  567. * would resolve
  568. */
  569. if (new_node->type != ACPI_TYPE_METHOD) {
  570. status = AE_AML_OPERAND_TYPE;
  571. }
  572. /* We could put the returned object (Node) on the object stack for
  573. * later, but for now, we will put it in the "op" object that the
  574. * parser uses, so we can get it again at the end of this scope
  575. */
  576. op->common.node = new_node;
  577. } else {
  578. ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
  579. }
  580. break;
  581. default:
  582. break;
  583. }
  584. cleanup:
  585. /* Remove the Node pushed at the very beginning */
  586. walk_state->operands[0] = NULL;
  587. walk_state->num_operands = 0;
  588. return_ACPI_STATUS(status);
  589. }