]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.h
ShellPkg: acpiview: Prevent infinite loop if structure length is 0
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / AcpiTableParser.h
index a69d56da6cf728bb98df265de3ae030d85120494..4f92596b90a6ee422d8d0959881015ffd3de4da0 100644 (file)
@@ -1,20 +1,15 @@
-/**\r
+/** @file\r
   Header file for ACPI table parser\r
 \r
   Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
 #ifndef ACPITABLEPARSER_H_\r
 #define ACPITABLEPARSER_H_\r
 \r
-/** The maximum number of ACPI table parsers.\r
+/**\r
+  The maximum number of ACPI table parsers.\r
 */\r
 #define MAX_ACPI_TABLE_PARSERS          16\r
 \r
 */\r
 #define ACPI_PARSER_SIGNATURE_NULL      0\r
 \r
-/** A function that parses the ACPI table.\r
+/**\r
+  A function that parses the ACPI table.\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
+**/\r
 typedef\r
 VOID\r
 (EFIAPI * PARSE_ACPI_TABLE_PROC) (\r
@@ -38,8 +34,9 @@ VOID
   IN UINT8   AcpiTableRevision\r
   );\r
 \r
-/** The ACPI table parser information\r
-*/\r
+/**\r
+  The ACPI table parser information\r
+**/\r
 typedef struct AcpiTableParser {\r
   /// ACPI table signature\r
   UINT32                  Signature;\r
@@ -48,7 +45,8 @@ typedef struct AcpiTableParser {
   PARSE_ACPI_TABLE_PROC   Parser;\r
 } ACPI_TABLE_PARSER;\r
 \r
-/** Register the ACPI table Parser\r
+/**\r
+  Register the ACPI table Parser\r
 \r
   This function registers the ACPI table parser.\r
 \r
@@ -61,15 +59,16 @@ typedef struct AcpiTableParser {
                                 was already registered.\r
   @retval EFI_OUT_OF_RESOURCES  No space to register the\r
                                 parser.\r
-*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterParser (\r
   IN  UINT32                  Signature,\r
   IN  PARSE_ACPI_TABLE_PROC   ParserProc\r
-);\r
+  );\r
 \r
-/** Deregister the ACPI table Parser\r
+/**\r
+  Deregister the ACPI table Parser\r
 \r
   This function deregisters the ACPI table parser.\r
 \r
@@ -78,14 +77,15 @@ RegisterParser (
   @retval EFI_SUCCESS           The parser was deregistered.\r
   @retval EFI_INVALID_PARAMETER A parameter is invalid.\r
   @retval EFI_NOT_FOUND         A registered parser was not found.\r
-*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DeregisterParser (\r
   IN  UINT32                  Signature\r
-);\r
+  );\r
 \r
-/** This function processes the ACPI tables.\r
+/**\r
+  This function processes the ACPI tables.\r
   This function calls ProcessTableReportOptions() to list the ACPI\r
   tables, perform binary dump of the tables and determine if the\r
   ACPI fields should be traced.\r
@@ -97,14 +97,15 @@ DeregisterParser (
 \r
   @param [in] Ptr                Pointer to the start of the ACPI\r
                                  table data buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 ProcessAcpiTable (\r
   IN UINT8* Ptr\r
   );\r
 \r
-/** Get the ACPI table Parser\r
+/**\r
+  Get the ACPI table Parser\r
 \r
   This function returns the ACPI table parser proc from the list of\r
   registered parsers.\r
@@ -115,7 +116,7 @@ ProcessAcpiTable (
   @retval EFI_SUCCESS           The parser was returned successfully.\r
   @retval EFI_INVALID_PARAMETER A parameter is invalid.\r
   @retval EFI_NOT_FOUND         A registered parser was not found.\r
-*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetParser (\r