]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: acpiview: Remove redundant IORT node types enum
authorKrzysztof Koch <krzysztof.koch@arm.com>
Fri, 28 Jun 2019 10:24:37 +0000 (18:24 +0800)
committerRay Ni <ray.ni@intel.com>
Tue, 2 Jul 2019 09:22:45 +0000 (17:22 +0800)
Replace the enum defining valid node types in the IORT table with
macros from IoRemappingTable.h.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c

index e3d9bc9a996001f77ed8b13a1c57505496807f4c..a91a4f9db13a52285bf56abe33f359a771fc04bd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IORT table parser\r
 \r
-  Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
+  Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Reference(s):\r
 // Local variables\r
 STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
 \r
-/**\r
-  The EIORT_NODE enum describes the IORT Node types.\r
-**/\r
-typedef enum IortNode {\r
-  Iort_Node_ITS_Group,        ///< ITS Group node\r
-  Iort_Node_Named_Component,  ///< Named Component node\r
-  Iort_Node_Root_Complex,     ///< Root Complex node\r
-  Iort_Node_SMMUV1_V2,        ///< SMMU v1/v2 node\r
-  Iort_Node_SMMUV3,           ///< SMMU v3 node\r
-  Iort_Node_PMCG,             ///< PMC group node\r
-  Iort_Node_Max\r
-} EIORT_NODE;\r
-\r
-// Local Variables\r
 STATIC CONST UINT32* IortNodeCount;\r
 STATIC CONST UINT32* IortNodeOffset;\r
 \r
-STATIC CONST UINT8* IortNodeType;\r
+STATIC CONST UINT8*  IortNodeType;\r
 STATIC CONST UINT16* IortNodeLength;\r
 STATIC CONST UINT32* IortIdMappingCount;\r
 STATIC CONST UINT32* IortIdMappingOffset;\r
@@ -659,13 +645,13 @@ ParseAcpiIort (
     Print (L"0x%x\n", Offset);\r
 \r
     switch (*IortNodeType) {\r
-      case Iort_Node_ITS_Group:\r
+      case EFI_ACPI_IORT_TYPE_ITS_GROUP:\r
         DumpIortNodeIts (\r
           NodePtr,\r
           *IortNodeLength\r
           );\r
         break;\r
-      case Iort_Node_Named_Component:\r
+      case EFI_ACPI_IORT_TYPE_NAMED_COMP:\r
         DumpIortNodeNamedComponent (\r
           NodePtr,\r
           *IortNodeLength,\r
@@ -673,7 +659,7 @@ ParseAcpiIort (
           *IortIdMappingOffset\r
           );\r
         break;\r
-      case Iort_Node_Root_Complex:\r
+      case EFI_ACPI_IORT_TYPE_ROOT_COMPLEX:\r
         DumpIortNodeRootComplex (\r
           NodePtr,\r
           *IortNodeLength,\r
@@ -681,7 +667,7 @@ ParseAcpiIort (
           *IortIdMappingOffset\r
           );\r
         break;\r
-      case Iort_Node_SMMUV1_V2:\r
+      case EFI_ACPI_IORT_TYPE_SMMUv1v2:\r
         DumpIortNodeSmmuV1V2 (\r
           NodePtr,\r
           *IortNodeLength,\r
@@ -689,7 +675,7 @@ ParseAcpiIort (
           *IortIdMappingOffset\r
           );\r
         break;\r
-      case Iort_Node_SMMUV3:\r
+      case EFI_ACPI_IORT_TYPE_SMMUv3:\r
         DumpIortNodeSmmuV3 (\r
           NodePtr,\r
           *IortNodeLength,\r
@@ -697,7 +683,7 @@ ParseAcpiIort (
           *IortIdMappingOffset\r
           );\r
         break;\r
-      case Iort_Node_PMCG:\r
+      case EFI_ACPI_IORT_TYPE_PMCG:\r
         DumpIortNodePmcg (\r
           NodePtr,\r
           *IortNodeLength,\r