Print this page
acpica-unix2-20130823
PANKOVs restructure

*** 3,13 **** * Module Name: exoparg2 - AML execution - opcodes with 2 arguments * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: --- 3,13 ---- * Module Name: exoparg2 - AML execution - opcodes with 2 arguments * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
*** 142,152 **** * control methods. */ Status = AcpiEvQueueNotifyRequest (Node, Value); break; - default: ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X", WalkState->Opcode)); Status = AE_AML_BAD_OPCODE; --- 142,151 ----
*** 215,225 **** { goto Cleanup; } break; - default: ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X", WalkState->Opcode)); Status = AE_AML_BAD_OPCODE; --- 214,223 ----
*** 284,294 **** { ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_OPERAND_OBJECT *ReturnDesc = NULL; UINT64 Index; ACPI_STATUS Status = AE_OK; ! ACPI_SIZE Length; ACPI_FUNCTION_TRACE_STR (ExOpcode_2A_1T_1R, AcpiPsGetOpcodeName (WalkState->Opcode)); --- 282,292 ---- { ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_OPERAND_OBJECT *ReturnDesc = NULL; UINT64 Index; ACPI_STATUS Status = AE_OK; ! ACPI_SIZE Length = 0; ACPI_FUNCTION_TRACE_STR (ExOpcode_2A_1T_1R, AcpiPsGetOpcodeName (WalkState->Opcode));
*** 329,348 **** Operand[1]->Integer.Value, NULL, &ReturnDesc->Integer.Value); break; - case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */ Status = AcpiExDoConcatenate (Operand[0], Operand[1], &ReturnDesc, WalkState); break; - case AML_TO_STRING_OP: /* ToString (Buffer, Length, Result) (ACPI 2.0) */ - /* * Input object is guaranteed to be a buffer at this point (it may have * been converted.) Copy the raw buffer data to a new object of * type String. */ --- 327,343 ----
*** 354,364 **** * 3) Length of input buffer up to a zero byte (null terminator) * * NOTE: A length of zero is ok, and will create a zero-length, null * terminated string. */ - Length = 0; while ((Length < Operand[0]->Buffer.Length) && (Length < Operand[1]->Integer.Value) && (Operand[0]->Buffer.Pointer[Length])) { Length++; --- 349,358 ----
*** 379,398 **** */ ACPI_MEMCPY (ReturnDesc->String.Pointer, Operand[0]->Buffer.Pointer, Length); break; - case AML_CONCAT_RES_OP: /* ConcatenateResTemplate (Buffer, Buffer, Result) (ACPI 2.0) */ Status = AcpiExConcatTemplate (Operand[0], Operand[1], &ReturnDesc, WalkState); break; - case AML_INDEX_OP: /* Index (Source Index Result) */ /* Create the internal return object */ ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_REFERENCE); --- 373,390 ----
*** 416,425 **** --- 408,418 ---- { case ACPI_TYPE_STRING: if (Index >= Operand[0]->String.Length) { + Length = Operand[0]->String.Length; Status = AE_AML_STRING_LIMIT; } ReturnDesc->Reference.TargetType = ACPI_TYPE_BUFFER_FIELD; break;
*** 426,435 **** --- 419,429 ---- case ACPI_TYPE_BUFFER: if (Index >= Operand[0]->Buffer.Length) { + Length = Operand[0]->Buffer.Length; Status = AE_AML_BUFFER_LIMIT; } ReturnDesc->Reference.TargetType = ACPI_TYPE_BUFFER_FIELD; break;
*** 436,445 **** --- 430,440 ---- case ACPI_TYPE_PACKAGE: if (Index >= Operand[0]->Package.Count) { + Length = Operand[0]->Package.Count; Status = AE_AML_PACKAGE_LIMIT; } ReturnDesc->Reference.TargetType = ACPI_TYPE_PACKAGE; ReturnDesc->Reference.Where = &Operand[0]->Package.Elements [Index];
*** 454,465 **** /* Failure means that the Index was beyond the end of the object */ if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, ! "Index (0x%8.8X%8.8X) is beyond end of object", ! ACPI_FORMAT_UINT64 (Index))); goto Cleanup; } /* * Save the target object and add a reference to it for the life --- 449,460 ---- /* Failure means that the Index was beyond the end of the object */ if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, ! "Index (0x%X%8.8X) is beyond end of object (length 0x%X)", ! ACPI_FORMAT_UINT64 (Index), (UINT32) Length)); goto Cleanup; } /* * Save the target object and add a reference to it for the life
*** 475,485 **** /* Return the reference */ WalkState->ResultObj = ReturnDesc; goto Cleanup; - default: ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X", WalkState->Opcode)); Status = AE_AML_BAD_OPCODE; --- 470,479 ----
*** 598,608 **** LogicalResult = TRUE; /* TRUE, Wait timed out */ Status = AE_OK; } break; - default: ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X", WalkState->Opcode)); Status = AE_AML_BAD_OPCODE; --- 592,601 ----
*** 636,642 **** WalkState->ResultObj = ReturnDesc; } return_ACPI_STATUS (Status); } - - --- 629,633 ----