exmisc.c (cb5629b10d64a8006622ce3a52bc887d91057d69) | exmisc.c (3371c19c294a4cb3649aa4e84606be8a1d999e61) |
---|---|
1 2/****************************************************************************** 3 * 4 * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes 5 * 6 *****************************************************************************/ 7 8/* --- 66 unchanged lines hidden (view full) --- 75 76 ACPI_FUNCTION_TRACE_PTR(ex_get_object_reference, obj_desc); 77 78 *return_desc = NULL; 79 80 switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) { 81 case ACPI_DESC_TYPE_OPERAND: 82 | 1 2/****************************************************************************** 3 * 4 * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes 5 * 6 *****************************************************************************/ 7 8/* --- 66 unchanged lines hidden (view full) --- 75 76 ACPI_FUNCTION_TRACE_PTR(ex_get_object_reference, obj_desc); 77 78 *return_desc = NULL; 79 80 switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) { 81 case ACPI_DESC_TYPE_OPERAND: 82 |
83 if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_LOCAL_REFERENCE) { | 83 if (obj_desc->common.type != ACPI_TYPE_LOCAL_REFERENCE) { |
84 return_ACPI_STATUS(AE_AML_OPERAND_TYPE); 85 } 86 87 /* 88 * Must be a reference to a Local or Arg 89 */ 90 switch (obj_desc->reference.class) { 91 case ACPI_REFCLASS_LOCAL: --- 163 unchanged lines hidden (view full) --- 255 256 /* 257 * Convert the second operand if necessary. The first operand 258 * determines the type of the second operand, (See the Data Types 259 * section of the ACPI specification.) Both object types are 260 * guaranteed to be either Integer/String/Buffer by the operand 261 * resolution mechanism. 262 */ | 84 return_ACPI_STATUS(AE_AML_OPERAND_TYPE); 85 } 86 87 /* 88 * Must be a reference to a Local or Arg 89 */ 90 switch (obj_desc->reference.class) { 91 case ACPI_REFCLASS_LOCAL: --- 163 unchanged lines hidden (view full) --- 255 256 /* 257 * Convert the second operand if necessary. The first operand 258 * determines the type of the second operand, (See the Data Types 259 * section of the ACPI specification.) Both object types are 260 * guaranteed to be either Integer/String/Buffer by the operand 261 * resolution mechanism. 262 */ |
263 switch (ACPI_GET_OBJECT_TYPE(operand0)) { | 263 switch (operand0->common.type) { |
264 case ACPI_TYPE_INTEGER: 265 status = 266 acpi_ex_convert_to_integer(operand1, &local_operand1, 16); 267 break; 268 269 case ACPI_TYPE_STRING: 270 status = acpi_ex_convert_to_string(operand1, &local_operand1, 271 ACPI_IMPLICIT_CONVERT_HEX); 272 break; 273 274 case ACPI_TYPE_BUFFER: 275 status = acpi_ex_convert_to_buffer(operand1, &local_operand1); 276 break; 277 278 default: 279 ACPI_ERROR((AE_INFO, "Invalid object type: %X", | 264 case ACPI_TYPE_INTEGER: 265 status = 266 acpi_ex_convert_to_integer(operand1, &local_operand1, 16); 267 break; 268 269 case ACPI_TYPE_STRING: 270 status = acpi_ex_convert_to_string(operand1, &local_operand1, 271 ACPI_IMPLICIT_CONVERT_HEX); 272 break; 273 274 case ACPI_TYPE_BUFFER: 275 status = acpi_ex_convert_to_buffer(operand1, &local_operand1); 276 break; 277 278 default: 279 ACPI_ERROR((AE_INFO, "Invalid object type: %X", |
280 ACPI_GET_OBJECT_TYPE(operand0))); | 280 operand0->common.type)); |
281 status = AE_AML_INTERNAL; 282 } 283 284 if (ACPI_FAILURE(status)) { 285 goto cleanup; 286 } 287 288 /* --- 4 unchanged lines hidden (view full) --- 293 294 /* 295 * There are three cases to handle: 296 * 297 * 1) Two Integers concatenated to produce a new Buffer 298 * 2) Two Strings concatenated to produce a new String 299 * 3) Two Buffers concatenated to produce a new Buffer 300 */ | 281 status = AE_AML_INTERNAL; 282 } 283 284 if (ACPI_FAILURE(status)) { 285 goto cleanup; 286 } 287 288 /* --- 4 unchanged lines hidden (view full) --- 293 294 /* 295 * There are three cases to handle: 296 * 297 * 1) Two Integers concatenated to produce a new Buffer 298 * 2) Two Strings concatenated to produce a new String 299 * 3) Two Buffers concatenated to produce a new Buffer 300 */ |
301 switch (ACPI_GET_OBJECT_TYPE(operand0)) { | 301 switch (operand0->common.type) { |
302 case ACPI_TYPE_INTEGER: 303 304 /* Result of two Integers is a Buffer */ 305 /* Need enough buffer space for two integers */ 306 307 return_desc = acpi_ut_create_buffer_object((acpi_size) 308 ACPI_MUL_2 309 (acpi_gbl_integer_byte_width)); --- 64 unchanged lines hidden (view full) --- 374 local_operand1->buffer.length); 375 break; 376 377 default: 378 379 /* Invalid object type, should not happen here */ 380 381 ACPI_ERROR((AE_INFO, "Invalid object type: %X", | 302 case ACPI_TYPE_INTEGER: 303 304 /* Result of two Integers is a Buffer */ 305 /* Need enough buffer space for two integers */ 306 307 return_desc = acpi_ut_create_buffer_object((acpi_size) 308 ACPI_MUL_2 309 (acpi_gbl_integer_byte_width)); --- 64 unchanged lines hidden (view full) --- 374 local_operand1->buffer.length); 375 break; 376 377 default: 378 379 /* Invalid object type, should not happen here */ 380 381 ACPI_ERROR((AE_INFO, "Invalid object type: %X", |
382 ACPI_GET_OBJECT_TYPE(operand0))); | 382 operand0->common.type)); |
383 status = AE_AML_INTERNAL; 384 goto cleanup; 385 } 386 387 *actual_return_desc = return_desc; 388 389 cleanup: 390 if (local_operand1 != operand1) { --- 185 unchanged lines hidden (view full) --- 576 577 /* 578 * Convert the second operand if necessary. The first operand 579 * determines the type of the second operand, (See the Data Types 580 * section of the ACPI 3.0+ specification.) Both object types are 581 * guaranteed to be either Integer/String/Buffer by the operand 582 * resolution mechanism. 583 */ | 383 status = AE_AML_INTERNAL; 384 goto cleanup; 385 } 386 387 *actual_return_desc = return_desc; 388 389 cleanup: 390 if (local_operand1 != operand1) { --- 185 unchanged lines hidden (view full) --- 576 577 /* 578 * Convert the second operand if necessary. The first operand 579 * determines the type of the second operand, (See the Data Types 580 * section of the ACPI 3.0+ specification.) Both object types are 581 * guaranteed to be either Integer/String/Buffer by the operand 582 * resolution mechanism. 583 */ |
584 switch (ACPI_GET_OBJECT_TYPE(operand0)) { | 584 switch (operand0->common.type) { |
585 case ACPI_TYPE_INTEGER: 586 status = 587 acpi_ex_convert_to_integer(operand1, &local_operand1, 16); 588 break; 589 590 case ACPI_TYPE_STRING: 591 status = acpi_ex_convert_to_string(operand1, &local_operand1, 592 ACPI_IMPLICIT_CONVERT_HEX); --- 10 unchanged lines hidden (view full) --- 603 604 if (ACPI_FAILURE(status)) { 605 goto cleanup; 606 } 607 608 /* 609 * Two cases: 1) Both Integers, 2) Both Strings or Buffers 610 */ | 585 case ACPI_TYPE_INTEGER: 586 status = 587 acpi_ex_convert_to_integer(operand1, &local_operand1, 16); 588 break; 589 590 case ACPI_TYPE_STRING: 591 status = acpi_ex_convert_to_string(operand1, &local_operand1, 592 ACPI_IMPLICIT_CONVERT_HEX); --- 10 unchanged lines hidden (view full) --- 603 604 if (ACPI_FAILURE(status)) { 605 goto cleanup; 606 } 607 608 /* 609 * Two cases: 1) Both Integers, 2) Both Strings or Buffers 610 */ |
611 if (ACPI_GET_OBJECT_TYPE(operand0) == ACPI_TYPE_INTEGER) { | 611 if (operand0->common.type == ACPI_TYPE_INTEGER) { |
612 /* 613 * 1) Both operands are of type integer 614 * Note: local_operand1 may have changed above 615 */ 616 integer0 = operand0->integer.value; 617 integer1 = local_operand1->integer.value; 618 619 switch (opcode) { --- 107 unchanged lines hidden --- | 612 /* 613 * 1) Both operands are of type integer 614 * Note: local_operand1 may have changed above 615 */ 616 integer0 = operand0->integer.value; 617 integer1 = local_operand1->integer.value; 618 619 switch (opcode) { --- 107 unchanged lines hidden --- |