exoparg3.c (85754) | exoparg3.c (87031) |
---|---|
1 2/****************************************************************************** 3 * 4 * Module Name: exoparg3 - AML execution - opcodes with 3 arguments | 1 2/****************************************************************************** 3 * 4 * Module Name: exoparg3 - AML execution - opcodes with 3 arguments |
5 * $Revision: 3 $ | 5 * $Revision: 5 $ |
6 * 7 *****************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * 13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 118 unchanged lines hidden (view full) --- 132 * Naming convention for AML interpreter execution routines. 133 * 134 * The routines that begin execution of AML opcodes are named with a common 135 * convention based upon the number of arguments, the number of target operands, 136 * and whether or not a value is returned: 137 * 138 * AcpiExOpcode_xA_yT_zR 139 * | 6 * 7 *****************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * 13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 118 unchanged lines hidden (view full) --- 132 * Naming convention for AML interpreter execution routines. 133 * 134 * The routines that begin execution of AML opcodes are named with a common 135 * convention based upon the number of arguments, the number of target operands, 136 * and whether or not a value is returned: 137 * 138 * AcpiExOpcode_xA_yT_zR 139 * |
140 * Where: | 140 * Where: |
141 * | 141 * |
142 * xA - ARGUMENTS: The number of arguments (input operands) that are | 142 * xA - ARGUMENTS: The number of arguments (input operands) that are |
143 * required for this opcode type (1 through 6 args). | 143 * required for this opcode type (1 through 6 args). |
144 * yT - TARGETS: The number of targets (output operands) that are required | 144 * yT - TARGETS: The number of targets (output operands) that are required |
145 * for this opcode type (0, 1, or 2 targets). | 145 * for this opcode type (0, 1, or 2 targets). |
146 * zR - RETURN VALUE: Indicates whether this opcode type returns a value | 146 * zR - RETURN VALUE: Indicates whether this opcode type returns a value |
147 * as the function return (0 or 1). 148 * | 147 * as the function return (0 or 1). 148 * |
149 * The AcpiExOpcode* functions are called via the Dispatcher component with | 149 * The AcpiExOpcode* functions are called via the Dispatcher component with |
150 * fully resolved operands. 151!*/ 152 153 | 150 * fully resolved operands. 151!*/ 152 153 |
154 | |
155/******************************************************************************* 156 * 157 * FUNCTION: AcpiExOpcode_3A_0T_0R 158 * 159 * PARAMETERS: WalkState - Current walk state 160 * 161 * RETURN: Status 162 * --- 48 unchanged lines hidden (view full) --- 211 REPORT_ERROR (("AcpiExOpcode_3A_0T_0R: Unknown opcode %X\n", 212 WalkState->Opcode)); 213 Status = AE_AML_BAD_OPCODE; 214 goto Cleanup; 215 break; 216 } 217 218 | 154/******************************************************************************* 155 * 156 * FUNCTION: AcpiExOpcode_3A_0T_0R 157 * 158 * PARAMETERS: WalkState - Current walk state 159 * 160 * RETURN: Status 161 * --- 48 unchanged lines hidden (view full) --- 210 REPORT_ERROR (("AcpiExOpcode_3A_0T_0R: Unknown opcode %X\n", 211 WalkState->Opcode)); 212 Status = AE_AML_BAD_OPCODE; 213 goto Cleanup; 214 break; 215 } 216 217 |
219 | |
220Cleanup: 221 222 return_ACPI_STATUS (Status); 223} 224 225 226/******************************************************************************* 227 * --- 17 unchanged lines hidden (view full) --- 245 ACPI_STATUS Status = AE_OK; 246 UINT32 Index; 247 UINT32 Length; 248 249 250 FUNCTION_TRACE_STR ("ExOpcode_3A_1T_1R", AcpiPsGetOpcodeName (WalkState->Opcode)); 251 252 | 218Cleanup: 219 220 return_ACPI_STATUS (Status); 221} 222 223 224/******************************************************************************* 225 * --- 17 unchanged lines hidden (view full) --- 243 ACPI_STATUS Status = AE_OK; 244 UINT32 Index; 245 UINT32 Length; 246 247 248 FUNCTION_TRACE_STR ("ExOpcode_3A_1T_1R", AcpiPsGetOpcodeName (WalkState->Opcode)); 249 250 |
253 | |
254 switch (WalkState->Opcode) 255 { 256 case AML_MID_OP: /* Mid (Source[0], Index[1], Length[2], Result[3]) */ 257 | 251 switch (WalkState->Opcode) 252 { 253 case AML_MID_OP: /* Mid (Source[0], Index[1], Length[2], Result[3]) */ 254 |
258 /* | 255 /* |
259 * Create the return object. The Source operand is guaranteed to be 260 * either a String or a Buffer, so just use its type. 261 */ 262 ReturnDesc = AcpiUtCreateInternalObject (Operand[0]->Common.Type); 263 if (!ReturnDesc) 264 { 265 Status = AE_NO_MEMORY; 266 goto Cleanup; --- 19 unchanged lines hidden (view full) --- 286 Length = Operand[0]->String.Length - Index; 287 } 288 289 /* Allocate a new buffer for the String/Buffer */ 290 291 Buffer = ACPI_MEM_CALLOCATE (Length + 1); 292 if (!Buffer) 293 { | 256 * Create the return object. The Source operand is guaranteed to be 257 * either a String or a Buffer, so just use its type. 258 */ 259 ReturnDesc = AcpiUtCreateInternalObject (Operand[0]->Common.Type); 260 if (!ReturnDesc) 261 { 262 Status = AE_NO_MEMORY; 263 goto Cleanup; --- 19 unchanged lines hidden (view full) --- 283 Length = Operand[0]->String.Length - Index; 284 } 285 286 /* Allocate a new buffer for the String/Buffer */ 287 288 Buffer = ACPI_MEM_CALLOCATE (Length + 1); 289 if (!Buffer) 290 { |
294 return (AE_NO_MEMORY); | 291 Status = AE_NO_MEMORY; 292 goto Cleanup; |
295 } 296 297 /* Copy the portion requested */ 298 299 MEMCPY (Buffer, Operand[0]->String.Pointer + Index, 300 Length); 301 302 /* Set the length of the new String/Buffer */ 303 304 ReturnDesc->String.Pointer = Buffer; 305 ReturnDesc->String.Length = Length; 306 } | 293 } 294 295 /* Copy the portion requested */ 296 297 MEMCPY (Buffer, Operand[0]->String.Pointer + Index, 298 Length); 299 300 /* Set the length of the new String/Buffer */ 301 302 ReturnDesc->String.Pointer = Buffer; 303 ReturnDesc->String.Length = Length; 304 } |
307 | 305 |
308 break; 309 310 311 default: 312 313 REPORT_ERROR (("AcpiExOpcode_3A_0T_0R: Unknown opcode %X\n", 314 WalkState->Opcode)); 315 Status = AE_AML_BAD_OPCODE; --- 16 unchanged lines hidden (view full) --- 332 333 /* Set the return object and exit */ 334 335 WalkState->ResultObj = ReturnDesc; 336 return_ACPI_STATUS (Status); 337} 338 339 | 306 break; 307 308 309 default: 310 311 REPORT_ERROR (("AcpiExOpcode_3A_0T_0R: Unknown opcode %X\n", 312 WalkState->Opcode)); 313 Status = AE_AML_BAD_OPCODE; --- 16 unchanged lines hidden (view full) --- 330 331 /* Set the return object and exit */ 332 333 WalkState->ResultObj = ReturnDesc; 334 return_ACPI_STATUS (Status); 335} 336 337 |
340 341 | |