1 /*******************************************************************************
3 * Module Name: rsutils - Utilities for the resource manager
6 ******************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
13 * All rights reserved.
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code. No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
38 * The above copyright and patent license is granted only if the following
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision. In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change. Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee. Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution. In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
73 * 3.4. Intel retains all right, title, and interest in and to the Original
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
81 * 4. Disclaimer and Export Compliance
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
118 #define __RSUTILS_C__
120 #include <contrib/dev/acpica/acpi.h>
121 #include <contrib/dev/acpica/acnamesp.h>
122 #include <contrib/dev/acpica/acresrc.h>
125 #define _COMPONENT ACPI_RESOURCES
126 ACPI_MODULE_NAME ("rsutils")
129 /*******************************************************************************
131 * FUNCTION: AcpiRsDecodeBitmask
133 * PARAMETERS: Mask - Bitmask to decode
134 * List - Where the converted list is returned
136 * RETURN: Count of bits set (length of list)
138 * DESCRIPTION: Convert a bit mask into a list of values
140 ******************************************************************************/
143 AcpiRsDecodeBitmask (
151 /* Decode the mask bits */
153 for (i = 0, BitCount = 0; Mask; i++)
157 List[BitCount] = (UINT8) i;
168 /*******************************************************************************
170 * FUNCTION: AcpiRsEncodeBitmask
172 * PARAMETERS: List - List of values to encode
173 * Count - Length of list
175 * RETURN: Encoded bitmask
177 * DESCRIPTION: Convert a list of values to an encoded bitmask
179 ******************************************************************************/
182 AcpiRsEncodeBitmask (
190 /* Encode the list into a single bitmask */
192 for (i = 0, Mask = 0; i < Count; i++)
194 Mask |= (0x0001 << List[i]);
201 /*******************************************************************************
203 * FUNCTION: AcpiRsMoveData
205 * PARAMETERS: Destination - Pointer to the destination descriptor
206 * Source - Pointer to the source descriptor
207 * ItemCount - How many items to move
208 * MoveType - Byte width
212 * DESCRIPTION: Move multiple data items from one descriptor to another. Handles
213 * alignment issues and endian issues if necessary, as configured
214 * via the ACPI_MOVE_* macros. (This is why a memcpy is not used)
216 ******************************************************************************/
228 /* One move per item */
230 for (i = 0; i < ItemCount; i++)
235 * For the 8-bit case, we can perform the move all at once
236 * since there are no alignment or endian issues
239 ACPI_MEMCPY (Destination, Source, ItemCount);
243 * 16-, 32-, and 64-bit cases must use the move macros that perform
244 * endian conversion and/or accomodate hardware that cannot perform
245 * misaligned memory transfers
247 case ACPI_RSC_MOVE16:
248 ACPI_MOVE_16_TO_16 (&((UINT16 *) Destination)[i],
249 &((UINT16 *) Source)[i]);
252 case ACPI_RSC_MOVE32:
253 ACPI_MOVE_32_TO_32 (&((UINT32 *) Destination)[i],
254 &((UINT32 *) Source)[i]);
257 case ACPI_RSC_MOVE64:
258 ACPI_MOVE_64_TO_64 (&((UINT64 *) Destination)[i],
259 &((UINT64 *) Source)[i]);
269 /*******************************************************************************
271 * FUNCTION: AcpiRsGetResourceInfo
273 * PARAMETERS: ResourceType - Byte 0 of a resource descriptor
275 * RETURN: Pointer to the resource conversion handler
277 * DESCRIPTION: Extract the Resource Type/Name from the first byte of
278 * a resource descriptor.
280 ******************************************************************************/
283 AcpiRsGetResourceInfo (
286 ACPI_RESOURCE_INFO *SizeInfo;
289 ACPI_FUNCTION_ENTRY ();
292 /* Determine if this is a small or large resource */
294 if (ResourceType & ACPI_RESOURCE_NAME_LARGE)
296 /* Large Resource Type -- bits 6:0 contain the name */
298 if (ResourceType > ACPI_RESOURCE_NAME_LARGE_MAX)
303 SizeInfo = &AcpiGbl_LgResourceInfo [
304 (ResourceType & ACPI_RESOURCE_NAME_LARGE_MASK)];
308 /* Small Resource Type -- bits 6:3 contain the name */
310 SizeInfo = &AcpiGbl_SmResourceInfo [
311 ((ResourceType & ACPI_RESOURCE_NAME_SMALL_MASK) >> 3)];
314 /* Zero entry indicates an invalid resource type */
316 if (!SizeInfo->MinimumInternalStructLength)
325 /*******************************************************************************
327 * FUNCTION: AcpiRsSetResourceLength
329 * PARAMETERS: TotalLength - Length of the AML descriptor, including
330 * the header and length fields.
331 * Aml - Pointer to the raw AML descriptor
335 * DESCRIPTION: Set the ResourceLength field of an AML
336 * resource descriptor, both Large and Small descriptors are
337 * supported automatically. Note: Descriptor Type field must
340 ******************************************************************************/
343 AcpiRsSetResourceLength (
344 ACPI_RSDESC_SIZE TotalLength,
347 ACPI_RS_LENGTH ResourceLength;
350 ACPI_FUNCTION_ENTRY ();
353 /* Determine if this is a small or large resource */
355 if (Aml->SmallHeader.DescriptorType & ACPI_RESOURCE_NAME_LARGE)
357 /* Large Resource type -- bytes 1-2 contain the 16-bit length */
359 ResourceLength = (ACPI_RS_LENGTH)
360 (TotalLength - sizeof (AML_RESOURCE_LARGE_HEADER));
362 /* Insert length into the Large descriptor length field */
364 ACPI_MOVE_16_TO_16 (&Aml->LargeHeader.ResourceLength, &ResourceLength);
368 /* Small Resource type -- bits 2:0 of byte 0 contain the length */
370 ResourceLength = (ACPI_RS_LENGTH)
371 (TotalLength - sizeof (AML_RESOURCE_SMALL_HEADER));
373 /* Insert length into the descriptor type byte */
375 Aml->SmallHeader.DescriptorType = (UINT8)
377 /* Clear any existing length, preserving descriptor type bits */
379 ((Aml->SmallHeader.DescriptorType & ~ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK)
386 /*******************************************************************************
388 * FUNCTION: AcpiRsSetResourceHeader
390 * PARAMETERS: DescriptorType - Byte to be inserted as the type
391 * TotalLength - Length of the AML descriptor, including
392 * the header and length fields.
393 * Aml - Pointer to the raw AML descriptor
397 * DESCRIPTION: Set the DescriptorType and ResourceLength fields of an AML
398 * resource descriptor, both Large and Small descriptors are
399 * supported automatically
401 ******************************************************************************/
404 AcpiRsSetResourceHeader (
405 UINT8 DescriptorType,
406 ACPI_RSDESC_SIZE TotalLength,
409 ACPI_FUNCTION_ENTRY ();
412 /* Set the Descriptor Type */
414 Aml->SmallHeader.DescriptorType = DescriptorType;
416 /* Set the Resource Length */
418 AcpiRsSetResourceLength (TotalLength, Aml);
422 /*******************************************************************************
424 * FUNCTION: AcpiRsStrcpy
426 * PARAMETERS: Destination - Pointer to the destination string
427 * Source - Pointer to the source string
429 * RETURN: String length, including NULL terminator
431 * DESCRIPTION: Local string copy that returns the string length, saving a
432 * strcpy followed by a strlen.
434 ******************************************************************************/
444 ACPI_FUNCTION_ENTRY ();
447 for (i = 0; Source[i]; i++)
449 Destination[i] = Source[i];
454 /* Return string length including the NULL terminator */
456 return ((UINT16) (i + 1));
460 /*******************************************************************************
462 * FUNCTION: AcpiRsGetResourceSource
464 * PARAMETERS: ResourceLength - Length field of the descriptor
465 * MinimumLength - Minimum length of the descriptor (minus
466 * any optional fields)
467 * ResourceSource - Where the ResourceSource is returned
468 * Aml - Pointer to the raw AML descriptor
469 * StringPtr - (optional) where to store the actual
470 * ResourceSource string
472 * RETURN: Length of the string plus NULL terminator, rounded up to 32 bit
474 * DESCRIPTION: Copy the optional ResourceSource data from a raw AML descriptor
475 * to an internal resource descriptor
477 ******************************************************************************/
480 AcpiRsGetResourceSource (
481 ACPI_RS_LENGTH ResourceLength,
482 ACPI_RS_LENGTH MinimumLength,
483 ACPI_RESOURCE_SOURCE *ResourceSource,
487 ACPI_RSDESC_SIZE TotalLength;
488 UINT8 *AmlResourceSource;
491 ACPI_FUNCTION_ENTRY ();
494 TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER);
495 AmlResourceSource = ((UINT8 *) Aml) + MinimumLength;
498 * ResourceSource is present if the length of the descriptor is longer than
499 * the minimum length.
501 * Note: Some resource descriptors will have an additional null, so
502 * we add 1 to the minimum length.
504 if (TotalLength > (ACPI_RSDESC_SIZE )(MinimumLength + 1))
506 /* Get the ResourceSourceIndex */
508 ResourceSource->Index = AmlResourceSource[0];
510 ResourceSource->StringPtr = StringPtr;
514 * String destination pointer is not specified; Set the String
515 * pointer to the end of the current ResourceSource structure.
517 ResourceSource->StringPtr = (char *)
518 ((UINT8 *) ResourceSource) + sizeof (ACPI_RESOURCE_SOURCE);
522 * In order for the StructSize to fall on a 32-bit boundary, calculate
523 * the length of the string (+1 for the NULL terminator) and expand the
524 * StructSize to the next 32-bit boundary.
526 * Zero the entire area of the buffer.
528 TotalLength = ACPI_ROUND_UP_TO_32BITS (
529 ACPI_STRLEN ((char *) &AmlResourceSource[1]) + 1);
530 ACPI_MEMSET (ResourceSource->StringPtr, 0, TotalLength);
532 /* Copy the ResourceSource string to the destination */
534 ResourceSource->StringLength = AcpiRsStrcpy (ResourceSource->StringPtr,
535 (char *) &AmlResourceSource[1]);
537 return ((ACPI_RS_LENGTH) TotalLength);
541 /* ResourceSource is not present */
543 ResourceSource->Index = 0;
544 ResourceSource->StringLength = 0;
545 ResourceSource->StringPtr = NULL;
550 /*******************************************************************************
552 * FUNCTION: AcpiRsSetResourceSource
554 * PARAMETERS: Aml - Pointer to the raw AML descriptor
555 * MinimumLength - Minimum length of the descriptor (minus
556 * any optional fields)
557 * ResourceSource - Internal ResourceSource
560 * RETURN: Total length of the AML descriptor
562 * DESCRIPTION: Convert an optional ResourceSource from internal format to a
563 * raw AML resource descriptor
565 ******************************************************************************/
568 AcpiRsSetResourceSource (
570 ACPI_RS_LENGTH MinimumLength,
571 ACPI_RESOURCE_SOURCE *ResourceSource)
573 UINT8 *AmlResourceSource;
574 ACPI_RSDESC_SIZE DescriptorLength;
577 ACPI_FUNCTION_ENTRY ();
580 DescriptorLength = MinimumLength;
582 /* Non-zero string length indicates presence of a ResourceSource */
584 if (ResourceSource->StringLength)
586 /* Point to the end of the AML descriptor */
588 AmlResourceSource = ((UINT8 *) Aml) + MinimumLength;
590 /* Copy the ResourceSourceIndex */
592 AmlResourceSource[0] = (UINT8) ResourceSource->Index;
594 /* Copy the ResourceSource string */
596 ACPI_STRCPY ((char *) &AmlResourceSource[1],
597 ResourceSource->StringPtr);
600 * Add the length of the string (+ 1 for null terminator) to the
601 * final descriptor length
603 DescriptorLength += ((ACPI_RSDESC_SIZE) ResourceSource->StringLength + 1);
606 /* Return the new total length of the AML descriptor */
608 return (DescriptorLength);
612 /*******************************************************************************
614 * FUNCTION: AcpiRsGetPrtMethodData
616 * PARAMETERS: Handle - a handle to the containing object
617 * RetBuffer - a pointer to a buffer structure for the
622 * DESCRIPTION: This function is called to get the _PRT value of an object
623 * contained in an object specified by the handle passed in
625 * If the function fails an appropriate status will be returned
626 * and the contents of the callers buffer is undefined.
628 ******************************************************************************/
631 AcpiRsGetPrtMethodData (
633 ACPI_BUFFER *RetBuffer)
635 ACPI_OPERAND_OBJECT *ObjDesc;
639 ACPI_FUNCTION_TRACE ("RsGetPrtMethodData");
642 /* Parameters guaranteed valid by caller */
644 /* Execute the method, no parameters */
646 Status = AcpiUtEvaluateObject (Handle, METHOD_NAME__PRT,
647 ACPI_BTYPE_PACKAGE, &ObjDesc);
648 if (ACPI_FAILURE (Status))
650 return_ACPI_STATUS (Status);
654 * Create a resource linked list from the byte stream buffer that comes
655 * back from the _CRS method execution.
657 Status = AcpiRsCreatePciRoutingTable (ObjDesc, RetBuffer);
659 /* On exit, we must delete the object returned by EvaluateObject */
661 AcpiUtRemoveReference (ObjDesc);
662 return_ACPI_STATUS (Status);
666 /*******************************************************************************
668 * FUNCTION: AcpiRsGetCrsMethodData
670 * PARAMETERS: Handle - a handle to the containing object
671 * RetBuffer - a pointer to a buffer structure for the
676 * DESCRIPTION: This function is called to get the _CRS value of an object
677 * contained in an object specified by the handle passed in
679 * If the function fails an appropriate status will be returned
680 * and the contents of the callers buffer is undefined.
682 ******************************************************************************/
685 AcpiRsGetCrsMethodData (
687 ACPI_BUFFER *RetBuffer)
689 ACPI_OPERAND_OBJECT *ObjDesc;
693 ACPI_FUNCTION_TRACE ("RsGetCrsMethodData");
696 /* Parameters guaranteed valid by caller */
698 /* Execute the method, no parameters */
700 Status = AcpiUtEvaluateObject (Handle, METHOD_NAME__CRS,
701 ACPI_BTYPE_BUFFER, &ObjDesc);
702 if (ACPI_FAILURE (Status))
704 return_ACPI_STATUS (Status);
708 * Make the call to create a resource linked list from the
709 * byte stream buffer that comes back from the _CRS method
712 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
714 /* On exit, we must delete the object returned by evaluateObject */
716 AcpiUtRemoveReference (ObjDesc);
717 return_ACPI_STATUS (Status);
721 /*******************************************************************************
723 * FUNCTION: AcpiRsGetPrsMethodData
725 * PARAMETERS: Handle - a handle to the containing object
726 * RetBuffer - a pointer to a buffer structure for the
731 * DESCRIPTION: This function is called to get the _PRS value of an object
732 * contained in an object specified by the handle passed in
734 * If the function fails an appropriate status will be returned
735 * and the contents of the callers buffer is undefined.
737 ******************************************************************************/
740 AcpiRsGetPrsMethodData (
742 ACPI_BUFFER *RetBuffer)
744 ACPI_OPERAND_OBJECT *ObjDesc;
748 ACPI_FUNCTION_TRACE ("RsGetPrsMethodData");
751 /* Parameters guaranteed valid by caller */
753 /* Execute the method, no parameters */
755 Status = AcpiUtEvaluateObject (Handle, METHOD_NAME__PRS,
756 ACPI_BTYPE_BUFFER, &ObjDesc);
757 if (ACPI_FAILURE (Status))
759 return_ACPI_STATUS (Status);
763 * Make the call to create a resource linked list from the
764 * byte stream buffer that comes back from the _CRS method
767 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
769 /* On exit, we must delete the object returned by evaluateObject */
771 AcpiUtRemoveReference (ObjDesc);
772 return_ACPI_STATUS (Status);
776 /*******************************************************************************
778 * FUNCTION: AcpiRsGetMethodData
780 * PARAMETERS: Handle - a handle to the containing object
781 * Path - Path to method, relative to Handle
782 * RetBuffer - a pointer to a buffer structure for the
787 * DESCRIPTION: This function is called to get the _CRS or _PRS value of an
788 * object contained in an object specified by the handle passed in
790 * If the function fails an appropriate status will be returned
791 * and the contents of the callers buffer is undefined.
793 ******************************************************************************/
796 AcpiRsGetMethodData (
799 ACPI_BUFFER *RetBuffer)
801 ACPI_OPERAND_OBJECT *ObjDesc;
805 ACPI_FUNCTION_TRACE ("RsGetMethodData");
808 /* Parameters guaranteed valid by caller */
810 /* Execute the method, no parameters */
812 Status = AcpiUtEvaluateObject (Handle, Path, ACPI_BTYPE_BUFFER, &ObjDesc);
813 if (ACPI_FAILURE (Status)) {
814 return_ACPI_STATUS (Status);
818 * Make the call to create a resource linked list from the
819 * byte stream buffer that comes back from the method
822 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
824 /* On exit, we must delete the object returned by EvaluateObject */
826 AcpiUtRemoveReference (ObjDesc);
827 return_ACPI_STATUS (Status);
830 /*******************************************************************************
832 * FUNCTION: AcpiRsSetSrsMethodData
834 * PARAMETERS: Handle - a handle to the containing object
835 * InBuffer - a pointer to a buffer structure of the
840 * DESCRIPTION: This function is called to set the _SRS of an object contained
841 * in an object specified by the handle passed in
843 * If the function fails an appropriate status will be returned
844 * and the contents of the callers buffer is undefined.
846 ******************************************************************************/
849 AcpiRsSetSrsMethodData (
851 ACPI_BUFFER *InBuffer)
853 ACPI_PARAMETER_INFO Info;
854 ACPI_OPERAND_OBJECT *Params[2];
859 ACPI_FUNCTION_TRACE ("RsSetSrsMethodData");
862 /* Parameters guaranteed valid by caller */
865 * The InBuffer parameter will point to a linked list of
866 * resource parameters. It needs to be formatted into a
867 * byte stream to be sent in as an input parameter to _SRS
869 * Convert the linked list into a byte stream
871 Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
872 Status = AcpiRsCreateAmlResources (InBuffer->Pointer, &Buffer);
873 if (ACPI_FAILURE (Status))
875 return_ACPI_STATUS (Status);
878 /* Init the param object */
880 Params[0] = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER);
883 AcpiOsFree (Buffer.Pointer);
884 return_ACPI_STATUS (AE_NO_MEMORY);
887 /* Set up the parameter object */
889 Params[0]->Buffer.Length = (UINT32) Buffer.Length;
890 Params[0]->Buffer.Pointer = Buffer.Pointer;
891 Params[0]->Common.Flags = AOPOBJ_DATA_VALID;
895 Info.Parameters = Params;
896 Info.ParameterType = ACPI_PARAM_ARGS;
898 /* Execute the method, no return value */
900 Status = AcpiNsEvaluateRelative (METHOD_NAME__SRS, &Info);
901 if (ACPI_SUCCESS (Status))
903 /* Delete any return object (especially if ImplicitReturn is enabled) */
905 if (Info.ReturnObject)
907 AcpiUtRemoveReference (Info.ReturnObject);
911 /* Clean up and return the status from AcpiNsEvaluateRelative */
913 AcpiUtRemoveReference (Params[0]);
914 return_ACPI_STATUS (Status);