mirror of https://github.com/acidanthera/audk.git
DynamicTablesPkg: AmlLib\AmlDbgPrint fix ECC error
Fix ECC error 8001 reported errors in AmlDbgPrint. [8001] Only capital letters are allowed to be used for #define declarations. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
This commit is contained in:
parent
5e0b708f74
commit
e18bc21d6a
|
@ -71,6 +71,7 @@
|
|||
"ExtendWords": [
|
||||
"ARMHB", # ARMHB000
|
||||
"ARMLTD",
|
||||
"AMLDBG",
|
||||
"EISAID",
|
||||
"CCIDX",
|
||||
"CCSIDR",
|
||||
|
|
|
@ -163,11 +163,11 @@ AmlDbgPrintNameString (
|
|||
}
|
||||
|
||||
if (SegCount != 0) {
|
||||
AmlDbgPrintNameSeg (Buffer);
|
||||
AMLDBG_PRINT_NAMESEG (Buffer);
|
||||
Buffer += AML_NAME_SEG_SIZE;
|
||||
for (Index = 0; Index < SegCount - 1; Index++) {
|
||||
DEBUG ((DEBUG_INFO, "."));
|
||||
AmlDbgPrintNameSeg (Buffer);
|
||||
AMLDBG_PRINT_NAMESEG (Buffer);
|
||||
Buffer += AML_NAME_SEG_SIZE;
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ AmlDbgPrintDataNode (
|
|||
|
||||
if ((DataNode->DataType == EAmlNodeDataTypeNameString) ||
|
||||
(DataNode->DataType == EAmlNodeDataTypeString)) {
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_INFO,
|
||||
(CONST CHAR8*)DataNode->Buffer,
|
||||
DataNode->Size
|
||||
|
@ -316,7 +316,7 @@ AmlDbgPrintObjectNode (
|
|||
DEBUG ((DEBUG_INFO, "0x%08x | ", ObjectNode->AmlByteEncoding->Attribute));
|
||||
DEBUG ((DEBUG_INFO, "0x%04x | ", ObjectNode->PkgLen));
|
||||
if (AmlNodeHasAttribute (ObjectNode, AML_IN_NAMESPACE)) {
|
||||
AmlDbgPrintNameString (
|
||||
AMLDBG_PRINT_NAMESTR (
|
||||
AmlNodeGetName ((CONST AML_OBJECT_NODE*)ObjectNode),
|
||||
FALSE
|
||||
);
|
||||
|
@ -488,7 +488,7 @@ AmlDbgPrintTree (
|
|||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpRaw (
|
||||
AmlDbgDumpRaw (
|
||||
IN CONST UINT8 * Ptr,
|
||||
IN UINT32 Length
|
||||
)
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpRaw (
|
||||
AmlDbgDumpRaw (
|
||||
IN CONST UINT8 * Ptr,
|
||||
IN UINT32 Length
|
||||
);
|
||||
|
@ -133,21 +133,45 @@ AmlDbgPrintNameSpace (
|
|||
IN AML_ROOT_NODE_HANDLE RootNode
|
||||
);
|
||||
|
||||
/* Macros to encapsulate Aml Debug Print APIs.
|
||||
*/
|
||||
|
||||
#define AMLDBG_DUMP_RAW(Ptr, Length) \
|
||||
AmlDbgDumpRaw (Ptr, Length)
|
||||
|
||||
#define AMLDBG_PRINT_CHARS(ErrorLevel, Buffer, Size) \
|
||||
AmlDbgPrintChars (ErrorLevel, Buffer, Size)
|
||||
|
||||
#define AMLDBG_PRINT_NAMESEG(Buffer) \
|
||||
AmlDbgPrintNameSeg (Buffer)
|
||||
|
||||
#define AMLDBG_PRINT_NAMESTR(Buffer,NewLine) \
|
||||
AmlDbgPrintNameString (Buffer,NewLine)
|
||||
|
||||
#define AMLDBG_PRINT_NODE(Node) \
|
||||
AmlDbgPrintNode (Node)
|
||||
|
||||
#define AMLDBG_PRINT_TREE(Node) \
|
||||
AmlDbgPrintTree (Node)
|
||||
|
||||
#define AMLDBG_PRINT_NAMESPACE(RootNode) \
|
||||
AmlDbgPrintNameSpace (RootNode)
|
||||
|
||||
#else
|
||||
|
||||
#define DumpRaw(Ptr, Length)
|
||||
#define AMLDBG_DUMP_RAW(Ptr, Length)
|
||||
|
||||
#define AmlDbgPrintChars(ErrorLevel, Buffer, Size)
|
||||
#define AMLDBG_PRINT_CHARS(ErrorLevel, Buffer, Size)
|
||||
|
||||
#define AmlDbgPrintNameSeg(Buffer)
|
||||
#define AMLDBG_PRINT_NAMESEG(Buffer)
|
||||
|
||||
#define AmlDbgPrintNameString(Buffer,NewLine)
|
||||
#define AMLDBG_PRINT_NAMESTR(Buffer,NewLine)
|
||||
|
||||
#define AmlDbgPrintNode(Node)
|
||||
#define AMLDBG_PRINT_NODE(Node)
|
||||
|
||||
#define AmlDbgPrintTree(Node)
|
||||
#define AMLDBG_PRINT_TREE(Node)
|
||||
|
||||
#define AmlDbgPrintNameSpace(RootNode)
|
||||
#define AMLDBG_PRINT_NAMESPACE(RootNode)
|
||||
|
||||
#endif // MDEPKG_NDEBUG
|
||||
|
||||
|
|
|
@ -1140,13 +1140,13 @@ AmlEnumeratePathCallback (
|
|||
"Comparing search path with current node path.\n"
|
||||
));
|
||||
DEBUG ((DEBUG_VERBOSE, "Search path:"));
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_VERBOSE,
|
||||
(CHAR8*)AmlStreamGetCurrPos (SearchPathBStream),
|
||||
AmlStreamGetIndex (SearchPathBStream)
|
||||
);
|
||||
DEBUG ((DEBUG_VERBOSE, "\nPath of the current node: "));
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_VERBOSE,
|
||||
(CHAR8*)AmlStreamGetCurrPos (CurrNodePathBStream),
|
||||
AmlStreamGetIndex (CurrNodePathBStream)
|
||||
|
|
|
@ -82,7 +82,7 @@ AmlParseFieldElement (
|
|||
}
|
||||
|
||||
// Skip the field opcode (1 byte) as it is already in the FieldByteEncoding.
|
||||
DumpRaw (CurrPos, 1);
|
||||
AMLDBG_DUMP_RAW (CurrPos, 1);
|
||||
Status = AmlStreamProgress (FStream, 1);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ASSERT (0);
|
||||
|
@ -106,7 +106,7 @@ AmlParseFieldElement (
|
|||
}
|
||||
|
||||
// Move stream forward as the PkgLen has been read.
|
||||
DumpRaw (CurrPos, PkgLenOffset);
|
||||
AMLDBG_DUMP_RAW (CurrPos, PkgLenOffset);
|
||||
Status = AmlStreamProgress (FStream, PkgLenOffset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ASSERT (0);
|
||||
|
|
|
@ -173,7 +173,7 @@ AmlDbgPrintNameSpaceRefList (
|
|||
while (CurrLink != NameSpaceRefList) {
|
||||
CurrNameSpaceNode = (AML_NAMESPACE_REF_NODE*)CurrLink;
|
||||
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_INFO,
|
||||
CurrNameSpaceNode->RawAbsolutePath,
|
||||
CurrNameSpaceNode->RawAbsolutePathSize
|
||||
|
@ -749,7 +749,7 @@ AmlFindMethodDefinition (
|
|||
}
|
||||
|
||||
DEBUG ((DEBUG_VERBOSE, "AmlMethodParser: Checking absolute name: "));
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_VERBOSE,
|
||||
(CONST CHAR8*)AmlStreamGetCurrPos (RawAbsolutePathFStream),
|
||||
AmlStreamGetMaxBufferSize (RawAbsolutePathFStream)
|
||||
|
@ -768,7 +768,7 @@ AmlFindMethodDefinition (
|
|||
ProbedNameSpaceRefNode = (AML_NAMESPACE_REF_NODE*)NextLink;
|
||||
|
||||
// Print the raw absolute path of the probed node.
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_VERBOSE,
|
||||
ProbedNameSpaceRefNode->RawAbsolutePath,
|
||||
ProbedNameSpaceRefNode->RawAbsolutePathSize
|
||||
|
@ -1067,7 +1067,7 @@ AmlIsMethodInvocation (
|
|||
DEBUG_VERBOSE,
|
||||
"AmlMethodParser: Corresponding method definition: "
|
||||
));
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_VERBOSE,
|
||||
NameSpaceRefNode->RawAbsolutePath,
|
||||
NameSpaceRefNode->RawAbsolutePathSize
|
||||
|
@ -1230,7 +1230,7 @@ AmlAddNameSpaceReference (
|
|||
DEBUG_VERBOSE,
|
||||
"AmlMethodParser: Adding namespace reference with name:\n"
|
||||
));
|
||||
AmlDbgPrintChars (
|
||||
AMLDBG_PRINT_CHARS (
|
||||
DEBUG_VERBOSE,
|
||||
(CONST CHAR8*)AmlStreamGetCurrPos (&RawAbsolutePathBStream),
|
||||
AmlStreamGetIndex (&RawAbsolutePathBStream)
|
||||
|
|
|
@ -182,7 +182,7 @@ AmlParseUIntX (
|
|||
return Status;
|
||||
}
|
||||
|
||||
DumpRaw (AmlStreamGetCurrPos (FStream), UIntXSize);
|
||||
AMLDBG_DUMP_RAW (AmlStreamGetCurrPos (FStream), UIntXSize);
|
||||
|
||||
// Move stream forward by the size of UIntX.
|
||||
Status = AmlStreamProgress (FStream, UIntXSize);
|
||||
|
@ -266,7 +266,7 @@ AmlParseNameString (
|
|||
return Status;
|
||||
}
|
||||
|
||||
DumpRaw (AmlStreamGetCurrPos (FStream), StrSize);
|
||||
AMLDBG_DUMP_RAW (AmlStreamGetCurrPos (FStream), StrSize);
|
||||
|
||||
// Move the stream forward by StrSize.
|
||||
Status = AmlStreamProgress (FStream, StrSize);
|
||||
|
@ -335,7 +335,7 @@ AmlParseString (
|
|||
StrSize++;
|
||||
} while (Byte != '\0');
|
||||
|
||||
DumpRaw (Buffer, StrSize);
|
||||
AMLDBG_DUMP_RAW (Buffer, StrSize);
|
||||
|
||||
Status = AmlCreateDataNode (
|
||||
AmlTypeToNodeDataType (ExpectedFormat),
|
||||
|
@ -441,7 +441,7 @@ AmlParseObject (
|
|||
}
|
||||
|
||||
// Print the opcode.
|
||||
DumpRaw (Buffer, OpCodeSize);
|
||||
AMLDBG_DUMP_RAW (Buffer, OpCodeSize);
|
||||
|
||||
if (!IS_END_OF_STREAM (FStream)) {
|
||||
// 3. Parse the PkgLength field, if present.
|
||||
|
@ -454,7 +454,7 @@ AmlParseObject (
|
|||
}
|
||||
|
||||
// Print the package length.
|
||||
DumpRaw (Buffer, PkgOffset);
|
||||
AMLDBG_DUMP_RAW (Buffer, PkgOffset);
|
||||
|
||||
// Adjust the size of the stream if it is valid package length.
|
||||
FreeSpace = AmlStreamGetFreeSpace (FStream);
|
||||
|
@ -559,7 +559,7 @@ AmlParseFieldPkgLen (
|
|||
return Status;
|
||||
}
|
||||
|
||||
DumpRaw (Buffer, PkgOffset);
|
||||
AMLDBG_DUMP_RAW (Buffer, PkgOffset);
|
||||
|
||||
Status = AmlStreamProgress (FStream, PkgOffset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
@ -844,7 +844,7 @@ AmlParseByteList (
|
|||
return Status;
|
||||
}
|
||||
|
||||
DumpRaw (Buffer, BufferSize);
|
||||
AMLDBG_DUMP_RAW (Buffer, BufferSize);
|
||||
|
||||
// Move the stream forward as we have consumed the Buffer.
|
||||
Status = AmlStreamProgress (FStream, BufferSize);
|
||||
|
|
|
@ -310,7 +310,7 @@ AmlParseResourceData (
|
|||
return Status;
|
||||
}
|
||||
|
||||
DumpRaw (CurrRdElement, CurrRdElementSize);
|
||||
AMLDBG_DUMP_RAW (CurrRdElement, CurrRdElementSize);
|
||||
|
||||
// Exit the loop when finding the resource data end tag.
|
||||
if (AmlRdCompareDescId (
|
||||
|
|
Loading…
Reference in New Issue