mirror of https://github.com/acidanthera/audk.git
ShellPkg/AcpiView: Fix field validator invocation
Bugzilla: 3046 (https://bugzilla.tianocore.org/show_bug.cgi?id=3046) The field validator function provides means to validate fields in the ACPI table structures. To print complex field types a print formatter function is provided. The field validator was being invoked for simple data fields for which the default print format is used. However, the field validator function was not invoked if a print formatter function was provided. This problem is noticed when a Generic Address Structure (GAS) is printed using DumpGas() and a field validator is present to validate the GAS structure. To fix this move the invocation of the field validator after the field is printed such that the validation function is called even when a print formatter function is present. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
This commit is contained in:
parent
10dc8c561c
commit
856cf5abf7
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
ACPI parser
|
ACPI parser
|
||||||
|
|
||||||
Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
|
Copyright (c) 2016 - 2020, Arm Limited. All rights reserved.
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -596,13 +596,12 @@ ParseAcpi (
|
||||||
Parser[Index].Length
|
Parser[Index].Length
|
||||||
);
|
);
|
||||||
} // switch
|
} // switch
|
||||||
|
}
|
||||||
// Validating only makes sense if we are tracing
|
// Validating only makes sense if we are tracing
|
||||||
// the parsed table entries, to report by table name.
|
// the parsed table entries, to report by table name.
|
||||||
if (GetConsistencyChecking () &&
|
if (GetConsistencyChecking () &&
|
||||||
(Parser[Index].FieldValidator != NULL)) {
|
(Parser[Index].FieldValidator != NULL)) {
|
||||||
Parser[Index].FieldValidator (Ptr, Parser[Index].Context);
|
Parser[Index].FieldValidator (Ptr, Parser[Index].Context);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Print (L"\n");
|
Print (L"\n");
|
||||||
} // if (Trace)
|
} // if (Trace)
|
||||||
|
|
Loading…
Reference in New Issue