DynamicTablesPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the DynamicTablesPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
7c34237831
commit
731c67e1d7
@@ -39,21 +39,22 @@
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlDeviceOpUpdateName (
|
||||
IN AML_OBJECT_NODE_HANDLE DeviceOpNode,
|
||||
IN CHAR8 * NewNameString
|
||||
IN AML_OBJECT_NODE_HANDLE DeviceOpNode,
|
||||
IN CHAR8 *NewNameString
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
AML_DATA_NODE_HANDLE DeviceNameDataNode;
|
||||
CHAR8 * NewAmlNameString;
|
||||
UINT32 NewAmlNameStringSize;
|
||||
AML_DATA_NODE_HANDLE DeviceNameDataNode;
|
||||
CHAR8 *NewAmlNameString;
|
||||
UINT32 NewAmlNameStringSize;
|
||||
|
||||
// Check the input node is an object node.
|
||||
if ((DeviceOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)DeviceOpNode) != EAmlNodeObject) ||
|
||||
(!AmlNodeHasOpCode (DeviceOpNode, AML_EXT_OP, AML_EXT_DEVICE_OP)) ||
|
||||
(NewNameString == NULL)) {
|
||||
(NewNameString == NULL))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -66,7 +67,8 @@ AmlDeviceOpUpdateName (
|
||||
);
|
||||
if ((DeviceNameDataNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)DeviceNameDataNode) != EAmlNodeData) ||
|
||||
(!AmlNodeHasDataType (DeviceNameDataNode, EAmlNodeDataTypeNameString))) {
|
||||
(!AmlNodeHasDataType (DeviceNameDataNode, EAmlNodeDataTypeNameString)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -87,7 +89,7 @@ AmlDeviceOpUpdateName (
|
||||
Status = AmlUpdateDataNode (
|
||||
DeviceNameDataNode,
|
||||
EAmlNodeDataTypeNameString,
|
||||
(UINT8*)NewAmlNameString,
|
||||
(UINT8 *)NewAmlNameString,
|
||||
NewAmlNameStringSize
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -124,7 +126,8 @@ AmlNameOpUpdateInteger (
|
||||
|
||||
if ((NameOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)NameOpNode) != EAmlNodeObject) ||
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0))) {
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -138,7 +141,8 @@ AmlNameOpUpdateInteger (
|
||||
EAmlParseIndexTerm1
|
||||
);
|
||||
if ((IntegerOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)IntegerOpNode) != EAmlNodeObject)) {
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)IntegerOpNode) != EAmlNodeObject))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -170,8 +174,8 @@ AmlNameOpUpdateInteger (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlNameOpUpdateString (
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
IN CONST CHAR8 * NewName
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
IN CONST CHAR8 *NewName
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -180,7 +184,8 @@ AmlNameOpUpdateString (
|
||||
|
||||
if ((NameOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)NameOpNode) != EAmlNodeObject) ||
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0))) {
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -193,7 +198,8 @@ AmlNameOpUpdateString (
|
||||
EAmlParseIndexTerm1
|
||||
);
|
||||
if ((StringOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)StringOpNode) != EAmlNodeObject)) {
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)StringOpNode) != EAmlNodeObject))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -205,7 +211,8 @@ AmlNameOpUpdateString (
|
||||
EAmlParseIndexTerm0
|
||||
);
|
||||
if ((StringDataNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)StringDataNode) != EAmlNodeData)) {
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)StringDataNode) != EAmlNodeData))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -214,7 +221,7 @@ AmlNameOpUpdateString (
|
||||
Status = AmlUpdateDataNode (
|
||||
StringDataNode,
|
||||
EAmlNodeDataTypeString,
|
||||
(UINT8*)NewName,
|
||||
(UINT8 *)NewName,
|
||||
(UINT32)AsciiStrLen (NewName) + 1
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -250,8 +257,8 @@ AmlNameOpUpdateString (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlNameOpGetFirstRdNode (
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
OUT AML_DATA_NODE_HANDLE * OutRdNode
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
OUT AML_DATA_NODE_HANDLE *OutRdNode
|
||||
)
|
||||
{
|
||||
AML_OBJECT_NODE_HANDLE BufferOpNode;
|
||||
@@ -260,7 +267,8 @@ AmlNameOpGetFirstRdNode (
|
||||
if ((NameOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)NameOpNode) != EAmlNodeObject) ||
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0)) ||
|
||||
(OutRdNode == NULL)) {
|
||||
(OutRdNode == NULL))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -275,7 +283,8 @@ AmlNameOpGetFirstRdNode (
|
||||
);
|
||||
if ((BufferOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)BufferOpNode) != EAmlNodeObject) ||
|
||||
(!AmlNodeHasOpCode (BufferOpNode, AML_BUFFER_OP, 0))) {
|
||||
(!AmlNodeHasOpCode (BufferOpNode, AML_BUFFER_OP, 0)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -288,7 +297,8 @@ AmlNameOpGetFirstRdNode (
|
||||
);
|
||||
if ((FirstRdNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)FirstRdNode) != EAmlNodeData) ||
|
||||
(!AmlNodeHasDataType (FirstRdNode, EAmlNodeDataTypeResourceData))) {
|
||||
(!AmlNodeHasDataType (FirstRdNode, EAmlNodeDataTypeResourceData)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -327,17 +337,18 @@ AmlNameOpGetFirstRdNode (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlNameOpGetNextRdNode (
|
||||
IN AML_DATA_NODE_HANDLE CurrRdNode,
|
||||
OUT AML_DATA_NODE_HANDLE * OutRdNode
|
||||
IN AML_DATA_NODE_HANDLE CurrRdNode,
|
||||
OUT AML_DATA_NODE_HANDLE *OutRdNode
|
||||
)
|
||||
{
|
||||
AML_OBJECT_NODE_HANDLE NameOpNode;
|
||||
AML_OBJECT_NODE_HANDLE BufferOpNode;
|
||||
AML_OBJECT_NODE_HANDLE NameOpNode;
|
||||
AML_OBJECT_NODE_HANDLE BufferOpNode;
|
||||
|
||||
if ((CurrRdNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)CurrRdNode) != EAmlNodeData) ||
|
||||
(!AmlNodeHasDataType (CurrRdNode, EAmlNodeDataTypeResourceData)) ||
|
||||
(OutRdNode == NULL)) {
|
||||
(OutRdNode == NULL))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -349,7 +360,8 @@ AmlNameOpGetNextRdNode (
|
||||
(AML_NODE_HANDLE)CurrRdNode
|
||||
);
|
||||
if ((BufferOpNode == NULL) ||
|
||||
(!AmlNodeHasOpCode (BufferOpNode, AML_BUFFER_OP, 0))) {
|
||||
(!AmlNodeHasOpCode (BufferOpNode, AML_BUFFER_OP, 0)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -359,7 +371,8 @@ AmlNameOpGetNextRdNode (
|
||||
(AML_NODE_HANDLE)BufferOpNode
|
||||
);
|
||||
if ((NameOpNode == NULL) ||
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0))) {
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -372,7 +385,9 @@ AmlNameOpGetNextRdNode (
|
||||
// If the Resource Data is an End Tag, return NULL.
|
||||
if (AmlNodeHasRdDataType (
|
||||
*OutRdNode,
|
||||
AML_RD_BUILD_SMALL_DESC_ID (ACPI_SMALL_END_TAG_DESCRIPTOR_NAME))) {
|
||||
AML_RD_BUILD_SMALL_DESC_ID (ACPI_SMALL_END_TAG_DESCRIPTOR_NAME)
|
||||
))
|
||||
{
|
||||
*OutRdNode = NULL;
|
||||
}
|
||||
|
||||
@@ -415,8 +430,8 @@ AmlNameOpGetNextRdNode (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlNameOpCrsGetFirstRdNode (
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpCrsNode,
|
||||
OUT AML_DATA_NODE_HANDLE * OutRdNode
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpCrsNode,
|
||||
OUT AML_DATA_NODE_HANDLE *OutRdNode
|
||||
)
|
||||
{
|
||||
return AmlNameOpGetFirstRdNode (NameOpCrsNode, OutRdNode);
|
||||
@@ -455,8 +470,8 @@ AmlNameOpCrsGetFirstRdNode (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlNameOpCrsGetNextRdNode (
|
||||
IN AML_DATA_NODE_HANDLE CurrRdNode,
|
||||
OUT AML_DATA_NODE_HANDLE * OutRdNode
|
||||
IN AML_DATA_NODE_HANDLE CurrRdNode,
|
||||
OUT AML_DATA_NODE_HANDLE *OutRdNode
|
||||
)
|
||||
{
|
||||
return AmlNameOpGetNextRdNode (CurrRdNode, OutRdNode);
|
||||
|
@@ -44,22 +44,23 @@
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNameOpCompareName (
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
IN CHAR8 * AslName
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
IN CHAR8 *AslName
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
AML_DATA_NODE_HANDLE NameDataNode;
|
||||
EFI_STATUS Status;
|
||||
AML_DATA_NODE_HANDLE NameDataNode;
|
||||
|
||||
CHAR8 * AmlName;
|
||||
UINT32 AmlNameSize;
|
||||
CHAR8 *AmlName;
|
||||
UINT32 AmlNameSize;
|
||||
|
||||
BOOLEAN RetVal;
|
||||
BOOLEAN RetVal;
|
||||
|
||||
if ((NameOpNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)NameOpNode) != EAmlNodeObject) ||
|
||||
(!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0)) ||
|
||||
(AslName == NULL)) {
|
||||
(AslName == NULL))
|
||||
{
|
||||
ASSERT (0);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -72,7 +73,8 @@ AmlNameOpCompareName (
|
||||
);
|
||||
if ((NameDataNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)NameDataNode) != EAmlNodeData) ||
|
||||
(!AmlNodeHasDataType (NameDataNode, EAmlNodeDataTypeNameString))) {
|
||||
(!AmlNodeHasDataType (NameDataNode, EAmlNodeDataTypeNameString)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -92,7 +94,7 @@ AmlNameOpCompareName (
|
||||
}
|
||||
|
||||
// Fetch the name.
|
||||
Status = AmlGetDataNodeBuffer (NameDataNode, (UINT8*)AmlName, &AmlNameSize);
|
||||
Status = AmlGetDataNodeBuffer (NameDataNode, (UINT8 *)AmlName, &AmlNameSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (AmlName);
|
||||
ASSERT (0);
|
||||
@@ -120,14 +122,14 @@ AmlNameOpCompareName (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNodeHasOpCode (
|
||||
IN AML_OBJECT_NODE_HANDLE ObjectNode,
|
||||
IN UINT8 OpCode,
|
||||
IN UINT8 SubOpCode
|
||||
IN AML_OBJECT_NODE_HANDLE ObjectNode,
|
||||
IN UINT8 OpCode,
|
||||
IN UINT8 SubOpCode
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT8 NodeOpCode;
|
||||
UINT8 NodeSubOpCode;
|
||||
EFI_STATUS Status;
|
||||
UINT8 NodeOpCode;
|
||||
UINT8 NodeSubOpCode;
|
||||
|
||||
// Get the Node information.
|
||||
Status = AmlGetObjectNodeInfo (
|
||||
@@ -144,7 +146,8 @@ AmlNodeHasOpCode (
|
||||
|
||||
// Check the OpCode and SubOpCode.
|
||||
if ((OpCode != NodeOpCode) ||
|
||||
(SubOpCode != NodeSubOpCode)) {
|
||||
(SubOpCode != NodeSubOpCode))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -163,12 +166,12 @@ AmlNodeHasOpCode (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNodeHasDataType (
|
||||
IN AML_DATA_NODE_HANDLE DataNode,
|
||||
IN EAML_NODE_DATA_TYPE DataType
|
||||
IN AML_DATA_NODE_HANDLE DataNode,
|
||||
IN EAML_NODE_DATA_TYPE DataType
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EAML_NODE_DATA_TYPE NodeDataType;
|
||||
EFI_STATUS Status;
|
||||
EAML_NODE_DATA_TYPE NodeDataType;
|
||||
|
||||
// Get the data type.
|
||||
Status = AmlGetNodeDataType (DataNode, &NodeDataType);
|
||||
@@ -197,12 +200,12 @@ AmlNodeHasDataType (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNodeHasRdDataType (
|
||||
IN AML_DATA_NODE_HANDLE RdNode,
|
||||
IN AML_RD_HEADER RdDataType
|
||||
IN AML_DATA_NODE_HANDLE RdNode,
|
||||
IN AML_RD_HEADER RdDataType
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
AML_RD_HEADER NodeRdDataType;
|
||||
EFI_STATUS Status;
|
||||
AML_RD_HEADER NodeRdDataType;
|
||||
|
||||
// Get the resource data type.
|
||||
Status = AmlGetResourceDataType (
|
||||
|
@@ -36,8 +36,8 @@
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNameOpCompareName (
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
IN CHAR8 * AslName
|
||||
IN AML_OBJECT_NODE_HANDLE NameOpNode,
|
||||
IN CHAR8 *AslName
|
||||
);
|
||||
|
||||
/** Check whether ObjectNode has the input OpCode/SubOpcode couple.
|
||||
@@ -53,9 +53,9 @@ AmlNameOpCompareName (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNodeHasOpCode (
|
||||
IN AML_OBJECT_NODE_HANDLE ObjectNode,
|
||||
IN UINT8 OpCode,
|
||||
IN UINT8 SubOpCode
|
||||
IN AML_OBJECT_NODE_HANDLE ObjectNode,
|
||||
IN UINT8 OpCode,
|
||||
IN UINT8 SubOpCode
|
||||
);
|
||||
|
||||
/** Check whether DataNode has the input DataType.
|
||||
@@ -70,8 +70,8 @@ AmlNodeHasOpCode (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNodeHasDataType (
|
||||
IN AML_DATA_NODE_HANDLE DataNode,
|
||||
IN EAML_NODE_DATA_TYPE DataType
|
||||
IN AML_DATA_NODE_HANDLE DataNode,
|
||||
IN EAML_NODE_DATA_TYPE DataType
|
||||
);
|
||||
|
||||
/** Check whether RdNode has the input RdDataType.
|
||||
@@ -86,8 +86,8 @@ AmlNodeHasDataType (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
AmlNodeHasRdDataType (
|
||||
IN AML_DATA_NODE_HANDLE RdNode,
|
||||
IN AML_RD_HEADER RdDataType
|
||||
IN AML_DATA_NODE_HANDLE RdNode,
|
||||
IN AML_RD_HEADER RdDataType
|
||||
);
|
||||
|
||||
#endif // AML_HELPER_H_
|
||||
|
@@ -41,24 +41,28 @@
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlUpdateRdInterrupt (
|
||||
IN AML_DATA_NODE_HANDLE InterruptRdNode,
|
||||
IN UINT32 Irq
|
||||
IN AML_DATA_NODE_HANDLE InterruptRdNode,
|
||||
IN UINT32 Irq
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT32 * FirstInterrupt;
|
||||
UINT8 * QueryBuffer;
|
||||
UINT32 QueryBufferSize;
|
||||
EFI_STATUS Status;
|
||||
UINT32 *FirstInterrupt;
|
||||
UINT8 *QueryBuffer;
|
||||
UINT32 QueryBufferSize;
|
||||
|
||||
if ((InterruptRdNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)InterruptRdNode) != EAmlNodeData) ||
|
||||
(!AmlNodeHasDataType (
|
||||
InterruptRdNode,
|
||||
EAmlNodeDataTypeResourceData)) ||
|
||||
EAmlNodeDataTypeResourceData
|
||||
)) ||
|
||||
(!AmlNodeHasRdDataType (
|
||||
InterruptRdNode,
|
||||
AML_RD_BUILD_LARGE_DESC_ID (
|
||||
ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME)))) {
|
||||
ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME
|
||||
)
|
||||
)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -102,7 +106,7 @@ AmlUpdateRdInterrupt (
|
||||
|
||||
// Get the address of the first interrupt field.
|
||||
FirstInterrupt =
|
||||
((EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR*)QueryBuffer)->InterruptNumber;
|
||||
((EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR *)QueryBuffer)->InterruptNumber;
|
||||
|
||||
*FirstInterrupt = Irq;
|
||||
|
||||
@@ -121,6 +125,7 @@ error_handler:
|
||||
if (QueryBuffer != NULL) {
|
||||
FreePool (QueryBuffer);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -151,40 +156,44 @@ error_handler:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmlUpdateRdInterruptEx (
|
||||
IN AML_DATA_NODE_HANDLE InterruptRdNode,
|
||||
IN BOOLEAN ResourceConsumer,
|
||||
IN BOOLEAN EdgeTriggered,
|
||||
IN BOOLEAN ActiveLow,
|
||||
IN BOOLEAN Shared,
|
||||
IN UINT32 * IrqList,
|
||||
IN UINT8 IrqCount
|
||||
IN AML_DATA_NODE_HANDLE InterruptRdNode,
|
||||
IN BOOLEAN ResourceConsumer,
|
||||
IN BOOLEAN EdgeTriggered,
|
||||
IN BOOLEAN ActiveLow,
|
||||
IN BOOLEAN Shared,
|
||||
IN UINT32 *IrqList,
|
||||
IN UINT8 IrqCount
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR * RdInterrupt;
|
||||
UINT32 * FirstInterrupt;
|
||||
UINT8 * UpdateBuffer;
|
||||
UINT16 UpdateBufferSize;
|
||||
EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR *RdInterrupt;
|
||||
UINT32 *FirstInterrupt;
|
||||
UINT8 *UpdateBuffer;
|
||||
UINT16 UpdateBufferSize;
|
||||
|
||||
if ((InterruptRdNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)InterruptRdNode) != EAmlNodeData) ||
|
||||
(!AmlNodeHasDataType (
|
||||
InterruptRdNode,
|
||||
EAmlNodeDataTypeResourceData)) ||
|
||||
EAmlNodeDataTypeResourceData
|
||||
)) ||
|
||||
(!AmlNodeHasRdDataType (
|
||||
InterruptRdNode,
|
||||
AML_RD_BUILD_LARGE_DESC_ID (
|
||||
ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME))) ||
|
||||
ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME
|
||||
)
|
||||
)) ||
|
||||
(IrqList == NULL) ||
|
||||
(IrqCount == 0)) {
|
||||
(IrqCount == 0))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
UpdateBuffer = NULL;
|
||||
UpdateBuffer = NULL;
|
||||
UpdateBufferSize = sizeof (EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR) +
|
||||
((IrqCount - 1) * sizeof (UINT32));
|
||||
((IrqCount - 1) * sizeof (UINT32));
|
||||
|
||||
// Allocate a buffer to update the data.
|
||||
UpdateBuffer = AllocatePool (UpdateBufferSize);
|
||||
@@ -194,9 +203,9 @@ AmlUpdateRdInterruptEx (
|
||||
}
|
||||
|
||||
// Update the Resource Data information (structure size, interrupt count).
|
||||
RdInterrupt = (EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR*)UpdateBuffer;
|
||||
RdInterrupt = (EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR *)UpdateBuffer;
|
||||
RdInterrupt->Header.Header.Byte =
|
||||
AML_RD_BUILD_LARGE_DESC_ID (ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME);
|
||||
AML_RD_BUILD_LARGE_DESC_ID (ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME);
|
||||
RdInterrupt->Header.Length =
|
||||
UpdateBufferSize - sizeof (ACPI_LARGE_RESOURCE_HEADER);
|
||||
RdInterrupt->InterruptTableLength = IrqCount;
|
||||
@@ -207,7 +216,7 @@ AmlUpdateRdInterruptEx (
|
||||
|
||||
// Get the address of the first interrupt field.
|
||||
FirstInterrupt =
|
||||
((EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR*)UpdateBuffer)->InterruptNumber;
|
||||
((EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR *)UpdateBuffer)->InterruptNumber;
|
||||
|
||||
// Copy the input list of interrupts.
|
||||
CopyMem (FirstInterrupt, IrqList, (sizeof (UINT32) * IrqCount));
|
||||
@@ -248,11 +257,11 @@ AmlUpdateRdQWord (
|
||||
IN UINT64 BaseAddressLength
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR * RdQWord;
|
||||
EFI_STATUS Status;
|
||||
EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR *RdQWord;
|
||||
|
||||
UINT8 * QueryBuffer;
|
||||
UINT32 QueryBufferSize;
|
||||
UINT8 *QueryBuffer;
|
||||
UINT32 QueryBufferSize;
|
||||
|
||||
if ((QWordRdNode == NULL) ||
|
||||
(AmlGetNodeType ((AML_NODE_HANDLE)QWordRdNode) != EAmlNodeData) ||
|
||||
@@ -260,7 +269,10 @@ AmlUpdateRdQWord (
|
||||
(!AmlNodeHasRdDataType (
|
||||
QWordRdNode,
|
||||
AML_RD_BUILD_LARGE_DESC_ID (
|
||||
ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME)))) {
|
||||
ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME
|
||||
)
|
||||
)))
|
||||
{
|
||||
ASSERT (0);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -294,12 +306,12 @@ AmlUpdateRdQWord (
|
||||
goto error_handler;
|
||||
}
|
||||
|
||||
RdQWord = (EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR*)QueryBuffer;
|
||||
RdQWord = (EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR *)QueryBuffer;
|
||||
|
||||
// Update the Base Address and Length.
|
||||
RdQWord->AddrRangeMin = BaseAddress;
|
||||
RdQWord->AddrRangeMax = BaseAddress + BaseAddressLength - 1;
|
||||
RdQWord->AddrLen = BaseAddressLength;
|
||||
RdQWord->AddrLen = BaseAddressLength;
|
||||
|
||||
// Update Base Address Resource Data node.
|
||||
Status = AmlUpdateDataNode (
|
||||
@@ -316,5 +328,6 @@ error_handler:
|
||||
if (QueryBuffer != NULL) {
|
||||
FreePool (QueryBuffer);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user