diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c index 586de7cbfb..4bf928139a 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c @@ -1,7 +1,7 @@ /** @file RSDP 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): @@ -15,52 +15,6 @@ // Local Variables STATIC CONST UINT64* XsdtAddress; -/** - This function validates the RSDT Address. - - @param [in] Ptr Pointer to the start of the field data. - @param [in] Context Pointer to context specific information e.g. this - could be a pointer to the ACPI table header. -**/ -STATIC -VOID -EFIAPI -ValidateRsdtAddress ( - IN UINT8* Ptr, - IN VOID* Context - ); - -/** - This function validates the XSDT Address. - - @param [in] Ptr Pointer to the start of the field data. - @param [in] Context Pointer to context specific information e.g. this - could be a pointer to the ACPI table header. -**/ -STATIC -VOID -EFIAPI -ValidateXsdtAddress ( - IN UINT8* Ptr, - IN VOID* Context - ); - -/** - An array describing the ACPI RSDP Table. -**/ -STATIC CONST ACPI_PARSER RsdpParser[] = { - {L"Signature", 8, 0, NULL, Dump8Chars, NULL, NULL, NULL}, - {L"Checksum", 1, 8, L"0x%x", NULL, NULL, NULL, NULL}, - {L"Oem ID", 6, 9, NULL, Dump6Chars, NULL, NULL, NULL}, - {L"Revision", 1, 15, L"%d", NULL, NULL, NULL, NULL}, - {L"RSDT Address", 4, 16, L"0x%x", NULL, NULL, ValidateRsdtAddress, NULL}, - {L"Length", 4, 20, L"%d", NULL, NULL, NULL, NULL}, - {L"XSDT Address", 8, 24, L"0x%lx", NULL, (VOID**)&XsdtAddress, - ValidateXsdtAddress, NULL}, - {L"Extended Checksum", 1, 32, L"0x%x", NULL, NULL, NULL, NULL}, - {L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL} -}; - /** This function validates the RSDT Address. @@ -131,6 +85,22 @@ ValidateXsdtAddress ( #endif } +/** + An array describing the ACPI RSDP Table. +**/ +STATIC CONST ACPI_PARSER RsdpParser[] = { + {L"Signature", 8, 0, NULL, Dump8Chars, NULL, NULL, NULL}, + {L"Checksum", 1, 8, L"0x%x", NULL, NULL, NULL, NULL}, + {L"Oem ID", 6, 9, NULL, Dump6Chars, NULL, NULL, NULL}, + {L"Revision", 1, 15, L"%d", NULL, NULL, NULL, NULL}, + {L"RSDT Address", 4, 16, L"0x%x", NULL, NULL, ValidateRsdtAddress, NULL}, + {L"Length", 4, 20, L"%d", NULL, NULL, NULL, NULL}, + {L"XSDT Address", 8, 24, L"0x%lx", NULL, (VOID**)&XsdtAddress, + ValidateXsdtAddress, NULL}, + {L"Extended Checksum", 1, 32, L"0x%x", NULL, NULL, NULL, NULL}, + {L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL} +}; + /** This function parses the ACPI RSDP table.