mirror of https://github.com/acidanthera/audk.git
ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call
Remove a call to ParseAcpi() responsible for getting the XSDT table length. This call is not needed because the ACPI table buffer length is provided as an input argument to the ParseAcpiXsdt() function. Modify remaining code to use the AcpiTableLength argument of the ParseAcpiXsdt() function instead of a global static variable. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
This commit is contained in:
parent
58cc0ffe68
commit
eefa8f8bf2
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
XSDT 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
|
||||
|
||||
@par Reference(s):
|
||||
|
@ -60,22 +60,12 @@ ParseAcpiXsdt (
|
|||
UINTN EntryIndex;
|
||||
CHAR16 Buffer[32];
|
||||
|
||||
// Parse the ACPI header to get the length
|
||||
ParseAcpi (
|
||||
FALSE,
|
||||
0,
|
||||
"XSDT",
|
||||
Ptr,
|
||||
ACPI_DESCRIPTION_HEADER_LENGTH,
|
||||
PARSER_PARAMS (XsdtParser)
|
||||
);
|
||||
|
||||
Offset = ParseAcpi (
|
||||
Trace,
|
||||
0,
|
||||
"XSDT",
|
||||
Ptr,
|
||||
*AcpiHdrInfo.Length,
|
||||
AcpiTableLength,
|
||||
PARSER_PARAMS (XsdtParser)
|
||||
);
|
||||
|
||||
|
@ -84,7 +74,7 @@ ParseAcpiXsdt (
|
|||
if (Trace) {
|
||||
EntryIndex = 0;
|
||||
TablePointer = (UINT64*)(Ptr + TableOffset);
|
||||
while (Offset < (*AcpiHdrInfo.Length)) {
|
||||
while (Offset < AcpiTableLength) {
|
||||
CONST UINT32* Signature;
|
||||
CONST UINT32* Length;
|
||||
CONST UINT8* Revision;
|
||||
|
@ -140,7 +130,7 @@ ParseAcpiXsdt (
|
|||
// Process the tables
|
||||
Offset = TableOffset;
|
||||
TablePointer = (UINT64*)(Ptr + TableOffset);
|
||||
while (Offset < (*AcpiHdrInfo.Length)) {
|
||||
while (Offset < AcpiTableLength) {
|
||||
if ((UINT64*)(UINTN)(*TablePointer) != NULL) {
|
||||
ProcessAcpiTable ((UINT8*)(UINTN)(*TablePointer));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue