dsfield.c (91116) | dsfield.c (99679) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: dsfield - Dispatcher field routines | 1/****************************************************************************** 2 * 3 * Module Name: dsfield - Dispatcher field routines |
4 * $Revision: 62 $ | 4 * $Revision: 65 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. --- 148 unchanged lines hidden (view full) --- 161 UINT32 Flags; 162 163 164 ACPI_FUNCTION_TRACE ("DsCreateBufferField"); 165 166 167 /* Get the NameString argument */ 168 | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. --- 148 unchanged lines hidden (view full) --- 161 UINT32 Flags; 162 163 164 ACPI_FUNCTION_TRACE ("DsCreateBufferField"); 165 166 167 /* Get the NameString argument */ 168 |
169 if (Op->Opcode == AML_CREATE_FIELD_OP) | 169 if (Op->Common.AmlOpcode == AML_CREATE_FIELD_OP) |
170 { 171 Arg = AcpiPsGetArg (Op, 3); 172 } 173 else 174 { 175 /* Create Bit/Byte/Word/Dword field */ 176 177 Arg = AcpiPsGetArg (Op, 2); --- 16 unchanged lines hidden (view full) --- 194 else 195 { 196 Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; 197 } 198 199 /* 200 * Enter the NameString into the namespace 201 */ | 170 { 171 Arg = AcpiPsGetArg (Op, 3); 172 } 173 else 174 { 175 /* Create Bit/Byte/Word/Dword field */ 176 177 Arg = AcpiPsGetArg (Op, 2); --- 16 unchanged lines hidden (view full) --- 194 else 195 { 196 Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; 197 } 198 199 /* 200 * Enter the NameString into the namespace 201 */ |
202 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String, | 202 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String, |
203 INTERNAL_TYPE_DEF_ANY, ACPI_IMODE_LOAD_PASS1, 204 Flags, WalkState, &(Node)); 205 if (ACPI_FAILURE (Status)) 206 { 207 return_ACPI_STATUS (Status); 208 } 209 210 /* We could put the returned object (Node) on the object stack for later, but 211 * for now, we will put it in the "op" object that the parser uses, so we 212 * can get it again at the end of this scope 213 */ | 203 INTERNAL_TYPE_DEF_ANY, ACPI_IMODE_LOAD_PASS1, 204 Flags, WalkState, &(Node)); 205 if (ACPI_FAILURE (Status)) 206 { 207 return_ACPI_STATUS (Status); 208 } 209 210 /* We could put the returned object (Node) on the object stack for later, but 211 * for now, we will put it in the "op" object that the parser uses, so we 212 * can get it again at the end of this scope 213 */ |
214 Op->Node = Node; | 214 Op->Common.Node = Node; |
215 216 /* 217 * If there is no object attached to the node, this node was just created and 218 * we need to create the field object. Otherwise, this was a lookup of an 219 * existing node and we don't want to create the field object again. 220 */ 221 ObjDesc = AcpiNsGetAttachedObject (Node); 222 if (ObjDesc) --- 16 unchanged lines hidden (view full) --- 239 } 240 241 /* 242 * Remember location in AML stream of the field unit 243 * opcode and operands -- since the buffer and index 244 * operands must be evaluated. 245 */ 246 SecondDesc = ObjDesc->Common.NextObject; | 215 216 /* 217 * If there is no object attached to the node, this node was just created and 218 * we need to create the field object. Otherwise, this was a lookup of an 219 * existing node and we don't want to create the field object again. 220 */ 221 ObjDesc = AcpiNsGetAttachedObject (Node); 222 if (ObjDesc) --- 16 unchanged lines hidden (view full) --- 239 } 240 241 /* 242 * Remember location in AML stream of the field unit 243 * opcode and operands -- since the buffer and index 244 * operands must be evaluated. 245 */ 246 SecondDesc = ObjDesc->Common.NextObject; |
247 SecondDesc->Extra.AmlStart = ((ACPI_PARSE2_OBJECT *) Op)->Data; 248 SecondDesc->Extra.AmlLength = ((ACPI_PARSE2_OBJECT *) Op)->Length; | 247 SecondDesc->Extra.AmlStart = Op->Named.Data; 248 SecondDesc->Extra.AmlLength = Op->Named.Length; |
249 ObjDesc->BufferField.Node = Node; 250 251 /* Attach constructed field descriptors to parent node */ 252 253 Status = AcpiNsAttachObject (Node, ObjDesc, ACPI_TYPE_BUFFER_FIELD); 254 if (ACPI_FAILURE (Status)) 255 { 256 goto Cleanup; --- 26 unchanged lines hidden (view full) --- 283 284ACPI_STATUS 285AcpiDsGetFieldNames ( 286 ACPI_CREATE_FIELD_INFO *Info, 287 ACPI_WALK_STATE *WalkState, 288 ACPI_PARSE_OBJECT *Arg) 289{ 290 ACPI_STATUS Status; | 249 ObjDesc->BufferField.Node = Node; 250 251 /* Attach constructed field descriptors to parent node */ 252 253 Status = AcpiNsAttachObject (Node, ObjDesc, ACPI_TYPE_BUFFER_FIELD); 254 if (ACPI_FAILURE (Status)) 255 { 256 goto Cleanup; --- 26 unchanged lines hidden (view full) --- 283 284ACPI_STATUS 285AcpiDsGetFieldNames ( 286 ACPI_CREATE_FIELD_INFO *Info, 287 ACPI_WALK_STATE *WalkState, 288 ACPI_PARSE_OBJECT *Arg) 289{ 290 ACPI_STATUS Status; |
291 ACPI_INTEGER Position; |
|
291 292 293 ACPI_FUNCTION_TRACE_PTR ("DsGetFieldNames", Info); 294 295 296 /* First field starts at bit zero */ 297 298 Info->FieldBitPosition = 0; 299 300 /* Process all elements in the field list (of parse nodes) */ 301 302 while (Arg) 303 { 304 /* 305 * Three types of field elements are handled: 306 * 1) Offset - specifies a bit offset 307 * 2) AccessAs - changes the access mode 308 * 3) Name - Enters a new named field into the namespace 309 */ | 292 293 294 ACPI_FUNCTION_TRACE_PTR ("DsGetFieldNames", Info); 295 296 297 /* First field starts at bit zero */ 298 299 Info->FieldBitPosition = 0; 300 301 /* Process all elements in the field list (of parse nodes) */ 302 303 while (Arg) 304 { 305 /* 306 * Three types of field elements are handled: 307 * 1) Offset - specifies a bit offset 308 * 2) AccessAs - changes the access mode 309 * 3) Name - Enters a new named field into the namespace 310 */ |
310 switch (Arg->Opcode) | 311 switch (Arg->Common.AmlOpcode) |
311 { 312 case AML_INT_RESERVEDFIELD_OP: 313 | 312 { 313 case AML_INT_RESERVEDFIELD_OP: 314 |
314 if (((ACPI_INTEGER) Info->FieldBitPosition + Arg->Value.Size) > 315 ACPI_UINT32_MAX) | 315 Position = (ACPI_INTEGER) Info->FieldBitPosition 316 + (ACPI_INTEGER) Arg->Common.Value.Size; 317 318 if (Position > ACPI_UINT32_MAX) |
316 { 317 ACPI_REPORT_ERROR (("Bit offset within field too large (> 0xFFFFFFFF)\n")); 318 return_ACPI_STATUS (AE_SUPPORT); 319 } 320 | 319 { 320 ACPI_REPORT_ERROR (("Bit offset within field too large (> 0xFFFFFFFF)\n")); 321 return_ACPI_STATUS (AE_SUPPORT); 322 } 323 |
321 Info->FieldBitPosition += Arg->Value.Size; | 324 Info->FieldBitPosition = (UINT32) Position; |
322 break; 323 324 325 case AML_INT_ACCESSFIELD_OP: 326 327 /* 328 * Get a new AccessType and AccessAttribute -- to be used for all 329 * field units that follow, until field end or another AccessAs keyword. 330 * 331 * In FieldFlags, preserve the flag bits other than the ACCESS_TYPE bits 332 */ 333 Info->FieldFlags = (UINT8) ((Info->FieldFlags & ~(AML_FIELD_ACCESS_TYPE_MASK)) | | 325 break; 326 327 328 case AML_INT_ACCESSFIELD_OP: 329 330 /* 331 * Get a new AccessType and AccessAttribute -- to be used for all 332 * field units that follow, until field end or another AccessAs keyword. 333 * 334 * In FieldFlags, preserve the flag bits other than the ACCESS_TYPE bits 335 */ 336 Info->FieldFlags = (UINT8) ((Info->FieldFlags & ~(AML_FIELD_ACCESS_TYPE_MASK)) | |
334 ((UINT8) (Arg->Value.Integer32 >> 8))); | 337 ((UINT8) (Arg->Common.Value.Integer32 >> 8))); |
335 | 338 |
336 Info->Attribute = (UINT8) (Arg->Value.Integer32); | 339 Info->Attribute = (UINT8) (Arg->Common.Value.Integer32); |
337 break; 338 339 340 case AML_INT_NAMEDFIELD_OP: 341 342 /* Lookup the name */ 343 344 Status = AcpiNsLookup (WalkState->ScopeInfo, | 340 break; 341 342 343 case AML_INT_NAMEDFIELD_OP: 344 345 /* Lookup the name */ 346 347 Status = AcpiNsLookup (WalkState->ScopeInfo, |
345 (NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)Arg)->Name, | 348 (NATIVE_CHAR *) &Arg->Named.Name, |
346 Info->FieldType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE, 347 WalkState, &Info->FieldNode); 348 if (ACPI_FAILURE (Status)) 349 { 350 if (Status != AE_ALREADY_EXISTS) 351 { 352 return_ACPI_STATUS (Status); 353 } 354 355 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n", | 349 Info->FieldType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE, 350 WalkState, &Info->FieldNode); 351 if (ACPI_FAILURE (Status)) 352 { 353 if (Status != AE_ALREADY_EXISTS) 354 { 355 return_ACPI_STATUS (Status); 356 } 357 358 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n", |
356 &((ACPI_PARSE2_OBJECT *)Arg)->Name)); | 359 &Arg->Named.Name)); |
357 } 358 else 359 { | 360 } 361 else 362 { |
360 Arg->Node = Info->FieldNode; 361 Info->FieldBitLength = Arg->Value.Size; | 363 Arg->Common.Node = Info->FieldNode; 364 Info->FieldBitLength = Arg->Common.Value.Size; |
362 363 /* Create and initialize an object for the new Field Node */ 364 365 Status = AcpiExPrepFieldValue (Info); 366 if (ACPI_FAILURE (Status)) 367 { 368 return_ACPI_STATUS (Status); 369 } 370 } 371 372 /* Keep track of bit position for the next field */ 373 | 365 366 /* Create and initialize an object for the new Field Node */ 367 368 Status = AcpiExPrepFieldValue (Info); 369 if (ACPI_FAILURE (Status)) 370 { 371 return_ACPI_STATUS (Status); 372 } 373 } 374 375 /* Keep track of bit position for the next field */ 376 |
374 if (((ACPI_INTEGER) Info->FieldBitPosition + Arg->Value.Size) > 375 ACPI_UINT32_MAX) | 377 Position = (ACPI_INTEGER) Info->FieldBitPosition 378 + (ACPI_INTEGER) Arg->Common.Value.Size; 379 380 if (Position > ACPI_UINT32_MAX) |
376 { 377 ACPI_REPORT_ERROR (("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", 378 &Info->FieldNode->Name)); 379 return_ACPI_STATUS (AE_SUPPORT); 380 } 381 382 Info->FieldBitPosition += Info->FieldBitLength; 383 break; 384 385 386 default: 387 388 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid opcode in field list: %X\n", | 381 { 382 ACPI_REPORT_ERROR (("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", 383 &Info->FieldNode->Name)); 384 return_ACPI_STATUS (AE_SUPPORT); 385 } 386 387 Info->FieldBitPosition += Info->FieldBitLength; 388 break; 389 390 391 default: 392 393 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid opcode in field list: %X\n", |
389 Arg->Opcode)); 390 return_ACPI_STATUS (AE_AML_ERROR); | 394 Arg->Common.AmlOpcode)); 395 return_ACPI_STATUS (AE_AML_BAD_OPCODE); |
391 } 392 | 396 } 397 |
393 Arg = Arg->Next; | 398 Arg = Arg->Common.Next; |
394 } 395 396 return_ACPI_STATUS (AE_OK); 397} 398 399 400/******************************************************************************* 401 * --- 10 unchanged lines hidden (view full) --- 412 ******************************************************************************/ 413 414ACPI_STATUS 415AcpiDsCreateField ( 416 ACPI_PARSE_OBJECT *Op, 417 ACPI_NAMESPACE_NODE *RegionNode, 418 ACPI_WALK_STATE *WalkState) 419{ | 399 } 400 401 return_ACPI_STATUS (AE_OK); 402} 403 404 405/******************************************************************************* 406 * --- 10 unchanged lines hidden (view full) --- 417 ******************************************************************************/ 418 419ACPI_STATUS 420AcpiDsCreateField ( 421 ACPI_PARSE_OBJECT *Op, 422 ACPI_NAMESPACE_NODE *RegionNode, 423 ACPI_WALK_STATE *WalkState) 424{ |
420 ACPI_STATUS Status = AE_AML_ERROR; | 425 ACPI_STATUS Status; |
421 ACPI_PARSE_OBJECT *Arg; 422 ACPI_CREATE_FIELD_INFO Info; 423 424 425 ACPI_FUNCTION_TRACE_PTR ("DsCreateField", Op); 426 427 428 /* First arg is the name of the parent OpRegion (must already exist) */ 429 | 426 ACPI_PARSE_OBJECT *Arg; 427 ACPI_CREATE_FIELD_INFO Info; 428 429 430 ACPI_FUNCTION_TRACE_PTR ("DsCreateField", Op); 431 432 433 /* First arg is the name of the parent OpRegion (must already exist) */ 434 |
430 Arg = Op->Value.Arg; | 435 Arg = Op->Common.Value.Arg; |
431 if (!RegionNode) 432 { | 436 if (!RegionNode) 437 { |
433 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.Name, | 438 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name, |
434 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 435 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 436 if (ACPI_FAILURE (Status)) 437 { 438 return_ACPI_STATUS (Status); 439 } 440 } 441 442 /* Second arg is the field flags */ 443 | 439 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 440 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 441 if (ACPI_FAILURE (Status)) 442 { 443 return_ACPI_STATUS (Status); 444 } 445 } 446 447 /* Second arg is the field flags */ 448 |
444 Arg = Arg->Next; 445 Info.FieldFlags = Arg->Value.Integer8; | 449 Arg = Arg->Common.Next; 450 Info.FieldFlags = Arg->Common.Value.Integer8; |
446 Info.Attribute = 0; 447 448 /* Each remaining arg is a Named Field */ 449 450 Info.FieldType = INTERNAL_TYPE_REGION_FIELD; 451 Info.RegionNode = RegionNode; 452 | 451 Info.Attribute = 0; 452 453 /* Each remaining arg is a Named Field */ 454 455 Info.FieldType = INTERNAL_TYPE_REGION_FIELD; 456 Info.RegionNode = RegionNode; 457 |
453 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Next); | 458 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); |
454 455 return_ACPI_STATUS (Status); 456} 457 458 459/******************************************************************************* 460 * 461 * FUNCTION: AcpiDsInitFieldObjects --- 9 unchanged lines hidden (view full) --- 471 * 472 ******************************************************************************/ 473 474ACPI_STATUS 475AcpiDsInitFieldObjects ( 476 ACPI_PARSE_OBJECT *Op, 477 ACPI_WALK_STATE *WalkState) 478{ | 459 460 return_ACPI_STATUS (Status); 461} 462 463 464/******************************************************************************* 465 * 466 * FUNCTION: AcpiDsInitFieldObjects --- 9 unchanged lines hidden (view full) --- 476 * 477 ******************************************************************************/ 478 479ACPI_STATUS 480AcpiDsInitFieldObjects ( 481 ACPI_PARSE_OBJECT *Op, 482 ACPI_WALK_STATE *WalkState) 483{ |
479 ACPI_STATUS Status = AE_AML_ERROR; | 484 ACPI_STATUS Status; |
480 ACPI_PARSE_OBJECT *Arg = NULL; 481 ACPI_NAMESPACE_NODE *Node; 482 UINT8 Type = 0; 483 484 485 ACPI_FUNCTION_TRACE_PTR ("DsInitFieldObjects", Op); 486 487 --- 8 unchanged lines hidden (view full) --- 496 Arg = AcpiPsGetArg (Op, 4); 497 Type = INTERNAL_TYPE_BANK_FIELD; 498 break; 499 500 case AML_INDEX_FIELD_OP: 501 Arg = AcpiPsGetArg (Op, 3); 502 Type = INTERNAL_TYPE_INDEX_FIELD; 503 break; | 485 ACPI_PARSE_OBJECT *Arg = NULL; 486 ACPI_NAMESPACE_NODE *Node; 487 UINT8 Type = 0; 488 489 490 ACPI_FUNCTION_TRACE_PTR ("DsInitFieldObjects", Op); 491 492 --- 8 unchanged lines hidden (view full) --- 501 Arg = AcpiPsGetArg (Op, 4); 502 Type = INTERNAL_TYPE_BANK_FIELD; 503 break; 504 505 case AML_INDEX_FIELD_OP: 506 Arg = AcpiPsGetArg (Op, 3); 507 Type = INTERNAL_TYPE_INDEX_FIELD; 508 break; |
509 510 default: 511 return_ACPI_STATUS (AE_BAD_PARAMETER); |
|
504 } 505 506 /* 507 * Walk the list of entries in the FieldList 508 */ 509 while (Arg) 510 { 511 /* Ignore OFFSET and ACCESSAS terms here */ 512 | 512 } 513 514 /* 515 * Walk the list of entries in the FieldList 516 */ 517 while (Arg) 518 { 519 /* Ignore OFFSET and ACCESSAS terms here */ 520 |
513 if (Arg->Opcode == AML_INT_NAMEDFIELD_OP) | 521 if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) |
514 { 515 Status = AcpiNsLookup (WalkState->ScopeInfo, | 522 { 523 Status = AcpiNsLookup (WalkState->ScopeInfo, |
516 (NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)Arg)->Name, | 524 (NATIVE_CHAR *) &Arg->Named.Name, |
517 Type, ACPI_IMODE_LOAD_PASS1, 518 ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, 519 WalkState, &Node); 520 if (ACPI_FAILURE (Status)) 521 { 522 if (Status != AE_ALREADY_EXISTS) 523 { 524 return_ACPI_STATUS (Status); 525 } 526 527 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n", | 525 Type, ACPI_IMODE_LOAD_PASS1, 526 ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, 527 WalkState, &Node); 528 if (ACPI_FAILURE (Status)) 529 { 530 if (Status != AE_ALREADY_EXISTS) 531 { 532 return_ACPI_STATUS (Status); 533 } 534 535 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n", |
528 &((ACPI_PARSE2_OBJECT *)Arg)->Name)); | 536 &Arg->Named.Name)); 537 538 /* Name already exists, just ignore this error */ 539 540 Status = AE_OK; |
529 } 530 | 541 } 542 |
531 Arg->Node = Node; | 543 Arg->Common.Node = Node; |
532 } 533 534 /* Move to next field in the list */ 535 | 544 } 545 546 /* Move to next field in the list */ 547 |
536 Arg = Arg->Next; | 548 Arg = Arg->Common.Next; |
537 } 538 | 549 } 550 |
539 return_ACPI_STATUS (Status); | 551 return_ACPI_STATUS (AE_OK); |
540} 541 542 543/******************************************************************************* 544 * 545 * FUNCTION: AcpiDsCreateBankField 546 * 547 * PARAMETERS: Op - Op containing the Field definition and args --- 7 unchanged lines hidden (view full) --- 555 ******************************************************************************/ 556 557ACPI_STATUS 558AcpiDsCreateBankField ( 559 ACPI_PARSE_OBJECT *Op, 560 ACPI_NAMESPACE_NODE *RegionNode, 561 ACPI_WALK_STATE *WalkState) 562{ | 552} 553 554 555/******************************************************************************* 556 * 557 * FUNCTION: AcpiDsCreateBankField 558 * 559 * PARAMETERS: Op - Op containing the Field definition and args --- 7 unchanged lines hidden (view full) --- 567 ******************************************************************************/ 568 569ACPI_STATUS 570AcpiDsCreateBankField ( 571 ACPI_PARSE_OBJECT *Op, 572 ACPI_NAMESPACE_NODE *RegionNode, 573 ACPI_WALK_STATE *WalkState) 574{ |
563 ACPI_STATUS Status = AE_AML_ERROR; | 575 ACPI_STATUS Status; |
564 ACPI_PARSE_OBJECT *Arg; 565 ACPI_CREATE_FIELD_INFO Info; 566 567 568 ACPI_FUNCTION_TRACE_PTR ("DsCreateBankField", Op); 569 570 571 /* First arg is the name of the parent OpRegion (must already exist) */ 572 | 576 ACPI_PARSE_OBJECT *Arg; 577 ACPI_CREATE_FIELD_INFO Info; 578 579 580 ACPI_FUNCTION_TRACE_PTR ("DsCreateBankField", Op); 581 582 583 /* First arg is the name of the parent OpRegion (must already exist) */ 584 |
573 Arg = Op->Value.Arg; | 585 Arg = Op->Common.Value.Arg; |
574 if (!RegionNode) 575 { | 586 if (!RegionNode) 587 { |
576 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.Name, | 588 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name, |
577 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 578 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 579 if (ACPI_FAILURE (Status)) 580 { 581 return_ACPI_STATUS (Status); 582 } 583 } 584 585 /* Second arg is the Bank Register (must already exist) */ 586 | 589 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 590 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 591 if (ACPI_FAILURE (Status)) 592 { 593 return_ACPI_STATUS (Status); 594 } 595 } 596 597 /* Second arg is the Bank Register (must already exist) */ 598 |
587 Arg = Arg->Next; 588 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String, | 599 Arg = Arg->Common.Next; 600 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String, |
589 INTERNAL_TYPE_BANK_FIELD_DEFN, ACPI_IMODE_EXECUTE, 590 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 591 if (ACPI_FAILURE (Status)) 592 { 593 return_ACPI_STATUS (Status); 594 } 595 596 /* Third arg is the BankValue */ 597 | 601 INTERNAL_TYPE_BANK_FIELD_DEFN, ACPI_IMODE_EXECUTE, 602 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 603 if (ACPI_FAILURE (Status)) 604 { 605 return_ACPI_STATUS (Status); 606 } 607 608 /* Third arg is the BankValue */ 609 |
598 Arg = Arg->Next; 599 Info.BankValue = Arg->Value.Integer32; | 610 Arg = Arg->Common.Next; 611 Info.BankValue = Arg->Common.Value.Integer32; |
600 601 /* Fourth arg is the field flags */ 602 | 612 613 /* Fourth arg is the field flags */ 614 |
603 Arg = Arg->Next; 604 Info.FieldFlags = Arg->Value.Integer8; | 615 Arg = Arg->Common.Next; 616 Info.FieldFlags = Arg->Common.Value.Integer8; |
605 606 /* Each remaining arg is a Named Field */ 607 608 Info.FieldType = INTERNAL_TYPE_BANK_FIELD; 609 Info.RegionNode = RegionNode; 610 | 617 618 /* Each remaining arg is a Named Field */ 619 620 Info.FieldType = INTERNAL_TYPE_BANK_FIELD; 621 Info.RegionNode = RegionNode; 622 |
611 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Next); | 623 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); |
612 613 return_ACPI_STATUS (Status); 614} 615 616 617/******************************************************************************* 618 * 619 * FUNCTION: AcpiDsCreateIndexField --- 19 unchanged lines hidden (view full) --- 639 ACPI_CREATE_FIELD_INFO Info; 640 641 642 ACPI_FUNCTION_TRACE_PTR ("DsCreateIndexField", Op); 643 644 645 /* First arg is the name of the Index register (must already exist) */ 646 | 624 625 return_ACPI_STATUS (Status); 626} 627 628 629/******************************************************************************* 630 * 631 * FUNCTION: AcpiDsCreateIndexField --- 19 unchanged lines hidden (view full) --- 651 ACPI_CREATE_FIELD_INFO Info; 652 653 654 ACPI_FUNCTION_TRACE_PTR ("DsCreateIndexField", Op); 655 656 657 /* First arg is the name of the Index register (must already exist) */ 658 |
647 Arg = Op->Value.Arg; 648 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String, | 659 Arg = Op->Common.Value.Arg; 660 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String, |
649 ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, 650 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 651 if (ACPI_FAILURE (Status)) 652 { 653 return_ACPI_STATUS (Status); 654 } 655 656 /* Second arg is the data register (must already exist) */ 657 | 661 ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, 662 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 663 if (ACPI_FAILURE (Status)) 664 { 665 return_ACPI_STATUS (Status); 666 } 667 668 /* Second arg is the data register (must already exist) */ 669 |
658 Arg = Arg->Next; 659 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String, | 670 Arg = Arg->Common.Next; 671 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String, |
660 INTERNAL_TYPE_INDEX_FIELD_DEFN, ACPI_IMODE_EXECUTE, 661 ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode); 662 if (ACPI_FAILURE (Status)) 663 { 664 return_ACPI_STATUS (Status); 665 } 666 667 /* Next arg is the field flags */ 668 | 672 INTERNAL_TYPE_INDEX_FIELD_DEFN, ACPI_IMODE_EXECUTE, 673 ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode); 674 if (ACPI_FAILURE (Status)) 675 { 676 return_ACPI_STATUS (Status); 677 } 678 679 /* Next arg is the field flags */ 680 |
669 Arg = Arg->Next; 670 Info.FieldFlags = Arg->Value.Integer8; | 681 Arg = Arg->Common.Next; 682 Info.FieldFlags = Arg->Common.Value.Integer8; |
671 672 673 /* Each remaining arg is a Named Field */ 674 675 Info.FieldType = INTERNAL_TYPE_INDEX_FIELD; 676 Info.RegionNode = RegionNode; 677 | 683 684 685 /* Each remaining arg is a Named Field */ 686 687 Info.FieldType = INTERNAL_TYPE_INDEX_FIELD; 688 Info.RegionNode = RegionNode; 689 |
678 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Next); | 690 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); |
679 680 return_ACPI_STATUS (Status); 681} 682 683 | 691 692 return_ACPI_STATUS (Status); 693} 694 695 |