ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

excreate.c
Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Module Name: excreate - Named object creation
00004  *
00005  *****************************************************************************/
00006 
00007 /******************************************************************************
00008  *
00009  * 1. Copyright Notice
00010  *
00011  * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
00012  * All rights reserved.
00013  *
00014  * 2. License
00015  *
00016  * 2.1. This is your license from Intel Corp. under its intellectual property
00017  * rights.  You may have additional license terms from the party that provided
00018  * you this software, covering your right to use that party's intellectual
00019  * property rights.
00020  *
00021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
00022  * copy of the source code appearing in this file ("Covered Code") an
00023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
00024  * base code distributed originally by Intel ("Original Intel Code") to copy,
00025  * make derivatives, distribute, use and display any portion of the Covered
00026  * Code in any form, with the right to sublicense such rights; and
00027  *
00028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
00029  * license (with the right to sublicense), under only those claims of Intel
00030  * patents that are infringed by the Original Intel Code, to make, use, sell,
00031  * offer to sell, and import the Covered Code and derivative works thereof
00032  * solely to the minimum extent necessary to exercise the above copyright
00033  * license, and in no event shall the patent license extend to any additions
00034  * to or modifications of the Original Intel Code.  No other license or right
00035  * is granted directly or by implication, estoppel or otherwise;
00036  *
00037  * The above copyright and patent license is granted only if the following
00038  * conditions are met:
00039  *
00040  * 3. Conditions
00041  *
00042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
00043  * Redistribution of source code of any substantial portion of the Covered
00044  * Code or modification with rights to further distribute source must include
00045  * the above Copyright Notice, the above License, this list of Conditions,
00046  * and the following Disclaimer and Export Compliance provision.  In addition,
00047  * Licensee must cause all Covered Code to which Licensee contributes to
00048  * contain a file documenting the changes Licensee made to create that Covered
00049  * Code and the date of any change.  Licensee must include in that file the
00050  * documentation of any changes made by any predecessor Licensee.  Licensee
00051  * must include a prominent statement that the modification is derived,
00052  * directly or indirectly, from Original Intel Code.
00053  *
00054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
00055  * Redistribution of source code of any substantial portion of the Covered
00056  * Code or modification without rights to further distribute source must
00057  * include the following Disclaimer and Export Compliance provision in the
00058  * documentation and/or other materials provided with distribution.  In
00059  * addition, Licensee may not authorize further sublicense of source of any
00060  * portion of the Covered Code, and must include terms to the effect that the
00061  * license from Licensee to its licensee is limited to the intellectual
00062  * property embodied in the software Licensee provides to its licensee, and
00063  * not to intellectual property embodied in modifications its licensee may
00064  * make.
00065  *
00066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
00067  * substantial portion of the Covered Code or modification must reproduce the
00068  * above Copyright Notice, and the following Disclaimer and Export Compliance
00069  * provision in the documentation and/or other materials provided with the
00070  * distribution.
00071  *
00072  * 3.4. Intel retains all right, title, and interest in and to the Original
00073  * Intel Code.
00074  *
00075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
00076  * Intel shall be used in advertising or otherwise to promote the sale, use or
00077  * other dealings in products derived from or relating to the Covered Code
00078  * without prior written authorization from Intel.
00079  *
00080  * 4. Disclaimer and Export Compliance
00081  *
00082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
00083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
00084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
00085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
00086 
00087  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
00088  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
00089  * PARTICULAR PURPOSE.
00090  *
00091  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
00092  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
00093  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
00094  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
00095  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
00096  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
00097  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
00098  * LIMITED REMEDY.
00099  *
00100  * 4.3. Licensee shall not export, either directly or indirectly, any of this
00101  * software or system incorporating such software without first obtaining any
00102  * required license or other approval from the U. S. Department of Commerce or
00103  * any other agency or department of the United States Government.  In the
00104  * event Licensee exports any such software from the United States or
00105  * re-exports any such software from a foreign destination, Licensee shall
00106  * ensure that the distribution and export/re-export of the software is in
00107  * compliance with all laws, regulations, orders, or other restrictions of the
00108  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
00109  * any of its subsidiaries will export/re-export any technical data, process,
00110  * software, or service, directly or indirectly, to any country for which the
00111  * United States government or any agency thereof requires an export license,
00112  * other governmental approval, or letter of assurance, without first obtaining
00113  * such license, approval or letter.
00114  *
00115  *****************************************************************************/
00116 
00117 #define __EXCREATE_C__
00118 
00119 #include "acpi.h"
00120 #include "accommon.h"
00121 #include "acinterp.h"
00122 #include "amlcode.h"
00123 #include "acnamesp.h"
00124 
00125 
00126 #define _COMPONENT          ACPI_EXECUTER
00127         ACPI_MODULE_NAME    ("excreate")
00128 
00129 
00130 #ifndef ACPI_NO_METHOD_EXECUTION
00131 /*******************************************************************************
00132  *
00133  * FUNCTION:    AcpiExCreateAlias
00134  *
00135  * PARAMETERS:  WalkState            - Current state, contains operands
00136  *
00137  * RETURN:      Status
00138  *
00139  * DESCRIPTION: Create a new named alias
00140  *
00141  ******************************************************************************/
00142 
00143 ACPI_STATUS
00144 AcpiExCreateAlias (
00145     ACPI_WALK_STATE         *WalkState)
00146 {
00147     ACPI_NAMESPACE_NODE     *TargetNode;
00148     ACPI_NAMESPACE_NODE     *AliasNode;
00149     ACPI_STATUS             Status = AE_OK;
00150 
00151 
00152     ACPI_FUNCTION_TRACE (ExCreateAlias);
00153 
00154 
00155     /* Get the source/alias operands (both namespace nodes) */
00156 
00157     AliasNode =  (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
00158     TargetNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[1];
00159 
00160     if ((TargetNode->Type == ACPI_TYPE_LOCAL_ALIAS)  ||
00161         (TargetNode->Type == ACPI_TYPE_LOCAL_METHOD_ALIAS))
00162     {
00163         /*
00164          * Dereference an existing alias so that we don't create a chain
00165          * of aliases.  With this code, we guarantee that an alias is
00166          * always exactly one level of indirection away from the
00167          * actual aliased name.
00168          */
00169         TargetNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, TargetNode->Object);
00170     }
00171 
00172     /*
00173      * For objects that can never change (i.e., the NS node will
00174      * permanently point to the same object), we can simply attach
00175      * the object to the new NS node.  For other objects (such as
00176      * Integers, buffers, etc.), we have to point the Alias node
00177      * to the original Node.
00178      */
00179     switch (TargetNode->Type)
00180     {
00181 
00182     /* For these types, the sub-object can change dynamically via a Store */
00183 
00184     case ACPI_TYPE_INTEGER:
00185     case ACPI_TYPE_STRING:
00186     case ACPI_TYPE_BUFFER:
00187     case ACPI_TYPE_PACKAGE:
00188     case ACPI_TYPE_BUFFER_FIELD:
00189 
00190     /*
00191      * These types open a new scope, so we need the NS node in order to access
00192      * any children.
00193      */
00194     case ACPI_TYPE_DEVICE:
00195     case ACPI_TYPE_POWER:
00196     case ACPI_TYPE_PROCESSOR:
00197     case ACPI_TYPE_THERMAL:
00198     case ACPI_TYPE_LOCAL_SCOPE:
00199 
00200         /*
00201          * The new alias has the type ALIAS and points to the original
00202          * NS node, not the object itself.
00203          */
00204         AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS;
00205         AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
00206         break;
00207 
00208     case ACPI_TYPE_METHOD:
00209 
00210         /*
00211          * Control method aliases need to be differentiated
00212          */
00213         AliasNode->Type = ACPI_TYPE_LOCAL_METHOD_ALIAS;
00214         AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
00215         break;
00216 
00217     default:
00218 
00219         /* Attach the original source object to the new Alias Node */
00220 
00221         /*
00222          * The new alias assumes the type of the target, and it points
00223          * to the same object.  The reference count of the object has an
00224          * additional reference to prevent deletion out from under either the
00225          * target node or the alias Node
00226          */
00227         Status = AcpiNsAttachObject (AliasNode,
00228                     AcpiNsGetAttachedObject (TargetNode), TargetNode->Type);
00229         break;
00230     }
00231 
00232     /* Since both operands are Nodes, we don't need to delete them */
00233 
00234     return_ACPI_STATUS (Status);
00235 }
00236 
00237 
00238 /*******************************************************************************
00239  *
00240  * FUNCTION:    AcpiExCreateEvent
00241  *
00242  * PARAMETERS:  WalkState           - Current state
00243  *
00244  * RETURN:      Status
00245  *
00246  * DESCRIPTION: Create a new event object
00247  *
00248  ******************************************************************************/
00249 
00250 ACPI_STATUS
00251 AcpiExCreateEvent (
00252     ACPI_WALK_STATE         *WalkState)
00253 {
00254     ACPI_STATUS             Status;
00255     ACPI_OPERAND_OBJECT     *ObjDesc;
00256 
00257 
00258     ACPI_FUNCTION_TRACE (ExCreateEvent);
00259 
00260 
00261     ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_EVENT);
00262     if (!ObjDesc)
00263     {
00264         Status = AE_NO_MEMORY;
00265         goto Cleanup;
00266     }
00267 
00268     /*
00269      * Create the actual OS semaphore, with zero initial units -- meaning
00270      * that the event is created in an unsignalled state
00271      */
00272     Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, 0,
00273                 &ObjDesc->Event.OsSemaphore);
00274     if (ACPI_FAILURE (Status))
00275     {
00276         goto Cleanup;
00277     }
00278 
00279     /* Attach object to the Node */
00280 
00281     Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) WalkState->Operands[0],
00282                 ObjDesc, ACPI_TYPE_EVENT);
00283 
00284 Cleanup:
00285     /*
00286      * Remove local reference to the object (on error, will cause deletion
00287      * of both object and semaphore if present.)
00288      */
00289     AcpiUtRemoveReference (ObjDesc);
00290     return_ACPI_STATUS (Status);
00291 }
00292 
00293 
00294 /*******************************************************************************
00295  *
00296  * FUNCTION:    AcpiExCreateMutex
00297  *
00298  * PARAMETERS:  WalkState           - Current state
00299  *
00300  * RETURN:      Status
00301  *
00302  * DESCRIPTION: Create a new mutex object
00303  *
00304  *              Mutex (Name[0], SyncLevel[1])
00305  *
00306  ******************************************************************************/
00307 
00308 ACPI_STATUS
00309 AcpiExCreateMutex (
00310     ACPI_WALK_STATE         *WalkState)
00311 {
00312     ACPI_STATUS             Status = AE_OK;
00313     ACPI_OPERAND_OBJECT     *ObjDesc;
00314 
00315 
00316     ACPI_FUNCTION_TRACE_PTR (ExCreateMutex, ACPI_WALK_OPERANDS);
00317 
00318 
00319     /* Create the new mutex object */
00320 
00321     ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_MUTEX);
00322     if (!ObjDesc)
00323     {
00324         Status = AE_NO_MEMORY;
00325         goto Cleanup;
00326     }
00327 
00328     /* Create the actual OS Mutex */
00329 
00330     Status = AcpiOsCreateMutex (&ObjDesc->Mutex.OsMutex);
00331     if (ACPI_FAILURE (Status))
00332     {
00333         goto Cleanup;
00334     }
00335 
00336     /* Init object and attach to NS node */
00337 
00338     ObjDesc->Mutex.SyncLevel = (UINT8) WalkState->Operands[1]->Integer.Value;
00339     ObjDesc->Mutex.Node = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
00340 
00341     Status = AcpiNsAttachObject (ObjDesc->Mutex.Node, ObjDesc, ACPI_TYPE_MUTEX);
00342 
00343 
00344 Cleanup:
00345     /*
00346      * Remove local reference to the object (on error, will cause deletion
00347      * of both object and semaphore if present.)
00348      */
00349     AcpiUtRemoveReference (ObjDesc);
00350     return_ACPI_STATUS (Status);
00351 }
00352 
00353 
00354 /*******************************************************************************
00355  *
00356  * FUNCTION:    AcpiExCreateRegion
00357  *
00358  * PARAMETERS:  AmlStart            - Pointer to the region declaration AML
00359  *              AmlLength           - Max length of the declaration AML
00360  *              RegionSpace         - SpaceID for the region
00361  *              WalkState           - Current state
00362  *
00363  * RETURN:      Status
00364  *
00365  * DESCRIPTION: Create a new operation region object
00366  *
00367  ******************************************************************************/
00368 
00369 ACPI_STATUS
00370 AcpiExCreateRegion (
00371     UINT8                   *AmlStart,
00372     UINT32                  AmlLength,
00373     UINT8                   RegionSpace,
00374     ACPI_WALK_STATE         *WalkState)
00375 {
00376     ACPI_STATUS             Status;
00377     ACPI_OPERAND_OBJECT     *ObjDesc;
00378     ACPI_NAMESPACE_NODE     *Node;
00379     ACPI_OPERAND_OBJECT     *RegionObj2;
00380 
00381 
00382     ACPI_FUNCTION_TRACE (ExCreateRegion);
00383 
00384 
00385     /* Get the Namespace Node */
00386 
00387     Node = WalkState->Op->Common.Node;
00388 
00389     /*
00390      * If the region object is already attached to this node,
00391      * just return
00392      */
00393     if (AcpiNsGetAttachedObject (Node))
00394     {
00395         return_ACPI_STATUS (AE_OK);
00396     }
00397 
00398     /*
00399      * Space ID must be one of the predefined IDs, or in the user-defined
00400      * range
00401      */
00402     if ((RegionSpace >= ACPI_NUM_PREDEFINED_REGIONS) &&
00403         (RegionSpace < ACPI_USER_REGION_BEGIN) &&
00404         (RegionSpace != ACPI_ADR_SPACE_DATA_TABLE))
00405     {
00406         ACPI_ERROR ((AE_INFO, "Invalid AddressSpace type 0x%X", RegionSpace));
00407         return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
00408     }
00409 
00410     ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
00411         AcpiUtGetRegionName (RegionSpace), RegionSpace));
00412 
00413     /* Create the region descriptor */
00414 
00415     ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
00416     if (!ObjDesc)
00417     {
00418         Status = AE_NO_MEMORY;
00419         goto Cleanup;
00420     }
00421 
00422     /*
00423      * Remember location in AML stream of address & length
00424      * operands since they need to be evaluated at run time.
00425      */
00426     RegionObj2 = ObjDesc->Common.NextObject;
00427     RegionObj2->Extra.AmlStart = AmlStart;
00428     RegionObj2->Extra.AmlLength = AmlLength;
00429 
00430     /* Init the region from the operands */
00431 
00432     ObjDesc->Region.SpaceId = RegionSpace;
00433     ObjDesc->Region.Address = 0;
00434     ObjDesc->Region.Length = 0;
00435     ObjDesc->Region.Node = Node;
00436 
00437     /* Install the new region object in the parent Node */
00438 
00439     Status = AcpiNsAttachObject (Node, ObjDesc, ACPI_TYPE_REGION);
00440 
00441 
00442 Cleanup:
00443 
00444     /* Remove local reference to the object */
00445 
00446     AcpiUtRemoveReference (ObjDesc);
00447     return_ACPI_STATUS (Status);
00448 }
00449 
00450 
00451 /*******************************************************************************
00452  *
00453  * FUNCTION:    AcpiExCreateProcessor
00454  *
00455  * PARAMETERS:  WalkState           - Current state
00456  *
00457  * RETURN:      Status
00458  *
00459  * DESCRIPTION: Create a new processor object and populate the fields
00460  *
00461  *              Processor (Name[0], CpuID[1], PblockAddr[2], PblockLength[3])
00462  *
00463  ******************************************************************************/
00464 
00465 ACPI_STATUS
00466 AcpiExCreateProcessor (
00467     ACPI_WALK_STATE         *WalkState)
00468 {
00469     ACPI_OPERAND_OBJECT     **Operand = &WalkState->Operands[0];
00470     ACPI_OPERAND_OBJECT     *ObjDesc;
00471     ACPI_STATUS             Status;
00472 
00473 
00474     ACPI_FUNCTION_TRACE_PTR (ExCreateProcessor, WalkState);
00475 
00476 
00477     /* Create the processor object */
00478 
00479     ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PROCESSOR);
00480     if (!ObjDesc)
00481     {
00482         return_ACPI_STATUS (AE_NO_MEMORY);
00483     }
00484 
00485     /* Initialize the processor object from the operands */
00486 
00487     ObjDesc->Processor.ProcId = (UINT8) Operand[1]->Integer.Value;
00488     ObjDesc->Processor.Length = (UINT8) Operand[3]->Integer.Value;
00489     ObjDesc->Processor.Address = (ACPI_IO_ADDRESS) Operand[2]->Integer.Value;
00490 
00491     /* Install the processor object in the parent Node */
00492 
00493     Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0],
00494                     ObjDesc, ACPI_TYPE_PROCESSOR);
00495 
00496     /* Remove local reference to the object */
00497 
00498     AcpiUtRemoveReference (ObjDesc);
00499     return_ACPI_STATUS (Status);
00500 }
00501 
00502 
00503 /*******************************************************************************
00504  *
00505  * FUNCTION:    AcpiExCreatePowerResource
00506  *
00507  * PARAMETERS:  WalkState           - Current state
00508  *
00509  * RETURN:      Status
00510  *
00511  * DESCRIPTION: Create a new PowerResource object and populate the fields
00512  *
00513  *              PowerResource (Name[0], SystemLevel[1], ResourceOrder[2])
00514  *
00515  ******************************************************************************/
00516 
00517 ACPI_STATUS
00518 AcpiExCreatePowerResource (
00519     ACPI_WALK_STATE         *WalkState)
00520 {
00521     ACPI_OPERAND_OBJECT     **Operand = &WalkState->Operands[0];
00522     ACPI_STATUS             Status;
00523     ACPI_OPERAND_OBJECT     *ObjDesc;
00524 
00525 
00526     ACPI_FUNCTION_TRACE_PTR (ExCreatePowerResource, WalkState);
00527 
00528 
00529     /* Create the power resource object */
00530 
00531     ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_POWER);
00532     if (!ObjDesc)
00533     {
00534         return_ACPI_STATUS (AE_NO_MEMORY);
00535     }
00536 
00537     /* Initialize the power object from the operands */
00538 
00539     ObjDesc->PowerResource.SystemLevel = (UINT8) Operand[1]->Integer.Value;
00540     ObjDesc->PowerResource.ResourceOrder = (UINT16) Operand[2]->Integer.Value;
00541 
00542     /* Install the  power resource object in the parent Node */
00543 
00544     Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0],
00545                     ObjDesc, ACPI_TYPE_POWER);
00546 
00547     /* Remove local reference to the object */
00548 
00549     AcpiUtRemoveReference (ObjDesc);
00550     return_ACPI_STATUS (Status);
00551 }
00552 #endif
00553 
00554 
00555 /*******************************************************************************
00556  *
00557  * FUNCTION:    AcpiExCreateMethod
00558  *
00559  * PARAMETERS:  AmlStart        - First byte of the method's AML
00560  *              AmlLength       - AML byte count for this method
00561  *              WalkState       - Current state
00562  *
00563  * RETURN:      Status
00564  *
00565  * DESCRIPTION: Create a new method object
00566  *
00567  ******************************************************************************/
00568 
00569 ACPI_STATUS
00570 AcpiExCreateMethod (
00571     UINT8                   *AmlStart,
00572     UINT32                  AmlLength,
00573     ACPI_WALK_STATE         *WalkState)
00574 {
00575     ACPI_OPERAND_OBJECT     **Operand = &WalkState->Operands[0];
00576     ACPI_OPERAND_OBJECT     *ObjDesc;
00577     ACPI_STATUS             Status;
00578     UINT8                   MethodFlags;
00579 
00580 
00581     ACPI_FUNCTION_TRACE_PTR (ExCreateMethod, WalkState);
00582 
00583 
00584     /* Create a new method object */
00585 
00586     ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
00587     if (!ObjDesc)
00588     {
00589        Status = AE_NO_MEMORY;
00590        goto Exit;
00591     }
00592 
00593     /* Save the method's AML pointer and length  */
00594 
00595     ObjDesc->Method.AmlStart = AmlStart;
00596     ObjDesc->Method.AmlLength = AmlLength;
00597 
00598     /*
00599      * Disassemble the method flags. Split off the ArgCount, Serialized
00600      * flag, and SyncLevel for efficiency.
00601      */
00602     MethodFlags = (UINT8) Operand[1]->Integer.Value;
00603     ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & AML_METHOD_ARG_COUNT);
00604 
00605     /*
00606      * Get the SyncLevel. If method is serialized, a mutex will be
00607      * created for this method when it is parsed.
00608      */
00609     if (MethodFlags & AML_METHOD_SERIALIZED)
00610     {
00611         ObjDesc->Method.InfoFlags = ACPI_METHOD_SERIALIZED;
00612 
00613         /*
00614          * ACPI 1.0: SyncLevel = 0
00615          * ACPI 2.0: SyncLevel = SyncLevel in method declaration
00616          */
00617         ObjDesc->Method.SyncLevel = (UINT8)
00618             ((MethodFlags & AML_METHOD_SYNC_LEVEL) >> 4);
00619     }
00620 
00621     /* Attach the new object to the method Node */
00622 
00623     Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0],
00624                     ObjDesc, ACPI_TYPE_METHOD);
00625 
00626     /* Remove local reference to the object */
00627 
00628     AcpiUtRemoveReference (ObjDesc);
00629 
00630 Exit:
00631     /* Remove a reference to the operand */
00632 
00633     AcpiUtRemoveReference (Operand[1]);
00634     return_ACPI_STATUS (Status);
00635 }
00636 
00637 

Generated on Sun May 27 2012 04:27:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.