/drivers/acpi/acpica/dsopcode.c

http://github.com/mirrors/linux · C · 761 lines · 394 code · 158 blank · 209 comment · 47 complexity · aa765ad7aacf353edae28c1f1889f47a MD5 · raw file

  1. // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
  2. /******************************************************************************
  3. *
  4. * Module Name: dsopcode - Dispatcher support for regions and fields
  5. *
  6. * Copyright (C) 2000 - 2020, Intel Corp.
  7. *
  8. *****************************************************************************/
  9. #include <acpi/acpi.h>
  10. #include "accommon.h"
  11. #include "acparser.h"
  12. #include "amlcode.h"
  13. #include "acdispat.h"
  14. #include "acinterp.h"
  15. #include "acnamesp.h"
  16. #include "acevents.h"
  17. #include "actables.h"
  18. #define _COMPONENT ACPI_DISPATCHER
  19. ACPI_MODULE_NAME("dsopcode")
  20. /* Local prototypes */
  21. static acpi_status
  22. acpi_ds_init_buffer_field(u16 aml_opcode,
  23. union acpi_operand_object *obj_desc,
  24. union acpi_operand_object *buffer_desc,
  25. union acpi_operand_object *offset_desc,
  26. union acpi_operand_object *length_desc,
  27. union acpi_operand_object *result_desc);
  28. /*******************************************************************************
  29. *
  30. * FUNCTION: acpi_ds_initialize_region
  31. *
  32. * PARAMETERS: obj_handle - Region namespace node
  33. *
  34. * RETURN: Status
  35. *
  36. * DESCRIPTION: Front end to ev_initialize_region
  37. *
  38. ******************************************************************************/
  39. acpi_status acpi_ds_initialize_region(acpi_handle obj_handle)
  40. {
  41. union acpi_operand_object *obj_desc;
  42. acpi_status status;
  43. obj_desc = acpi_ns_get_attached_object(obj_handle);
  44. /* Namespace is NOT locked */
  45. status = acpi_ev_initialize_region(obj_desc);
  46. return (status);
  47. }
  48. /*******************************************************************************
  49. *
  50. * FUNCTION: acpi_ds_init_buffer_field
  51. *
  52. * PARAMETERS: aml_opcode - create_xxx_field
  53. * obj_desc - buffer_field object
  54. * buffer_desc - Host Buffer
  55. * offset_desc - Offset into buffer
  56. * length_desc - Length of field (CREATE_FIELD_OP only)
  57. * result_desc - Where to store the result
  58. *
  59. * RETURN: Status
  60. *
  61. * DESCRIPTION: Perform actual initialization of a buffer field
  62. *
  63. ******************************************************************************/
  64. static acpi_status
  65. acpi_ds_init_buffer_field(u16 aml_opcode,
  66. union acpi_operand_object *obj_desc,
  67. union acpi_operand_object *buffer_desc,
  68. union acpi_operand_object *offset_desc,
  69. union acpi_operand_object *length_desc,
  70. union acpi_operand_object *result_desc)
  71. {
  72. u32 offset;
  73. u32 bit_offset;
  74. u32 bit_count;
  75. u8 field_flags;
  76. acpi_status status;
  77. ACPI_FUNCTION_TRACE_PTR(ds_init_buffer_field, obj_desc);
  78. /* Host object must be a Buffer */
  79. if (buffer_desc->common.type != ACPI_TYPE_BUFFER) {
  80. ACPI_ERROR((AE_INFO,
  81. "Target of Create Field is not a Buffer object - %s",
  82. acpi_ut_get_object_type_name(buffer_desc)));
  83. status = AE_AML_OPERAND_TYPE;
  84. goto cleanup;
  85. }
  86. /*
  87. * The last parameter to all of these opcodes (result_desc) started
  88. * out as a name_string, and should therefore now be a NS node
  89. * after resolution in acpi_ex_resolve_operands().
  90. */
  91. if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) {
  92. ACPI_ERROR((AE_INFO,
  93. "(%s) destination not a NS Node [%s]",
  94. acpi_ps_get_opcode_name(aml_opcode),
  95. acpi_ut_get_descriptor_name(result_desc)));
  96. status = AE_AML_OPERAND_TYPE;
  97. goto cleanup;
  98. }
  99. offset = (u32) offset_desc->integer.value;
  100. /*
  101. * Setup the Bit offsets and counts, according to the opcode
  102. */
  103. switch (aml_opcode) {
  104. case AML_CREATE_FIELD_OP:
  105. /* Offset is in bits, count is in bits */
  106. field_flags = AML_FIELD_ACCESS_BYTE;
  107. bit_offset = offset;
  108. bit_count = (u32) length_desc->integer.value;
  109. /* Must have a valid (>0) bit count */
  110. if (bit_count == 0) {
  111. ACPI_BIOS_ERROR((AE_INFO,
  112. "Attempt to CreateField of length zero"));
  113. status = AE_AML_OPERAND_VALUE;
  114. goto cleanup;
  115. }
  116. break;
  117. case AML_CREATE_BIT_FIELD_OP:
  118. /* Offset is in bits, Field is one bit */
  119. bit_offset = offset;
  120. bit_count = 1;
  121. field_flags = AML_FIELD_ACCESS_BYTE;
  122. break;
  123. case AML_CREATE_BYTE_FIELD_OP:
  124. /* Offset is in bytes, field is one byte */
  125. bit_offset = 8 * offset;
  126. bit_count = 8;
  127. field_flags = AML_FIELD_ACCESS_BYTE;
  128. break;
  129. case AML_CREATE_WORD_FIELD_OP:
  130. /* Offset is in bytes, field is one word */
  131. bit_offset = 8 * offset;
  132. bit_count = 16;
  133. field_flags = AML_FIELD_ACCESS_WORD;
  134. break;
  135. case AML_CREATE_DWORD_FIELD_OP:
  136. /* Offset is in bytes, field is one dword */
  137. bit_offset = 8 * offset;
  138. bit_count = 32;
  139. field_flags = AML_FIELD_ACCESS_DWORD;
  140. break;
  141. case AML_CREATE_QWORD_FIELD_OP:
  142. /* Offset is in bytes, field is one qword */
  143. bit_offset = 8 * offset;
  144. bit_count = 64;
  145. field_flags = AML_FIELD_ACCESS_QWORD;
  146. break;
  147. default:
  148. ACPI_ERROR((AE_INFO,
  149. "Unknown field creation opcode 0x%02X",
  150. aml_opcode));
  151. status = AE_AML_BAD_OPCODE;
  152. goto cleanup;
  153. }
  154. /* Entire field must fit within the current length of the buffer */
  155. if ((bit_offset + bit_count) > (8 * (u32)buffer_desc->buffer.length)) {
  156. status = AE_AML_BUFFER_LIMIT;
  157. ACPI_BIOS_EXCEPTION((AE_INFO, status,
  158. "Field [%4.4s] at bit offset/length %u/%u "
  159. "exceeds size of target Buffer (%u bits)",
  160. acpi_ut_get_node_name(result_desc),
  161. bit_offset, bit_count,
  162. 8 * (u32)buffer_desc->buffer.length));
  163. goto cleanup;
  164. }
  165. /*
  166. * Initialize areas of the field object that are common to all fields
  167. * For field_flags, use LOCK_RULE = 0 (NO_LOCK),
  168. * UPDATE_RULE = 0 (UPDATE_PRESERVE)
  169. */
  170. status =
  171. acpi_ex_prep_common_field_object(obj_desc, field_flags, 0,
  172. bit_offset, bit_count);
  173. if (ACPI_FAILURE(status)) {
  174. goto cleanup;
  175. }
  176. obj_desc->buffer_field.buffer_obj = buffer_desc;
  177. obj_desc->buffer_field.is_create_field =
  178. aml_opcode == AML_CREATE_FIELD_OP;
  179. /* Reference count for buffer_desc inherits obj_desc count */
  180. buffer_desc->common.reference_count = (u16)
  181. (buffer_desc->common.reference_count +
  182. obj_desc->common.reference_count);
  183. cleanup:
  184. /* Always delete the operands */
  185. acpi_ut_remove_reference(offset_desc);
  186. acpi_ut_remove_reference(buffer_desc);
  187. if (aml_opcode == AML_CREATE_FIELD_OP) {
  188. acpi_ut_remove_reference(length_desc);
  189. }
  190. /* On failure, delete the result descriptor */
  191. if (ACPI_FAILURE(status)) {
  192. acpi_ut_remove_reference(result_desc); /* Result descriptor */
  193. } else {
  194. /* Now the address and length are valid for this buffer_field */
  195. obj_desc->buffer_field.flags |= AOPOBJ_DATA_VALID;
  196. }
  197. return_ACPI_STATUS(status);
  198. }
  199. /*******************************************************************************
  200. *
  201. * FUNCTION: acpi_ds_eval_buffer_field_operands
  202. *
  203. * PARAMETERS: walk_state - Current walk
  204. * op - A valid buffer_field Op object
  205. *
  206. * RETURN: Status
  207. *
  208. * DESCRIPTION: Get buffer_field Buffer and Index
  209. * Called from acpi_ds_exec_end_op during buffer_field parse tree walk
  210. *
  211. ******************************************************************************/
  212. acpi_status
  213. acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
  214. union acpi_parse_object *op)
  215. {
  216. acpi_status status;
  217. union acpi_operand_object *obj_desc;
  218. struct acpi_namespace_node *node;
  219. union acpi_parse_object *next_op;
  220. ACPI_FUNCTION_TRACE_PTR(ds_eval_buffer_field_operands, op);
  221. /*
  222. * This is where we evaluate the address and length fields of the
  223. * create_xxx_field declaration
  224. */
  225. node = op->common.node;
  226. /* next_op points to the op that holds the Buffer */
  227. next_op = op->common.value.arg;
  228. /* Evaluate/create the address and length operands */
  229. status = acpi_ds_create_operands(walk_state, next_op);
  230. if (ACPI_FAILURE(status)) {
  231. return_ACPI_STATUS(status);
  232. }
  233. obj_desc = acpi_ns_get_attached_object(node);
  234. if (!obj_desc) {
  235. return_ACPI_STATUS(AE_NOT_EXIST);
  236. }
  237. /* Resolve the operands */
  238. status =
  239. acpi_ex_resolve_operands(op->common.aml_opcode, ACPI_WALK_OPERANDS,
  240. walk_state);
  241. if (ACPI_FAILURE(status)) {
  242. ACPI_ERROR((AE_INFO, "(%s) bad operand(s), status 0x%X",
  243. acpi_ps_get_opcode_name(op->common.aml_opcode),
  244. status));
  245. return_ACPI_STATUS(status);
  246. }
  247. /* Initialize the Buffer Field */
  248. if (op->common.aml_opcode == AML_CREATE_FIELD_OP) {
  249. /* NOTE: Slightly different operands for this opcode */
  250. status =
  251. acpi_ds_init_buffer_field(op->common.aml_opcode, obj_desc,
  252. walk_state->operands[0],
  253. walk_state->operands[1],
  254. walk_state->operands[2],
  255. walk_state->operands[3]);
  256. } else {
  257. /* All other, create_xxx_field opcodes */
  258. status =
  259. acpi_ds_init_buffer_field(op->common.aml_opcode, obj_desc,
  260. walk_state->operands[0],
  261. walk_state->operands[1], NULL,
  262. walk_state->operands[2]);
  263. }
  264. return_ACPI_STATUS(status);
  265. }
  266. /*******************************************************************************
  267. *
  268. * FUNCTION: acpi_ds_eval_region_operands
  269. *
  270. * PARAMETERS: walk_state - Current walk
  271. * op - A valid region Op object
  272. *
  273. * RETURN: Status
  274. *
  275. * DESCRIPTION: Get region address and length
  276. * Called from acpi_ds_exec_end_op during op_region parse tree walk
  277. *
  278. ******************************************************************************/
  279. acpi_status
  280. acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
  281. union acpi_parse_object *op)
  282. {
  283. acpi_status status;
  284. union acpi_operand_object *obj_desc;
  285. union acpi_operand_object *operand_desc;
  286. struct acpi_namespace_node *node;
  287. union acpi_parse_object *next_op;
  288. acpi_adr_space_type space_id;
  289. ACPI_FUNCTION_TRACE_PTR(ds_eval_region_operands, op);
  290. /*
  291. * This is where we evaluate the address and length fields of the
  292. * op_region declaration
  293. */
  294. node = op->common.node;
  295. /* next_op points to the op that holds the space_ID */
  296. next_op = op->common.value.arg;
  297. space_id = (acpi_adr_space_type)next_op->common.value.integer;
  298. /* next_op points to address op */
  299. next_op = next_op->common.next;
  300. /* Evaluate/create the address and length operands */
  301. status = acpi_ds_create_operands(walk_state, next_op);
  302. if (ACPI_FAILURE(status)) {
  303. return_ACPI_STATUS(status);
  304. }
  305. /* Resolve the length and address operands to numbers */
  306. status =
  307. acpi_ex_resolve_operands(op->common.aml_opcode, ACPI_WALK_OPERANDS,
  308. walk_state);
  309. if (ACPI_FAILURE(status)) {
  310. return_ACPI_STATUS(status);
  311. }
  312. obj_desc = acpi_ns_get_attached_object(node);
  313. if (!obj_desc) {
  314. return_ACPI_STATUS(AE_NOT_EXIST);
  315. }
  316. /*
  317. * Get the length operand and save it
  318. * (at Top of stack)
  319. */
  320. operand_desc = walk_state->operands[walk_state->num_operands - 1];
  321. obj_desc->region.length = (u32) operand_desc->integer.value;
  322. acpi_ut_remove_reference(operand_desc);
  323. /* A zero-length operation region is unusable. Just warn */
  324. if (!obj_desc->region.length
  325. && (space_id < ACPI_NUM_PREDEFINED_REGIONS)) {
  326. ACPI_WARNING((AE_INFO,
  327. "Operation Region [%4.4s] has zero length (SpaceId %X)",
  328. node->name.ascii, space_id));
  329. }
  330. /*
  331. * Get the address and save it
  332. * (at top of stack - 1)
  333. */
  334. operand_desc = walk_state->operands[walk_state->num_operands - 2];
  335. obj_desc->region.address = (acpi_physical_address)
  336. operand_desc->integer.value;
  337. acpi_ut_remove_reference(operand_desc);
  338. ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
  339. obj_desc,
  340. ACPI_FORMAT_UINT64(obj_desc->region.address),
  341. obj_desc->region.length));
  342. status = acpi_ut_add_address_range(obj_desc->region.space_id,
  343. obj_desc->region.address,
  344. obj_desc->region.length, node);
  345. /* Now the address and length are valid for this opregion */
  346. obj_desc->region.flags |= AOPOBJ_DATA_VALID;
  347. return_ACPI_STATUS(status);
  348. }
  349. /*******************************************************************************
  350. *
  351. * FUNCTION: acpi_ds_eval_table_region_operands
  352. *
  353. * PARAMETERS: walk_state - Current walk
  354. * op - A valid region Op object
  355. *
  356. * RETURN: Status
  357. *
  358. * DESCRIPTION: Get region address and length.
  359. * Called from acpi_ds_exec_end_op during data_table_region parse
  360. * tree walk.
  361. *
  362. ******************************************************************************/
  363. acpi_status
  364. acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
  365. union acpi_parse_object *op)
  366. {
  367. acpi_status status;
  368. union acpi_operand_object *obj_desc;
  369. union acpi_operand_object **operand;
  370. struct acpi_namespace_node *node;
  371. union acpi_parse_object *next_op;
  372. struct acpi_table_header *table;
  373. u32 table_index;
  374. ACPI_FUNCTION_TRACE_PTR(ds_eval_table_region_operands, op);
  375. /*
  376. * This is where we evaluate the Signature string, oem_id string,
  377. * and oem_table_id string of the Data Table Region declaration
  378. */
  379. node = op->common.node;
  380. /* next_op points to Signature string op */
  381. next_op = op->common.value.arg;
  382. /*
  383. * Evaluate/create the Signature string, oem_id string,
  384. * and oem_table_id string operands
  385. */
  386. status = acpi_ds_create_operands(walk_state, next_op);
  387. if (ACPI_FAILURE(status)) {
  388. return_ACPI_STATUS(status);
  389. }
  390. operand = &walk_state->operands[0];
  391. /*
  392. * Resolve the Signature string, oem_id string,
  393. * and oem_table_id string operands
  394. */
  395. status =
  396. acpi_ex_resolve_operands(op->common.aml_opcode, ACPI_WALK_OPERANDS,
  397. walk_state);
  398. if (ACPI_FAILURE(status)) {
  399. goto cleanup;
  400. }
  401. /* Find the ACPI table */
  402. status = acpi_tb_find_table(operand[0]->string.pointer,
  403. operand[1]->string.pointer,
  404. operand[2]->string.pointer, &table_index);
  405. if (ACPI_FAILURE(status)) {
  406. if (status == AE_NOT_FOUND) {
  407. ACPI_ERROR((AE_INFO,
  408. "ACPI Table [%4.4s] OEM:(%s, %s) not found in RSDT/XSDT",
  409. operand[0]->string.pointer,
  410. operand[1]->string.pointer,
  411. operand[2]->string.pointer));
  412. }
  413. goto cleanup;
  414. }
  415. status = acpi_get_table_by_index(table_index, &table);
  416. if (ACPI_FAILURE(status)) {
  417. goto cleanup;
  418. }
  419. obj_desc = acpi_ns_get_attached_object(node);
  420. if (!obj_desc) {
  421. status = AE_NOT_EXIST;
  422. goto cleanup;
  423. }
  424. obj_desc->region.address = ACPI_PTR_TO_PHYSADDR(table);
  425. obj_desc->region.length = table->length;
  426. ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
  427. obj_desc,
  428. ACPI_FORMAT_UINT64(obj_desc->region.address),
  429. obj_desc->region.length));
  430. /* Now the address and length are valid for this opregion */
  431. obj_desc->region.flags |= AOPOBJ_DATA_VALID;
  432. cleanup:
  433. acpi_ut_remove_reference(operand[0]);
  434. acpi_ut_remove_reference(operand[1]);
  435. acpi_ut_remove_reference(operand[2]);
  436. return_ACPI_STATUS(status);
  437. }
  438. /*******************************************************************************
  439. *
  440. * FUNCTION: acpi_ds_eval_data_object_operands
  441. *
  442. * PARAMETERS: walk_state - Current walk
  443. * op - A valid data_object Op object
  444. * obj_desc - data_object
  445. *
  446. * RETURN: Status
  447. *
  448. * DESCRIPTION: Get the operands and complete the following data object types:
  449. * Buffer, Package.
  450. *
  451. ******************************************************************************/
  452. acpi_status
  453. acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
  454. union acpi_parse_object *op,
  455. union acpi_operand_object *obj_desc)
  456. {
  457. acpi_status status;
  458. union acpi_operand_object *arg_desc;
  459. u32 length;
  460. ACPI_FUNCTION_TRACE(ds_eval_data_object_operands);
  461. /* The first operand (for all of these data objects) is the length */
  462. /*
  463. * Set proper index into operand stack for acpi_ds_obj_stack_push
  464. * invoked inside acpi_ds_create_operand.
  465. */
  466. walk_state->operand_index = walk_state->num_operands;
  467. /* Ignore if child is not valid */
  468. if (!op->common.value.arg) {
  469. ACPI_ERROR((AE_INFO,
  470. "Missing child while evaluating opcode %4.4X, Op %p",
  471. op->common.aml_opcode, op));
  472. return_ACPI_STATUS(AE_OK);
  473. }
  474. status = acpi_ds_create_operand(walk_state, op->common.value.arg, 1);
  475. if (ACPI_FAILURE(status)) {
  476. return_ACPI_STATUS(status);
  477. }
  478. status = acpi_ex_resolve_operands(walk_state->opcode,
  479. &(walk_state->
  480. operands[walk_state->num_operands -
  481. 1]), walk_state);
  482. if (ACPI_FAILURE(status)) {
  483. return_ACPI_STATUS(status);
  484. }
  485. /* Extract length operand */
  486. arg_desc = walk_state->operands[walk_state->num_operands - 1];
  487. length = (u32) arg_desc->integer.value;
  488. /* Cleanup for length operand */
  489. status = acpi_ds_obj_stack_pop(1, walk_state);
  490. if (ACPI_FAILURE(status)) {
  491. return_ACPI_STATUS(status);
  492. }
  493. acpi_ut_remove_reference(arg_desc);
  494. /*
  495. * Create the actual data object
  496. */
  497. switch (op->common.aml_opcode) {
  498. case AML_BUFFER_OP:
  499. status =
  500. acpi_ds_build_internal_buffer_obj(walk_state, op, length,
  501. &obj_desc);
  502. break;
  503. case AML_PACKAGE_OP:
  504. case AML_VARIABLE_PACKAGE_OP:
  505. status =
  506. acpi_ds_build_internal_package_obj(walk_state, op, length,
  507. &obj_desc);
  508. break;
  509. default:
  510. return_ACPI_STATUS(AE_AML_BAD_OPCODE);
  511. }
  512. if (ACPI_SUCCESS(status)) {
  513. /*
  514. * Return the object in the walk_state, unless the parent is a package -
  515. * in this case, the return object will be stored in the parse tree
  516. * for the package.
  517. */
  518. if ((!op->common.parent) ||
  519. ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) &&
  520. (op->common.parent->common.aml_opcode !=
  521. AML_VARIABLE_PACKAGE_OP)
  522. && (op->common.parent->common.aml_opcode !=
  523. AML_NAME_OP))) {
  524. walk_state->result_obj = obj_desc;
  525. }
  526. }
  527. return_ACPI_STATUS(status);
  528. }
  529. /*******************************************************************************
  530. *
  531. * FUNCTION: acpi_ds_eval_bank_field_operands
  532. *
  533. * PARAMETERS: walk_state - Current walk
  534. * op - A valid bank_field Op object
  535. *
  536. * RETURN: Status
  537. *
  538. * DESCRIPTION: Get bank_field bank_value
  539. * Called from acpi_ds_exec_end_op during bank_field parse tree walk
  540. *
  541. ******************************************************************************/
  542. acpi_status
  543. acpi_ds_eval_bank_field_operands(struct acpi_walk_state *walk_state,
  544. union acpi_parse_object *op)
  545. {
  546. acpi_status status;
  547. union acpi_operand_object *obj_desc;
  548. union acpi_operand_object *operand_desc;
  549. struct acpi_namespace_node *node;
  550. union acpi_parse_object *next_op;
  551. union acpi_parse_object *arg;
  552. ACPI_FUNCTION_TRACE_PTR(ds_eval_bank_field_operands, op);
  553. /*
  554. * This is where we evaluate the bank_value field of the
  555. * bank_field declaration
  556. */
  557. /* next_op points to the op that holds the Region */
  558. next_op = op->common.value.arg;
  559. /* next_op points to the op that holds the Bank Register */
  560. next_op = next_op->common.next;
  561. /* next_op points to the op that holds the Bank Value */
  562. next_op = next_op->common.next;
  563. /*
  564. * Set proper index into operand stack for acpi_ds_obj_stack_push
  565. * invoked inside acpi_ds_create_operand.
  566. *
  567. * We use walk_state->Operands[0] to store the evaluated bank_value
  568. */
  569. walk_state->operand_index = 0;
  570. status = acpi_ds_create_operand(walk_state, next_op, 0);
  571. if (ACPI_FAILURE(status)) {
  572. return_ACPI_STATUS(status);
  573. }
  574. status = acpi_ex_resolve_to_value(&walk_state->operands[0], walk_state);
  575. if (ACPI_FAILURE(status)) {
  576. return_ACPI_STATUS(status);
  577. }
  578. ACPI_DUMP_OPERANDS(ACPI_WALK_OPERANDS,
  579. acpi_ps_get_opcode_name(op->common.aml_opcode), 1);
  580. /*
  581. * Get the bank_value operand and save it
  582. * (at Top of stack)
  583. */
  584. operand_desc = walk_state->operands[0];
  585. /* Arg points to the start Bank Field */
  586. arg = acpi_ps_get_arg(op, 4);
  587. while (arg) {
  588. /* Ignore OFFSET and ACCESSAS terms here */
  589. if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) {
  590. node = arg->common.node;
  591. obj_desc = acpi_ns_get_attached_object(node);
  592. if (!obj_desc) {
  593. return_ACPI_STATUS(AE_NOT_EXIST);
  594. }
  595. obj_desc->bank_field.value =
  596. (u32) operand_desc->integer.value;
  597. }
  598. /* Move to next field in the list */
  599. arg = arg->common.next;
  600. }
  601. acpi_ut_remove_reference(operand_desc);
  602. return_ACPI_STATUS(status);
  603. }