diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c')
-rw-r--r-- | ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c index 4b618f131e..75b949429e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c @@ -19,14 +19,14 @@ #include "AcpiView.h"
#include "AcpiViewConfig.h"
-#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
-#include "Arm/SbbrValidator.h"
+#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
+ #include "Arm/SbbrValidator.h"
#endif
/**
A list of registered ACPI table parsers.
**/
-STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS];
+STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS];
/**
Register the ACPI table Parser
@@ -46,11 +46,11 @@ STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS]; EFI_STATUS
EFIAPI
RegisterParser (
- IN UINT32 Signature,
- IN PARSE_ACPI_TABLE_PROC ParserProc
+ IN UINT32 Signature,
+ IN PARSE_ACPI_TABLE_PROC ParserProc
)
{
- UINT32 Index;
+ UINT32 Index;
if ((ParserProc == NULL) || (Signature == ACPI_PARSER_SIGNATURE_NULL)) {
return EFI_INVALID_PARAMETER;
@@ -70,12 +70,12 @@ RegisterParser ( // Find the first free slot and register the parser
for (Index = 0;
- Index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
- Index++)
+ Index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
+ Index++)
{
if (mTableParserList[Index].Signature == ACPI_PARSER_SIGNATURE_NULL) {
mTableParserList[Index].Signature = Signature;
- mTableParserList[Index].Parser = ParserProc;
+ mTableParserList[Index].Parser = ParserProc;
return EFI_SUCCESS;
}
}
@@ -98,10 +98,10 @@ RegisterParser ( EFI_STATUS
EFIAPI
DeregisterParser (
- IN UINT32 Signature
+ IN UINT32 Signature
)
{
- UINT32 Index;
+ UINT32 Index;
if (Signature == ACPI_PARSER_SIGNATURE_NULL) {
return EFI_INVALID_PARAMETER;
@@ -113,7 +113,7 @@ DeregisterParser ( {
if (Signature == mTableParserList[Index].Signature) {
mTableParserList[Index].Signature = ACPI_PARSER_SIGNATURE_NULL;
- mTableParserList[Index].Parser = NULL;
+ mTableParserList[Index].Parser = NULL;
return EFI_SUCCESS;
}
}
@@ -138,11 +138,11 @@ DeregisterParser ( EFI_STATUS
EFIAPI
GetParser (
- IN UINT32 Signature,
- OUT PARSE_ACPI_TABLE_PROC * ParserProc
+ IN UINT32 Signature,
+ OUT PARSE_ACPI_TABLE_PROC *ParserProc
)
{
- UINT32 Index;
+ UINT32 Index;
if ((ParserProc == NULL) || (Signature == ACPI_PARSER_SIGNATURE_NULL)) {
return EFI_INVALID_PARAMETER;
@@ -179,16 +179,16 @@ GetParser ( VOID
EFIAPI
ProcessAcpiTable (
- IN UINT8* Ptr
+ IN UINT8 *Ptr
)
{
- EFI_STATUS Status;
- BOOLEAN Trace;
- CONST UINT32* AcpiTableSignature;
- CONST UINT32* AcpiTableLength;
- CONST UINT8* AcpiTableRevision;
- CONST UINT8* SignaturePtr;
- PARSE_ACPI_TABLE_PROC ParserProc;
+ EFI_STATUS Status;
+ BOOLEAN Trace;
+ CONST UINT32 *AcpiTableSignature;
+ CONST UINT32 *AcpiTableLength;
+ CONST UINT8 *AcpiTableRevision;
+ CONST UINT8 *SignaturePtr;
+ PARSE_ACPI_TABLE_PROC ParserProc;
ParseAcpiHeader (
Ptr,
@@ -209,7 +209,7 @@ ProcessAcpiTable ( // Do not process the ACPI table any further if the table length read
// is invalid. The ACPI table should at least contain the table header.
if (*AcpiTableLength < sizeof (EFI_ACPI_DESCRIPTION_HEADER)) {
- SignaturePtr = (CONST UINT8*)AcpiTableSignature;
+ SignaturePtr = (CONST UINT8 *)AcpiTableSignature;
IncrementErrorCount ();
Print (
L"ERROR: Invalid %c%c%c%c table length. Length = %d\n",
@@ -227,11 +227,12 @@ ProcessAcpiTable ( }
}
-#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
+ #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
if (GetMandatoryTableValidate ()) {
ArmSbbrIncrementTableCount (*AcpiTableSignature);
}
-#endif
+
+ #endif
Status = GetParser (*AcpiTableSignature, &ParserProc);
if (EFI_ERROR (Status)) {
@@ -239,6 +240,7 @@ ProcessAcpiTable ( if (Trace) {
DumpAcpiHeader (Ptr);
}
+
return;
}
|