1 /******************************************************************************
2 *
3 * Module Name: dsargs - Support for execution of dynamic arguments for static
4 * objects (regions, fields, buffer fields, etc.)
5 *
6 *****************************************************************************/
7
8 /*
9 * Copyright (C) 2000 - 2011, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
407 return_ACPI_STATUS (AE_OK);
408 }
409
410 ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
411 if (!ExtraDesc)
412 {
413 return_ACPI_STATUS (AE_NOT_EXIST);
414 }
415
416 /* Get the Region node */
417
418 Node = ObjDesc->Region.Node;
419
420 ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_REGION, Node, NULL));
421
422 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Arg Init at AML %p\n",
423 AcpiUtGetNodeName (Node), ExtraDesc->Extra.AmlStart));
424
425 /* Execute the argument AML */
426
427 Status = AcpiDsExecuteArguments (Node, Node->Parent,
428 ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
429 return_ACPI_STATUS (Status);
430 }
|
1 /******************************************************************************
2 *
3 * Module Name: dsargs - Support for execution of dynamic arguments for static
4 * objects (regions, fields, buffer fields, etc.)
5 *
6 *****************************************************************************/
7
8 /*
9 * Copyright (C) 2000 - 2014, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
407 return_ACPI_STATUS (AE_OK);
408 }
409
410 ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
411 if (!ExtraDesc)
412 {
413 return_ACPI_STATUS (AE_NOT_EXIST);
414 }
415
416 /* Get the Region node */
417
418 Node = ObjDesc->Region.Node;
419
420 ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_REGION, Node, NULL));
421
422 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Arg Init at AML %p\n",
423 AcpiUtGetNodeName (Node), ExtraDesc->Extra.AmlStart));
424
425 /* Execute the argument AML */
426
427 Status = AcpiDsExecuteArguments (Node, ExtraDesc->Extra.ScopeNode,
428 ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
429 if (ACPI_FAILURE (Status))
430 {
431 return_ACPI_STATUS (Status);
432 }
433
434 Status = AcpiUtAddAddressRange (ObjDesc->Region.SpaceId,
435 ObjDesc->Region.Address, ObjDesc->Region.Length,
436 Node);
437 return_ACPI_STATUS (Status);
438 }
|