X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellAcpiViewCommandLib%2FAcpiParser.h;h=f81ccac7e118378aa185db4b625e5bcd75f78347;hb=0b9026a823e01078681a3a9153f17c78afb042dd;hp=20ca358bddfa5953bfb1d1bebaebbf3079eaba01;hpb=58cc0ffe68e249ffcc73ee3d8e2120be27793f28;p=mirror_edk2.git diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index 20ca358bdd..f81ccac7e1 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -1,7 +1,7 @@ /** @file Header file for ACPI parser - Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -184,6 +184,22 @@ Dump8Chars ( IN UINT8* Ptr ); +/** + This function traces 12 characters which can be optionally + formated using the format string if specified. + + If no format string is specified the Format must be NULL. + + @param [in] Format Optional format string for tracing the data. + @param [in] Ptr Pointer to the start of the buffer. +**/ +VOID +EFIAPI +Dump12Chars ( + IN CONST CHAR16* Format OPTIONAL, + IN UINT8* Ptr + ); + /** This function indents and prints the ACPI table Field Name. @@ -380,26 +396,6 @@ ParseAcpi ( { L"Creator Revision", 4, 32, L"0x%X", NULL, \ (VOID**)&(Info)->CreatorRevision, NULL, NULL } -/** - Length of the ACPI GAS structure. - - NOTE: This might normally be defined as - sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE). - However, we deliberately minimise any reference to the EDK2 ACPI - headers in an attempt to provide cross checking. -**/ -#define GAS_LENGTH 12 - -/** - Length of the ACPI Header structure. - - NOTE: This might normally be defined as - sizeof (EFI_ACPI_DESCRIPTION_HEADER). - However, we deliberately minimise any reference to the EDK2 ACPI - headers in an attempt to provide cross checking. -**/ -#define ACPI_DESCRIPTION_HEADER_LENGTH 36 - /** This function indents and traces the GAS structure as described by the GasParser. @@ -528,6 +524,27 @@ ParseAcpiDsdt ( IN UINT8 AcpiTableRevision ); +/** + This function parses the ACPI FACS table. + When trace is enabled this function parses the FACS table and + traces the ACPI table fields. + + This function also performs validation of the ACPI table fields. + + @param [in] Trace If TRUE, trace the ACPI fields. + @param [in] Ptr Pointer to the start of the buffer. + @param [in] AcpiTableLength Length of the ACPI table. + @param [in] AcpiTableRevision Revision of the ACPI table. +**/ +VOID +EFIAPI +ParseAcpiFacs ( + IN BOOLEAN Trace, + IN UINT8* Ptr, + IN UINT32 AcpiTableLength, + IN UINT8 AcpiTableRevision + ); + /** This function parses the ACPI FADT table. This function parses the FADT table and optionally traces the ACPI