exstoren.c revision 69746
1 2/****************************************************************************** 3 * 4 * Module Name: amstoren - AML Interpreter object store support, 5 * Store to Node (namespace object) 6 * $Revision: 24 $ 7 * 8 *****************************************************************************/ 9 10/****************************************************************************** 11 * 12 * 1. Copyright Notice 13 * 14 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights 15 * reserved. 16 * 17 * 2. License 18 * 19 * 2.1. This is your license from Intel Corp. under its intellectual property 20 * rights. You may have additional license terms from the party that provided 21 * you this software, covering your right to use that party's intellectual 22 * property rights. 23 * 24 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 25 * copy of the source code appearing in this file ("Covered Code") an 26 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 27 * base code distributed originally by Intel ("Original Intel Code") to copy, 28 * make derivatives, distribute, use and display any portion of the Covered 29 * Code in any form, with the right to sublicense such rights; and 30 * 31 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 32 * license (with the right to sublicense), under only those claims of Intel 33 * patents that are infringed by the Original Intel Code, to make, use, sell, 34 * offer to sell, and import the Covered Code and derivative works thereof 35 * solely to the minimum extent necessary to exercise the above copyright 36 * license, and in no event shall the patent license extend to any additions 37 * to or modifications of the Original Intel Code. No other license or right 38 * is granted directly or by implication, estoppel or otherwise; 39 * 40 * The above copyright and patent license is granted only if the following 41 * conditions are met: 42 * 43 * 3. Conditions 44 * 45 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 46 * Redistribution of source code of any substantial portion of the Covered 47 * Code or modification with rights to further distribute source must include 48 * the above Copyright Notice, the above License, this list of Conditions, 49 * and the following Disclaimer and Export Compliance provision. In addition, 50 * Licensee must cause all Covered Code to which Licensee contributes to 51 * contain a file documenting the changes Licensee made to create that Covered 52 * Code and the date of any change. Licensee must include in that file the 53 * documentation of any changes made by any predecessor Licensee. Licensee 54 * must include a prominent statement that the modification is derived, 55 * directly or indirectly, from Original Intel Code. 56 * 57 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 58 * Redistribution of source code of any substantial portion of the Covered 59 * Code or modification without rights to further distribute source must 60 * include the following Disclaimer and Export Compliance provision in the 61 * documentation and/or other materials provided with distribution. In 62 * addition, Licensee may not authorize further sublicense of source of any 63 * portion of the Covered Code, and must include terms to the effect that the 64 * license from Licensee to its licensee is limited to the intellectual 65 * property embodied in the software Licensee provides to its licensee, and 66 * not to intellectual property embodied in modifications its licensee may 67 * make. 68 * 69 * 3.3. Redistribution of Executable. Redistribution in executable form of any 70 * substantial portion of the Covered Code or modification must reproduce the 71 * above Copyright Notice, and the following Disclaimer and Export Compliance 72 * provision in the documentation and/or other materials provided with the 73 * distribution. 74 * 75 * 3.4. Intel retains all right, title, and interest in and to the Original 76 * Intel Code. 77 * 78 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 79 * Intel shall be used in advertising or otherwise to promote the sale, use or 80 * other dealings in products derived from or relating to the Covered Code 81 * without prior written authorization from Intel. 82 * 83 * 4. Disclaimer and Export Compliance 84 * 85 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 86 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 87 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 88 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 89 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 90 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 91 * PARTICULAR PURPOSE. 92 * 93 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 94 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 95 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 96 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 97 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 98 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 99 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 100 * LIMITED REMEDY. 101 * 102 * 4.3. Licensee shall not export, either directly or indirectly, any of this 103 * software or system incorporating such software without first obtaining any 104 * required license or other approval from the U. S. Department of Commerce or 105 * any other agency or department of the United States Government. In the 106 * event Licensee exports any such software from the United States or 107 * re-exports any such software from a foreign destination, Licensee shall 108 * ensure that the distribution and export/re-export of the software is in 109 * compliance with all laws, regulations, orders, or other restrictions of the 110 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 111 * any of its subsidiaries will export/re-export any technical data, process, 112 * software, or service, directly or indirectly, to any country for which the 113 * United States government or any agency thereof requires an export license, 114 * other governmental approval, or letter of assurance, without first obtaining 115 * such license, approval or letter. 116 * 117 *****************************************************************************/ 118 119#define __AMSTOREN_C__ 120 121#include "acpi.h" 122#include "acparser.h" 123#include "acdispat.h" 124#include "acinterp.h" 125#include "amlcode.h" 126#include "acnamesp.h" 127#include "actables.h" 128 129 130#define _COMPONENT INTERPRETER 131 MODULE_NAME ("amstoren") 132 133 134/******************************************************************************* 135 * 136 * FUNCTION: AcpiAmlStoreObjectToNode 137 * 138 * PARAMETERS: *ValDesc - Value to be stored 139 * *Node - Named object to recieve the value 140 * 141 * RETURN: Status 142 * 143 * DESCRIPTION: Store the object to the named object. 144 * 145 * The Assignment of an object to a named object is handled here 146 * The val passed in will replace the current value (if any) 147 * with the input value. 148 * 149 * When storing into an object the data is converted to the 150 * target object type then stored in the object. This means 151 * that the target object type (for an initialized target) will 152 * not be changed by a store operation. 153 * 154 * NOTE: the global lock is acquired early. This will result 155 * in the global lock being held a bit longer. Also, if the 156 * function fails during set up we may get the lock when we 157 * don't really need it. I don't think we care. 158 * 159 ******************************************************************************/ 160 161ACPI_STATUS 162AcpiAmlStoreObjectToNode ( 163 ACPI_OPERAND_OBJECT *ValDesc, 164 ACPI_NAMESPACE_NODE *Node, 165 ACPI_WALK_STATE *WalkState) 166{ 167 ACPI_STATUS Status = AE_OK; 168 UINT8 *Buffer = NULL; 169 UINT32 Length = 0; 170 UINT32 Mask; 171 UINT32 NewValue; 172 BOOLEAN Locked = FALSE; 173 UINT8 *Location=NULL; 174 ACPI_OPERAND_OBJECT *DestDesc; 175 OBJECT_TYPE_INTERNAL DestinationType = ACPI_TYPE_ANY; 176 177 178 FUNCTION_TRACE ("AmlStoreObjectToNte"); 179 180 DEBUG_PRINT (ACPI_INFO, 181 ("entered AcpiAmlStoreObjectToNode: NamedObj=%p, Obj=%p\n", 182 Node, ValDesc)); 183 184 /* 185 * Assuming the parameters are valid!!! 186 */ 187 ACPI_ASSERT((Node) && (ValDesc)); 188 189 DestinationType = AcpiNsGetType (Node); 190 191 DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToNte: Storing %s into %s\n", 192 AcpiCmGetTypeName (ValDesc->Common.Type), 193 AcpiCmGetTypeName (DestinationType))); 194 195 /* 196 * First ensure we have a value that can be stored in the target 197 */ 198 switch (DestinationType) 199 { 200 /* Type of Name's existing value */ 201 202 case INTERNAL_TYPE_ALIAS: 203 204 /* 205 * Aliases are resolved by AcpiAmlPrepOperands 206 */ 207 208 DEBUG_PRINT (ACPI_WARN, 209 ("AmlStoreObjectToNte: Store into Alias - should never happen\n")); 210 Status = AE_AML_INTERNAL; 211 break; 212 213 214 case INTERNAL_TYPE_BANK_FIELD: 215 case INTERNAL_TYPE_INDEX_FIELD: 216 case ACPI_TYPE_FIELD_UNIT: 217 case ACPI_TYPE_NUMBER: 218 219 /* 220 * These cases all require only number values or values that 221 * can be converted to numbers. 222 * 223 * If value is not a Number, try to resolve it to one. 224 */ 225 226 if (ValDesc->Common.Type != ACPI_TYPE_NUMBER) 227 { 228 /* 229 * Initially not a number, convert 230 */ 231 Status = AcpiAmlResolveToValue (&ValDesc, WalkState); 232 if (ACPI_SUCCESS (Status) && 233 (ValDesc->Common.Type != ACPI_TYPE_NUMBER)) 234 { 235 /* 236 * Conversion successful but still not a number 237 */ 238 DEBUG_PRINT (ACPI_ERROR, 239 ("AmlStoreObjectToNte: Value assigned to %s must be Number, not %s\n", 240 AcpiCmGetTypeName (DestinationType), 241 AcpiCmGetTypeName (ValDesc->Common.Type))); 242 Status = AE_AML_OPERAND_TYPE; 243 } 244 } 245 246 break; 247 248 case ACPI_TYPE_STRING: 249 case ACPI_TYPE_BUFFER: 250 case INTERNAL_TYPE_DEF_FIELD: 251 252 /* 253 * Storing into a Field in a region or into a buffer or into 254 * a string all is essentially the same. 255 * 256 * If value is not a valid type, try to resolve it to one. 257 */ 258 259 if ((ValDesc->Common.Type != ACPI_TYPE_NUMBER) && 260 (ValDesc->Common.Type != ACPI_TYPE_BUFFER) && 261 (ValDesc->Common.Type != ACPI_TYPE_STRING)) 262 { 263 /* 264 * Initially not a valid type, convert 265 */ 266 Status = AcpiAmlResolveToValue (&ValDesc, WalkState); 267 if (ACPI_SUCCESS (Status) && 268 (ValDesc->Common.Type != ACPI_TYPE_NUMBER) && 269 (ValDesc->Common.Type != ACPI_TYPE_BUFFER) && 270 (ValDesc->Common.Type != ACPI_TYPE_STRING)) 271 { 272 /* 273 * Conversion successful but still not a valid type 274 */ 275 DEBUG_PRINT (ACPI_ERROR, 276 ("AmlStoreObjectToNte: Assign wrong type %s to %s (must be type Num/Str/Buf)\n", 277 AcpiCmGetTypeName (ValDesc->Common.Type), 278 AcpiCmGetTypeName (DestinationType))); 279 Status = AE_AML_OPERAND_TYPE; 280 } 281 } 282 break; 283 284 285 case ACPI_TYPE_PACKAGE: 286 287 /* 288 * TBD: [Unhandled] Not real sure what to do here 289 */ 290 Status = AE_NOT_IMPLEMENTED; 291 break; 292 293 294 default: 295 296 /* 297 * All other types than Alias and the various Fields come here. 298 * Store ValDesc as the new value of the Name, and set 299 * the Name's type to that of the value being stored in it. 300 * ValDesc reference count is incremented by AttachObject. 301 */ 302 303 Status = AcpiNsAttachObject (Node, ValDesc, ValDesc->Common.Type); 304 305 DEBUG_PRINT (ACPI_INFO, 306 ("AmlStoreObjectToNte: Store %s into %s via Attach\n", 307 AcpiCmGetTypeName (ValDesc->Common.Type), 308 AcpiCmGetTypeName (DestinationType))); 309 310 goto CleanUpAndBailOut; 311 break; 312 } 313 314 /* Exit now if failure above */ 315 316 if (ACPI_FAILURE (Status)) 317 { 318 goto CleanUpAndBailOut; 319 } 320 321 /* 322 * Get descriptor for object attached to Node 323 */ 324 DestDesc = AcpiNsGetAttachedObject (Node); 325 if (!DestDesc) 326 { 327 /* 328 * There is no existing object attached to this Node 329 */ 330 DEBUG_PRINT (ACPI_ERROR, 331 ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %X\n", 332 &Node->Name, DestinationType)); 333 Status = AE_AML_INTERNAL; 334 goto CleanUpAndBailOut; 335 } 336 337 /* 338 * Make sure the destination Object is the same as the Node 339 */ 340 if (DestDesc->Common.Type != (UINT8) DestinationType) 341 { 342 DEBUG_PRINT (ACPI_ERROR, 343 ("AmlStoreObjectToNte: Internal error - Name %4.4s type %X does not match value-type %X at %p\n", 344 &Node->Name, AcpiNsGetType (Node), 345 DestDesc->Common.Type, DestDesc)); 346 Status = AE_AML_INTERNAL; 347 goto CleanUpAndBailOut; 348 } 349 350 /* 351 * AcpiEverything is ready to execute now, We have 352 * a value we can handle, just perform the update 353 */ 354 355 switch (DestinationType) 356 { 357 /* Type of Name's existing value */ 358 359 case INTERNAL_TYPE_BANK_FIELD: 360 361 /* 362 * Get the global lock if needed 363 */ 364 Locked = AcpiAmlAcquireGlobalLock (DestDesc->BankField.LockRule); 365 366 /* 367 * Set Bank value to select proper Bank 368 * Perform the update (Set Bank Select) 369 */ 370 371 Status = AcpiAmlAccessNamedField (ACPI_WRITE, 372 DestDesc->BankField.BankSelect, 373 &DestDesc->BankField.Value, 374 sizeof (DestDesc->BankField.Value)); 375 if (ACPI_SUCCESS (Status)) 376 { 377 /* Set bank select successful, set data value */ 378 379 Status = AcpiAmlAccessNamedField (ACPI_WRITE, 380 DestDesc->BankField.BankSelect, 381 &ValDesc->BankField.Value, 382 sizeof (ValDesc->BankField.Value)); 383 } 384 385 break; 386 387 388 case INTERNAL_TYPE_DEF_FIELD: 389 390 /* 391 * Get the global lock if needed 392 */ 393 Locked = AcpiAmlAcquireGlobalLock (ValDesc->Field.LockRule); 394 395 /* 396 * Perform the update 397 */ 398 399 switch (ValDesc->Common.Type) 400 { 401 case ACPI_TYPE_NUMBER: 402 Buffer = (UINT8 *) &ValDesc->Number.Value; 403 Length = sizeof (ValDesc->Number.Value); 404 break; 405 406 case ACPI_TYPE_BUFFER: 407 Buffer = (UINT8 *) ValDesc->Buffer.Pointer; 408 Length = ValDesc->Buffer.Length; 409 break; 410 411 case ACPI_TYPE_STRING: 412 Buffer = (UINT8 *) ValDesc->String.Pointer; 413 Length = ValDesc->String.Length; 414 break; 415 } 416 417 Status = AcpiAmlAccessNamedField (ACPI_WRITE, 418 Node, Buffer, Length); 419 420 break; /* Global Lock released below */ 421 422 423 case ACPI_TYPE_STRING: 424 425 /* 426 * Perform the update 427 */ 428 429 switch (ValDesc->Common.Type) 430 { 431 case ACPI_TYPE_NUMBER: 432 Buffer = (UINT8 *) &ValDesc->Number.Value; 433 Length = sizeof (ValDesc->Number.Value); 434 break; 435 436 case ACPI_TYPE_BUFFER: 437 Buffer = (UINT8 *) ValDesc->Buffer.Pointer; 438 Length = ValDesc->Buffer.Length; 439 break; 440 441 case ACPI_TYPE_STRING: 442 Buffer = (UINT8 *) ValDesc->String.Pointer; 443 Length = ValDesc->String.Length; 444 break; 445 } 446 447 /* 448 * Setting a string value replaces the old string 449 */ 450 451 if (Length < DestDesc->String.Length) 452 { 453 /* 454 * Zero fill, not willing to do pointer arithmetic for 455 * archetecture independance. Just clear the whole thing 456 */ 457 MEMSET(DestDesc->String.Pointer, 0, DestDesc->String.Length); 458 MEMCPY(DestDesc->String.Pointer, Buffer, Length); 459 } 460 else 461 { 462 /* 463 * Free the current buffer, then allocate a buffer 464 * large enough to hold the value 465 */ 466 if ( DestDesc->String.Pointer && 467 !AcpiTbSystemTablePointer (DestDesc->String.Pointer)) 468 { 469 /* 470 * Only free if not a pointer into the DSDT 471 */ 472 473 AcpiCmFree(DestDesc->String.Pointer); 474 } 475 476 DestDesc->String.Pointer = AcpiCmAllocate (Length + 1); 477 DestDesc->String.Length = Length; 478 479 if (!DestDesc->String.Pointer) 480 { 481 Status = AE_NO_MEMORY; 482 goto CleanUpAndBailOut; 483 } 484 485 MEMCPY(DestDesc->String.Pointer, Buffer, Length); 486 } 487 break; 488 489 490 case ACPI_TYPE_BUFFER: 491 492 /* 493 * Perform the update to the buffer 494 */ 495 496 switch (ValDesc->Common.Type) 497 { 498 case ACPI_TYPE_NUMBER: 499 Buffer = (UINT8 *) &ValDesc->Number.Value; 500 Length = sizeof (ValDesc->Number.Value); 501 break; 502 503 case ACPI_TYPE_BUFFER: 504 Buffer = (UINT8 *) ValDesc->Buffer.Pointer; 505 Length = ValDesc->Buffer.Length; 506 break; 507 508 case ACPI_TYPE_STRING: 509 Buffer = (UINT8 *) ValDesc->String.Pointer; 510 Length = ValDesc->String.Length; 511 break; 512 } 513 514 /* 515 * Buffer is a static allocation, 516 * only place what will fit in the buffer. 517 */ 518 if (Length <= DestDesc->Buffer.Length) 519 { 520 /* 521 * Zero fill first, not willing to do pointer arithmetic for 522 * archetecture independence. Just clear the whole thing 523 */ 524 MEMSET(DestDesc->Buffer.Pointer, 0, DestDesc->Buffer.Length); 525 MEMCPY(DestDesc->Buffer.Pointer, Buffer, Length); 526 } 527 else 528 { 529 /* 530 * truncate, copy only what will fit 531 */ 532 MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length); 533 DEBUG_PRINT (ACPI_INFO, 534 ("AmlStoreObjectToNte: Truncating src buffer from %X to %X\n", 535 Length, DestDesc->Buffer.Length)); 536 } 537 break; 538 539 540 case INTERNAL_TYPE_INDEX_FIELD: 541 542 /* 543 * Get the global lock if needed 544 */ 545 Locked = AcpiAmlAcquireGlobalLock (DestDesc->IndexField.LockRule); 546 547 /* 548 * Set Index value to select proper Data register 549 * perform the update (Set index) 550 */ 551 552 Status = AcpiAmlAccessNamedField (ACPI_WRITE, 553 DestDesc->IndexField.Index, 554 &DestDesc->IndexField.Value, 555 sizeof (DestDesc->IndexField.Value)); 556 557 DEBUG_PRINT (ACPI_INFO, 558 ("AmlStoreObjectToNte: IndexField: set index returned %s\n", 559 AcpiCmFormatException (Status))); 560 561 if (ACPI_SUCCESS (Status)) 562 { 563 /* set index successful, next set Data value */ 564 565 Status = AcpiAmlAccessNamedField (ACPI_WRITE, 566 DestDesc->IndexField.Data, 567 &ValDesc->Number.Value, 568 sizeof (ValDesc->Number.Value)); 569 DEBUG_PRINT (ACPI_INFO, 570 ("AmlStoreObjectToNte: IndexField: set data returned %s\n", 571 AcpiCmFormatException (Status))); 572 } 573 break; 574 575 576 case ACPI_TYPE_FIELD_UNIT: 577 578 579 /* 580 * If the Field Buffer and Index have not been previously evaluated, 581 * evaluate them and save the results. 582 */ 583 if (!(DestDesc->Common.Flags & AOPOBJ_DATA_VALID)) 584 { 585 Status = AcpiDsGetFieldUnitArguments (DestDesc); 586 if (ACPI_FAILURE (Status)) 587 { 588 return_ACPI_STATUS (Status); 589 } 590 } 591 592 if ((!DestDesc->FieldUnit.Container || 593 ACPI_TYPE_BUFFER != DestDesc->FieldUnit.Container->Common.Type)) 594 { 595 DUMP_PATHNAME (Node, 596 "AmlStoreObjectToNte: FieldUnit: Bad container in ", 597 ACPI_ERROR, _COMPONENT); 598 DUMP_ENTRY (Node, ACPI_ERROR); 599 DEBUG_PRINT (ACPI_ERROR, 600 ("Container: %p", DestDesc->FieldUnit.Container)); 601 602 if (DestDesc->FieldUnit.Container) 603 { 604 DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X", 605 DestDesc->FieldUnit.Container->Common.Type)); 606 } 607 DEBUG_PRINT_RAW (ACPI_ERROR, ("\n")); 608 609 Status = AE_AML_INTERNAL; 610 goto CleanUpAndBailOut; 611 } 612 613 /* 614 * Get the global lock if needed 615 */ 616 Locked = AcpiAmlAcquireGlobalLock (DestDesc->FieldUnit.LockRule); 617 618 /* 619 * TBD: [Unhandled] REMOVE this limitation 620 * Make sure the operation is within the limits of our implementation 621 * this is not a Spec limitation!! 622 */ 623 if (DestDesc->FieldUnit.Length + DestDesc->FieldUnit.BitOffset > 32) 624 { 625 DEBUG_PRINT (ACPI_ERROR, 626 ("AmlStoreObjectToNte: FieldUnit: Implementation limitation - Field exceeds UINT32\n")); 627 Status = AE_NOT_IMPLEMENTED; 628 goto CleanUpAndBailOut; 629 } 630 631 /* Field location is (base of buffer) + (byte offset) */ 632 633 Location = DestDesc->FieldUnit.Container->Buffer.Pointer 634 + DestDesc->FieldUnit.Offset; 635 636 /* 637 * Construct Mask with 1 bits where the field is, 638 * 0 bits elsewhere 639 */ 640 Mask = ((UINT32) 1 << DestDesc->FieldUnit.Length) - ((UINT32)1 641 << DestDesc->FieldUnit.BitOffset); 642 643 DEBUG_PRINT (TRACE_EXEC, 644 ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n", 645 ValDesc->Number.Value, 646 DestDesc->FieldUnit.Container->Buffer.Pointer, 647 DestDesc->FieldUnit.Offset, DestDesc->FieldUnit.BitOffset, 648 DestDesc->FieldUnit.Length,Location, Mask)); 649 650 /* Zero out the field in the buffer */ 651 652 MOVE_UNALIGNED32_TO_32 (&NewValue, Location); 653 NewValue &= ~Mask; 654 655 /* 656 * Shift and mask the new value into position, 657 * and or it into the buffer. 658 */ 659 NewValue |= (ValDesc->Number.Value << DestDesc->FieldUnit.BitOffset) & 660 Mask; 661 662 /* Store back the value */ 663 664 MOVE_UNALIGNED32_TO_32 (Location, &NewValue); 665 666 DEBUG_PRINT (TRACE_EXEC, ("New Field value %08lx\n", NewValue)); 667 break; 668 669 670 case ACPI_TYPE_NUMBER: 671 672 673 DestDesc->Number.Value = ValDesc->Number.Value; 674 675 /* Truncate value if we are executing from a 32-bit ACPI table */ 676 677 AcpiAmlTruncateFor32bitTable (DestDesc, WalkState); 678 break; 679 680 681 case ACPI_TYPE_PACKAGE: 682 683 /* 684 * TBD: [Unhandled] Not real sure what to do here 685 */ 686 Status = AE_NOT_IMPLEMENTED; 687 break; 688 689 690 default: 691 692 /* 693 * All other types than Alias and the various Fields come here. 694 * Store ValDesc as the new value of the Name, and set 695 * the Name's type to that of the value being stored in it. 696 * ValDesc reference count is incremented by AttachObject. 697 */ 698 699 DEBUG_PRINT (ACPI_WARN, 700 ("AmlStoreObjectToNte: Store into %s not implemented\n", 701 AcpiCmGetTypeName (AcpiNsGetType (Node)))); 702 703 Status = AE_NOT_IMPLEMENTED; 704 break; 705 } 706 707 708CleanUpAndBailOut: 709 710 /* 711 * Release global lock if we acquired it earlier 712 */ 713 AcpiAmlReleaseGlobalLock (Locked); 714 715 return_ACPI_STATUS (Status); 716} 717 718 719