]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: remove EblCmdLib implementation
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 15 Nov 2017 15:29:20 +0000 (15:29 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Sun, 26 Nov 2017 10:58:32 +0000 (10:58 +0000)
EBL is being phased out so remove ArmPlatformPkg's copy of EblCmdLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/Library/EblCmdLib/AArch64/EblCmdMmu.c [deleted file]
ArmPlatformPkg/Library/EblCmdLib/Arm/EblCmdMmu.c [deleted file]
ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c [deleted file]
ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c [deleted file]
ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf [deleted file]

diff --git a/ArmPlatformPkg/Library/EblCmdLib/AArch64/EblCmdMmu.c b/ArmPlatformPkg/Library/EblCmdLib/AArch64/EblCmdMmu.c
deleted file mode 100644 (file)
index 1692675..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2011 - 2013, ARM Limited. All rights reserved.\r
-*\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
-*\r
-**/\r
-\r
-#include <PiDxe.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/ArmLib.h>\r
-#include <Chipset/AArch64.h>\r
-#include <Library/CacheMaintenanceLib.h>\r
-#include <Library/EblCmdLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-\r
-EFI_STATUS\r
-EblDumpMmu (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  AsciiPrint ("\nNot supported on this platform.\n");\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/ArmPlatformPkg/Library/EblCmdLib/Arm/EblCmdMmu.c b/ArmPlatformPkg/Library/EblCmdLib/Arm/EblCmdMmu.c
deleted file mode 100644 (file)
index fe9d3ea..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
-*\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
-*\r
-**/\r
-\r
-#include <PiDxe.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/ArmLib.h>\r
-#include <Chipset/ArmV7.h>\r
-#include <Library/CacheMaintenanceLib.h>\r
-#include <Library/EblCmdLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-\r
-#define GET_TT_ATTRIBUTES(TTEntry)  ((TTEntry) & ~(TT_DESCRIPTOR_SECTION_BASE_ADDRESS_MASK))\r
-#define GET_TT_PAGE_ATTRIBUTES(TTEntry)  ((TTEntry) & 0xFFF)\r
-#define GET_TT_LARGEPAGE_ATTRIBUTES(TTEntry)  ((TTEntry) & 0xFFFF)\r
-\r
-// Section\r
-#define TT_DESCRIPTOR_SECTION_STRONGLY_ORDER   (TT_DESCRIPTOR_SECTION_TYPE_SECTION    | \\r
-                                                TT_DESCRIPTOR_SECTION_NG_GLOBAL       | \\r
-                                                TT_DESCRIPTOR_SECTION_S_NOT_SHARED    | \\r
-                                                TT_DESCRIPTOR_SECTION_DOMAIN(0)       | \\r
-                                                TT_DESCRIPTOR_SECTION_AP_RW_RW        | \\r
-                                                TT_DESCRIPTOR_SECTION_CACHE_POLICY_STRONGLY_ORDERED)\r
-\r
-// Small Page\r
-#define TT_DESCRIPTOR_PAGE_STRONGLY_ORDER      (TT_DESCRIPTOR_PAGE_TYPE_PAGE          | \\r
-                                                TT_DESCRIPTOR_PAGE_NG_GLOBAL          | \\r
-                                                TT_DESCRIPTOR_PAGE_S_NOT_SHARED       | \\r
-                                                TT_DESCRIPTOR_PAGE_AP_RW_RW           | \\r
-                                                TT_DESCRIPTOR_PAGE_CACHE_POLICY_STRONGLY_ORDERED)\r
-\r
-// Large Page\r
-#define TT_DESCRIPTOR_LARGEPAGE_WRITE_BACK     (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE     | \\r
-                                                TT_DESCRIPTOR_PAGE_NG_GLOBAL          | \\r
-                                                TT_DESCRIPTOR_PAGE_S_NOT_SHARED       | \\r
-                                                TT_DESCRIPTOR_PAGE_AP_RW_RW           | \\r
-                                                TT_DESCRIPTOR_SECTION_CACHE_POLICY_WRITE_BACK_ALLOC)\r
-#define TT_DESCRIPTOR_LARGEPAGE_WRITE_THROUGH  (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE     | \\r
-                                                TT_DESCRIPTOR_PAGE_NG_GLOBAL          | \\r
-                                                TT_DESCRIPTOR_PAGE_S_NOT_SHARED       | \\r
-                                                TT_DESCRIPTOR_PAGE_AP_RW_RW           | \\r
-                                                TT_DESCRIPTOR_SECTION_CACHE_POLICY_WRITE_THROUGH_NO_ALLOC)\r
-#define TT_DESCRIPTOR_LARGEPAGE_DEVICE         (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE     | \\r
-                                                TT_DESCRIPTOR_PAGE_NG_GLOBAL          | \\r
-                                                TT_DESCRIPTOR_PAGE_S_NOT_SHARED       | \\r
-                                                TT_DESCRIPTOR_PAGE_AP_RW_RW           | \\r
-                                                TT_DESCRIPTOR_SECTION_CACHE_POLICY_SHAREABLE_DEVICE)\r
-#define TT_DESCRIPTOR_LARGEPAGE_UNCACHED       (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE     | \\r
-                                                TT_DESCRIPTOR_PAGE_NG_GLOBAL          | \\r
-                                                TT_DESCRIPTOR_PAGE_S_NOT_SHARED       | \\r
-                                                TT_DESCRIPTOR_PAGE_AP_RW_RW           | \\r
-                                                TT_DESCRIPTOR_SECTION_CACHE_POLICY_NON_CACHEABLE)\r
-\r
-\r
-typedef enum { Level0, Level1,Level2 } MMU_LEVEL;\r
-\r
-typedef struct {\r
-  MMU_LEVEL   Level;\r
-  UINT32      Value;\r
-  UINT32      Index;\r
-  UINT32*     Table;\r
-} MMU_ENTRY;\r
-\r
-MMU_ENTRY\r
-MmuEntryCreate (\r
-  IN MMU_LEVEL Level,\r
-  IN UINT32* Table,\r
-  IN UINT32 Index\r
-  )\r
-{\r
-  MMU_ENTRY Entry;\r
-  Entry.Level = Level;\r
-  Entry.Value = Table[Index];\r
-  Entry.Table = Table;\r
-  Entry.Index = Index;\r
-  return Entry;\r
-}\r
-\r
-UINT32\r
-MmuEntryIsValidAddress (\r
-  IN MMU_LEVEL Level,\r
-  IN UINT32 Entry\r
-  )\r
-{\r
-  if (Level == Level0) {\r
-    return 0;\r
-  } else if (Level == Level1) {\r
-    if ((Entry & 0x3) == 0) {           // Ignored\r
-      return 0;\r
-    } else if ((Entry & 0x3) == 2) {    // Section Type\r
-      return 1;\r
-    } else {                            // Page Type\r
-      return 0;\r
-    }\r
-  } else if (Level == Level2){\r
-    if ((Entry & 0x3) == 0) {           // Ignored\r
-      return 0;\r
-    } else {                            // Page Type\r
-      return 1;\r
-    }\r
-  } else {\r
-    DEBUG((EFI_D_ERROR,"MmuEntryIsValidAddress: Level:%d Entry:0x%X\n",(UINT32)Level,(UINT32)Entry));\r
-    ASSERT(0);\r
-    return 0;\r
-  }\r
-}\r
-\r
-UINT32\r
-MmuEntryGetAddress (\r
-  IN MMU_ENTRY Entry\r
-  )\r
-{\r
-  if (Entry.Level == Level1) {\r
-    if ((Entry.Value & 0x3) == 0) {\r
-      return 0;\r
-    } else if ((Entry.Value & 0x3) == 2) {    // Section Type\r
-      return Entry.Value & TT_DESCRIPTOR_SECTION_BASE_ADDRESS_MASK;\r
-    } else if ((Entry.Value & 0x3) == 1) {    // Level2 Table\r
-      MMU_ENTRY Level2Entry = MmuEntryCreate (Level2,(UINT32*)(Entry.Value & 0xFFFFC000),0);\r
-      return MmuEntryGetAddress (Level2Entry);\r
-    } else {                                  // Page Type\r
-      return 0;\r
-    }\r
-  } else if (Entry.Level == Level2) {\r
-    if ((Entry.Value & 0x3) == 0) {           // Ignored\r
-      return 0;\r
-    } else if ((Entry.Value & 0x3) == 1) {    // Large Page\r
-      return Entry.Value & 0xFFFF0000;\r
-    } else if ((Entry.Value & 0x2) == 2) {    // Small Page\r
-      return Entry.Value & 0xFFFFF000;\r
-    } else {\r
-      return 0;\r
-    }\r
-  } else {\r
-    ASSERT(0);\r
-    return 0;\r
-  }\r
-}\r
-\r
-UINT32\r
-MmuEntryGetSize (\r
-  IN MMU_ENTRY Entry\r
-  )\r
-{\r
-  if (Entry.Level == Level1) {\r
-    if ((Entry.Value & 0x3) == 0) {\r
-      return 0;\r
-    } else if ((Entry.Value & 0x3) == 2) {\r
-      if (Entry.Value & (1 << 18))\r
-        return 16*SIZE_1MB;\r
-      else\r
-        return SIZE_1MB;\r
-    } else if ((Entry.Value & 0x3) == 1) {      // Level2 Table split 1MB section\r
-      return SIZE_1MB;\r
-    } else {\r
-      DEBUG((EFI_D_ERROR, "MmuEntryGetSize: Value:0x%X",Entry.Value));\r
-      ASSERT(0);\r
-      return 0;\r
-    }\r
-  } else if (Entry.Level == Level2) {\r
-    if ((Entry.Value & 0x3) == 0) {           // Ignored\r
-      return 0;\r
-    } else if ((Entry.Value & 0x3) == 1) {    // Large Page\r
-      return SIZE_64KB;\r
-    } else if ((Entry.Value & 0x2) == 2) {    // Small Page\r
-      return SIZE_4KB;\r
-    } else {\r
-      ASSERT(0);\r
-      return 0;\r
-    }\r
-  } else {\r
-    ASSERT(0);\r
-    return 0;\r
-  }\r
-}\r
-\r
-CONST CHAR8*\r
-MmuEntryGetAttributesName (\r
-  IN MMU_ENTRY Entry\r
-  )\r
-{\r
-  UINT32 Value;\r
-\r
-  if (Entry.Level == Level1) {\r
-    Value = GET_TT_ATTRIBUTES(Entry.Value) | TT_DESCRIPTOR_SECTION_NS_MASK;\r
-    if (Value == TT_DESCRIPTOR_SECTION_WRITE_BACK(0))\r
-      return "TT_DESCRIPTOR_SECTION_WRITE_BACK";\r
-    else if (Value == TT_DESCRIPTOR_SECTION_WRITE_THROUGH(0))\r
-      return "TT_DESCRIPTOR_SECTION_WRITE_THROUGH";\r
-    else if (Value == TT_DESCRIPTOR_SECTION_DEVICE(0))\r
-      return "TT_DESCRIPTOR_SECTION_DEVICE";\r
-    else if (Value == TT_DESCRIPTOR_SECTION_UNCACHED(0))\r
-      return "TT_DESCRIPTOR_SECTION_UNCACHED";\r
-    else if (Value == TT_DESCRIPTOR_SECTION_STRONGLY_ORDER)\r
-      return "TT_DESCRIPTOR_SECTION_STRONGLY_ORDERED";\r
-    else {\r
-      return "SectionUnknown";\r
-    }\r
-  } else if ((Entry.Level == Level2) && ((Entry.Value & 0x2) == 2)) { //Small Page\r
-    Value = GET_TT_PAGE_ATTRIBUTES(Entry.Value);\r
-    if (Value == TT_DESCRIPTOR_PAGE_WRITE_BACK)\r
-      return "TT_DESCRIPTOR_PAGE_WRITE_BACK";\r
-    else if (Value == TT_DESCRIPTOR_PAGE_WRITE_THROUGH)\r
-      return "TT_DESCRIPTOR_PAGE_WRITE_THROUGH";\r
-    else if (Value == TT_DESCRIPTOR_PAGE_DEVICE)\r
-      return "TT_DESCRIPTOR_PAGE_DEVICE";\r
-    else if (Value == TT_DESCRIPTOR_PAGE_UNCACHED)\r
-      return "TT_DESCRIPTOR_PAGE_UNCACHED";\r
-    else if (Value == TT_DESCRIPTOR_PAGE_STRONGLY_ORDER)\r
-      return "TT_DESCRIPTOR_PAGE_STRONGLY_ORDERED";\r
-    else {\r
-      return "PageUnknown";\r
-    }\r
-  } else if ((Entry.Level == Level2) && ((Entry.Value & 0x3) == 1)) { //Large Page\r
-    Value = GET_TT_LARGEPAGE_ATTRIBUTES(Entry.Value);\r
-    if (Value == TT_DESCRIPTOR_LARGEPAGE_WRITE_BACK)\r
-      return "TT_DESCRIPTOR_LARGEPAGE_WRITE_BACK";\r
-    else if (Value == TT_DESCRIPTOR_LARGEPAGE_WRITE_THROUGH)\r
-      return "TT_DESCRIPTOR_LARGEPAGE_WRITE_THROUGH";\r
-    else if (Value == TT_DESCRIPTOR_LARGEPAGE_DEVICE)\r
-      return "TT_DESCRIPTOR_LARGEPAGE_DEVICE";\r
-    else if (Value == TT_DESCRIPTOR_LARGEPAGE_UNCACHED)\r
-      return "TT_DESCRIPTOR_LARGEPAGE_UNCACHED";\r
-    else {\r
-      return "LargePageUnknown";\r
-    }\r
-  } else {\r
-    ASSERT(0);\r
-    return "";\r
-  }\r
-}\r
-\r
-UINT32\r
-MmuEntryGetAttributes (\r
-  IN MMU_ENTRY Entry\r
-  )\r
-{\r
-  if (Entry.Level == Level1) {\r
-    if ((Entry.Value & 0x3) == 0) {\r
-      return 0;\r
-    } else if ((Entry.Value & 0x3) == 2) {\r
-      return GET_TT_ATTRIBUTES(Entry.Value);\r
-    } else {\r
-      return 0;\r
-    }\r
-  } else if ((Entry.Level == Level2) && ((Entry.Value & 0x2) == 2)) { //Small Page\r
-    if (GET_TT_PAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_PAGE_WRITE_BACK)\r
-      return TT_DESCRIPTOR_SECTION_WRITE_BACK(0);\r
-    else if (GET_TT_PAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_PAGE_WRITE_THROUGH)\r
-      return TT_DESCRIPTOR_SECTION_WRITE_THROUGH(0);\r
-    else if (GET_TT_PAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_PAGE_DEVICE)\r
-      return TT_DESCRIPTOR_SECTION_DEVICE(0);\r
-    else if (GET_TT_PAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_PAGE_UNCACHED)\r
-      return TT_DESCRIPTOR_SECTION_UNCACHED(0);\r
-    else if (GET_TT_PAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_PAGE_STRONGLY_ORDER)\r
-      return TT_DESCRIPTOR_SECTION_STRONGLY_ORDER;\r
-    else {\r
-      return 0;\r
-    }\r
-  } else if ((Entry.Level == Level2) && ((Entry.Value & 0x3) == 1)) { //Large Page\r
-    if (GET_TT_LARGEPAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_LARGEPAGE_WRITE_BACK)\r
-      return TT_DESCRIPTOR_SECTION_WRITE_BACK(0);\r
-    else if (GET_TT_LARGEPAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_LARGEPAGE_WRITE_THROUGH)\r
-      return TT_DESCRIPTOR_SECTION_WRITE_THROUGH(0);\r
-    else if (GET_TT_LARGEPAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_LARGEPAGE_DEVICE)\r
-      return TT_DESCRIPTOR_SECTION_DEVICE(0);\r
-    else if (GET_TT_LARGEPAGE_ATTRIBUTES(Entry.Value) == TT_DESCRIPTOR_LARGEPAGE_UNCACHED)\r
-      return TT_DESCRIPTOR_SECTION_UNCACHED(0);\r
-    else {\r
-      return 0;\r
-    }\r
-  } else {\r
-    return 0;\r
-  }\r
-}\r
-\r
-\r
-MMU_ENTRY\r
-DumpMmuLevel (\r
-  IN MMU_LEVEL Level,\r
-  IN UINT32* Table,\r
-  IN MMU_ENTRY PreviousEntry\r
-  )\r
-{\r
-  UINT32      Index = 0, Count;\r
-  MMU_ENTRY   LastEntry, Entry;\r
-\r
-  ASSERT((Level == Level1) || (Level == Level2));\r
-\r
-  if (Level == Level1)    Count = 4096;\r
-  else                    Count = 256;\r
-\r
-  // At Level1, we will get into this function because PreviousEntry is not valid\r
-  if (!MmuEntryIsValidAddress((MMU_LEVEL)(Level-1),PreviousEntry.Value)) {\r
-      // Find the first valid address\r
-      for (; (Index < Count) && (!MmuEntryIsValidAddress(Level,Table[Index])); Index++);\r
-\r
-      LastEntry = MmuEntryCreate(Level,Table,Index);\r
-      Index++;\r
-  } else {\r
-    LastEntry = PreviousEntry;\r
-  }\r
-\r
-  for (; Index < Count; Index++) {\r
-    Entry = MmuEntryCreate(Level,Table,Index);\r
-    if ((Level == Level1) && ((Entry.Value & 0x3) == 1)) {       // We have got a Level2 table redirection\r
-      LastEntry = DumpMmuLevel(Level2,(UINT32*)(Entry.Value & 0xFFFFFC00),LastEntry);\r
-    } else if (!MmuEntryIsValidAddress(Level,Table[Index])) {\r
-      if (MmuEntryIsValidAddress(LastEntry.Level,LastEntry.Value)) {\r
-          AsciiPrint("0x%08X-0x%08X\t%a\n",\r
-              MmuEntryGetAddress(LastEntry),MmuEntryGetAddress(PreviousEntry)+MmuEntryGetSize(PreviousEntry)-1,\r
-              MmuEntryGetAttributesName(LastEntry));\r
-      }\r
-      LastEntry = Entry;\r
-    } else {\r
-      if (MmuEntryGetAttributes(LastEntry) != MmuEntryGetAttributes(Entry)) {\r
-          if (MmuEntryIsValidAddress(Level,LastEntry.Value)) {\r
-            AsciiPrint("0x%08X-0x%08X\t%a\n",\r
-                      MmuEntryGetAddress(LastEntry),MmuEntryGetAddress(PreviousEntry)+MmuEntryGetSize(PreviousEntry)-1,\r
-                      MmuEntryGetAttributesName(LastEntry));\r
-          }\r
-          LastEntry = Entry;\r
-      } else {\r
-        ASSERT(LastEntry.Value != 0);\r
-      }\r
-    }\r
-    PreviousEntry = Entry;\r
-  }\r
-\r
-  if ((Level == Level1) && (LastEntry.Index != Index) && MmuEntryIsValidAddress(Level,LastEntry.Value)) {\r
-    AsciiPrint("0x%08X-0x%08X\t%a\n",\r
-                  MmuEntryGetAddress(LastEntry),MmuEntryGetAddress(PreviousEntry)+MmuEntryGetSize(PreviousEntry)-1,\r
-                  MmuEntryGetAttributesName(LastEntry));\r
-  }\r
-\r
-  return LastEntry;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EblDumpMmu (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  UINT32  *TTEntry;\r
-  MMU_ENTRY NoEntry;\r
-\r
-  TTEntry = ArmGetTTBR0BaseAddress();\r
-\r
-  AsciiPrint ("\nTranslation Table:0x%X\n",TTEntry);\r
-  AsciiPrint ("Address Range\t\tAttributes\n");\r
-  AsciiPrint ("____________________________________________________\n");\r
-\r
-  NoEntry.Level = (MMU_LEVEL)200;\r
-  DumpMmuLevel(Level1,TTEntry,NoEntry);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c b/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c
deleted file mode 100644 (file)
index b0f6a72..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
-*\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
-*\r
-**/\r
-\r
-#include <Base.h>\r
-#include <Uefi.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BdsLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/UefiApplicationEntryPoint.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-\r
-#include <Protocol/DevicePathFromText.h>\r
-\r
-#include <Guid/Fdt.h>\r
-\r
-#include <libfdt.h>\r
-\r
-#define ALIGN(x, a)     (((x) + ((a) - 1)) & ~((a) - 1))\r
-#define PALIGN(p, a)    ((void *)(ALIGN((unsigned long)(p), (a))))\r
-#define GET_CELL(p)     (p += 4, *((const uint32_t *)(p-4)))\r
-\r
-STATIC\r
-UINTN\r
-IsPrintableString (\r
-  IN CONST VOID* data,\r
-  IN UINTN len\r
-  )\r
-{\r
-  CONST CHAR8 *s = data;\r
-  CONST CHAR8 *ss;\r
-\r
-  // Zero length is not\r
-  if (len == 0) {\r
-    return 0;\r
-  }\r
-\r
-  // Must terminate with zero\r
-  if (s[len - 1] != '\0') {\r
-    return 0;\r
-  }\r
-\r
-  ss = s;\r
-  while (*s/* && isprint(*s)*/) {\r
-    s++;\r
-  }\r
-\r
-  // Not zero, or not done yet\r
-  if (*s != '\0' || (s + 1 - ss) < len) {\r
-    return 0;\r
-  }\r
-\r
-  return 1;\r
-}\r
-\r
-STATIC\r
-VOID\r
-PrintData (\r
-  IN CONST CHAR8* data,\r
-  IN UINTN len\r
-  )\r
-{\r
-  UINTN i;\r
-  CONST CHAR8 *p = data;\r
-\r
-  // No data, don't print\r
-  if (len == 0)\r
-    return;\r
-\r
-  if (IsPrintableString (data, len)) {\r
-    Print(L" = \"%a\"", (const char *)data);\r
-  } else if ((len % 4) == 0) {\r
-    Print(L" = <");\r
-    for (i = 0; i < len; i += 4) {\r
-      Print(L"0x%08x%a", fdt32_to_cpu(GET_CELL(p)),i < (len - 4) ? " " : "");\r
-    }\r
-    Print(L">");\r
-  } else {\r
-    Print(L" = [");\r
-    for (i = 0; i < len; i++)\r
-      Print(L"%02x%a", *p++, i < len - 1 ? " " : "");\r
-    Print(L"]");\r
-  }\r
-}\r
-\r
-VOID\r
-DumpFdt (\r
-  IN VOID*                FdtBlob\r
-  )\r
-{\r
-  struct fdt_header *bph;\r
-  UINT32 off_dt;\r
-  UINT32 off_str;\r
-  CONST CHAR8* p_struct;\r
-  CONST CHAR8* p_strings;\r
-  CONST CHAR8* p;\r
-  CONST CHAR8* s;\r
-  CONST CHAR8* t;\r
-  UINT32 tag;\r
-  UINTN sz;\r
-  UINTN depth;\r
-  UINTN shift;\r
-  UINT32 version;\r
-\r
-  depth = 0;\r
-  shift = 4;\r
-\r
-  bph = FdtBlob;\r
-  off_dt = fdt32_to_cpu(bph->off_dt_struct);\r
-  off_str = fdt32_to_cpu(bph->off_dt_strings);\r
-  p_struct = (CONST CHAR8*)FdtBlob + off_dt;\r
-  p_strings = (CONST CHAR8*)FdtBlob + off_str;\r
-  version = fdt32_to_cpu(bph->version);\r
-\r
-  p = p_struct;\r
-  while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) {\r
-\r
-    if (tag == FDT_BEGIN_NODE) {\r
-      s = p;\r
-      p = PALIGN(p + strlen(s) + 1, 4);\r
-\r
-      if (*s == '\0')\r
-              s = "/";\r
-\r
-      Print(L"%*s%a {\n", depth * shift, L" ", s);\r
-\r
-      depth++;\r
-      continue;\r
-    }\r
-\r
-    if (tag == FDT_END_NODE) {\r
-      depth--;\r
-\r
-      Print(L"%*s};\n", depth * shift, L" ");\r
-      continue;\r
-    }\r
-\r
-    if (tag == FDT_NOP) {\r
-      Print(L"%*s// [NOP]\n", depth * shift, L" ");\r
-      continue;\r
-    }\r
-\r
-    if (tag != FDT_PROP) {\r
-      Print(L"%*s ** Unknown tag 0x%08x\n", depth * shift, L" ", tag);\r
-      break;\r
-    }\r
-    sz = fdt32_to_cpu(GET_CELL(p));\r
-    s = p_strings + fdt32_to_cpu(GET_CELL(p));\r
-    if (version < 16 && sz >= 8)\r
-            p = PALIGN(p, 8);\r
-    t = p;\r
-\r
-    p = PALIGN(p + sz, 4);\r
-\r
-    Print(L"%*s%a", depth * shift, L" ", s);\r
-    PrintData(t, sz);\r
-    Print(L";\n");\r
-  }\r
-}\r
-\r
-EFI_STATUS\r
-EblDumpFdt (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-  VOID        *FdtBlob;\r
-  UINTN       Ret;\r
-\r
-  // If no FDT file is passed to the argument then get the one from the platform\r
-  if (Argc < 2) {\r
-    Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &FdtBlob);\r
-    if (EFI_ERROR (Status)) {\r
-      Print (L"ERROR: Did not find the Fdt Blob.\n");\r
-      return Status;\r
-    }\r
-  } else {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  Ret = fdt_check_header (FdtBlob);\r
-  if (Ret != 0) {\r
-    Print (L"ERROR: Device Tree header not valid (err:%d)\n", Ret);\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  DumpFdt (FdtBlob);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c
deleted file mode 100644 (file)
index 5bcd750..0000000
+++ /dev/null
@@ -1,520 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
-*\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
-*\r
-**/\r
-\r
-#include <PiDxe.h>\r
-#include <Library/ArmLib.h>\r
-#include <Library/CacheMaintenanceLib.h>\r
-#include <Library/EblCmdLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/DxeServicesTableLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/EfiFileLib.h>\r
-#include <Library/ArmDisassemblerLib.h>\r
-#include <Library/PeCoffGetEntryPointLib.h>\r
-#include <Library/PerformanceLib.h>\r
-#include <Library/TimerLib.h>\r
-#include <Library/BdsLib.h>\r
-\r
-#include <Guid/DebugImageInfoTable.h>\r
-\r
-#include <Protocol/DebugSupport.h>\r
-#include <Protocol/LoadedImage.h>\r
-#include <Protocol/DevicePathToText.h>\r
-\r
-EFI_STATUS\r
-EblDumpMmu (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  );\r
-\r
-EFI_STATUS\r
-EblDumpFdt (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  );\r
-\r
-/**\r
-  Connect all DXE drivers\r
-\r
-  @retval EFI_SUCCESS           All drivers have been connected\r
-  @retval EFI_NOT_FOUND         No handles match the search.\r
-  @retval EFI_OUT_OF_RESOURCES  There is not resource pool memory to store the matching results.\r
-\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-ConnectAllDrivers (\r
-  VOID\r
-  )\r
-{\r
-  UINTN                     HandleCount, Index;\r
-  EFI_HANDLE                *HandleBuffer;\r
-  EFI_STATUS                Status;\r
-\r
-  do {\r
-    // Locate all the driver handles\r
-    Status = gBS->LocateHandleBuffer (\r
-                AllHandles,\r
-                NULL,\r
-                NULL,\r
-                &HandleCount,\r
-                &HandleBuffer\r
-                );\r
-    if (EFI_ERROR (Status)) {\r
-      break;\r
-    }\r
-\r
-    // Connect every handles\r
-    for (Index = 0; Index < HandleCount; Index++) {\r
-      gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);\r
-    }\r
-\r
-    if (HandleBuffer != NULL) {\r
-      FreePool (HandleBuffer);\r
-    }\r
-\r
-    // Check if new handles have been created after the start of the previous handles\r
-    Status = gDS->Dispatch ();\r
-  } while (!EFI_ERROR(Status));\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Simple arm disassembler via a library\r
-\r
-  Argv[0] - symboltable\r
-  Argv[1] - Optional qoted format string\r
-  Argv[2] - Optional flag\r
-\r
-  @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line.\r
-                 Argv[0] is the command name\r
-\r
-  @return EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EblSymbolTable (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  EFI_STATUS                        Status;\r
-  EFI_DEBUG_IMAGE_INFO_TABLE_HEADER *DebugImageTableHeader = NULL;\r
-  EFI_DEBUG_IMAGE_INFO              *DebugTable;\r
-  UINTN                             Entry;\r
-  CHAR8                             *Format;\r
-  CHAR8                             *Pdb;\r
-  UINT32                            PeCoffSizeOfHeaders;\r
-  UINT32                            ImageBase;\r
-  BOOLEAN                           Elf;\r
-\r
-  // Need to add lots of error checking on the passed in string\r
-  // Default string is for RealView debugger\r
-#if (__ARMCC_VERSION < 500000)\r
-  Format = (Argc > 1) ? Argv[1] : "load /a /ni /np %a &0x%x";\r
-#else\r
-  Format = (Argc > 1) ? Argv[1] : "add-symbol-file %a 0x%x";\r
-#endif\r
-  Elf = (Argc > 2) ? FALSE : TRUE;\r
-\r
-  Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&DebugImageTableHeader);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  DebugTable = DebugImageTableHeader->EfiDebugImageInfoTable;\r
-  if (DebugTable == NULL) {\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  for (Entry = 0; Entry < DebugImageTableHeader->TableSize; Entry++, DebugTable++) {\r
-    if (DebugTable->NormalImage != NULL) {\r
-      if ((DebugTable->NormalImage->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) && (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {\r
-        ImageBase = (UINTN)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;\r
-        PeCoffSizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID *)(UINTN)ImageBase);\r
-        Pdb = PeCoffLoaderGetPdbPointer (DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase);\r
-        if (Pdb != NULL) {\r
-          if (Elf) {\r
-            // ELF and Mach-O images don't include the header so the linked address does not include header\r
-            ImageBase += PeCoffSizeOfHeaders;\r
-          }\r
-          AsciiPrint (Format, Pdb, ImageBase);\r
-          AsciiPrint ("\n");\r
-        } else {\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-/**\r
-  Simple arm disassembler via a library\r
-\r
-  Argv[0] - disasm\r
-  Argv[1] - Address to start disassembling from\r
-  ARgv[2] - Number of instructions to disassembly (optional)\r
-\r
-  @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line.\r
-                 Argv[0] is the command name\r
-\r
-  @return EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EblDisassembler (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  UINT8   *Ptr, *CurrentAddress;\r
-  UINT32  Address;\r
-  UINT32  Count;\r
-  CHAR8   Buffer[80];\r
-  UINT32  ItBlock;\r
-\r
-  if (Argc < 2) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Address = AsciiStrHexToUintn (Argv[1]);\r
-  Count   = (Argc > 2) ? (UINT32)AsciiStrHexToUintn (Argv[2]) : 20;\r
-\r
-  Ptr = (UINT8 *)(UINTN)Address;\r
-  ItBlock = 0;\r
-  do {\r
-    CurrentAddress = Ptr;\r
-    DisassembleInstruction (&Ptr, TRUE, TRUE, &ItBlock, Buffer, sizeof (Buffer));\r
-    AsciiPrint ("0x%08x: %a\n", CurrentAddress, Buffer);\r
-  } while (Count-- > 0);\r
-\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-CHAR8 *\r
-ImageHandleToPdbFileName (\r
-  IN  EFI_HANDLE    Handle\r
-  )\r
-{\r
-  EFI_STATUS                  Status;\r
-  EFI_LOADED_IMAGE_PROTOCOL   *LoadedImage;\r
-  CHAR8                       *Pdb;\r
-  CHAR8                       *StripLeading;\r
-\r
-  Status = gBS->HandleProtocol (Handle, &gEfiLoadedImageProtocolGuid, (VOID **)&LoadedImage);\r
-  if (EFI_ERROR (Status)) {\r
-    return "";\r
-  }\r
-\r
-  Pdb = PeCoffLoaderGetPdbPointer (LoadedImage->ImageBase);\r
-  StripLeading = AsciiStrStr (Pdb, "\\ARM\\");\r
-  if (StripLeading == NULL) {\r
-    StripLeading = AsciiStrStr (Pdb, "/ARM/");\r
-    if (StripLeading == NULL) {\r
-      return Pdb;\r
-    }\r
-  }\r
-  // Hopefully we hacked off the unneeded part\r
-  return (StripLeading + 5);\r
-}\r
-\r
-\r
-STATIC CHAR8 *mTokenList[] = {\r
-  /*"SEC",*/\r
-  "PEI",\r
-  "DXE",\r
-  /*"BDS",*/\r
-  NULL\r
-};\r
-\r
-/**\r
-  Simple arm disassembler via a library\r
-\r
-  Argv[0] - disasm\r
-  Argv[1] - Address to start disassembling from\r
-  ARgv[2] - Number of instructions to disassembly (optional)\r
-\r
-  @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line.\r
-                 Argv[0] is the command name\r
-\r
-  @return EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EblPerformance (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  UINTN       Key;\r
-  CONST VOID  *Handle;\r
-  CONST CHAR8 *Token, *Module;\r
-  UINT64      Start, Stop, TimeStamp;\r
-  UINT64      Delta, TicksPerSecond, Milliseconds, Microseconds;\r
-  UINTN       Index;\r
-  BOOLEAN     CountUp;\r
-\r
-  TicksPerSecond = GetPerformanceCounterProperties (&Start, &Stop);\r
-  if (Start < Stop) {\r
-    CountUp = TRUE;\r
-  } else {\r
-    CountUp = FALSE;\r
-  }\r
-\r
-  Key       = 0;\r
-  do {\r
-    Key = GetPerformanceMeasurement (Key, (CONST VOID **)&Handle, &Token, &Module, &Start, &Stop);\r
-    if (Key != 0) {\r
-      if (AsciiStriCmp ("StartImage:", Token) == 0) {\r
-        if (Stop == 0) {\r
-          // The entry for EBL is still running so the stop time will be zero. Skip it\r
-          AsciiPrint ("   running     %a\n", ImageHandleToPdbFileName ((EFI_HANDLE)Handle));\r
-        } else {\r
-          Delta =  CountUp?(Stop - Start):(Start - Stop);\r
-          Microseconds = DivU64x64Remainder (MultU64x32 (Delta, 1000000), TicksPerSecond, NULL);\r
-          AsciiPrint ("%10ld us  %a\n", Microseconds, ImageHandleToPdbFileName ((EFI_HANDLE)Handle));\r
-        }\r
-      }\r
-    }\r
-  } while (Key != 0);\r
-\r
-  AsciiPrint ("\n");\r
-\r
-  TimeStamp = 0;\r
-  Key       = 0;\r
-  do {\r
-    Key = GetPerformanceMeasurement (Key, (CONST VOID **)&Handle, &Token, &Module, &Start, &Stop);\r
-    if (Key != 0) {\r
-      for (Index = 0; mTokenList[Index] != NULL; Index++) {\r
-        if (AsciiStriCmp (mTokenList[Index], Token) == 0) {\r
-          Delta =  CountUp?(Stop - Start):(Start - Stop);\r
-          TimeStamp += Delta;\r
-          Milliseconds = DivU64x64Remainder (MultU64x32 (Delta, 1000), TicksPerSecond, NULL);\r
-          AsciiPrint ("%6a %6ld ms\n", Token, Milliseconds);\r
-          break;\r
-        }\r
-      }\r
-    }\r
-  } while (Key != 0);\r
-\r
-  AsciiPrint ("Total Time = %ld ms\n\n", DivU64x64Remainder (MultU64x32 (TimeStamp, 1000), TicksPerSecond, NULL));\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-#define EFI_MEMORY_PORT_IO  0x4000000000000000ULL\r
-\r
-EFI_STATUS\r
-EblDumpGcd (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  EFI_STATUS                        Status;\r
-  UINTN                           NumberOfDescriptors;\r
-  UINTN i;\r
-  EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap;\r
-  EFI_GCD_IO_SPACE_DESCRIPTOR *IoSpaceMap;\r
-\r
-  Status = gDS->GetMemorySpaceMap(&NumberOfDescriptors,&MemorySpaceMap);\r
-  if (EFI_ERROR (Status)) {\r
-      return Status;\r
-  }\r
-  AsciiPrint ("    Address Range       Image     Device   Attributes\n");\r
-  AsciiPrint ("__________________________________________________________\n");\r
-  for (i=0; i < NumberOfDescriptors; i++) {\r
-    AsciiPrint ("MEM %016lx - %016lx",(UINT64)MemorySpaceMap[i].BaseAddress,MemorySpaceMap[i].BaseAddress+MemorySpaceMap[i].Length-1);\r
-    AsciiPrint (" %08x %08x",MemorySpaceMap[i].ImageHandle,MemorySpaceMap[i].DeviceHandle);\r
-\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_RUNTIME)\r
-        AsciiPrint (" RUNTIME");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_PORT_IO)\r
-        AsciiPrint (" PORT_IO");\r
-\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_UC)\r
-        AsciiPrint (" MEM_UC");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_WC)\r
-        AsciiPrint (" MEM_WC");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_WT)\r
-        AsciiPrint (" MEM_WT");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_WB)\r
-        AsciiPrint (" MEM_WB");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_UCE)\r
-        AsciiPrint (" MEM_UCE");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_WP)\r
-        AsciiPrint (" MEM_WP");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_RP)\r
-        AsciiPrint (" MEM_RP");\r
-    if (MemorySpaceMap[i].Attributes & EFI_MEMORY_XP)\r
-        AsciiPrint (" MEM_XP");\r
-\r
-    switch (MemorySpaceMap[i].GcdMemoryType) {\r
-      case EfiGcdMemoryTypeNonExistent:\r
-        AsciiPrint (" TYPE_NONEXISTENT");\r
-        break;\r
-      case EfiGcdMemoryTypeReserved:\r
-        AsciiPrint (" TYPE_RESERVED");\r
-        break;\r
-      case EfiGcdMemoryTypeSystemMemory:\r
-        AsciiPrint (" TYPE_SYSMEM");\r
-        break;\r
-      case EfiGcdMemoryTypeMemoryMappedIo:\r
-        AsciiPrint (" TYPE_MEMMAP");\r
-        break;\r
-      default:\r
-        AsciiPrint (" TYPE_UNKNOWN");\r
-        break;\r
-    }\r
-\r
-    AsciiPrint ("\n");\r
-  }\r
-\r
-  FreePool (MemorySpaceMap);\r
-\r
-  Status = gDS->GetIoSpaceMap(&NumberOfDescriptors,&IoSpaceMap);\r
-  if (EFI_ERROR (Status)) {\r
-      return Status;\r
-  }\r
-  for (i=0; i < NumberOfDescriptors; i++) {\r
-    AsciiPrint ("IO  %08lx - %08lx",IoSpaceMap[i].BaseAddress,IoSpaceMap[i].BaseAddress+IoSpaceMap[i].Length);\r
-    AsciiPrint ("\t%08x %08x",IoSpaceMap[i].ImageHandle,IoSpaceMap[i].DeviceHandle);\r
-\r
-    switch (IoSpaceMap[i].GcdIoType) {\r
-      case EfiGcdIoTypeNonExistent:\r
-        AsciiPrint (" TYPE_NONEXISTENT");\r
-        break;\r
-      case EfiGcdIoTypeReserved:\r
-        AsciiPrint (" TYPE_RESERVED");\r
-        break;\r
-      case EfiGcdIoTypeIo:\r
-        AsciiPrint (" TYPE_IO");\r
-        break;\r
-      default:\r
-        AsciiPrint (" TYPE_UNKNOWN");\r
-        break;\r
-    }\r
-\r
-    AsciiPrint ("\n");\r
-  }\r
-\r
-  FreePool (IoSpaceMap);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EblDevicePaths (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  EFI_STATUS Status;\r
-  UINTN                              HandleCount;\r
-  EFI_HANDLE                         *HandleBuffer;\r
-  UINTN                              Index;\r
-  CHAR16*                            String;\r
-  EFI_DEVICE_PATH_PROTOCOL*          DevicePathProtocol;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL*  DevicePathToTextProtocol;\r
-\r
-  ConnectAllDrivers();\r
-\r
-  Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);\r
-  if (EFI_ERROR (Status)) {\r
-    AsciiPrint ("Did not find the DevicePathToTextProtocol.\n");\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiDevicePathProtocolGuid, NULL, &HandleCount, &HandleBuffer);\r
-  if (EFI_ERROR (Status)) {\r
-    AsciiPrint ("No device path found\n");\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  for (Index = 0; Index < HandleCount; Index++) {\r
-    Status = gBS->HandleProtocol (HandleBuffer[Index], &gEfiDevicePathProtocolGuid, (VOID **)&DevicePathProtocol);\r
-    String = DevicePathToTextProtocol->ConvertDevicePathToText(DevicePathProtocol,TRUE,TRUE);\r
-    Print (L"[0x%X] %s\n",(UINTN)HandleBuffer[Index], String);\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-GLOBAL_REMOVE_IF_UNREFERENCED const EBL_COMMAND_TABLE mLibCmdTemplate[] =\r
-{\r
-  {\r
-    "disasm address [count]",\r
-    " disassemble count instructions",\r
-    NULL,\r
-    EblDisassembler\r
-  },\r
-  {\r
-    "performance",\r
-    " Display boot performance info",\r
-    NULL,\r
-    EblPerformance\r
-  },\r
-  {\r
-    "symboltable [\"format string\"] [PECOFF]",\r
-    " show symbol table commands for debugger",\r
-    NULL,\r
-    EblSymbolTable\r
-  },\r
-  {\r
-    "dumpgcd",\r
-    " dump Global Coherency Domain",\r
-    NULL,\r
-    EblDumpGcd\r
-  },\r
-  {\r
-    "dumpmmu",\r
-    " dump MMU Table",\r
-    NULL,\r
-    EblDumpMmu\r
-  },\r
-  {\r
-    "devicepaths",\r
-    " list all the Device Paths",\r
-    NULL,\r
-    EblDevicePaths\r
-  },\r
-  {\r
-    "dumpfdt",\r
-    " dump the current fdt or the one defined in the arguments",\r
-    NULL,\r
-    EblDumpFdt\r
-  }\r
-};\r
-\r
-\r
-VOID\r
-EblInitializeExternalCmd (\r
-  VOID\r
-  )\r
-{\r
-  EblAddCommands (mLibCmdTemplate, sizeof (mLibCmdTemplate)/sizeof (EBL_COMMAND_TABLE));\r
-  return;\r
-}\r
diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf
deleted file mode 100644 (file)
index f33456a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#/** @file\r
-#\r
-#  Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\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
-#\r
-#**/\r
-\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = ArmPlatformEblCmdLib\r
-  FILE_GUID                      = 6085e1ca-0d2d-4ba4-9872-c59b36ffd6ad\r
-  MODULE_TYPE                    = UEFI_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = EblCmdLib|DXE_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
-\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
-#\r
-\r
-[Sources.common]\r
-  EblCmdLib.c\r
-  EblCmdFdt.c\r
-\r
-[Sources.ARM]\r
-  Arm/EblCmdMmu.c\r
-\r
-[Sources.AARCH64]\r
-  AArch64/EblCmdMmu.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  EmbeddedPkg/EmbeddedPkg.dec\r
-  ArmPkg/ArmPkg.dec\r
-  ArmPlatformPkg/ArmPlatformPkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  ArmLib\r
-  DebugLib\r
-  ArmDisassemblerLib\r
-  PerformanceLib\r
-  TimerLib\r
-  FdtLib\r
-\r
-[Protocols]\r
-  gEfiDebugSupportProtocolGuid\r
-  gEfiLoadedImageProtocolGuid\r
-  gEfiDevicePathToTextProtocolGuid\r
-\r
-[Guids]\r
-  gEfiDebugImageInfoTableGuid\r
-  gFdtTableGuid\r