ShellPkg: acpiview: Allow disabling consistency checks (-q flag)

The current documentation for the acpiview UEFI shell tool states
that the '-c' flag enables consistency checks on ACPI table data.
However, these checks are enabled anyway by default.

This patch keeps ACPI table validation as a default option, but it
makes it possible to turn ACPI table validation off by setting the
newly-introduced '-q' flag. Consequently, the '-c' flag is removed.

The remaining code changes in this patch make a number of consistency
checks optional (but enabled by default):
1. ACPI table field offset mismatch.
2. ACPI table field validation functions provided in the ACPI_PARSER
   arrays.
3. Table checksum computation.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Krzysztof Koch
2019-06-28 16:56:58 +08:00
committed by Ray Ni
parent 3d31443502
commit f73843d56d
5 changed files with 65 additions and 9 deletions

View File

@ -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);