1 /****************************************************************************** 2 * 3 * Module Name: utdecode - Utility decoding routines (value-to-string) 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2016, Intel Corp. 12 * All rights reserved. 13 * 14 * 2. License 15 * 16 * 2.1. This is your license from Intel Corp. under its intellectual property 17 * rights. You may have additional license terms from the party that provided 18 * you this software, covering your right to use that party's intellectual 19 * property rights. 20 * 21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22 * copy of the source code appearing in this file ("Covered Code") an 23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24 * base code distributed originally by Intel ("Original Intel Code") to copy, 25 * make derivatives, distribute, use and display any portion of the Covered 26 * Code in any form, with the right to sublicense such rights; and 27 * 28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29 * license (with the right to sublicense), under only those claims of Intel 30 * patents that are infringed by the Original Intel Code, to make, use, sell, 31 * offer to sell, and import the Covered Code and derivative works thereof 32 * solely to the minimum extent necessary to exercise the above copyright 33 * license, and in no event shall the patent license extend to any additions 34 * to or modifications of the Original Intel Code. No other license or right 35 * is granted directly or by implication, estoppel or otherwise; 36 * 37 * The above copyright and patent license is granted only if the following 38 * conditions are met: 39 * 40 * 3. Conditions 41 * 42 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43 * Redistribution of source code of any substantial portion of the Covered 44 * Code or modification with rights to further distribute source must include 45 * the above Copyright Notice, the above License, this list of Conditions, 46 * and the following Disclaimer and Export Compliance provision. In addition, 47 * Licensee must cause all Covered Code to which Licensee contributes to 48 * contain a file documenting the changes Licensee made to create that Covered 49 * Code and the date of any change. Licensee must include in that file the 50 * documentation of any changes made by any predecessor Licensee. Licensee 51 * must include a prominent statement that the modification is derived, 52 * directly or indirectly, from Original Intel Code. 53 * 54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55 * Redistribution of source code of any substantial portion of the Covered 56 * Code or modification without rights to further distribute source must 57 * include the following Disclaimer and Export Compliance provision in the 58 * documentation and/or other materials provided with distribution. In 59 * addition, Licensee may not authorize further sublicense of source of any 60 * portion of the Covered Code, and must include terms to the effect that the 61 * license from Licensee to its licensee is limited to the intellectual 62 * property embodied in the software Licensee provides to its licensee, and 63 * not to intellectual property embodied in modifications its licensee may 64 * make. 65 * 66 * 3.3. Redistribution of Executable. Redistribution in executable form of any 67 * substantial portion of the Covered Code or modification must reproduce the 68 * above Copyright Notice, and the following Disclaimer and Export Compliance 69 * provision in the documentation and/or other materials provided with the 70 * distribution. 71 * 72 * 3.4. Intel retains all right, title, and interest in and to the Original 73 * Intel Code. 74 * 75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76 * Intel shall be used in advertising or otherwise to promote the sale, use or 77 * other dealings in products derived from or relating to the Covered Code 78 * without prior written authorization from Intel. 79 * 80 * 4. Disclaimer and Export Compliance 81 * 82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88 * PARTICULAR PURPOSE. 89 * 90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97 * LIMITED REMEDY. 98 * 99 * 4.3. Licensee shall not export, either directly or indirectly, any of this 100 * software or system incorporating such software without first obtaining any 101 * required license or other approval from the U. S. Department of Commerce or 102 * any other agency or department of the United States Government. In the 103 * event Licensee exports any such software from the United States or 104 * re-exports any such software from a foreign destination, Licensee shall 105 * ensure that the distribution and export/re-export of the software is in 106 * compliance with all laws, regulations, orders, or other restrictions of the 107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108 * any of its subsidiaries will export/re-export any technical data, process, 109 * software, or service, directly or indirectly, to any country for which the 110 * United States government or any agency thereof requires an export license, 111 * other governmental approval, or letter of assurance, without first obtaining 112 * such license, approval or letter. 113 * 114 *****************************************************************************/ 115 116 #include "acpi.h" 117 #include "accommon.h" 118 #include "acnamesp.h" 119 120 #define _COMPONENT ACPI_UTILITIES 121 ACPI_MODULE_NAME ("utdecode") 122 123 124 /* 125 * Properties of the ACPI Object Types, both internal and external. 126 * The table is indexed by values of ACPI_OBJECT_TYPE 127 */ 128 const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] = 129 { 130 ACPI_NS_NORMAL, /* 00 Any */ 131 ACPI_NS_NORMAL, /* 01 Number */ 132 ACPI_NS_NORMAL, /* 02 String */ 133 ACPI_NS_NORMAL, /* 03 Buffer */ 134 ACPI_NS_NORMAL, /* 04 Package */ 135 ACPI_NS_NORMAL, /* 05 FieldUnit */ 136 ACPI_NS_NEWSCOPE, /* 06 Device */ 137 ACPI_NS_NORMAL, /* 07 Event */ 138 ACPI_NS_NEWSCOPE, /* 08 Method */ 139 ACPI_NS_NORMAL, /* 09 Mutex */ 140 ACPI_NS_NORMAL, /* 10 Region */ 141 ACPI_NS_NEWSCOPE, /* 11 Power */ 142 ACPI_NS_NEWSCOPE, /* 12 Processor */ 143 ACPI_NS_NEWSCOPE, /* 13 Thermal */ 144 ACPI_NS_NORMAL, /* 14 BufferField */ 145 ACPI_NS_NORMAL, /* 15 DdbHandle */ 146 ACPI_NS_NORMAL, /* 16 Debug Object */ 147 ACPI_NS_NORMAL, /* 17 DefField */ 148 ACPI_NS_NORMAL, /* 18 BankField */ 149 ACPI_NS_NORMAL, /* 19 IndexField */ 150 ACPI_NS_NORMAL, /* 20 Reference */ 151 ACPI_NS_NORMAL, /* 21 Alias */ 152 ACPI_NS_NORMAL, /* 22 MethodAlias */ 153 ACPI_NS_NORMAL, /* 23 Notify */ 154 ACPI_NS_NORMAL, /* 24 Address Handler */ 155 ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */ 156 ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */ 157 ACPI_NS_NEWSCOPE, /* 27 Scope */ 158 ACPI_NS_NORMAL, /* 28 Extra */ 159 ACPI_NS_NORMAL, /* 29 Data */ 160 ACPI_NS_NORMAL /* 30 Invalid */ 161 }; 162 163 164 /******************************************************************************* 165 * 166 * FUNCTION: AcpiUtGetRegionName 167 * 168 * PARAMETERS: Space ID - ID for the region 169 * 170 * RETURN: Decoded region SpaceId name 171 * 172 * DESCRIPTION: Translate a Space ID into a name string (Debug only) 173 * 174 ******************************************************************************/ 175 176 /* Region type decoding */ 177 178 const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = 179 { 180 "SystemMemory", /* 0x00 */ 181 "SystemIO", /* 0x01 */ 182 "PCI_Config", /* 0x02 */ 183 "EmbeddedControl", /* 0x03 */ 184 "SMBus", /* 0x04 */ 185 "SystemCMOS", /* 0x05 */ 186 "PCIBARTarget", /* 0x06 */ 187 "IPMI", /* 0x07 */ 188 "GeneralPurposeIo", /* 0x08 */ 189 "GenericSerialBus", /* 0x09 */ 190 "PCC" /* 0x0A */ 191 }; 192 193 194 const char * 195 AcpiUtGetRegionName ( 196 UINT8 SpaceId) 197 { 198 199 if (SpaceId >= ACPI_USER_REGION_BEGIN) 200 { 201 return ("UserDefinedRegion"); 202 } 203 else if (SpaceId == ACPI_ADR_SPACE_DATA_TABLE) 204 { 205 return ("DataTable"); 206 } 207 else if (SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE) 208 { 209 return ("FunctionalFixedHW"); 210 } 211 else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) 212 { 213 return ("InvalidSpaceId"); 214 } 215 216 return (AcpiGbl_RegionTypes[SpaceId]); 217 } 218 219 220 /******************************************************************************* 221 * 222 * FUNCTION: AcpiUtGetEventName 223 * 224 * PARAMETERS: EventId - Fixed event ID 225 * 226 * RETURN: Decoded event ID name 227 * 228 * DESCRIPTION: Translate a Event ID into a name string (Debug only) 229 * 230 ******************************************************************************/ 231 232 /* Event type decoding */ 233 234 static const char *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = 235 { 236 "PM_Timer", 237 "GlobalLock", 238 "PowerButton", 239 "SleepButton", 240 "RealTimeClock", 241 }; 242 243 244 const char * 245 AcpiUtGetEventName ( 246 UINT32 EventId) 247 { 248 249 if (EventId > ACPI_EVENT_MAX) 250 { 251 return ("InvalidEventID"); 252 } 253 254 return (AcpiGbl_EventTypes[EventId]); 255 } 256 257 258 /******************************************************************************* 259 * 260 * FUNCTION: AcpiUtGetTypeName 261 * 262 * PARAMETERS: Type - An ACPI object type 263 * 264 * RETURN: Decoded ACPI object type name 265 * 266 * DESCRIPTION: Translate a Type ID into a name string (Debug only) 267 * 268 ******************************************************************************/ 269 270 /* 271 * Elements of AcpiGbl_NsTypeNames below must match 272 * one-to-one with values of ACPI_OBJECT_TYPE 273 * 274 * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching; 275 * when stored in a table it really means that we have thus far seen no 276 * evidence to indicate what type is actually going to be stored for this 277 & entry. 278 */ 279 static const char AcpiGbl_BadType[] = "UNDEFINED"; 280 281 /* Printable names of the ACPI object types */ 282 283 static const char *AcpiGbl_NsTypeNames[] = 284 { 285 /* 00 */ "Untyped", 286 /* 01 */ "Integer", 287 /* 02 */ "String", 288 /* 03 */ "Buffer", 289 /* 04 */ "Package", 290 /* 05 */ "FieldUnit", 291 /* 06 */ "Device", 292 /* 07 */ "Event", 293 /* 08 */ "Method", 294 /* 09 */ "Mutex", 295 /* 10 */ "Region", 296 /* 11 */ "Power", 297 /* 12 */ "Processor", 298 /* 13 */ "Thermal", 299 /* 14 */ "BufferField", 300 /* 15 */ "DdbHandle", 301 /* 16 */ "DebugObject", 302 /* 17 */ "RegionField", 303 /* 18 */ "BankField", 304 /* 19 */ "IndexField", 305 /* 20 */ "Reference", 306 /* 21 */ "Alias", 307 /* 22 */ "MethodAlias", 308 /* 23 */ "Notify", 309 /* 24 */ "AddrHandler", 310 /* 25 */ "ResourceDesc", 311 /* 26 */ "ResourceFld", 312 /* 27 */ "Scope", 313 /* 28 */ "Extra", 314 /* 29 */ "Data", 315 /* 30 */ "Invalid" 316 }; 317 318 319 const char * 320 AcpiUtGetTypeName ( 321 ACPI_OBJECT_TYPE Type) 322 { 323 324 if (Type > ACPI_TYPE_INVALID) 325 { 326 return (AcpiGbl_BadType); 327 } 328 329 return (AcpiGbl_NsTypeNames[Type]); 330 } 331 332 333 const char * 334 AcpiUtGetObjectTypeName ( 335 ACPI_OPERAND_OBJECT *ObjDesc) 336 { 337 ACPI_FUNCTION_TRACE (UtGetObjectTypeName); 338 339 340 if (!ObjDesc) 341 { 342 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n")); 343 return_PTR ("[NULL Object Descriptor]"); 344 } 345 346 /* These descriptor types share a common area */ 347 348 if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) && 349 (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_NAMED)) 350 { 351 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 352 "Invalid object descriptor type: 0x%2.2X [%s] (%p)\n", 353 ACPI_GET_DESCRIPTOR_TYPE (ObjDesc), 354 AcpiUtGetDescriptorName (ObjDesc), ObjDesc)); 355 356 return_PTR ("Invalid object"); 357 } 358 359 return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type)); 360 } 361 362 363 /******************************************************************************* 364 * 365 * FUNCTION: AcpiUtGetNodeName 366 * 367 * PARAMETERS: Object - A namespace node 368 * 369 * RETURN: ASCII name of the node 370 * 371 * DESCRIPTION: Validate the node and return the node's ACPI name. 372 * 373 ******************************************************************************/ 374 375 const char * 376 AcpiUtGetNodeName ( 377 void *Object) 378 { 379 ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) Object; 380 381 382 /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ 383 384 if (!Object) 385 { 386 return ("NULL"); 387 } 388 389 /* Check for Root node */ 390 391 if ((Object == ACPI_ROOT_OBJECT) || 392 (Object == AcpiGbl_RootNode)) 393 { 394 return ("\"\\\" "); 395 } 396 397 /* Descriptor must be a namespace node */ 398 399 if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED) 400 { 401 return ("####"); 402 } 403 404 /* 405 * Ensure name is valid. The name was validated/repaired when the node 406 * was created, but make sure it has not been corrupted. 407 */ 408 AcpiUtRepairName (Node->Name.Ascii); 409 410 /* Return the name */ 411 412 return (Node->Name.Ascii); 413 } 414 415 416 /******************************************************************************* 417 * 418 * FUNCTION: AcpiUtGetDescriptorName 419 * 420 * PARAMETERS: Object - An ACPI object 421 * 422 * RETURN: Decoded name of the descriptor type 423 * 424 * DESCRIPTION: Validate object and return the descriptor type 425 * 426 ******************************************************************************/ 427 428 /* Printable names of object descriptor types */ 429 430 static const char *AcpiGbl_DescTypeNames[] = 431 { 432 /* 00 */ "Not a Descriptor", 433 /* 01 */ "Cached", 434 /* 02 */ "State-Generic", 435 /* 03 */ "State-Update", 436 /* 04 */ "State-Package", 437 /* 05 */ "State-Control", 438 /* 06 */ "State-RootParseScope", 439 /* 07 */ "State-ParseScope", 440 /* 08 */ "State-WalkScope", 441 /* 09 */ "State-Result", 442 /* 10 */ "State-Notify", 443 /* 11 */ "State-Thread", 444 /* 12 */ "Walk", 445 /* 13 */ "Parser", 446 /* 14 */ "Operand", 447 /* 15 */ "Node" 448 }; 449 450 451 const char * 452 AcpiUtGetDescriptorName ( 453 void *Object) 454 { 455 456 if (!Object) 457 { 458 return ("NULL OBJECT"); 459 } 460 461 if (ACPI_GET_DESCRIPTOR_TYPE (Object) > ACPI_DESC_TYPE_MAX) 462 { 463 return ("Not a Descriptor"); 464 } 465 466 return (AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]); 467 } 468 469 470 /******************************************************************************* 471 * 472 * FUNCTION: AcpiUtGetReferenceName 473 * 474 * PARAMETERS: Object - An ACPI reference object 475 * 476 * RETURN: Decoded name of the type of reference 477 * 478 * DESCRIPTION: Decode a reference object sub-type to a string. 479 * 480 ******************************************************************************/ 481 482 /* Printable names of reference object sub-types */ 483 484 static const char *AcpiGbl_RefClassNames[] = 485 { 486 /* 00 */ "Local", 487 /* 01 */ "Argument", 488 /* 02 */ "RefOf", 489 /* 03 */ "Index", 490 /* 04 */ "DdbHandle", 491 /* 05 */ "Named Object", 492 /* 06 */ "Debug" 493 }; 494 495 const char * 496 AcpiUtGetReferenceName ( 497 ACPI_OPERAND_OBJECT *Object) 498 { 499 500 if (!Object) 501 { 502 return ("NULL Object"); 503 } 504 505 if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND) 506 { 507 return ("Not an Operand object"); 508 } 509 510 if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE) 511 { 512 return ("Not a Reference object"); 513 } 514 515 if (Object->Reference.Class > ACPI_REFCLASS_MAX) 516 { 517 return ("Unknown Reference class"); 518 } 519 520 return (AcpiGbl_RefClassNames[Object->Reference.Class]); 521 } 522 523 524 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 525 /* 526 * Strings and procedures used for debug only 527 */ 528 529 /******************************************************************************* 530 * 531 * FUNCTION: AcpiUtGetMutexName 532 * 533 * PARAMETERS: MutexId - The predefined ID for this mutex. 534 * 535 * RETURN: Decoded name of the internal mutex 536 * 537 * DESCRIPTION: Translate a mutex ID into a name string (Debug only) 538 * 539 ******************************************************************************/ 540 541 /* Names for internal mutex objects, used for debug output */ 542 543 static const char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = 544 { 545 "ACPI_MTX_Interpreter", 546 "ACPI_MTX_Namespace", 547 "ACPI_MTX_Tables", 548 "ACPI_MTX_Events", 549 "ACPI_MTX_Caches", 550 "ACPI_MTX_Memory", 551 }; 552 553 const char * 554 AcpiUtGetMutexName ( 555 UINT32 MutexId) 556 { 557 558 if (MutexId > ACPI_MAX_MUTEX) 559 { 560 return ("Invalid Mutex ID"); 561 } 562 563 return (AcpiGbl_MutexNames[MutexId]); 564 } 565 566 567 /******************************************************************************* 568 * 569 * FUNCTION: AcpiUtGetNotifyName 570 * 571 * PARAMETERS: NotifyValue - Value from the Notify() request 572 * 573 * RETURN: Decoded name for the notify value 574 * 575 * DESCRIPTION: Translate a Notify Value to a notify namestring. 576 * 577 ******************************************************************************/ 578 579 /* Names for Notify() values, used for debug output */ 580 581 static const char *AcpiGbl_GenericNotify[ACPI_GENERIC_NOTIFY_MAX + 1] = 582 { 583 /* 00 */ "Bus Check", 584 /* 01 */ "Device Check", 585 /* 02 */ "Device Wake", 586 /* 03 */ "Eject Request", 587 /* 04 */ "Device Check Light", 588 /* 05 */ "Frequency Mismatch", 589 /* 06 */ "Bus Mode Mismatch", 590 /* 07 */ "Power Fault", 591 /* 08 */ "Capabilities Check", 592 /* 09 */ "Device PLD Check", 593 /* 0A */ "Reserved", 594 /* 0B */ "System Locality Update", 595 /* 0C */ "Shutdown Request", /* Reserved in ACPI 6.0 */ 596 /* 0D */ "System Resource Affinity Update" 597 }; 598 599 static const char *AcpiGbl_DeviceNotify[5] = 600 { 601 /* 80 */ "Status Change", 602 /* 81 */ "Information Change", 603 /* 82 */ "Device-Specific Change", 604 /* 83 */ "Device-Specific Change", 605 /* 84 */ "Reserved" 606 }; 607 608 static const char *AcpiGbl_ProcessorNotify[5] = 609 { 610 /* 80 */ "Performance Capability Change", 611 /* 81 */ "C-State Change", 612 /* 82 */ "Throttling Capability Change", 613 /* 83 */ "Guaranteed Change", 614 /* 84 */ "Minimum Excursion" 615 }; 616 617 static const char *AcpiGbl_ThermalNotify[5] = 618 { 619 /* 80 */ "Thermal Status Change", 620 /* 81 */ "Thermal Trip Point Change", 621 /* 82 */ "Thermal Device List Change", 622 /* 83 */ "Thermal Relationship Change", 623 /* 84 */ "Reserved" 624 }; 625 626 627 const char * 628 AcpiUtGetNotifyName ( 629 UINT32 NotifyValue, 630 ACPI_OBJECT_TYPE Type) 631 { 632 633 /* 00 - 0D are "common to all object types" (from ACPI Spec) */ 634 635 if (NotifyValue <= ACPI_GENERIC_NOTIFY_MAX) 636 { 637 return (AcpiGbl_GenericNotify[NotifyValue]); 638 } 639 640 /* 0E - 7F are reserved */ 641 642 if (NotifyValue <= ACPI_MAX_SYS_NOTIFY) 643 { 644 return ("Reserved"); 645 } 646 647 /* 80 - 84 are per-object-type */ 648 649 if (NotifyValue <= ACPI_SPECIFIC_NOTIFY_MAX) 650 { 651 switch (Type) 652 { 653 case ACPI_TYPE_ANY: 654 case ACPI_TYPE_DEVICE: 655 return (AcpiGbl_DeviceNotify [NotifyValue - 0x80]); 656 657 case ACPI_TYPE_PROCESSOR: 658 return (AcpiGbl_ProcessorNotify [NotifyValue - 0x80]); 659 660 case ACPI_TYPE_THERMAL: 661 return (AcpiGbl_ThermalNotify [NotifyValue - 0x80]); 662 663 default: 664 return ("Target object type does not support notifies"); 665 } 666 } 667 668 /* 84 - BF are device-specific */ 669 670 if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) 671 { 672 return ("Device-Specific"); 673 } 674 675 /* C0 and above are hardware-specific */ 676 677 return ("Hardware-Specific"); 678 } 679 #endif 680 681 682 /******************************************************************************* 683 * 684 * FUNCTION: AcpiUtValidObjectType 685 * 686 * PARAMETERS: Type - Object type to be validated 687 * 688 * RETURN: TRUE if valid object type, FALSE otherwise 689 * 690 * DESCRIPTION: Validate an object type 691 * 692 ******************************************************************************/ 693 694 BOOLEAN 695 AcpiUtValidObjectType ( 696 ACPI_OBJECT_TYPE Type) 697 { 698 699 if (Type > ACPI_TYPE_LOCAL_MAX) 700 { 701 /* Note: Assumes all TYPEs are contiguous (external/local) */ 702 703 return (FALSE); 704 } 705 706 return (TRUE); 707 } 708