mirror of
https://github.com/acpica/acpica/
synced 2025-01-16 14:29:18 +03:00
New data types/names; removed OUTRANGE macro.
date 99.07.12.23.26.00; author rmoore1; state Exp;
This commit is contained in:
parent
2c2f82106e
commit
d90d94e400
@ -9,92 +9,111 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* reserved.
|
||||
*
|
||||
* 2. License
|
||||
*
|
||||
* 2.1. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") a license
|
||||
* under Intel's copyrights in the base code distributed originally by Intel
|
||||
* ("Original Intel Code") to copy, make derivatives, distribute, use and
|
||||
* display any portion of the Covered Code in any form; and
|
||||
*
|
||||
* 2.2. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* 2.1. This is your license from Intel Corp. under its intellectual property
|
||||
* rights. You may have additional license terms from the party that provided
|
||||
* you this software, covering your right to use that party's intellectual
|
||||
* property rights.
|
||||
*
|
||||
* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") an
|
||||
* irrevocable, perpetual, worldwide license under Intel's copyrights in the
|
||||
* base code distributed originally by Intel ("Original Intel Code") to copy,
|
||||
* make derivatives, distribute, use and display any portion of the Covered
|
||||
* Code in any form, with the right to sublicense such rights; and
|
||||
*
|
||||
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* license (without the right to sublicense), under only those claims of Intel
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions to
|
||||
* or modifications of the Original Intel Code. No other license or right is
|
||||
* granted directly or by implication, estoppel or otherwise;
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions
|
||||
* to or modifications of the Original Intel Code. No other license or right
|
||||
* is granted directly or by implication, estoppel or otherwise;
|
||||
*
|
||||
* the above copyright and patent license is granted only if the following
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification must include the above Copyright Notice, the above
|
||||
* License, this list of Conditions, and the following Disclaimer and Export
|
||||
* Compliance provision. In addition, Licensee must cause all Covered Code to
|
||||
* which Licensee contributes to contain a file documenting the changes
|
||||
* Licensee made to create that Covered Code and the date of any change.
|
||||
* Licensee must include in that file the documentation of any changes made by
|
||||
* any predecessor Licensee. Licensee must include a prominent statement that
|
||||
* the modification is derived, directly or indirectly, from Original Intel
|
||||
* Code.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
* and the following Disclaimer and Export Compliance provision. In addition,
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution in binary form of any substantial portion of the Covered
|
||||
* Code or modification must reproduce the above Copyright Notice, and the
|
||||
* following Disclaimer and Export Compliance provision in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
* documentation and/or other materials provided with distribution. In
|
||||
* addition, Licensee may not authorize further sublicense of source of any
|
||||
* portion of the Covered Code, and must include terms to the effect that the
|
||||
* license from Licensee to its licensee is limited to the intellectual
|
||||
* property embodied in the software Licensee provides to its licensee, and
|
||||
* not to intellectual property embodied in modifications its licensee may
|
||||
* make.
|
||||
*
|
||||
* 3.3. Intel retains all right, title, and interest in and to the Original
|
||||
* 3.3. Redistribution of Executable. Redistribution in executable form of any
|
||||
* substantial portion of the Covered Code or modification must reproduce the
|
||||
* above Copyright Notice, and the following Disclaimer and Export Compliance
|
||||
* provision in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3.4. Intel retains all right, title, and interest in and to the Original
|
||||
* Intel Code.
|
||||
*
|
||||
* 3.4. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* 3.5. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* without prior written authorization from Intel.
|
||||
*
|
||||
* 4. Disclaimer and Export Compliance
|
||||
*
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* LIMITED REMEDY.
|
||||
*
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or re-
|
||||
* exports any such software from a foreign destination, Licensee shall ensure
|
||||
* that the distribution and export/re-export of the software is in compliance
|
||||
* with all laws, regulations, orders, or other restrictions of the U.S. Export
|
||||
* Administration Regulations. Licensee agrees that neither it nor any of its
|
||||
* subsidiaries will export/re-export any technical data, process, software, or
|
||||
* service, directly or indirectly, to any country for which the United States
|
||||
* government or any agency thereof requires an export license, other
|
||||
* governmental approval, or letter of assurance, without first obtaining such
|
||||
* license, approval or letter.
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or
|
||||
* re-exports any such software from a foreign destination, Licensee shall
|
||||
* ensure that the distribution and export/re-export of the software is in
|
||||
* compliance with all laws, regulations, orders, or other restrictions of the
|
||||
* U.S. Export Administration Regulations. Licensee agrees that neither it nor
|
||||
* any of its subsidiaries will export/re-export any technical data, process,
|
||||
* software, or service, directly or indirectly, to any country for which the
|
||||
* United States government or any agency thereof requires an export license,
|
||||
* other governmental approval, or letter of assurance, without first obtaining
|
||||
* such license, approval or letter.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#define __NSUTILS_C__
|
||||
|
||||
#include <acpi.h>
|
||||
@ -301,7 +320,7 @@ NsLocal (
|
||||
FUNCTION_TRACE ("NsLocal");
|
||||
|
||||
|
||||
if (OUTRANGE (Type, NsProperties))
|
||||
if (Type > INTERNAL_TYPE_MAX)
|
||||
{
|
||||
/* type code out of range */
|
||||
|
||||
|
@ -10,92 +10,111 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* reserved.
|
||||
*
|
||||
* 2. License
|
||||
*
|
||||
* 2.1. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") a license
|
||||
* under Intel's copyrights in the base code distributed originally by Intel
|
||||
* ("Original Intel Code") to copy, make derivatives, distribute, use and
|
||||
* display any portion of the Covered Code in any form; and
|
||||
*
|
||||
* 2.2. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* 2.1. This is your license from Intel Corp. under its intellectual property
|
||||
* rights. You may have additional license terms from the party that provided
|
||||
* you this software, covering your right to use that party's intellectual
|
||||
* property rights.
|
||||
*
|
||||
* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") an
|
||||
* irrevocable, perpetual, worldwide license under Intel's copyrights in the
|
||||
* base code distributed originally by Intel ("Original Intel Code") to copy,
|
||||
* make derivatives, distribute, use and display any portion of the Covered
|
||||
* Code in any form, with the right to sublicense such rights; and
|
||||
*
|
||||
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* license (without the right to sublicense), under only those claims of Intel
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions to
|
||||
* or modifications of the Original Intel Code. No other license or right is
|
||||
* granted directly or by implication, estoppel or otherwise;
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions
|
||||
* to or modifications of the Original Intel Code. No other license or right
|
||||
* is granted directly or by implication, estoppel or otherwise;
|
||||
*
|
||||
* the above copyright and patent license is granted only if the following
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification must include the above Copyright Notice, the above
|
||||
* License, this list of Conditions, and the following Disclaimer and Export
|
||||
* Compliance provision. In addition, Licensee must cause all Covered Code to
|
||||
* which Licensee contributes to contain a file documenting the changes
|
||||
* Licensee made to create that Covered Code and the date of any change.
|
||||
* Licensee must include in that file the documentation of any changes made by
|
||||
* any predecessor Licensee. Licensee must include a prominent statement that
|
||||
* the modification is derived, directly or indirectly, from Original Intel
|
||||
* Code.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
* and the following Disclaimer and Export Compliance provision. In addition,
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution in binary form of any substantial portion of the Covered
|
||||
* Code or modification must reproduce the above Copyright Notice, and the
|
||||
* following Disclaimer and Export Compliance provision in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
* documentation and/or other materials provided with distribution. In
|
||||
* addition, Licensee may not authorize further sublicense of source of any
|
||||
* portion of the Covered Code, and must include terms to the effect that the
|
||||
* license from Licensee to its licensee is limited to the intellectual
|
||||
* property embodied in the software Licensee provides to its licensee, and
|
||||
* not to intellectual property embodied in modifications its licensee may
|
||||
* make.
|
||||
*
|
||||
* 3.3. Intel retains all right, title, and interest in and to the Original
|
||||
* 3.3. Redistribution of Executable. Redistribution in executable form of any
|
||||
* substantial portion of the Covered Code or modification must reproduce the
|
||||
* above Copyright Notice, and the following Disclaimer and Export Compliance
|
||||
* provision in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3.4. Intel retains all right, title, and interest in and to the Original
|
||||
* Intel Code.
|
||||
*
|
||||
* 3.4. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* 3.5. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* without prior written authorization from Intel.
|
||||
*
|
||||
* 4. Disclaimer and Export Compliance
|
||||
*
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* LIMITED REMEDY.
|
||||
*
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or re-
|
||||
* exports any such software from a foreign destination, Licensee shall ensure
|
||||
* that the distribution and export/re-export of the software is in compliance
|
||||
* with all laws, regulations, orders, or other restrictions of the U.S. Export
|
||||
* Administration Regulations. Licensee agrees that neither it nor any of its
|
||||
* subsidiaries will export/re-export any technical data, process, software, or
|
||||
* service, directly or indirectly, to any country for which the United States
|
||||
* government or any agency thereof requires an export license, other
|
||||
* governmental approval, or letter of assurance, without first obtaining such
|
||||
* license, approval or letter.
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or
|
||||
* re-exports any such software from a foreign destination, Licensee shall
|
||||
* ensure that the distribution and export/re-export of the software is in
|
||||
* compliance with all laws, regulations, orders, or other restrictions of the
|
||||
* U.S. Export Administration Regulations. Licensee agrees that neither it nor
|
||||
* any of its subsidiaries will export/re-export any technical data, process,
|
||||
* software, or service, directly or indirectly, to any country for which the
|
||||
* United States government or any agency thereof requires an export license,
|
||||
* other governmental approval, or letter of assurance, without first obtaining
|
||||
* such license, approval or letter.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#define __NSAPINAM_C__
|
||||
|
||||
#include <acpi.h>
|
||||
@ -114,8 +133,8 @@
|
||||
*
|
||||
* FUNCTION: AcpiNameToHandle
|
||||
*
|
||||
* PARAMETERS: Scope - Handle for a search scope.
|
||||
* Name - Pointer to an ascii string containing the name
|
||||
* PARAMETERS: Name - Pointer to an ascii string containing the name
|
||||
* Scope - Handle for a search scope.
|
||||
* RetHandle - Where the return handle is placed
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -129,10 +148,13 @@
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNameToHandle (NsHandle Scope, UINT32 Name, NsHandle *RetHandle)
|
||||
AcpiNameToHandle (
|
||||
ACPI_NAME Name,
|
||||
ACPI_HANDLE Scope,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
NAME_TABLE_ENTRY *ThisEntry;
|
||||
NsHandle LocalScope = Scope;
|
||||
NAME_TABLE_ENTRY *ThisEntry;
|
||||
ACPI_HANDLE LocalScope = Scope;
|
||||
|
||||
|
||||
if (!RetHandle)
|
||||
@ -189,7 +211,7 @@ AcpiNameToHandle (NsHandle Scope, UINT32 Name, NsHandle *RetHandle)
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: This routine returns the name associated with NsHandle. This
|
||||
* DESCRIPTION: This routine returns the name associated with ACPI_HANDLE. This
|
||||
* and the AcpiNameToHandle are complementary functions.
|
||||
*
|
||||
* Handle == AcpiNameToHandle(AcpiHandleToName(Handle))
|
||||
@ -199,9 +221,11 @@ AcpiNameToHandle (NsHandle Scope, UINT32 Name, NsHandle *RetHandle)
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHandleToName (NsHandle Handle, UINT32 *RetName)
|
||||
AcpiHandleToName (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_NAME *RetName)
|
||||
{
|
||||
NAME_TABLE_ENTRY *ObjEntry;
|
||||
NAME_TABLE_ENTRY *ObjEntry;
|
||||
|
||||
|
||||
if (!RetName)
|
||||
@ -241,7 +265,9 @@ AcpiHandleToName (NsHandle Handle, UINT32 *RetName)
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiPathnameToHandle (char *Pathname, NsHandle *RetHandle)
|
||||
AcpiPathnameToHandle (
|
||||
ACPI_STRING *Pathname,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
|
||||
if (!RetHandle || !Pathname)
|
||||
@ -279,15 +305,17 @@ AcpiPathnameToHandle (char *Pathname, NsHandle *RetHandle)
|
||||
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHandleToPathname (NsHandle Handle, ACPI_BUFFER *RetPathPtr)
|
||||
AcpiHandleToPathname (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_BUFFER *RetPathPtr)
|
||||
{
|
||||
if ((!RetPathPtr->BufferPtr) ||
|
||||
if ((!RetPathPtr->Pointer) ||
|
||||
(!RetPathPtr->Length))
|
||||
{
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
return (NsHandleToPathname (Handle, RetPathPtr->Length, RetPathPtr->BufferPtr));
|
||||
return (NsHandleToPathname (Handle, RetPathPtr->Length, RetPathPtr->Pointer));
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,88 +10,108 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
|
||||
* reserved.
|
||||
*
|
||||
* 2. License
|
||||
*
|
||||
* 2.1. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") a license
|
||||
* under Intel's copyrights in the base code distributed originally by Intel
|
||||
* ("Original Intel Code") to copy, make derivatives, distribute, use and
|
||||
* display any portion of the Covered Code in any form; and
|
||||
*
|
||||
* 2.2. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* 2.1. This is your license from Intel Corp. under its intellectual property
|
||||
* rights. You may have additional license terms from the party that provided
|
||||
* you this software, covering your right to use that party's intellectual
|
||||
* property rights.
|
||||
*
|
||||
* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") an
|
||||
* irrevocable, perpetual, worldwide license under Intel's copyrights in the
|
||||
* base code distributed originally by Intel ("Original Intel Code") to copy,
|
||||
* make derivatives, distribute, use and display any portion of the Covered
|
||||
* Code in any form, with the right to sublicense such rights; and
|
||||
*
|
||||
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* license (without the right to sublicense), under only those claims of Intel
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions to
|
||||
* or modifications of the Original Intel Code. No other license or right is
|
||||
* granted directly or by implication, estoppel or otherwise;
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions
|
||||
* to or modifications of the Original Intel Code. No other license or right
|
||||
* is granted directly or by implication, estoppel or otherwise;
|
||||
*
|
||||
* the above copyright and patent license is granted only if the following
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification must include the above Copyright Notice, the above
|
||||
* License, this list of Conditions, and the following Disclaimer and Export
|
||||
* Compliance provision. In addition, Licensee must cause all Covered Code to
|
||||
* which Licensee contributes to contain a file documenting the changes
|
||||
* Licensee made to create that Covered Code and the date of any change.
|
||||
* Licensee must include in that file the documentation of any changes made by
|
||||
* any predecessor Licensee. Licensee must include a prominent statement that
|
||||
* the modification is derived, directly or indirectly, from Original Intel
|
||||
* Code.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
* and the following Disclaimer and Export Compliance provision. In addition,
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution in binary form of any substantial portion of the Covered
|
||||
* Code or modification must reproduce the above Copyright Notice, and the
|
||||
* following Disclaimer and Export Compliance provision in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
* documentation and/or other materials provided with distribution. In
|
||||
* addition, Licensee may not authorize further sublicense of source of any
|
||||
* portion of the Covered Code, and must include terms to the effect that the
|
||||
* license from Licensee to its licensee is limited to the intellectual
|
||||
* property embodied in the software Licensee provides to its licensee, and
|
||||
* not to intellectual property embodied in modifications its licensee may
|
||||
* make.
|
||||
*
|
||||
* 3.3. Intel retains all right, title, and interest in and to the Original
|
||||
* 3.3. Redistribution of Executable. Redistribution in executable form of any
|
||||
* substantial portion of the Covered Code or modification must reproduce the
|
||||
* above Copyright Notice, and the following Disclaimer and Export Compliance
|
||||
* provision in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3.4. Intel retains all right, title, and interest in and to the Original
|
||||
* Intel Code.
|
||||
*
|
||||
* 3.4. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* 3.5. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* without prior written authorization from Intel.
|
||||
*
|
||||
* 4. Disclaimer and Export Compliance
|
||||
*
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* LIMITED REMEDY.
|
||||
*
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or re-
|
||||
* exports any such software from a foreign destination, Licensee shall ensure
|
||||
* that the distribution and export/re-export of the software is in compliance
|
||||
* with all laws, regulations, orders, or other restrictions of the U.S. Export
|
||||
* Administration Regulations. Licensee agrees that neither it nor any of its
|
||||
* subsidiaries will export/re-export any technical data, process, software, or
|
||||
* service, directly or indirectly, to any country for which the United States
|
||||
* government or any agency thereof requires an export license, other
|
||||
* governmental approval, or letter of assurance, without first obtaining such
|
||||
* license, approval or letter.
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or
|
||||
* re-exports any such software from a foreign destination, Licensee shall
|
||||
* ensure that the distribution and export/re-export of the software is in
|
||||
* compliance with all laws, regulations, orders, or other restrictions of the
|
||||
* U.S. Export Administration Regulations. Licensee agrees that neither it nor
|
||||
* any of its subsidiaries will export/re-export any technical data, process,
|
||||
* software, or service, directly or indirectly, to any country for which the
|
||||
* United States government or any agency thereof requires an export license,
|
||||
* other governmental approval, or letter of assurance, without first obtaining
|
||||
* such license, approval or letter.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -116,13 +136,13 @@
|
||||
*
|
||||
* PARAMETERS: Handle - Object handle (optional)
|
||||
* *Pathname - Object pathname (optional)
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* any). If NULL, no value is returned.
|
||||
* **Params - List of parameters to pass to
|
||||
* method, terminated by NULL.
|
||||
* Params itself may be NULL
|
||||
* if no parameters are being
|
||||
* passed.
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* any). If NULL, no value is returned.
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
@ -133,66 +153,218 @@
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvaluateObject (NsHandle Handle, char *Pathname, OBJECT_DESCRIPTOR *ReturnObject,
|
||||
OBJECT_DESCRIPTOR **Params)
|
||||
AcpiEvaluateObject (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_STRING *Pathname,
|
||||
ACPI_OBJECT_LIST *ParamObjects,
|
||||
ACPI_BUFFER *ReturnBuffer)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
NAME_TABLE_ENTRY *ObjEntry;
|
||||
ACPI_OBJECT_INTERNAL InternalRetObj;
|
||||
ACPI_OBJECT_INTERNAL **ParamPtr = NULL;
|
||||
ACPI_OBJECT_INTERNAL *ReturnPtr = NULL;
|
||||
ACPI_OBJECT_INTERNAL *ObjectPtr = NULL;
|
||||
UINT32 BufferSpaceNeeded;
|
||||
UINT32 Count;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("AcpiEvaluateObject");
|
||||
|
||||
|
||||
/* Parameter validation */
|
||||
/*
|
||||
* If there are parameters, the external objects must be converted
|
||||
* to internal objects
|
||||
*/
|
||||
|
||||
if (!Handle && !Pathname)
|
||||
if (ParamObjects && ParamObjects->Count)
|
||||
{
|
||||
DEBUG_PRINT (ACPI_ERROR, ("AcpiEvaluateObject: Both Handle and Pathname are NULL\n"));
|
||||
FUNCTION_EXIT;
|
||||
return AE_BAD_PARAMETER;
|
||||
/*
|
||||
* Allocate a new parameter block for the internal objects
|
||||
* Add 1 to count to allow for null terminated internal list
|
||||
* TBD: merge into single allocation!
|
||||
*/
|
||||
|
||||
Count = ParamObjects->Count;
|
||||
ParamPtr = LocalCallocate ((Count + 1) *
|
||||
sizeof (void *));
|
||||
if (!ParamPtr)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_NO_MEMORY);
|
||||
return AE_NO_MEMORY;
|
||||
}
|
||||
|
||||
ObjectPtr = LocalCallocate ((Count) *
|
||||
sizeof (ACPI_OBJECT_INTERNAL));
|
||||
if (!ObjectPtr)
|
||||
{
|
||||
OsdFree (ParamPtr);
|
||||
FUNCTION_STATUS_EXIT (AE_NO_MEMORY);
|
||||
return AE_NO_MEMORY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Init the param array of pointers and NULL terminate the list
|
||||
*/
|
||||
|
||||
for (i = 0; i < Count; i++)
|
||||
{
|
||||
ParamPtr[i] = &ObjectPtr[i];
|
||||
}
|
||||
ParamPtr[Count] = NULL;
|
||||
|
||||
/*
|
||||
* Convert each external object in the list to an internal object
|
||||
*/
|
||||
for (i = 0; i < Count; i++)
|
||||
{
|
||||
Status = CmBuildInternalObject (&ParamObjects->Pointer[i], ParamPtr[i]);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
CmDeleteInternalObjectList (ParamPtr);
|
||||
FUNCTION_STATUS_EXIT (Status);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ReturnBuffer && ReturnBuffer->Pointer)
|
||||
{
|
||||
ReturnPtr = &InternalRetObj;
|
||||
}
|
||||
|
||||
/* The null handle case means that the pathname is fully qualified */
|
||||
/*
|
||||
* If the pathname exists and is fully qualified then just eval by name
|
||||
*/
|
||||
|
||||
if ((Pathname) && (Pathname[0] == '\\'))
|
||||
{
|
||||
BREAKPOINT3;
|
||||
Status = NsEvaluateByName (Pathname, ParamPtr, ReturnPtr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
if (!Handle)
|
||||
{
|
||||
Status = NsEvaluateByName (Pathname, ReturnObject, Params);
|
||||
/*
|
||||
* Handle is optional iff fully qualified pathname is specified, we've already handled
|
||||
* fully qualified names, so this is an error
|
||||
*/
|
||||
if (!Pathname)
|
||||
{
|
||||
DEBUG_PRINT (ACPI_ERROR, ("AcpiEvaluateObject: Both Handle and Pathname are NULL\n"));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
DEBUG_PRINT (ACPI_ERROR, ("AcpiEvaluateObject: Handle is NULL and Pathname is relative\n"));
|
||||
}
|
||||
|
||||
Status = AE_BAD_PARAMETER;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* We get here we have a handle, and if we have a pathname it is relative.
|
||||
*
|
||||
* Validate the handle
|
||||
*/
|
||||
if (!(ObjEntry = NsConvertHandleToEntry (Handle)))
|
||||
{
|
||||
DEBUG_PRINT (ACPI_ERROR, ("AcpiEvaluateObject: Bad Handle\n"));
|
||||
Status = AE_BAD_PARAMETER;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
if (!Pathname)
|
||||
{
|
||||
/*
|
||||
* The null pathname case means the handle is for the object
|
||||
*/
|
||||
Status = NsEvaluateByHandle (ObjEntry, ParamPtr, ReturnPtr);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* These cases require a valid handle */
|
||||
|
||||
if (!(ObjEntry = NsConvertHandleToEntry (Handle)))
|
||||
{
|
||||
FUNCTION_EXIT;
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
/* The null pathname case means the handle is for the object */
|
||||
|
||||
if (!Pathname)
|
||||
{
|
||||
Status = NsEvaluateByHandle (ObjEntry, ReturnObject, Params);
|
||||
}
|
||||
|
||||
|
||||
/* Both Handle and Pathname means we have a path relative to the handle */
|
||||
|
||||
else
|
||||
{
|
||||
Status = NsEvaluateRelative (ObjEntry, Pathname, ReturnObject, Params);
|
||||
}
|
||||
/*
|
||||
* Have both Handle and a relative Pathname
|
||||
*/
|
||||
Status = NsEvaluateRelative (ObjEntry, Pathname, ParamPtr, ReturnPtr);
|
||||
}
|
||||
|
||||
|
||||
FUNCTION_EXIT;
|
||||
|
||||
/*
|
||||
* Common cleanup: We must free the input parameter list (if we created one),
|
||||
* and copy the return object to the caller's buffer (if necessary)
|
||||
*/
|
||||
|
||||
Cleanup:
|
||||
if (ParamPtr)
|
||||
{
|
||||
/* Free the allocated parameter block */
|
||||
|
||||
CmDeleteInternalObjectList (ParamPtr);
|
||||
}
|
||||
|
||||
if (ReturnPtr)
|
||||
{
|
||||
/* Check if the return object is valid */
|
||||
|
||||
if (ReturnPtr->Type != TYPE_Invalid)
|
||||
{
|
||||
/*
|
||||
* Find out how large a buffer is needed to contain the
|
||||
* returned object
|
||||
*/
|
||||
Status = CmGetObjectSize (ReturnPtr, &BufferSpaceNeeded);
|
||||
if (Status != AE_OK)
|
||||
{
|
||||
/*
|
||||
* Failed the call
|
||||
*/
|
||||
ReturnBuffer->Length = 0;
|
||||
FUNCTION_STATUS_EXIT (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
if (ReturnBuffer->Length < BufferSpaceNeeded)
|
||||
{
|
||||
/*
|
||||
* Caller's buffer is too small, can't give him partial results
|
||||
* fail the call but return the buffer size needed
|
||||
*/
|
||||
|
||||
DEBUG_PRINT (ACPI_ERROR, ("AcpiEvaluateObject: Needed buffer size %d, received %d\n",
|
||||
BufferSpaceNeeded, ReturnBuffer->Length));
|
||||
|
||||
ReturnBuffer->Length = BufferSpaceNeeded;
|
||||
FUNCTION_STATUS_EXIT (AE_BUFFER_OVERFLOW);
|
||||
return AE_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
/*
|
||||
* We have enough space for the object, build it
|
||||
*/
|
||||
Status = CmBuildExternalObject (ReturnPtr, ReturnBuffer);
|
||||
ReturnBuffer->Length = BufferSpaceNeeded;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Nothing was returned */
|
||||
|
||||
ReturnBuffer->Length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
FUNCTION_STATUS_EXIT (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiGetNextObject
|
||||
@ -211,9 +383,13 @@ AcpiEvaluateObject (NsHandle Handle, char *Pathname, OBJECT_DESCRIPTOR *ReturnOb
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetNextObject (NsType Type, NsHandle Scope, NsHandle Handle, NsHandle *RetHandle)
|
||||
AcpiGetNextObject (
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_HANDLE Scope,
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
NAME_TABLE_ENTRY *ThisEntry;
|
||||
NAME_TABLE_ENTRY *ThisEntry;
|
||||
|
||||
|
||||
if (!RetHandle)
|
||||
@ -223,7 +399,7 @@ AcpiGetNextObject (NsType Type, NsHandle Scope, NsHandle Handle, NsHandle *RetHa
|
||||
*RetHandle = NULL;
|
||||
|
||||
|
||||
if (OUTRANGE (Type, NsTypeNames))
|
||||
if (Type > ACPI_TYPE_MAX)
|
||||
{
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
@ -306,6 +482,44 @@ AcpiGetNextObject (NsType Type, NsHandle Scope, NsHandle Handle, NsHandle *RetHa
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiGetType
|
||||
*
|
||||
* PARAMETERS: Handle - Handle of object whose type is desired
|
||||
* *RetType - Where the type will be placed
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: This routine returns the type associatd with a particular handle
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetType (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_OBJECT_TYPE *RetType)
|
||||
{
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
|
||||
|
||||
if (!RetType)
|
||||
{
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
/* Convert and validate the handle */
|
||||
|
||||
if (!(Object = NsConvertHandleToEntry (Handle)))
|
||||
{
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
*RetType = Object->Type;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiGetParent
|
||||
@ -321,9 +535,11 @@ AcpiGetNextObject (NsType Type, NsHandle Scope, NsHandle Handle, NsHandle *RetHa
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetParent (NsHandle Handle, NsHandle *RetHandle)
|
||||
AcpiGetParent (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
|
||||
|
||||
if (!RetHandle)
|
||||
@ -372,9 +588,11 @@ AcpiGetParent (NsHandle Handle, NsHandle *RetHandle)
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetScope (NsHandle Handle, NsHandle *RetScope)
|
||||
AcpiGetScope (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE *RetScope)
|
||||
{
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
|
||||
|
||||
if (!RetScope)
|
||||
@ -422,9 +640,11 @@ AcpiGetScope (NsHandle Handle, NsHandle *RetScope)
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetContainingScope (NsHandle Handle, NsHandle *RetHandle)
|
||||
AcpiGetContainingScope (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
|
||||
|
||||
if (!RetHandle)
|
||||
@ -460,7 +680,7 @@ AcpiGetContainingScope (NsHandle Handle, NsHandle *RetHandle)
|
||||
*
|
||||
* FUNCTION: AcpiWalkNamespace
|
||||
*
|
||||
* PARAMETERS: Type - NsType to search for
|
||||
* PARAMETERS: Type - ACPI_OBJECT_TYPE to search for
|
||||
* StartHandle - Handle in namespace where search begins
|
||||
* MaxDepth - Depth to which search is to reach
|
||||
* UserFunction - Called when an object of "Type" is found
|
||||
@ -485,15 +705,19 @@ AcpiGetContainingScope (NsHandle Handle, NsHandle *RetHandle)
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiWalkNamespace (NsType Type, NsHandle StartHandle, UINT32 MaxDepth,
|
||||
WALK_CALLBACK UserFunction,
|
||||
void *Context, void **ReturnValue)
|
||||
AcpiWalkNamespace (
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_HANDLE StartHandle,
|
||||
UINT32 MaxDepth,
|
||||
WALK_CALLBACK UserFunction,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
NsHandle ObjHandle = 0;
|
||||
NsHandle Scope;
|
||||
NsHandle NewScope;
|
||||
void *UserReturnVal;
|
||||
UINT32 Level = 1;
|
||||
ACPI_HANDLE ObjHandle = 0;
|
||||
ACPI_HANDLE Scope;
|
||||
ACPI_HANDLE NewScope;
|
||||
void *UserReturnVal;
|
||||
UINT32 Level = 1;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("AcpiWalkNamespace");
|
||||
@ -501,15 +725,15 @@ AcpiWalkNamespace (NsType Type, NsHandle StartHandle, UINT32 MaxDepth,
|
||||
|
||||
/* Parameter validation */
|
||||
|
||||
if (OUTRANGE (Type, NsTypeNames))
|
||||
if (Type > ACPI_TABLE_MAX)
|
||||
{
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
if ((!MaxDepth) || (!UserFunction))
|
||||
{
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
@ -518,7 +742,7 @@ AcpiWalkNamespace (NsType Type, NsHandle StartHandle, UINT32 MaxDepth,
|
||||
|
||||
if (ACPI_FAILURE (AcpiGetScope (StartHandle, &Scope)))
|
||||
{
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
@ -547,7 +771,7 @@ AcpiWalkNamespace (NsType Type, NsHandle StartHandle, UINT32 MaxDepth,
|
||||
if (ReturnValue)
|
||||
*ReturnValue = UserReturnVal;
|
||||
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
@ -580,7 +804,7 @@ AcpiWalkNamespace (NsType Type, NsHandle StartHandle, UINT32 MaxDepth,
|
||||
}
|
||||
}
|
||||
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK; /* Complete walk, not terminated by user function */
|
||||
}
|
||||
|
||||
@ -602,7 +826,9 @@ AcpiWalkNamespace (NsType Type, NsHandle StartHandle, UINT32 MaxDepth,
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetObject (char *Pathname, NsHandle *RetHandle)
|
||||
AcpiGetObject (
|
||||
ACPI_STRING *Pathname,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
|
||||
if (!RetHandle)
|
||||
@ -629,33 +855,15 @@ AcpiGetObject (char *Pathname, NsHandle *RetHandle)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NsHandle
|
||||
AcpiGetParentHandle (NsHandle ChildHandle)
|
||||
ACPI_HANDLE
|
||||
AcpiGetParentHandle (
|
||||
ACPI_HANDLE ChildHandle)
|
||||
{
|
||||
|
||||
return ((NsHandle) NULL);
|
||||
return ((ACPI_HANDLE) NULL);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: NsType AcpiValueType
|
||||
*
|
||||
* PARAMETERS: Handle - the handle of the object to find the type of
|
||||
*
|
||||
* RETURN: NsType - type of the Handle
|
||||
*
|
||||
* DESCRIPTION: This routine returns the type associatd with a particular handle
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NsType
|
||||
AcpiValueType (NsHandle Handle)
|
||||
{
|
||||
|
||||
return (TYPE_Any);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiCurrentScopeName
|
||||
@ -677,7 +885,7 @@ AcpiCurrentScopeName (void)
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiIsNameSpaceHandle
|
||||
* FUNCTION: AcpiIsNamespaceHandle
|
||||
*
|
||||
* PARAMETERS: QueryHandle - handle to be verified
|
||||
*
|
||||
@ -689,7 +897,8 @@ AcpiCurrentScopeName (void)
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiIsNameSpaceHandle (NsHandle QueryHandle)
|
||||
AcpiIsNamesaceHandle (
|
||||
ACPI_HANDLE QueryHandle)
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
@ -697,18 +906,19 @@ AcpiIsNameSpaceHandle (NsHandle QueryHandle)
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiIsNameSpaceValue
|
||||
* FUNCTION: AcpiIsNamesaceValue
|
||||
*
|
||||
* PARAMETERS: Value
|
||||
*
|
||||
* RETURN: TRUE if the value is a valid NS vakue, FALSE otherwise
|
||||
*
|
||||
* DESCRIPTION: This routine verifies the value is valid for NsType what is the utility of this? RLM
|
||||
* DESCRIPTION: This routine verifies the value is valid for ACPI_OBJECT_TYPE what is the utility of this? RLM
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiIsNameSpaceValue (NsType Value)
|
||||
AcpiIsNamesaceValue (
|
||||
ACPI_OBJECT_TYPE Value)
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
@ -727,12 +937,13 @@ AcpiIsNameSpaceValue (NsType Value)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
INT32
|
||||
AcpiSetFirmwareWakingVector (UINT32 PhysicalAddress)
|
||||
ACPI_STATUS
|
||||
AcpiSetFirmwareWakingVector (
|
||||
void *PhysicalAddress)
|
||||
{
|
||||
FUNCTION_TRACE ("AcpiSetFirmwareWakingVector");
|
||||
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@ -752,12 +963,13 @@ AcpiSetFirmwareWakingVector (UINT32 PhysicalAddress)
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetFirmwareWakingVector (UINT32 * PhysicalAddress)
|
||||
AcpiGetFirmwareWakingVector (
|
||||
void **PhysicalAddress)
|
||||
{
|
||||
FUNCTION_TRACE ("AcpiGetFirmwareWakingVector");
|
||||
|
||||
|
||||
FUNCTION_EXIT;
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user