diff options
5 files changed, 65 insertions, 9 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index f9dbbd3544..8b3153516d 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -506,7 +506,8 @@ ParseAcpi ( break;
}
- if (Offset != Parser[Index].Offset) {
+ if (GetConsistencyChecking () &&
+ (Offset != Parser[Index].Offset)) {
IncrementErrorCount ();
Print (
L"\nERROR: %a: Offset Mismatch for %s\n"
@@ -549,7 +550,8 @@ ParseAcpi ( // Validating only makes sense if we are tracing
// the parsed table entries, to report by table name.
- if (Parser[Index].FieldValidator != NULL) {
+ if (GetConsistencyChecking () &&
+ (Parser[Index].FieldValidator != NULL)) {
Parser[Index].FieldValidator (Ptr, Parser[Index].Context);
}
}
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c index 504c81e3f1..d5500bcb2b 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c @@ -1,7 +1,7 @@ /** @file
ACPI table parser
- Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -193,7 +193,9 @@ ProcessAcpiTable ( if (Trace) {
DumpRaw (Ptr, *AcpiTableLength);
- VerifyChecksum (TRUE, Ptr, *AcpiTableLength);
+ if (GetConsistencyChecking ()) {
+ VerifyChecksum (TRUE, Ptr, *AcpiTableLength);
+ }
}
Status = GetParser (*AcpiTableSignature, &ParserProc);
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 9bbb00caca..e99537acf3 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -33,7 +33,7 @@ STATIC BOOLEAN mColourHighlighting; An array of acpiview command line parameters.
**/
STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
- {L"-c", TypeFlag},
+ {L"-q", TypeFlag},
{L"-d", TypeFlag},
{L"-h", TypeValue},
{L"-l", TypeFlag},
@@ -70,6 +70,33 @@ SetColourHighlighting ( }
/**
+ This function returns the consistency checking status.
+
+ @retval TRUE if consistency checking is enabled.
+**/
+BOOLEAN
+GetConsistencyChecking (
+ VOID
+ )
+{
+ return mConsistencyCheck;
+}
+
+/**
+ This function sets the consistency checking status.
+
+ @param ConsistencyChecking The consistency checking status.
+
+**/
+VOID
+SetConsistencyChecking (
+ BOOLEAN ConsistencyChecking
+ )
+{
+ mConsistencyCheck = ConsistencyChecking;
+}
+
+/**
This function returns the report options.
@retval Returns the report option.
@@ -380,7 +407,8 @@ AcpiView ( (ReportDumpBinFile == ReportOption)) &&
(!mSelectedAcpiTableFound)) {
Print (L"\nRequested ACPI Table not found.\n");
- } else if (ReportDumpBinFile != ReportOption) {
+ } else if (GetConsistencyChecking () &&
+ (ReportDumpBinFile != ReportOption)) {
OriginalAttribute = gST->ConOut->Mode->Attribute;
Print (L"\nTable Statistics:\n");
@@ -554,6 +582,9 @@ ShellCommandRunAcpiView ( }
}
+ // Surpress consistency checking if requested
+ SetConsistencyChecking (!ShellCommandLineGetFlag (Package, L"-q"));
+
if (ShellCommandLineGetFlag (Package, L"-l")) {
mReportType = ReportTableList;
} else {
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h index 1b26d8fb17..b5cb274ecb 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h @@ -1,7 +1,7 @@ /** @file
Header file for AcpiView
- Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -92,6 +92,27 @@ SetColourHighlighting ( );
/**
+ This function returns the consistency checking status.
+
+ @retval TRUE if consistency checking is enabled.
+**/
+BOOLEAN
+GetConsistencyChecking (
+ VOID
+ );
+
+/**
+ This function sets the consistency checking status.
+
+ @param ConsistencyChecking The consistency checking status.
+
+**/
+VOID
+SetConsistencyChecking (
+ BOOLEAN ConsistencyChecking
+ );
+
+/**
This function processes the table reporting options for the ACPI table.
@param [in] Signature The ACPI table Signature.
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni index 4c63143cbe..f061087050 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni @@ -30,7 +30,7 @@ "Display ACPI Table information.\r\n"
".SH SYNOPSIS\r\n"
" \r\n"
-"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-c] [-v] [-h Highlight]]\r\n"
+"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-v] [-h Highlight]]\r\n"
" \r\n"
".SH OPTIONS\r\n"
" \r\n"
@@ -39,7 +39,7 @@ " invocation option.\r\n"
" AcpiTable : The required ACPI Table type.\r\n"
" -d - Generate a binary file dump of the specified AcpiTable.\r\n"
-" -c - Consistency checking (enabled by default).\r\n"
+" -q - Quiet. Suppress errors and warnings. Disables consistency checks.\r\n"
" -v - Display verbose data (enabled by default).\r\n"
" -h - Enable/Disable Colour Highlighting.\r\n"
" Highlight : TRUE/ON enables highlighting;\r\n"
|