Path: blob/main/sys/contrib/dev/acpica/components/utilities/utdecode.c
48406 views
/******************************************************************************1*2* Module Name: utdecode - Utility decoding routines (value-to-string)3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#include <contrib/dev/acpica/include/acpi.h>152#include <contrib/dev/acpica/include/accommon.h>153#include <contrib/dev/acpica/include/acnamesp.h>154#include <contrib/dev/acpica/include/amlcode.h>155156#define _COMPONENT ACPI_UTILITIES157ACPI_MODULE_NAME ("utdecode")158159160/*161* Properties of the ACPI Object Types, both internal and external.162* The table is indexed by values of ACPI_OBJECT_TYPE163*/164const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] =165{166ACPI_NS_NORMAL, /* 00 Any */167ACPI_NS_NORMAL, /* 01 Number */168ACPI_NS_NORMAL, /* 02 String */169ACPI_NS_NORMAL, /* 03 Buffer */170ACPI_NS_NORMAL, /* 04 Package */171ACPI_NS_NORMAL, /* 05 FieldUnit */172ACPI_NS_NEWSCOPE, /* 06 Device */173ACPI_NS_NORMAL, /* 07 Event */174ACPI_NS_NEWSCOPE, /* 08 Method */175ACPI_NS_NORMAL, /* 09 Mutex */176ACPI_NS_NORMAL, /* 10 Region */177ACPI_NS_NEWSCOPE, /* 11 Power */178ACPI_NS_NEWSCOPE, /* 12 Processor */179ACPI_NS_NEWSCOPE, /* 13 Thermal */180ACPI_NS_NORMAL, /* 14 BufferField */181ACPI_NS_NORMAL, /* 15 DdbHandle */182ACPI_NS_NORMAL, /* 16 Debug Object */183ACPI_NS_NORMAL, /* 17 DefField */184ACPI_NS_NORMAL, /* 18 BankField */185ACPI_NS_NORMAL, /* 19 IndexField */186ACPI_NS_NORMAL, /* 20 Reference */187ACPI_NS_NORMAL, /* 21 Alias */188ACPI_NS_NORMAL, /* 22 MethodAlias */189ACPI_NS_NORMAL, /* 23 Notify */190ACPI_NS_NORMAL, /* 24 Address Handler */191ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */192ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */193ACPI_NS_NEWSCOPE, /* 27 Scope */194ACPI_NS_NORMAL, /* 28 Extra */195ACPI_NS_NORMAL, /* 29 Data */196ACPI_NS_NORMAL /* 30 Invalid */197};198199200/*******************************************************************************201*202* FUNCTION: AcpiUtGetRegionName203*204* PARAMETERS: Space ID - ID for the region205*206* RETURN: Decoded region SpaceId name207*208* DESCRIPTION: Translate a Space ID into a name string (Debug only)209*210******************************************************************************/211212/* Region type decoding */213214const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =215{216"SystemMemory", /* 0x00 */217"SystemIO", /* 0x01 */218"PCI_Config", /* 0x02 */219"EmbeddedControl", /* 0x03 */220"SMBus", /* 0x04 */221"SystemCMOS", /* 0x05 */222"PCIBARTarget", /* 0x06 */223"IPMI", /* 0x07 */224"GeneralPurposeIo", /* 0x08 */225"GenericSerialBus", /* 0x09 */226"PCC", /* 0x0A */227"PlatformRtMechanism" /* 0x0B */228};229230231const char *232AcpiUtGetRegionName (233UINT8 SpaceId)234{235236if (SpaceId >= ACPI_USER_REGION_BEGIN)237{238return ("UserDefinedRegion");239}240else if (SpaceId == ACPI_ADR_SPACE_DATA_TABLE)241{242return ("DataTable");243}244else if (SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)245{246return ("FunctionalFixedHW");247}248else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS)249{250return ("InvalidSpaceId");251}252253return (AcpiGbl_RegionTypes[SpaceId]);254}255256257/*******************************************************************************258*259* FUNCTION: AcpiUtGetEventName260*261* PARAMETERS: EventId - Fixed event ID262*263* RETURN: Decoded event ID name264*265* DESCRIPTION: Translate a Event ID into a name string (Debug only)266*267******************************************************************************/268269/* Event type decoding */270271static const char *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] =272{273"PM_Timer",274"GlobalLock",275"PowerButton",276"SleepButton",277"RealTimeClock",278};279280281const char *282AcpiUtGetEventName (283UINT32 EventId)284{285286if (EventId > ACPI_EVENT_MAX)287{288return ("InvalidEventID");289}290291return (AcpiGbl_EventTypes[EventId]);292}293294295/*******************************************************************************296*297* FUNCTION: AcpiUtGetTypeName298*299* PARAMETERS: Type - An ACPI object type300*301* RETURN: Decoded ACPI object type name302*303* DESCRIPTION: Translate a Type ID into a name string (Debug only)304*305******************************************************************************/306307/*308* Elements of AcpiGbl_NsTypeNames below must match309* one-to-one with values of ACPI_OBJECT_TYPE310*311* The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching;312* when stored in a table it really means that we have thus far seen no313* evidence to indicate what type is actually going to be stored for this314& entry.315*/316static const char AcpiGbl_BadType[] = "UNDEFINED";317318/* Printable names of the ACPI object types */319320static const char *AcpiGbl_NsTypeNames[] =321{322/* 00 */ "Untyped",323/* 01 */ "Integer",324/* 02 */ "String",325/* 03 */ "Buffer",326/* 04 */ "Package",327/* 05 */ "FieldUnit",328/* 06 */ "Device",329/* 07 */ "Event",330/* 08 */ "Method",331/* 09 */ "Mutex",332/* 10 */ "Region",333/* 11 */ "Power",334/* 12 */ "Processor",335/* 13 */ "Thermal",336/* 14 */ "BufferField",337/* 15 */ "DdbHandle",338/* 16 */ "DebugObject",339/* 17 */ "RegionField",340/* 18 */ "BankField",341/* 19 */ "IndexField",342/* 20 */ "Reference",343/* 21 */ "Alias",344/* 22 */ "MethodAlias",345/* 23 */ "Notify",346/* 24 */ "AddrHandler",347/* 25 */ "ResourceDesc",348/* 26 */ "ResourceFld",349/* 27 */ "Scope",350/* 28 */ "Extra",351/* 29 */ "Data",352/* 30 */ "Invalid"353};354355356const char *357AcpiUtGetTypeName (358ACPI_OBJECT_TYPE Type)359{360361if (Type > ACPI_TYPE_INVALID)362{363return (AcpiGbl_BadType);364}365366return (AcpiGbl_NsTypeNames[Type]);367}368369370const char *371AcpiUtGetObjectTypeName (372ACPI_OPERAND_OBJECT *ObjDesc)373{374ACPI_FUNCTION_TRACE (UtGetObjectTypeName);375376377if (!ObjDesc)378{379ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));380return_STR ("[NULL Object Descriptor]");381}382383/* These descriptor types share a common area */384385if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) &&386(ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_NAMED))387{388ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,389"Invalid object descriptor type: 0x%2.2X [%s] (%p)\n",390ACPI_GET_DESCRIPTOR_TYPE (ObjDesc),391AcpiUtGetDescriptorName (ObjDesc), ObjDesc));392393return_STR ("Invalid object");394}395396return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type));397}398399400/*******************************************************************************401*402* FUNCTION: AcpiUtGetNodeName403*404* PARAMETERS: Object - A namespace node405*406* RETURN: ASCII name of the node407*408* DESCRIPTION: Validate the node and return the node's ACPI name.409*410******************************************************************************/411412const char *413AcpiUtGetNodeName (414void *Object)415{416ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) Object;417418419/* Must return a string of exactly 4 characters == ACPI_NAMESEG_SIZE */420421if (!Object)422{423return ("NULL");424}425426/* Check for Root node */427428if ((Object == ACPI_ROOT_OBJECT) ||429(Object == AcpiGbl_RootNode))430{431return ("\"\\\" ");432}433434/* Descriptor must be a namespace node */435436if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)437{438return ("####");439}440441/*442* Ensure name is valid. The name was validated/repaired when the node443* was created, but make sure it has not been corrupted.444*/445AcpiUtRepairName (Node->Name.Ascii);446447/* Return the name */448449return (Node->Name.Ascii);450}451452453/*******************************************************************************454*455* FUNCTION: AcpiUtGetDescriptorName456*457* PARAMETERS: Object - An ACPI object458*459* RETURN: Decoded name of the descriptor type460*461* DESCRIPTION: Validate object and return the descriptor type462*463******************************************************************************/464465/* Printable names of object descriptor types */466467static const char *AcpiGbl_DescTypeNames[] =468{469/* 00 */ "Not a Descriptor",470/* 01 */ "Cached Object",471/* 02 */ "State-Generic",472/* 03 */ "State-Update",473/* 04 */ "State-Package",474/* 05 */ "State-Control",475/* 06 */ "State-RootParseScope",476/* 07 */ "State-ParseScope",477/* 08 */ "State-WalkScope",478/* 09 */ "State-Result",479/* 10 */ "State-Notify",480/* 11 */ "State-Thread",481/* 12 */ "Tree Walk State",482/* 13 */ "Parse Tree Op",483/* 14 */ "Operand Object",484/* 15 */ "Namespace Node"485};486487488const char *489AcpiUtGetDescriptorName (490void *Object)491{492493if (!Object)494{495return ("NULL OBJECT");496}497498if (ACPI_GET_DESCRIPTOR_TYPE (Object) > ACPI_DESC_TYPE_MAX)499{500return ("Not a Descriptor");501}502503return (AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]);504}505506507/*******************************************************************************508*509* FUNCTION: AcpiUtGetReferenceName510*511* PARAMETERS: Object - An ACPI reference object512*513* RETURN: Decoded name of the type of reference514*515* DESCRIPTION: Decode a reference object sub-type to a string.516*517******************************************************************************/518519/* Printable names of reference object sub-types */520521static const char *AcpiGbl_RefClassNames[] =522{523/* 00 */ "Local",524/* 01 */ "Argument",525/* 02 */ "RefOf",526/* 03 */ "Index",527/* 04 */ "DdbHandle",528/* 05 */ "Named Object",529/* 06 */ "Debug"530};531532const char *533AcpiUtGetReferenceName (534ACPI_OPERAND_OBJECT *Object)535{536537if (!Object)538{539return ("NULL Object");540}541542if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)543{544return ("Not an Operand object");545}546547if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE)548{549return ("Not a Reference object");550}551552if (Object->Reference.Class > ACPI_REFCLASS_MAX)553{554return ("Unknown Reference class");555}556557return (AcpiGbl_RefClassNames[Object->Reference.Class]);558}559560561/*******************************************************************************562*563* FUNCTION: AcpiUtGetMutexName564*565* PARAMETERS: MutexId - The predefined ID for this mutex.566*567* RETURN: Decoded name of the internal mutex568*569* DESCRIPTION: Translate a mutex ID into a name string (Debug only)570*571******************************************************************************/572573/* Names for internal mutex objects, used for debug output */574575static const char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] =576{577"ACPI_MTX_Interpreter",578"ACPI_MTX_Namespace",579"ACPI_MTX_Tables",580"ACPI_MTX_Events",581"ACPI_MTX_Caches",582"ACPI_MTX_Memory",583};584585const char *586AcpiUtGetMutexName (587UINT32 MutexId)588{589590if (MutexId > ACPI_MAX_MUTEX)591{592return ("Invalid Mutex ID");593}594595return (AcpiGbl_MutexNames[MutexId]);596}597598599#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)600601/*602* Strings and procedures used for debug only603*/604605/*******************************************************************************606*607* FUNCTION: AcpiUtGetNotifyName608*609* PARAMETERS: NotifyValue - Value from the Notify() request610*611* RETURN: Decoded name for the notify value612*613* DESCRIPTION: Translate a Notify Value to a notify namestring.614*615******************************************************************************/616617/* Names for Notify() values, used for debug output */618619static const char *AcpiGbl_GenericNotify[ACPI_GENERIC_NOTIFY_MAX + 1] =620{621/* 00 */ "Bus Check",622/* 01 */ "Device Check",623/* 02 */ "Device Wake",624/* 03 */ "Eject Request",625/* 04 */ "Device Check Light",626/* 05 */ "Frequency Mismatch",627/* 06 */ "Bus Mode Mismatch",628/* 07 */ "Power Fault",629/* 08 */ "Capabilities Check",630/* 09 */ "Device PLD Check",631/* 0A */ "Reserved",632/* 0B */ "System Locality Update",633/* 0C */ "Reserved (was previously Shutdown Request)", /* Reserved in ACPI 6.0 */634/* 0D */ "System Resource Affinity Update",635/* 0E */ "Heterogeneous Memory Attributes Update", /* ACPI 6.2 */636/* 0F */ "Error Disconnect Recover" /* ACPI 6.3 */637};638639static const char *AcpiGbl_DeviceNotify[5] =640{641/* 80 */ "Status Change",642/* 81 */ "Information Change",643/* 82 */ "Device-Specific Change",644/* 83 */ "Device-Specific Change",645/* 84 */ "Reserved"646};647648static const char *AcpiGbl_ProcessorNotify[5] =649{650/* 80 */ "Performance Capability Change",651/* 81 */ "C-State Change",652/* 82 */ "Throttling Capability Change",653/* 83 */ "Guaranteed Change",654/* 84 */ "Minimum Excursion"655};656657static const char *AcpiGbl_ThermalNotify[5] =658{659/* 80 */ "Thermal Status Change",660/* 81 */ "Thermal Trip Point Change",661/* 82 */ "Thermal Device List Change",662/* 83 */ "Thermal Relationship Change",663/* 84 */ "Reserved"664};665666667const char *668AcpiUtGetNotifyName (669UINT32 NotifyValue,670ACPI_OBJECT_TYPE Type)671{672673/* 00 - 0F are "common to all object types" (from ACPI Spec) */674675if (NotifyValue <= ACPI_GENERIC_NOTIFY_MAX)676{677return (AcpiGbl_GenericNotify[NotifyValue]);678}679680/* 10 - 7F are reserved */681682if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)683{684return ("Reserved");685}686687/* 80 - 84 are per-object-type */688689if (NotifyValue <= ACPI_SPECIFIC_NOTIFY_MAX)690{691switch (Type)692{693case ACPI_TYPE_ANY:694case ACPI_TYPE_DEVICE:695return (AcpiGbl_DeviceNotify [NotifyValue - 0x80]);696697case ACPI_TYPE_PROCESSOR:698return (AcpiGbl_ProcessorNotify [NotifyValue - 0x80]);699700case ACPI_TYPE_THERMAL:701return (AcpiGbl_ThermalNotify [NotifyValue - 0x80]);702703default:704return ("Target object type does not support notifies");705}706}707708/* 84 - BF are device-specific */709710if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY)711{712return ("Device-Specific");713}714715/* C0 and above are hardware-specific */716717return ("Hardware-Specific");718}719720721/*******************************************************************************722*723* FUNCTION: AcpiUtGetArgumentTypeName724*725* PARAMETERS: ArgType - an ARGP_* parser argument type726*727* RETURN: Decoded ARGP_* type728*729* DESCRIPTION: Decode an ARGP_* parser type, as defined in the amlcode.h file,730* and used in the acopcode.h file. For example, ARGP_TERMARG.731* Used for debug only.732*733******************************************************************************/734735static const char *AcpiGbl_ArgumentType[20] =736{737/* 00 */ "Unknown ARGP",738/* 01 */ "ByteData",739/* 02 */ "ByteList",740/* 03 */ "CharList",741/* 04 */ "DataObject",742/* 05 */ "DataObjectList",743/* 06 */ "DWordData",744/* 07 */ "FieldList",745/* 08 */ "Name",746/* 09 */ "NameString",747/* 0A */ "ObjectList",748/* 0B */ "PackageLength",749/* 0C */ "SuperName",750/* 0D */ "Target",751/* 0E */ "TermArg",752/* 0F */ "TermList",753/* 10 */ "WordData",754/* 11 */ "QWordData",755/* 12 */ "SimpleName",756/* 13 */ "NameOrRef"757};758759const char *760AcpiUtGetArgumentTypeName (761UINT32 ArgType)762{763764if (ArgType > ARGP_MAX)765{766return ("Unknown ARGP");767}768769return (AcpiGbl_ArgumentType[ArgType]);770}771772#endif773774775/*******************************************************************************776*777* FUNCTION: AcpiUtValidObjectType778*779* PARAMETERS: Type - Object type to be validated780*781* RETURN: TRUE if valid object type, FALSE otherwise782*783* DESCRIPTION: Validate an object type784*785******************************************************************************/786787BOOLEAN788AcpiUtValidObjectType (789ACPI_OBJECT_TYPE Type)790{791792if (Type > ACPI_TYPE_LOCAL_MAX)793{794/* Note: Assumes all TYPEs are contiguous (external/local) */795796return (FALSE);797}798799return (TRUE);800}801802803