/** @file\r
AML Resource Data Code Generation.\r
\r
- Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.<BR>\r
+ Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\r
/** Code generation for the "Interrupt ()" ASL function.\r
\r
- This function creates a Resource Data element corresponding to the\r
- "Interrupt ()" ASL function and stores it in an AML Data Node.\r
-\r
The Resource Data effectively created is an Extended Interrupt Resource\r
- Data. See ACPI 6.3 specification, s6.4.3.6 "Extended Interrupt Descriptor"\r
- for more information about Extended Interrupt Resource Data.\r
-\r
- This function allocates memory to create a data node. It is the caller's\r
- responsibility to either:\r
- - attach this node to an AML tree;\r
- - delete this node.\r
-\r
- @param [in] ResourceConsumer The device consumes the specified interrupt\r
- or produces it for use by a child device.\r
- @param [in] EdgeTriggered The interrupt is edge triggered or\r
- level triggered.\r
- @param [in] ActiveLow The interrupt is active-high or active-low.\r
- @param [in] Shared The interrupt can be shared with other\r
- devices or not (Exclusive).\r
- @param [in] IrqList Interrupt list. Must be non-NULL.\r
- @param [in] IrqCount Interrupt count. Must be non-zero.\r
- @param [in] ParentNode If not NULL, add the generated node\r
- to the end of the variable list of\r
- argument of the ParentNode, but\r
- before the "End Tag" Resource Data.\r
- Must be a BufferOpNode.\r
- @param [out] NewRdNode If success, contains the generated node.\r
+ Data. Cf ACPI 6.4:\r
+ - s6.4.3.6 "Extended Interrupt Descriptor"\r
+ - s19.6.64 "Interrupt (Interrupt Resource Descriptor Macro)"\r
+\r
+ The created resource data node can be:\r
+ - appended to the list of resource data elements of the NameOpNode.\r
+ In such case NameOpNode must be defined by a the "Name ()" ASL statement\r
+ and initially contain a "ResourceTemplate ()".\r
+ - returned through the NewRdNode parameter.\r
+\r
+ @param [in] ResourceConsumer The device consumes the specified interrupt\r
+ or produces it for use by a child device.\r
+ @param [in] EdgeTriggered The interrupt is edge triggered or\r
+ level triggered.\r
+ @param [in] ActiveLow The interrupt is active-high or active-low.\r
+ @param [in] Shared The interrupt can be shared with other\r
+ devices or not (Exclusive).\r
+ @param [in] IrqList Interrupt list. Must be non-NULL.\r
+ @param [in] IrqCount Interrupt count. Must be non-zero.\r
+ @param [in] NameOpNode NameOp object node defining a named object.\r
+ If provided, append the new resource data node\r
+ to the list of resource data elements of this\r
+ node.\r
+ @param [out] NewRdNode If provided and success,\r
+ contain the created node.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
@retval EFI_INVALID_PARAMETER Invalid parameter.\r
**/\r
EFI_STATUS\r
EFIAPI\r
-AmlCodeGenInterrupt (\r
- IN BOOLEAN ResourceConsumer,\r
- IN BOOLEAN EdgeTriggered,\r
- IN BOOLEAN ActiveLow,\r
- IN BOOLEAN Shared,\r
- IN UINT32 * IrqList,\r
- IN UINT8 IrqCount,\r
- IN AML_OBJECT_NODE * ParentNode, OPTIONAL\r
- OUT AML_DATA_NODE ** NewRdNode OPTIONAL\r
+AmlCodeGenRdInterrupt (\r
+ IN BOOLEAN ResourceConsumer,\r
+ IN BOOLEAN EdgeTriggered,\r
+ IN BOOLEAN ActiveLow,\r
+ IN BOOLEAN Shared,\r
+ IN UINT32 *IrqList,\r
+ IN UINT8 IrqCount,\r
+ IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL\r
+ OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL\r
);\r
\r
#endif // AML_RESOURCE_DATA_CODE_GEN_H_\r