]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
ShellPkg: acpiview: Remove duplicate ACPI structure size definitions
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / AcpiParser.h
index 7657892d9fd2e2e14c6578611ff0cf1b6f6cd750..f81ccac7e118378aa185db4b625e5bcd75f78347 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for ACPI parser\r
 \r
-  Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
+  Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
@@ -184,6 +184,22 @@ Dump8Chars (
   IN UINT8*        Ptr\r
   );\r
 \r
+/**\r
+  This function traces 12 characters which can be optionally\r
+  formated using the format string if specified.\r
+\r
+  If no format string is specified the Format must be NULL.\r
+\r
+  @param [in] Format  Optional format string for tracing the data.\r
+  @param [in] Ptr     Pointer to the start of the buffer.\r
+**/\r
+VOID\r
+EFIAPI\r
+Dump12Chars (\r
+  IN CONST CHAR16* Format OPTIONAL,\r
+  IN       UINT8*  Ptr\r
+  );\r
+\r
 /**\r
   This function indents and prints the ACPI table Field Name.\r
 \r
@@ -380,37 +396,21 @@ ParseAcpi (
   { L"Creator Revision", 4, 32, L"0x%X", NULL,    \\r
     (VOID**)&(Info)->CreatorRevision, NULL, NULL }\r
 \r
-/**\r
-  Length of the ACPI GAS structure.\r
-\r
-  NOTE: This might normally be defined as\r
-        sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE).\r
-        However, we deliberately minimise any reference to the EDK2 ACPI\r
-        headers in an attempt to provide cross checking.\r
-**/\r
-#define GAS_LENGTH                     12\r
-\r
-/**\r
-  Length of the ACPI Header structure.\r
-\r
-  NOTE: This might normally be defined as\r
-        sizeof (EFI_ACPI_DESCRIPTION_HEADER).\r
-        However, we deliberately minimise any reference to the EDK2 ACPI\r
-        headers in an attempt to provide cross checking.\r
-**/\r
-#define ACPI_DESCRIPTION_HEADER_LENGTH  36\r
-\r
 /**\r
   This function indents and traces the GAS structure as described by the GasParser.\r
 \r
   @param [in] Ptr     Pointer to the start of the buffer.\r
   @param [in] Indent  Number of spaces to indent the output.\r
+  @param [in] Length  Length of the GAS structure buffer.\r
+\r
+  @retval Number of bytes parsed.\r
 **/\r
-VOID\r
+UINT32\r
 EFIAPI\r
 DumpGasStruct (\r
   IN UINT8*        Ptr,\r
-  IN UINT32        Indent\r
+  IN UINT32        Indent,\r
+  IN UINT32        Length\r
   );\r
 \r
 /**\r
@@ -524,6 +524,27 @@ ParseAcpiDsdt (
   IN UINT8   AcpiTableRevision\r
   );\r
 \r
+/**\r
+  This function parses the ACPI FACS table.\r
+  When trace is enabled this function parses the FACS table and\r
+  traces the ACPI table fields.\r
+\r
+  This function also performs validation of the ACPI table fields.\r
+\r
+  @param [in] Trace              If TRUE, trace the ACPI fields.\r
+  @param [in] Ptr                Pointer to the start of the buffer.\r
+  @param [in] AcpiTableLength    Length of the ACPI table.\r
+  @param [in] AcpiTableRevision  Revision of the ACPI table.\r
+**/\r
+VOID\r
+EFIAPI\r
+ParseAcpiFacs (\r
+  IN BOOLEAN Trace,\r
+  IN UINT8*  Ptr,\r
+  IN UINT32  AcpiTableLength,\r
+  IN UINT8   AcpiTableRevision\r
+  );\r
+\r
 /**\r
   This function parses the ACPI FADT table.\r
   This function parses the FADT table and optionally traces the ACPI\r