]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToTe...
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 26 Jul 2013 03:14:08 +0000 (03:14 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 Jul 2013 03:14:08 +0000 (03:14 +0000)
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14505 6f19259b-4bc3-4df7-8a09-765794883524

59 files changed:
IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c
IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h
MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h
MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
Nt32Pkg/Nt32Pkg.dsc
Nt32Pkg/Nt32Pkg.fdf
OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgIa32X64.fdf
OvmfPkg/SecureBootConfigDxe/SecureBootConfigDevicePath.c
OvmfPkg/SecureBootConfigDxe/SecureBootConfigDxe.inf
OvmfPkg/SecureBootConfigDxe/SecureBootConfigImpl.h
PerformancePkg/Dp_App/Dp.inf
PerformancePkg/Dp_App/DpUtilities.c
PerformancePkg/PerformancePkg.dsc
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf
SecurityPkg/UserIdentification/UserProfileManagerDxe/ModifyAccessPolicy.c
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.h
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDevicePath.c
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
ShellPkg/Application/Shell/Shell.inf
ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg/Include/Library/ShellCommandLib.h
ShellPkg/Library/UefiDpLib/DpUtilities.c
ShellPkg/Library/UefiDpLib/UefiDpLib.h
ShellPkg/Library/UefiDpLib/UefiDpLib.inf
ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
ShellPkg/Library/UefiShellDebug1CommandsLib/Bcfg.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h
ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h
ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
ShellPkg/Library/UefiShellInstall1CommandsLib/Bcfg.c
ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.h
ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h
ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.h
ShellPkg/Library/UefiSortLib/UefiSortLib.c
ShellPkg/Library/UefiSortLib/UefiSortLib.inf
ShellPkg/ShellPkg.dsc

index 9d46b1cfb0239f677d7b199051a4f23903249022..2f22e7df7fd210fd142111bb5ecb921569b8fe61 100644 (file)
@@ -2,7 +2,7 @@
   BDS internal function define the default device path string, it can be\r
   replaced by platform device path.\r
 \r
   BDS internal function define the default device path string, it can be\r
   replaced by platform device path.\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2013, Intel Corporation. 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
 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
@@ -15,1466 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "InternalBdsLib.h"\r
 \r
 \r
 #include "InternalBdsLib.h"\r
 \r
-/**\r
-  Concatenates a formatted unicode string to allocated pool.\r
-  The caller must free the resulting buffer.\r
-\r
-  @param  Str      Tracks the allocated pool, size in use, and amount of pool allocated.\r
-  @param  Fmt      The format string\r
-  @param  ...      The data will be printed.\r
-\r
-  @return Allocated buffer with the formatted string printed in it.\r
-          The caller must free the allocated buffer.\r
-          The buffer allocation is not packed.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-CatPrint (\r
-  IN OUT POOL_PRINT   *Str,\r
-  IN CHAR16           *Fmt,\r
-  ...\r
-  )\r
-{\r
-  UINT16  *AppendStr;\r
-  VA_LIST Args;\r
-  UINTN   StringSize;\r
-\r
-  AppendStr = AllocateZeroPool (0x1000);\r
-  if (AppendStr == NULL) {\r
-    return Str->Str;\r
-  }\r
-\r
-  VA_START (Args, Fmt);\r
-  UnicodeVSPrint (AppendStr, 0x1000, Fmt, Args);\r
-  VA_END (Args);\r
-  if (NULL == Str->Str) {\r
-    StringSize   = StrSize (AppendStr);\r
-    Str->Str  = AllocateZeroPool (StringSize);\r
-    ASSERT (Str->Str != NULL);\r
-  } else {\r
-    StringSize = StrSize (AppendStr);\r
-    StringSize += (StrSize (Str->Str) - sizeof (UINT16));\r
-\r
-    Str->Str = ReallocatePool (\r
-                StrSize (Str->Str),\r
-                StringSize,\r
-                Str->Str\r
-                );\r
-    ASSERT (Str->Str != NULL);\r
-  }\r
-\r
-  Str->Maxlen = MAX_CHAR * sizeof (UINT16);\r
-  if (StringSize < Str->Maxlen) {\r
-    StrCat (Str->Str, AppendStr);\r
-    Str->Len = StringSize - sizeof (UINT16);\r
-  }\r
-\r
-  FreePool (AppendStr);\r
-  return Str->Str;\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathPci (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  PCI_DEVICE_PATH *Pci;\r
-\r
-  Pci = DevPath;\r
-  CatPrint (Str, L"Pci(%x|%x)", (UINTN) Pci->Device, (UINTN) Pci->Function);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathPccard (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  PCCARD_DEVICE_PATH  *Pccard;\r
-\r
-  Pccard = DevPath;\r
-  CatPrint (Str, L"Pcmcia(Function%x)", (UINTN) Pccard->FunctionNumber);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMemMap (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEMMAP_DEVICE_PATH  *MemMap;\r
-\r
-  MemMap = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"MemMap(%d:%lx-%lx)",\r
-    (UINTN) MemMap->MemoryType,\r
-    MemMap->StartingAddress,\r
-    MemMap->EndingAddress\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathController (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CONTROLLER_DEVICE_PATH  *Controller;\r
-\r
-  Controller = DevPath;\r
-  CatPrint (Str, L"Ctrl(%d)", (UINTN) Controller->ControllerNumber);\r
-}\r
-\r
-\r
-/**\r
-  Convert Vendor device path to device name.\r
-\r
-  @param  Str      The buffer store device name\r
-  @param  DevPath  Pointer to vendor device path\r
-\r
-**/\r
-VOID\r
-DevPathVendor (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  VENDOR_DEVICE_PATH  *Vendor;\r
-  CHAR16              *Type;\r
-  UINTN               DataLength;\r
-  UINTN               Index;\r
-  UINT32              FlowControlMap;\r
-\r
-  UINT16              Info;\r
-\r
-  Vendor  = DevPath;\r
-\r
-  switch (DevicePathType (&Vendor->Header)) {\r
-  case HARDWARE_DEVICE_PATH:\r
-    Type = L"Hw";\r
-    break;\r
-\r
-  case MESSAGING_DEVICE_PATH:\r
-    Type = L"Msg";\r
-    if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) {\r
-      CatPrint (Str, L"VenPcAnsi()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) {\r
-      CatPrint (Str, L"VenVt100()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {\r
-      CatPrint (Str, L"VenVt100Plus()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {\r
-      CatPrint (Str, L"VenUft8()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid     )) {\r
-      FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);\r
-      switch (FlowControlMap & 0x00000003) {\r
-      case 0:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"None");\r
-        break;\r
-\r
-      case 1:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware");\r
-        break;\r
-\r
-      case 2:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff");\r
-        break;\r
-\r
-      default:\r
-        break;\r
-      }\r
-\r
-      return ;\r
-\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) {\r
-      CatPrint (\r
-        Str,\r
-        L"SAS(%lx,%lx,%x,",\r
-        ((SAS_DEVICE_PATH *) Vendor)->SasAddress,\r
-        ((SAS_DEVICE_PATH *) Vendor)->Lun,\r
-        (UINTN) ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort\r
-        );\r
-      Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology);\r
-      if ((Info & 0x0f) == 0) {\r
-        CatPrint (Str, L"NoTopology,0,0,0,");\r
-      } else if (((Info & 0x0f) == 1) || ((Info & 0x0f) == 2)) {\r
-        CatPrint (\r
-          Str,\r
-          L"%s,%s,%s,",\r
-          ((Info & (0x1 << 4)) != 0) ? L"SATA" : L"SAS",\r
-          ((Info & (0x1 << 5)) != 0) ? L"External" : L"Internal",\r
-          ((Info & (0x1 << 6)) != 0) ? L"Expanded" : L"Direct"\r
-          );\r
-        if ((Info & 0x0f) == 1) {\r
-          CatPrint (Str, L"0,");\r
-        } else {\r
-          CatPrint (Str, L"%x,", (UINTN) ((Info >> 8) & 0xff));\r
-        }\r
-      } else {\r
-        CatPrint (Str, L"0,0,0,0,");\r
-      }\r
-\r
-      CatPrint (Str, L"%x)", (UINTN) ((SAS_DEVICE_PATH *) Vendor)->Reserved);\r
-      return ;\r
-\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) {\r
-      CatPrint (Str, L"DebugPort()");\r
-      return ;\r
-    }\r
-    break;\r
-\r
-  case MEDIA_DEVICE_PATH:\r
-    Type = L"Media";\r
-    break;\r
-\r
-  default:\r
-    Type = L"?";\r
-    break;\r
-  }\r
-\r
-  CatPrint (Str, L"Ven%s(%g", Type, &Vendor->Guid);\r
-  DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH);\r
-  if (DataLength > 0) {\r
-    CatPrint (Str, L",");\r
-    for (Index = 0; Index < DataLength; Index++) {\r
-      CatPrint (Str, L"%02x", (UINTN) ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]);\r
-    }\r
-  }\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_HID_DEVICE_PATH  *Acpi;\r
-\r
-  Acpi = DevPath;\r
-  if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-    CatPrint (Str, L"Acpi(PNP%04x,%x)", (UINTN)  EISA_ID_TO_NUM (Acpi->HID), (UINTN) Acpi->UID);\r
-  } else {\r
-    CatPrint (Str, L"Acpi(%08x,%x)", (UINTN) Acpi->HID, (UINTN) Acpi->UID);\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathExtendedAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_EXTENDED_HID_DEVICE_PATH   *ExtendedAcpi;\r
-  \r
-  //\r
-  // Index for HID, UID and CID strings, 0 for non-exist\r
-  //\r
-  UINT16                          HIDSTRIdx;\r
-  UINT16                          UIDSTRIdx;\r
-  UINT16                          CIDSTRIdx;\r
-  UINT16                          Index;\r
-  UINT16                          Length;\r
-  UINT16                          Anchor;\r
-  CHAR8                           *AsChar8Array;\r
-\r
-  HIDSTRIdx    = 0;\r
-  UIDSTRIdx    = 0;\r
-  CIDSTRIdx    = 0;\r
-  ExtendedAcpi = DevPath;\r
-  Length       = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) ExtendedAcpi);\r
-\r
-  AsChar8Array = (CHAR8 *) ExtendedAcpi;\r
-\r
-  //\r
-  // find HIDSTR\r
-  //\r
-  Anchor = 16;\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    HIDSTRIdx = Anchor;\r
-  }\r
-  //\r
-  // find UIDSTR\r
-  //\r
-  Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    UIDSTRIdx = Anchor;\r
-  }\r
-  //\r
-  // find CIDSTR\r
-  //\r
-  Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    CIDSTRIdx = Anchor;\r
-  }\r
-\r
-  if (HIDSTRIdx == 0 && CIDSTRIdx == 0 && ExtendedAcpi->UID == 0) {\r
-    CatPrint (Str, L"AcpiExp(");\r
-    if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->HID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID);\r
-    }\r
-    if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN)  EISA_ID_TO_NUM (ExtendedAcpi->CID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN)  ExtendedAcpi->CID);\r
-    }\r
-    if (UIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\")");\r
-    }\r
-  } else {\r
-    CatPrint (Str, L"AcpiEx(");\r
-    if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN)  EISA_ID_TO_NUM (ExtendedAcpi->HID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID);\r
-    }\r
-    if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->CID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->CID);\r
-    }\r
-    CatPrint (Str, L"%x,", (UINTN) ExtendedAcpi->UID);\r
-\r
-    if (HIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a,", AsChar8Array + HIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\",");\r
-    }\r
-    if (CIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a,", AsChar8Array + CIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\",");\r
-    }\r
-    if (UIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\")");\r
-    }\r
-  }\r
-\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAdrAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_ADR_DEVICE_PATH    *AcpiAdr;\r
-  UINT16                  Index;\r
-  UINT16                  Length;\r
-  UINT16                  AdditionalAdrCount;\r
-\r
-  AcpiAdr            = DevPath;\r
-  Length             = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr);\r
-  AdditionalAdrCount = (UINT16) ((Length - 8) / 4);\r
-\r
-  CatPrint (Str, L"AcpiAdr(%x", (UINTN) AcpiAdr->ADR);\r
-  for (Index = 0; Index < AdditionalAdrCount; Index++) {\r
-    CatPrint (Str, L",%x", (UINTN) *(UINT32 *) ((UINT8 *) AcpiAdr + 8 + Index * 4));\r
-  }\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAtapi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ATAPI_DEVICE_PATH *Atapi;\r
-\r
-  Atapi = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Ata(%s,%s)",\r
-    (Atapi->PrimarySecondary != 0)? L"Secondary" : L"Primary",\r
-    (Atapi->SlaveMaster != 0)? L"Slave" : L"Master"\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathScsi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  SCSI_DEVICE_PATH  *Scsi;\r
-\r
-  Scsi = DevPath;\r
-  CatPrint (Str, L"Scsi(Pun%x,Lun%x)", (UINTN) Scsi->Pun, (UINTN) Scsi->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFibre (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  FIBRECHANNEL_DEVICE_PATH  *Fibre;\r
-\r
-  Fibre = DevPath;\r
-  CatPrint (Str, L"Fibre(Wwn%lx,Lun%x)", Fibre->WWN, Fibre->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPath1394 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  F1394_DEVICE_PATH *F1394Path;\r
-\r
-  F1394Path = DevPath;\r
-  CatPrint (Str, L"1394(%lx)", &F1394Path->Guid);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsb (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_DEVICE_PATH *Usb;\r
-\r
-  Usb = DevPath;\r
-  CatPrint (Str, L"Usb(%x,%x)", (UINTN) Usb->ParentPortNumber, (UINTN) Usb->InterfaceNumber);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsbWWID (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_WWID_DEVICE_PATH  *UsbWWId;\r
-\r
-  UsbWWId = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"UsbWwid(%x,%x,%x,\"WWID\")",\r
-    (UINTN) UsbWWId->VendorId,\r
-    (UINTN) UsbWWId->ProductId,\r
-    (UINTN) UsbWWId->InterfaceNumber\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathLogicalUnit (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit;\r
-\r
-  LogicalUnit = DevPath;\r
-  CatPrint (Str, L"Unit(%x)", (UINTN) LogicalUnit->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsbClass (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_CLASS_DEVICE_PATH *UsbClass;\r
-\r
-  UsbClass = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Usb Class(%x,%x,%x,%x,%x)",\r
-    (UINTN) UsbClass->VendorId,\r
-    (UINTN) UsbClass->ProductId,\r
-    (UINTN) UsbClass->DeviceClass,\r
-    (UINTN) UsbClass->DeviceSubClass,\r
-    (UINTN) UsbClass->DeviceProtocol\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathSata (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  SATA_DEVICE_PATH *Sata;\r
-\r
-  Sata = DevPath;\r
-  if ((Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) != 0) {\r
-    CatPrint (\r
-      Str,\r
-      L"Sata(%x,%x)",\r
-      (UINTN) Sata->HBAPortNumber,\r
-      (UINTN) Sata->Lun\r
-      );\r
-  } else {\r
-    CatPrint (\r
-      Str,\r
-      L"Sata(%x,%x,%x)",\r
-      (UINTN) Sata->HBAPortNumber,\r
-      (UINTN) Sata->PortMultiplierPortNumber,\r
-      (UINTN) Sata->Lun\r
-      );\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathI2O (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  I2O_DEVICE_PATH *I2OPath;\r
-\r
-  I2OPath = DevPath;\r
-  CatPrint (Str, L"I2O(%x)", (UINTN) I2OPath->Tid);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMacAddr (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MAC_ADDR_DEVICE_PATH  *MACDevPath;\r
-  UINTN                 HwAddressSize;\r
-  UINTN                 Index;\r
-\r
-  MACDevPath           = DevPath;\r
-\r
-  HwAddressSize = sizeof (EFI_MAC_ADDRESS);\r
-  if (MACDevPath->IfType == 0x01 || MACDevPath->IfType == 0x00) {\r
-    HwAddressSize = 6;\r
-  }\r
-\r
-  CatPrint (Str, L"Mac(");\r
-\r
-  for (Index = 0; Index < HwAddressSize; Index++) {\r
-    CatPrint (Str, L"%02x", (UINTN) MACDevPath->MacAddress.Addr[Index]);\r
-  }\r
-\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathIPv4 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  IPv4_DEVICE_PATH  *IPDevPath;\r
-\r
-  IPDevPath = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"IPv4(%d.%d.%d.%d:%d)",\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[0],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[1],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[2],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[3],\r
-    (UINTN) IPDevPath->RemotePort\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathIPv6 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  IPv6_DEVICE_PATH  *IPv6DevPath;\r
-\r
-  IPv6DevPath = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x)",\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[0],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[1],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[2],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[3],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[4],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[5],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[6],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[7],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[8],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[9],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[10],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[11],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[12],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[13],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[14],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[15]\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathInfiniBand (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  INFINIBAND_DEVICE_PATH  *InfiniBand;\r
-\r
-  InfiniBand = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Infiniband(%x,%g,%lx,%lx,%lx)",\r
-    (UINTN) InfiniBand->ResourceFlags,\r
-    InfiniBand->PortGid,\r
-    InfiniBand->ServiceId,\r
-    InfiniBand->TargetPortId,\r
-    InfiniBand->DeviceId\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUart (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  UART_DEVICE_PATH  *Uart;\r
-  CHAR8             Parity;\r
-\r
-  Uart = DevPath;\r
-  switch (Uart->Parity) {\r
-  case 0:\r
-    Parity = 'D';\r
-    break;\r
-\r
-  case 1:\r
-    Parity = 'N';\r
-    break;\r
-\r
-  case 2:\r
-    Parity = 'E';\r
-    break;\r
-\r
-  case 3:\r
-    Parity = 'O';\r
-    break;\r
-\r
-  case 4:\r
-    Parity = 'M';\r
-    break;\r
-\r
-  case 5:\r
-    Parity = 'S';\r
-    break;\r
-\r
-  default:\r
-    Parity = 'x';\r
-    break;\r
-  }\r
-\r
-  if (Uart->BaudRate == 0) {\r
-    CatPrint (Str, L"Uart(DEFAULT,%c,", Parity);\r
-  } else {\r
-    CatPrint (Str, L"Uart(%ld,%c,", Uart->BaudRate, Parity);\r
-  }\r
-\r
-  if (Uart->DataBits == 0) {\r
-    CatPrint (Str, L"D,");\r
-  } else {\r
-    CatPrint (Str, L"%d,", (UINTN) Uart->DataBits);\r
-  }\r
-\r
-  switch (Uart->StopBits) {\r
-  case 0:\r
-    CatPrint (Str, L"D)");\r
-    break;\r
-\r
-  case 1:\r
-    CatPrint (Str, L"1)");\r
-    break;\r
-\r
-  case 2:\r
-    CatPrint (Str, L"1.5)");\r
-    break;\r
-\r
-  case 3:\r
-    CatPrint (Str, L"2)");\r
-    break;\r
-\r
-  default:\r
-    CatPrint (Str, L"x)");\r
-    break;\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathiSCSI (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ISCSI_DEVICE_PATH_WITH_NAME *IScsi;\r
-  UINT16                      Options;\r
-\r
-  IScsi = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"iSCSI(%a,%x,%lx,",\r
-    IScsi->TargetName,\r
-    (UINTN) IScsi->TargetPortalGroupTag,\r
-    IScsi->Lun\r
-    );\r
-\r
-  Options = IScsi->LoginOption;\r
-  CatPrint (Str, L"%s,", (((Options >> 1) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
-  CatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
-  if (((Options >> 11) & 0x0001) != 0) {\r
-    CatPrint (Str, L"%s,", L"None");\r
-  } else if (((Options >> 12) & 0x0001) != 0) {\r
-    CatPrint (Str, L"%s,", L"CHAP_UNI");\r
-  } else {\r
-    CatPrint (Str, L"%s,", L"CHAP_BI");\r
-\r
-  }\r
-\r
-  CatPrint (Str, L"%s)", (IScsi->NetworkProtocol == 0) ? L"TCP" : L"reserved");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathVlan (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  VLAN_DEVICE_PATH  *Vlan;\r
-\r
-  Vlan = DevPath;\r
-  CatPrint (Str, L"Vlan(%d)", (UINTN) Vlan->VlanId);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathHardDrive (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  HARDDRIVE_DEVICE_PATH *Hd;\r
-\r
-  Hd = DevPath;\r
-  switch (Hd->SignatureType) {\r
-  case SIGNATURE_TYPE_MBR:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,Sig%08x)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (UINTN) *((UINT32 *) (&(Hd->Signature[0])))\r
-      );\r
-    break;\r
-\r
-  case SIGNATURE_TYPE_GUID:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,Sig%g)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (EFI_GUID *) &(Hd->Signature[0])\r
-      );\r
-    break;\r
-\r
-  default:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,MBRType=%02x,SigType=%02x)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (UINTN) Hd->MBRType,\r
-      (UINTN) Hd->SignatureType\r
-      );\r
-    break;\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathCDROM (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CDROM_DEVICE_PATH *Cd;\r
-\r
-  Cd = DevPath;\r
-  CatPrint (Str, L"CDROM(Entry%x)", (UINTN) Cd->BootEntry);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFilePath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  FILEPATH_DEVICE_PATH  *Fp;\r
-\r
-  Fp = DevPath;\r
-  CatPrint (Str, L"%s", Fp->PathName);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMediaProtocol (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_PROTOCOL_DEVICE_PATH  *MediaProt;\r
-\r
-  MediaProt = DevPath;\r
-  CatPrint (Str, L"Media(%g)", &MediaProt->Protocol);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFvFilePath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFilePath;\r
-\r
-  FvFilePath = DevPath;\r
-  CatPrint (Str, L"%g", &FvFilePath->FvFileName);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathRelativeOffsetRange (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r
-\r
-  Offset = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Offset(%lx,%lx)",\r
-    Offset->StartingOffset,\r
-    Offset->EndingOffset\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathBssBss (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  BBS_BBS_DEVICE_PATH *Bbs;\r
-  CHAR16              *Type;\r
-\r
-  Bbs = DevPath;\r
-  switch (Bbs->DeviceType) {\r
-  case BBS_TYPE_FLOPPY:\r
-    Type = L"Floppy";\r
-    break;\r
-\r
-  case BBS_TYPE_HARDDRIVE:\r
-    Type = L"Harddrive";\r
-    break;\r
-\r
-  case BBS_TYPE_CDROM:\r
-    Type = L"CDROM";\r
-    break;\r
-\r
-  case BBS_TYPE_PCMCIA:\r
-    Type = L"PCMCIA";\r
-    break;\r
-\r
-  case BBS_TYPE_USB:\r
-    Type = L"Usb";\r
-    break;\r
-\r
-  case BBS_TYPE_EMBEDDED_NETWORK:\r
-    Type = L"Net";\r
-    break;\r
-\r
-  case BBS_TYPE_BEV:\r
-    Type = L"BEV";\r
-    break;\r
-\r
-  default:\r
-    Type = L"?";\r
-    break;\r
-  }\r
-  CatPrint (Str, L"Legacy-%s", Type);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathEndInstance (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CatPrint (Str, L",");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathNodeUnknown (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CatPrint (Str, L"?");\r
-}\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maximum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFvPath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_FW_VOL_DEVICE_PATH *FvPath;\r
-\r
-  FvPath = DevPath;\r
-  CatPrint (Str, L"Fv(%g)", &FvPath->FvName);\r
-}\r
-\r
-DEVICE_PATH_STRING_TABLE  DevPathTable[] = {\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_PCI_DP,\r
-    DevPathPci\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_PCCARD_DP,\r
-    DevPathPccard\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_MEMMAP_DP,\r
-    DevPathMemMap\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_CONTROLLER_DP,\r
-    DevPathController\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_DP,\r
-    DevPathAcpi\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_EXTENDED_DP,\r
-    DevPathExtendedAcpi\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_ADR_DP,\r
-    DevPathAdrAcpi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_ATAPI_DP,\r
-    DevPathAtapi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_SCSI_DP,\r
-    DevPathScsi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_FIBRECHANNEL_DP,\r
-    DevPathFibre\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_1394_DP,\r
-    DevPath1394\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_DP,\r
-    DevPathUsb\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_WWID_DP,\r
-    DevPathUsbWWID\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_DEVICE_LOGICAL_UNIT_DP,\r
-    DevPathLogicalUnit\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_CLASS_DP,\r
-    DevPathUsbClass\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_SATA_DP,\r
-    DevPathSata\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_I2O_DP,\r
-    DevPathI2O\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_MAC_ADDR_DP,\r
-    DevPathMacAddr\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_IPv4_DP,\r
-    DevPathIPv4\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_IPv6_DP,\r
-    DevPathIPv6\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_INFINIBAND_DP,\r
-    DevPathInfiniBand\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_UART_DP,\r
-    DevPathUart\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_ISCSI_DP,\r
-    DevPathiSCSI\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VLAN_DP,\r
-    DevPathVlan\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_HARDDRIVE_DP,\r
-    DevPathHardDrive\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_CDROM_DP,\r
-    DevPathCDROM\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_FILEPATH_DP,\r
-    DevPathFilePath\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PROTOCOL_DP,\r
-    DevPathMediaProtocol\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PIWG_FW_VOL_DP,\r
-    DevPathFvPath,\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PIWG_FW_FILE_DP,\r
-    DevPathFvFilePath\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_RELATIVE_OFFSET_RANGE_DP,\r
-    DevPathRelativeOffsetRange,\r
-  },\r
-  {\r
-    BBS_DEVICE_PATH,\r
-    BBS_BBS_DP,\r
-    DevPathBssBss\r
-  },\r
-  {\r
-    END_DEVICE_PATH_TYPE,\r
-    END_INSTANCE_DEVICE_PATH_SUBTYPE,\r
-    DevPathEndInstance\r
-  },\r
-  {\r
-    0,\r
-    0,\r
-    NULL\r
-  }\r
-};\r
-\r
-\r
 /**\r
   This function converts an input device structure to a Unicode string.\r
 \r
 /**\r
   This function converts an input device structure to a Unicode string.\r
 \r
@@ -1489,83 +29,5 @@ DevicePathToStr (
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
-  POOL_PRINT                Str;\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevPathNode;\r
-  VOID (*DumpNode) (POOL_PRINT *, VOID *);\r
-\r
-  UINTN Index;\r
-  UINTN NewSize;\r
-\r
-  EFI_STATUS                       Status;\r
-  CHAR16                           *ToText;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;\r
-\r
-  ZeroMem (&Str, sizeof (Str));\r
-\r
-  if (DevPath == NULL) {\r
-    goto Done;\r
-  }\r
-\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &DevPathToText\r
-                  );\r
-  if (!EFI_ERROR (Status)) {\r
-    ToText = DevPathToText->ConvertDevicePathToText (\r
-                              DevPath,\r
-                              FALSE,\r
-                              TRUE\r
-                              );\r
-    ASSERT (ToText != NULL);\r
-    return ToText;\r
-  }\r
-\r
-  //\r
-  // Process each device path node\r
-  //\r
-  DevPathNode = DevPath;\r
-  while (!IsDevicePathEnd (DevPathNode)) {\r
-    //\r
-    // Find the handler to dump this device path node\r
-    //\r
-    DumpNode = NULL;\r
-    for (Index = 0; DevPathTable[Index].Function != NULL; Index += 1) {\r
-\r
-      if (DevicePathType (DevPathNode) == DevPathTable[Index].Type &&\r
-          DevicePathSubType (DevPathNode) == DevPathTable[Index].SubType\r
-          ) {\r
-        DumpNode = DevPathTable[Index].Function;\r
-        break;\r
-      }\r
-    }\r
-    //\r
-    // If not found, use a generic function\r
-    //\r
-    if (!DumpNode) {\r
-      DumpNode = DevPathNodeUnknown;\r
-    }\r
-    //\r
-    //  Put a path seperator in if needed\r
-    //\r
-    if ((Str.Len != 0) && (DumpNode != DevPathEndInstance)) {\r
-      CatPrint (&Str, L"/");\r
-    }\r
-    //\r
-    // Print this node of the device path\r
-    //\r
-    DumpNode (&Str, DevPathNode);\r
-\r
-    //\r
-    // Next device path node\r
-    //\r
-    DevPathNode = NextDevicePathNode (DevPathNode);\r
-  }\r
-\r
-Done:\r
-  NewSize = (Str.Len + 1) * sizeof (CHAR16);\r
-  Str.Str = ReallocatePool (NewSize, NewSize, Str.Str);\r
-  ASSERT (Str.Str != NULL);\r
-  Str.Str[Str.Len] = 0;\r
-  return Str.Str;\r
+  return ConvertDevicePathToText (DevPath, TRUE, TRUE);\r
 }\r
 }\r
index 2d4a90f97df6edaf1e3f36facefdbe70e69474ed..545709c6eb35db74ef90be92717ad0cd89784740 100644 (file)
@@ -5,7 +5,7 @@
 #  2) BDS boot device connect interface;\r
 #  3) BDS Misc interfaces for mainting boot variable, ouput string, etc.\r
 #  \r
 #  2) BDS boot device connect interface;\r
 #  3) BDS Misc interfaces for mainting boot variable, ouput string, etc.\r
 #  \r
-#  Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2013, Intel Corporation. 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
 #  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
   ReportStatusCodeLib\r
 \r
 [Guids]\r
   ReportStatusCodeLib\r
 \r
 [Guids]\r
-  gEfiVT100PlusGuid                             ## CONSUMES ## GUID (The type of terminal)\r
-  gEfiVT100Guid                                 ## CONSUMES ## GUID (The type of terminal)\r
-                                                ## CONSUMES ## GUID HOB (The hob holding memory type information)\r
   gEfiMemoryTypeInformationGuid                 ## CONSUMES ## GUID (The identifier of memory type information type in system table)\r
   gEfiMemoryTypeInformationGuid                 ## CONSUMES ## GUID (The identifier of memory type information type in system table)\r
-  gEfiVTUTF8Guid                                ## CONSUMES ## GUID (The type of terminal)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"BootXX" (Boot option variable)\r
-                                                ## CONSUMES           ## Variable:L"Timeout" (The time out value in second of showing progress bar)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"BootOrder" (The boot option array)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" (The driver order list)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ConIn" (The device path of console in device)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
   gEfiGlobalVariableGuid                        ## SOMETIMES_PRODUCES ## Variable:L"BootCurrent" (The boot option of current boot)\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID\r
   gEfiGlobalVariableGuid                        ## SOMETIMES_PRODUCES ## Variable:L"BootCurrent" (The boot option of current boot)\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID\r
-  gEfiPcAnsiGuid                                ## CONSUMES ## GUID (The type of terminal)\r
   gPerformanceProtocolGuid                      ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
   gEfiUartDevicePathGuid                        ## CONSUMES ## GUID (Identify the device path for UARD device)\r
   gPerformanceProtocolGuid                      ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
   gEfiUartDevicePathGuid                        ## CONSUMES ## GUID (Identify the device path for UARD device)\r
-  gEfiSasDevicePathGuid                         ## CONSUMES ## GUID (Identify the device path for SAS device)\r
   gLastEnumLangGuid                             ## SOMETIMES_PRODUCES ## Variable:L"LastEnumLang" (Platform language at last time enumeration.)\r
   gHdBootDevicePathVariablGuid                  ## SOMETIMES_PRODUCES ## Variable:L"HDDP" (The device path of Boot file on Hard device.)\r
   gBdsLibStringPackageGuid                      ## PRODUCES ## GUID (HII String PackageList Guid)\r
   gLastEnumLangGuid                             ## SOMETIMES_PRODUCES ## Variable:L"LastEnumLang" (Platform language at last time enumeration.)\r
   gHdBootDevicePathVariablGuid                  ## SOMETIMES_PRODUCES ## Variable:L"HDDP" (The device path of Boot file on Hard device.)\r
   gBdsLibStringPackageGuid                      ## PRODUCES ## GUID (HII String PackageList Guid)\r
@@ -98,7 +85,6 @@
   gEfiSimpleTextOutProtocolGuid                 # PROTOCOL CONSUMES\r
   gEfiPciIoProtocolGuid                         # PROTOCOL CONSUMES\r
   gEfiLoadedImageProtocolGuid                   # PROTOCOL CONSUMES\r
   gEfiSimpleTextOutProtocolGuid                 # PROTOCOL CONSUMES\r
   gEfiPciIoProtocolGuid                         # PROTOCOL CONSUMES\r
   gEfiLoadedImageProtocolGuid                   # PROTOCOL CONSUMES\r
-  gEfiDevicePathToTextProtocolGuid              # PROTOCOL SOMETIMES_CONSUMES\r
   gEfiSimpleNetworkProtocolGuid                 # PROTOCOL CONSUMES\r
   gEfiDebugPortProtocolGuid                     # PROTOCOL CONSUMES\r
   gEfiSimpleTextInProtocolGuid                  # PROTOCOL CONSUMES\r
   gEfiSimpleNetworkProtocolGuid                 # PROTOCOL CONSUMES\r
   gEfiDebugPortProtocolGuid                     # PROTOCOL CONSUMES\r
   gEfiSimpleTextInProtocolGuid                  # PROTOCOL CONSUMES\r
index 1384febc986f7b8570803555ffca96d3edce003c..80b1f49a90d3778abd1052a1af6f747342a7acd8 100644 (file)
@@ -31,7 +31,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/LegacyBios.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 #include <Protocol/SimpleNetwork.h>\r
 #include <Protocol/LegacyBios.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 #include <Protocol/SimpleNetwork.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/FirmwareVolume2.h>\r
 #include <Protocol/PciIo.h>\r
 #include <Protocol/AcpiS3Save.h>\r
 #include <Protocol/FirmwareVolume2.h>\r
 #include <Protocol/PciIo.h>\r
 #include <Protocol/AcpiS3Save.h>\r
index 348ce392e621db1dc29fa83321b4b3f9e824e804..fc62a251c231d28f9df0a93a2d2a80ea7a676b73 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header files and data structures needed by PCI Bus module.\r
 \r
 /** @file\r
   Header files and data structures needed by PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. 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
 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
@@ -32,7 +32,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/IncompatiblePciDeviceSupport.h>\r
 #include <Protocol/PciOverride.h>\r
 #include <Protocol/PciEnumerationComplete.h>\r
 #include <Protocol/IncompatiblePciDeviceSupport.h>\r
 #include <Protocol/PciOverride.h>\r
 #include <Protocol/PciEnumerationComplete.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
index 8c557f2fd760ec840896d5040e5b193bb1d547c4..34eb672df1dac578d31b66ebc8741e554d83240c 100644 (file)
@@ -5,7 +5,7 @@
 #  space for these devices. Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable\r
 #  hot plug supporting.\r
 #\r
 #  space for these devices. Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable\r
 #  hot plug supporting.\r
 #\r
-#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -97,7 +97,6 @@
   gEfiPciRootBridgeIoProtocolGuid                 ## CONSUMED\r
   gEfiIncompatiblePciDeviceSupportProtocolGuid    ## CONSUMED\r
   gEfiLoadFile2ProtocolGuid                       ## CONSUMED\r
   gEfiPciRootBridgeIoProtocolGuid                 ## CONSUMED\r
   gEfiIncompatiblePciDeviceSupportProtocolGuid    ## CONSUMED\r
   gEfiLoadFile2ProtocolGuid                       ## CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                ## CONSUMED\r
 \r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport\r
 \r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport\r
index a5cea9e52a0d2b590569c7dc63cfd275f505c0c4..b3d91a8d3037ee43f85f060211d78a3d27567c9e 100644 (file)
@@ -290,7 +290,6 @@ DumpResourceMap (
   PCI_RESOURCE_NODE                *ChildPMem32Node;\r
   PCI_RESOURCE_NODE                *ChildMem64Node;\r
   PCI_RESOURCE_NODE                *ChildPMem64Node;\r
   PCI_RESOURCE_NODE                *ChildPMem32Node;\r
   PCI_RESOURCE_NODE                *ChildMem64Node;\r
   PCI_RESOURCE_NODE                *ChildPMem64Node;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *ToText;\r
   CHAR16                           *Str;\r
 \r
   DEBUG ((EFI_D_INFO, "PciBus: Resource Map for "));\r
   CHAR16                           *Str;\r
 \r
   DEBUG ((EFI_D_INFO, "PciBus: Resource Map for "));\r
@@ -309,19 +308,11 @@ DumpResourceMap (
       Bridge->BusNumber, Bridge->DeviceNumber, Bridge->FunctionNumber\r
       ));\r
   } else {\r
       Bridge->BusNumber, Bridge->DeviceNumber, Bridge->FunctionNumber\r
       ));\r
   } else {\r
-    Status = gBS->LocateProtocol (\r
-                    &gEfiDevicePathToTextProtocolGuid,\r
-                    NULL,\r
-                    (VOID **) &ToText\r
-                    );\r
-    Str = NULL;\r
-    if (!EFI_ERROR (Status)) {\r
-      Str = ToText->ConvertDevicePathToText (\r
-                      DevicePathFromHandle (Bridge->Handle),\r
-                      FALSE,\r
-                      FALSE\r
-                      );\r
-    }\r
+    Str = ConvertDevicePathToText (\r
+            DevicePathFromHandle (Bridge->Handle),\r
+            FALSE,\r
+            FALSE\r
+            );\r
     DEBUG ((EFI_D_INFO, "Root Bridge %s\n", Str != NULL ? Str : L""));\r
     if (Str != NULL) {\r
       FreePool (Str);\r
     DEBUG ((EFI_D_INFO, "Root Bridge %s\n", Str != NULL ? Str : L""));\r
     if (Str != NULL) {\r
       FreePool (Str);\r
index cb2cbe7932806e24f66c8df1e2ffb20d48d51f8f..d79a81a6d9de2e55a2cbcf8620b96f50470a62c3 100644 (file)
@@ -1798,14 +1798,12 @@ DriverSampleInit (
   MY_EFI_VARSTORE_DATA            *VarStoreConfig;\r
   EFI_INPUT_KEY                   HotKey;\r
   EFI_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx;\r
   MY_EFI_VARSTORE_DATA            *VarStoreConfig;\r
   EFI_INPUT_KEY                   HotKey;\r
   EFI_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *PathToText;\r
 \r
   //\r
   // Initialize the local variables.\r
   //\r
   ConfigRequestHdr = NULL;\r
   NewString        = NULL;\r
 \r
   //\r
   // Initialize the local variables.\r
   //\r
   ConfigRequestHdr = NULL;\r
   NewString        = NULL;\r
-  PathToText       = NULL;\r
 \r
   //\r
   // Initialize screen dimensions for SendForm().\r
 \r
   //\r
   // Initialize screen dimensions for SendForm().\r
@@ -1922,18 +1920,11 @@ DriverSampleInit (
   }\r
 \r
   PrivateData->HiiHandle[1] = HiiHandle[1];\r
   }\r
 \r
   PrivateData->HiiHandle[1] = HiiHandle[1];\r
\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &PathToText\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   // Update the device path string.\r
   //\r
 \r
   //\r
   // Update the device path string.\r
   //\r
-  NewString = PathToText->ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)&mHiiVendorDevicePath0, FALSE, FALSE);\r
+  NewString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)&mHiiVendorDevicePath0, FALSE, FALSE);\r
   if (HiiSetString (HiiHandle[0], STRING_TOKEN (STR_DEVICE_PATH), NewString, NULL) == 0) {\r
     DriverSampleUnload (ImageHandle);\r
     return EFI_OUT_OF_RESOURCES;\r
   if (HiiSetString (HiiHandle[0], STRING_TOKEN (STR_DEVICE_PATH), NewString, NULL) == 0) {\r
     DriverSampleUnload (ImageHandle);\r
     return EFI_OUT_OF_RESOURCES;\r
index cd546bf38884679da8386117f8b1ad3b687b0e28..29870c0f1f1e2b8ec5663df5c15063589dbf5610 100644 (file)
@@ -32,7 +32,6 @@ Revision History
 #include <Protocol/HiiDatabase.h>\r
 #include <Protocol/HiiString.h>\r
 #include <Protocol/FormBrowserEx.h>\r
 #include <Protocol/HiiDatabase.h>\r
 #include <Protocol/HiiString.h>\r
 #include <Protocol/FormBrowserEx.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Guid/MdeModuleHii.h>\r
 #include <Library/DebugLib.h>\r
 \r
 #include <Guid/MdeModuleHii.h>\r
 #include <Library/DebugLib.h>\r
index 36511e66d07a332e4d638838ee1c4816b4e7d229..1affe874bcff7432cb39ddb9d9599ffb319e68e6 100644 (file)
@@ -55,6 +55,7 @@
   HiiLib\r
   PrintLib\r
   UefiLib\r
   HiiLib\r
   PrintLib\r
   UefiLib\r
+  DevicePathLib\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid                              ## CONSUMES ## Guid\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid                              ## CONSUMES ## Guid\r
@@ -70,7 +71,6 @@
   gEfiHiiDatabaseProtocolGuid                   ## CONSUMES\r
   gEfiSimpleTextInputExProtocolGuid             ## CONSUMES\r
   gEfiFormBrowserExProtocolGuid                 ## CONSUMES\r
   gEfiHiiDatabaseProtocolGuid                   ## CONSUMES\r
   gEfiSimpleTextInputExProtocolGuid             ## CONSUMES\r
   gEfiFormBrowserExProtocolGuid                 ## CONSUMES\r
-  gEfiDevicePathToTextProtocolGuid              ## CONSUMES\r
 \r
 [Depex]\r
   gEfiSimpleTextOutProtocolGuid AND gEfiHiiDatabaseProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid\r
 \r
 [Depex]\r
   gEfiSimpleTextOutProtocolGuid AND gEfiHiiDatabaseProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid\r
index 60113fee12ef9a88c5ae88676b19d176f7fff37e..75af7635226ae09cb826f2da180b040d87b2d76b 100644 (file)
@@ -2,7 +2,7 @@
   Ihe internal heder file includes the required Protocol/Guid/Library\r
   and the shared function APIs.\r
 \r
   Ihe internal heder file includes the required Protocol/Guid/Library\r
   and the shared function APIs.\r
 \r
-Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2013, Intel Corporation. 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
 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
@@ -29,7 +29,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/ComponentName2.h>\r
 #include <Protocol/ComponentName.h>\r
 #include <Protocol/DriverBinding.h>\r
 #include <Protocol/ComponentName2.h>\r
 #include <Protocol/ComponentName.h>\r
 #include <Protocol/DriverBinding.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
 #include <Guid/MdeModuleHii.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
 #include <Guid/MdeModuleHii.h>\r
index 9c0064df2935700de2dc934c0581e533ff241167..ab254a0b450e1eb4d558c427ff7a0bafdf4fcdba 100644 (file)
@@ -13,7 +13,7 @@
   4. It save all the mapping info in NV variables which will be consumed\r
      by platform override protocol driver to publish the platform override protocol.\r
 \r
   4. It save all the mapping info in NV variables which will be consumed\r
      by platform override protocol driver to publish the platform override protocol.\r
 \r
-Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2013, Intel Corporation. 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
 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
@@ -104,45 +104,29 @@ HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePath = {
 };\r
 \r
 /**\r
 };\r
 \r
 /**\r
-  Converting a given device to an unicode string. \r
-  \r
-  This function will dependent on gEfiDevicePathToTextProtocolGuid, if protocol\r
-  does not installed, then return unknown device path L"?" directly.\r
-  \r
+  Converting a given device to an unicode string.\r
+\r
   @param    DevPath     Given device path instance\r
   \r
   @return   Converted string from given device path.\r
   @param    DevPath     Given device path instance\r
   \r
   @return   Converted string from given device path.\r
-  @retval   L"?"  Can not locate gEfiDevicePathToTextProtocolGuid protocol for converting.\r
+  @retval   L"?" Converting failed.\r
 **/\r
 CHAR16 *\r
 DevicePathToStr (\r
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
 **/\r
 CHAR16 *\r
 DevicePathToStr (\r
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
-  EFI_STATUS                       Status;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;\r
-  CHAR16                           *ToText;\r
-  \r
-  if (DevPath == NULL) {\r
-    return L"";\r
-  }\r
-    \r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &DevPathToText\r
-                  );\r
-  if (!EFI_ERROR (Status)) {\r
-    ToText = DevPathToText->ConvertDevicePathToText (\r
-                              DevPath,\r
-                              FALSE,\r
-                              TRUE\r
-                              );\r
-    ASSERT (ToText != NULL);\r
-    return ToText;\r
+  CHAR16                          *Text;\r
+  Text = ConvertDevicePathToText (\r
+           DevPath,\r
+           FALSE,\r
+           TRUE\r
+           );\r
+  if (Text == NULL) {\r
+    return AllocateCopyPool (sizeof (L"?"), L"?");\r
+  } else {\r
+    return Text;\r
   }\r
   }\r
-\r
-  return L"?";\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
index bf333d29dfd9af4e580b72be7336f354ae048651..9702f249b544de156544d3ee7bb679aa68fc2af1 100644 (file)
@@ -16,7 +16,7 @@
 #  4. It save all the mapping info in NV variables for the following boot, \r
 #     which will be consumed by GetDriver API of the produced the platform override protocol.\r
 #\r
 #  4. It save all the mapping info in NV variables for the following boot, \r
 #     which will be consumed by GetDriver API of the produced the platform override protocol.\r
 #\r
-# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -95,7 +95,6 @@
   gEfiFormBrowser2ProtocolGuid                  ## CONSUMED\r
   gEfiHiiConfigRoutingProtocolGuid              ## CONSUMED\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCED\r
   gEfiFormBrowser2ProtocolGuid                  ## CONSUMED\r
   gEfiHiiConfigRoutingProtocolGuid              ## CONSUMED\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCED\r
-  gEfiDevicePathToTextProtocolGuid              ## CONSUMED\r
   gEfiPlatformDriverOverrideProtocolGuid        ## PRODUCED\r
 \r
 [Depex]\r
   gEfiPlatformDriverOverrideProtocolGuid        ## PRODUCED\r
 \r
 [Depex]\r
index c97342b981d9d69029a0d7b3ddaf8a467448ed1e..cfcfc4234d804fcfe3102508d257ff8a4f354cc8 100644 (file)
@@ -84,7 +84,7 @@
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf\r
   UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
   UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
   MdeModulePkg/Core/Dxe/DxeMain.inf {\r
     <LibraryClasses>\r
       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf\r
   MdeModulePkg/Core/Dxe/DxeMain.inf {\r
     <LibraryClasses>\r
       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf\r
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
     <BuildOptions>\r
       *_*_IA32_CC_FLAGS =\r
   }\r
     <BuildOptions>\r
       *_*_IA32_CC_FLAGS =\r
   }\r
     <LibraryClasses>\r
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   }\r
     <LibraryClasses>\r
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   }\r
-  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
+  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {\r
+    <LibraryClasses>\r
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  }\r
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
index b191a86bc92209697adbae947888964245ff110a..2b8a8e76d3c9295b4586093676734dde5825a50c 100644 (file)
@@ -167,6 +167,7 @@ APRIORI PEI {
   INF  Nt32Pkg/WinNtOemHookStatusCodeHandlerPei/WinNtOemHookStatusCodeHandlerPei.inf\r
   }\r
 APRIORI DXE {\r
   INF  Nt32Pkg/WinNtOemHookStatusCodeHandlerPei/WinNtOemHookStatusCodeHandlerPei.inf\r
   }\r
 APRIORI DXE {\r
+  INF  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
   INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
   INF  Nt32Pkg/MetronomeDxe/MetronomeDxe.inf\r
   }\r
   INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
   INF  Nt32Pkg/MetronomeDxe/MetronomeDxe.inf\r
   }\r
index 781b415178ae6420fb3580632356fddc7f6b53d6..ba6af2caefd8510708610b11777caf40dd88060d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Platform BDS customizations.\r
 \r
 /** @file\r
   Platform BDS customizations.\r
 \r
-  Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2004 - 2013, Intel Corporation. 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
   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
@@ -209,14 +209,16 @@ Returns:
   // Print Device Path\r
   //\r
   DevPathStr = DevicePathToStr(DevicePath);\r
   // Print Device Path\r
   //\r
   DevPathStr = DevicePathToStr(DevicePath);\r
-  DEBUG((\r
-    EFI_D_INFO,\r
-    "BdsPlatform.c+%d: COM%d DevPath: %s\n",\r
-    __LINE__,\r
-    gPnp16550ComPortDeviceNode.UID + 1,\r
-    DevPathStr\r
-    ));\r
-  FreePool(DevPathStr);\r
+  if (DevPathStr != NULL) {\r
+    DEBUG((\r
+      EFI_D_INFO,\r
+      "BdsPlatform.c+%d: COM%d DevPath: %s\n",\r
+      __LINE__,\r
+      gPnp16550ComPortDeviceNode.UID + 1,\r
+      DevPathStr\r
+      ));\r
+    FreePool(DevPathStr);\r
+  }\r
 \r
   BdsLibUpdateConsoleVariable (VarConsoleOut, DevicePath, NULL);\r
   BdsLibUpdateConsoleVariable (VarConsoleInp, DevicePath, NULL);\r
 \r
   BdsLibUpdateConsoleVariable (VarConsoleOut, DevicePath, NULL);\r
   BdsLibUpdateConsoleVariable (VarConsoleInp, DevicePath, NULL);\r
@@ -236,14 +238,16 @@ Returns:
   // Print Device Path\r
   //\r
   DevPathStr = DevicePathToStr(DevicePath);\r
   // Print Device Path\r
   //\r
   DevPathStr = DevicePathToStr(DevicePath);\r
-  DEBUG((\r
-    EFI_D_INFO,\r
-    "BdsPlatform.c+%d: COM%d DevPath: %s\n",\r
-    __LINE__,\r
-    gPnp16550ComPortDeviceNode.UID + 1,\r
-    DevPathStr\r
-    ));\r
-  FreePool(DevPathStr);\r
+  if (DevPathStr != NULL) {\r
+    DEBUG((\r
+      EFI_D_INFO,\r
+      "BdsPlatform.c+%d: COM%d DevPath: %s\n",\r
+      __LINE__,\r
+      gPnp16550ComPortDeviceNode.UID + 1,\r
+      DevPathStr\r
+      ));\r
+    FreePool(DevPathStr);\r
+  }\r
 \r
   BdsLibUpdateConsoleVariable (VarConsoleOut, DevicePath, NULL);\r
   BdsLibUpdateConsoleVariable (VarConsoleInp, DevicePath, NULL);\r
 \r
   BdsLibUpdateConsoleVariable (VarConsoleOut, DevicePath, NULL);\r
   BdsLibUpdateConsoleVariable (VarConsoleInp, DevicePath, NULL);\r
@@ -799,12 +803,14 @@ ConnectRecursivelyIfPciMassStorage (
     // Print Device Path\r
     //\r
     DevPathStr = DevicePathToStr (DevicePath);\r
     // Print Device Path\r
     //\r
     DevPathStr = DevicePathToStr (DevicePath);\r
-    DEBUG((\r
-      EFI_D_INFO,\r
-      "Found Mass Storage device: %s\n",\r
-      DevPathStr\r
-      ));\r
-    FreePool(DevPathStr);\r
+    if (DevPathStr != NULL) {\r
+      DEBUG((\r
+        EFI_D_INFO,\r
+        "Found Mass Storage device: %s\n",\r
+        DevPathStr\r
+        ));\r
+      FreePool(DevPathStr);\r
+    }\r
 \r
     Status = gBS->ConnectController (Handle, NULL, NULL, TRUE);\r
     if (EFI_ERROR (Status)) {\r
 \r
     Status = gBS->ConnectController (Handle, NULL, NULL, TRUE);\r
     if (EFI_ERROR (Status)) {\r
index 9f94e2424a02b19267a0fb7d4070ad24b0720488..c9b8556fab0f28c8932ce78deaa3ce640b9e8225 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Rewrite the BootOrder NvVar based on QEMU's "bootorder" fw_cfg file.\r
 \r
 /** @file\r
   Rewrite the BootOrder NvVar based on QEMU's "bootorder" fw_cfg file.\r
 \r
-  Copyright (C) 2012, Red Hat, Inc.\r
+  Copyright (C) 2012 - 2013, Red Hat, Inc.\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -20,7 +20,7 @@
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/PrintLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/PrintLib.h>\r
-#include <Protocol/DevicePathToText.h>\r
+#include <Library/DevicePathLib.h>\r
 #include <Guid/GlobalVariable.h>\r
 \r
 \r
 #include <Guid/GlobalVariable.h>\r
 \r
 \r
@@ -866,18 +866,17 @@ BOOLEAN
 Match (\r
   IN  CONST CHAR16                           *Translated,\r
   IN  UINTN                                  TranslatedLength,\r
 Match (\r
   IN  CONST CHAR16                           *Translated,\r
   IN  UINTN                                  TranslatedLength,\r
-  IN  CONST EFI_DEVICE_PATH_PROTOCOL         *DevicePath,\r
-  IN  CONST EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText\r
+  IN  CONST EFI_DEVICE_PATH_PROTOCOL         *DevicePath\r
   )\r
 {\r
   CHAR16  *Converted;\r
   BOOLEAN Result;\r
 \r
   )\r
 {\r
   CHAR16  *Converted;\r
   BOOLEAN Result;\r
 \r
-  Converted = DevPathToText->ConvertDevicePathToText (\r
-                               DevicePath,\r
-                               FALSE, // DisplayOnly\r
-                               FALSE  // AllowShortcuts\r
-                               );\r
+  Converted = ConvertDevicePathToText (\r
+                DevicePath,\r
+                FALSE, // DisplayOnly\r
+                FALSE  // AllowShortcuts\r
+                );\r
   if (Converted == NULL) {\r
     return FALSE;\r
   }\r
   if (Converted == NULL) {\r
     return FALSE;\r
   }\r
@@ -933,9 +932,6 @@ SetBootOrderFromQemu (
   )\r
 {\r
   RETURN_STATUS                    Status;\r
   )\r
 {\r
   RETURN_STATUS                    Status;\r
-\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;\r
-\r
   FIRMWARE_CONFIG_ITEM             FwCfgItem;\r
   UINTN                            FwCfgSize;\r
   CHAR8                            *FwCfg;\r
   FIRMWARE_CONFIG_ITEM             FwCfgItem;\r
   UINTN                            FwCfgSize;\r
   CHAR8                            *FwCfg;\r
@@ -946,15 +942,6 @@ SetBootOrderFromQemu (
   UINTN                            TranslatedSize;\r
   CHAR16                           Translated[TRANSLATION_OUTPUT_SIZE];\r
 \r
   UINTN                            TranslatedSize;\r
   CHAR16                           Translated[TRANSLATION_OUTPUT_SIZE];\r
 \r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL, // optional registration key\r
-                  (VOID **) &DevPathToText\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
-    return Status;\r
-  }\r
-\r
   Status = QemuFwCfgFindFile ("bootorder", &FwCfgItem, &FwCfgSize);\r
   if (Status != RETURN_SUCCESS) {\r
     return Status;\r
   Status = QemuFwCfgFindFile ("bootorder", &FwCfgItem, &FwCfgSize);\r
   if (Status != RETURN_SUCCESS) {\r
     return Status;\r
@@ -1019,8 +1006,7 @@ SetBootOrderFromQemu (
             Match (\r
               Translated,\r
               TranslatedSize, // contains length, not size, in CHAR16's here\r
             Match (\r
               Translated,\r
               TranslatedSize, // contains length, not size, in CHAR16's here\r
-              BootOption->DevicePath,\r
-              DevPathToText\r
+              BootOption->DevicePath\r
               )\r
             ) {\r
           //\r
               )\r
             ) {\r
           //\r
index 7c8cd0dca470aa0f169965f15ffa77fd109fa059..dcfb95aa3217fe4c9e8479a385347dbae0a7f864 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform\r
 #\r
 ## @file\r
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform\r
 #\r
-#  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -90,7 +90,7 @@
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf\r
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf\r
   FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf\r
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf\r
   FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf\r
   MdeModulePkg/Core/Dxe/DxeMain.inf {\r
     <LibraryClasses>\r
       NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
   MdeModulePkg/Core/Dxe/DxeMain.inf {\r
     <LibraryClasses>\r
       NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
   }\r
 \r
   IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf\r
   }\r
 \r
   IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf\r
   MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf\r
   MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf\r
   MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf\r
   MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf\r
   MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf\r
   MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf\r
-  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
+  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {\r
+    <LibraryClasses>\r
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  }\r
   MdeModulePkg/Universal/PrintDxe/PrintDxe.inf\r
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
   MdeModulePkg/Universal/PrintDxe/PrintDxe.inf\r
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
index 89e86e6804212a9dcfed49bf9622e1478790022d..fe77a3a3de65ffb627161f91267569a61e8ccfd4 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Open Virtual Machine Firmware: FDF\r
 #\r
 ## @file\r
 #  Open Virtual Machine Firmware: FDF\r
 #\r
-#  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -155,6 +155,7 @@ READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE\r
 \r
 APRIORI DXE {\r
 READ_LOCK_STATUS   = TRUE\r
 \r
 APRIORI DXE {\r
+  INF  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
   INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
 }\r
 \r
   INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
 }\r
 \r
index ae44626594f223abebfa407ebd0d8b9a2d8ddbd7..28c4d4f8b66d2be8dc33171a4b20aebdc554edee 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal function defines the default device path string for SecureBoot configuration module.\r
 \r
 /** @file\r
   Internal function defines the default device path string for SecureBoot configuration module.\r
 \r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2012 - 2013, Intel Corporation. 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
 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
@@ -14,1431 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "SecureBootConfigImpl.h"\r
 \r
 \r
 #include "SecureBootConfigImpl.h"\r
 \r
-/**\r
-  Concatenates a formatted unicode string to allocated pool.\r
-  The caller must free the resulting buffer.\r
-\r
-  @param[in, out]  Str      Tracks the allocated pool, size in use, and amount of pool allocated.\r
-  @param[in]       Fmt      The format string\r
-  @param[in]       ...      The data will be printed.\r
-\r
-  @return Allocated buffer with the formatted string printed in it.\r
-          The caller must free the allocated buffer.\r
-          The buffer allocation is not packed.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-CatPrint (\r
-  IN OUT POOL_PRINT   *Str,\r
-  IN CHAR16           *Fmt,\r
-  ...\r
-  )\r
-{\r
-  UINT16  *AppendStr;\r
-  VA_LIST Args;\r
-  UINTN   StringSize;\r
-\r
-  AppendStr = AllocateZeroPool (0x1000);\r
-  if (AppendStr == NULL) {\r
-    return Str->Str;\r
-  }\r
-\r
-  VA_START (Args, Fmt);\r
-  UnicodeVSPrint (AppendStr, 0x1000, Fmt, Args);\r
-  VA_END (Args);\r
-  if (NULL == Str->Str) {\r
-    StringSize   = StrSize (AppendStr);\r
-    Str->Str  = AllocateZeroPool (StringSize);\r
-    ASSERT (Str->Str != NULL);\r
-  } else {\r
-    StringSize = StrSize (AppendStr);\r
-    StringSize += (StrSize (Str->Str) - sizeof (UINT16));\r
-\r
-    Str->Str = ReallocatePool (\r
-                StrSize (Str->Str),\r
-                StringSize,\r
-                Str->Str\r
-                );\r
-    ASSERT (Str->Str != NULL);\r
-  }\r
-\r
-  Str->Maxlen = MAX_CHAR * sizeof (UINT16);\r
-  if (StringSize < Str->Maxlen) {\r
-    StrCat (Str->Str, AppendStr);\r
-    Str->Len = StringSize - sizeof (UINT16);\r
-  }\r
-\r
-  FreePool (AppendStr);\r
-  return Str->Str;\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathPci (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  PCI_DEVICE_PATH *Pci;\r
-\r
-  Pci = DevPath;\r
-  CatPrint (Str, L"Pci(%x|%x)", (UINTN) Pci->Device, (UINTN) Pci->Function);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathPccard (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  PCCARD_DEVICE_PATH  *Pccard;\r
-\r
-  Pccard = DevPath;\r
-  CatPrint (Str, L"Pcmcia(Function%x)", (UINTN) Pccard->FunctionNumber);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMemMap (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEMMAP_DEVICE_PATH  *MemMap;\r
-\r
-  MemMap = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"MemMap(%d:%lx-%lx)",\r
-    (UINTN) MemMap->MemoryType,\r
-    MemMap->StartingAddress,\r
-    MemMap->EndingAddress\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathController (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CONTROLLER_DEVICE_PATH  *Controller;\r
-\r
-  Controller = DevPath;\r
-  CatPrint (Str, L"Ctrl(%d)", (UINTN) Controller->ControllerNumber);\r
-}\r
-\r
-\r
-/**\r
-  Convert Vendor device path to device name.\r
-\r
-  @param[in, out]  Str      The buffer store device name\r
-  @param[in]       DevPath  Pointer to vendor device path\r
-\r
-**/\r
-VOID\r
-DevPathVendor (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  VENDOR_DEVICE_PATH  *Vendor;\r
-  CHAR16              *Type;\r
-  UINTN               DataLength;\r
-  UINTN               Index;\r
-  UINT32              FlowControlMap;\r
-\r
-  UINT16              Info;\r
-\r
-  Vendor  = DevPath;\r
-\r
-  switch (DevicePathType (&Vendor->Header)) {\r
-  case HARDWARE_DEVICE_PATH:\r
-    Type = L"Hw";\r
-    break;\r
-\r
-  case MESSAGING_DEVICE_PATH:\r
-    Type = L"Msg";\r
-    if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) {\r
-      CatPrint (Str, L"VenPcAnsi()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) {\r
-      CatPrint (Str, L"VenVt100()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {\r
-      CatPrint (Str, L"VenVt100Plus()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {\r
-      CatPrint (Str, L"VenUft8()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid     )) {\r
-      FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);\r
-      switch (FlowControlMap & 0x00000003) {\r
-      case 0:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"None");\r
-        break;\r
-\r
-      case 1:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware");\r
-        break;\r
-\r
-      case 2:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff");\r
-        break;\r
-\r
-      default:\r
-        break;\r
-      }\r
-\r
-      return ;\r
-\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) {\r
-      CatPrint (\r
-        Str,\r
-        L"SAS(%lx,%lx,%x,",\r
-        ((SAS_DEVICE_PATH *) Vendor)->SasAddress,\r
-        ((SAS_DEVICE_PATH *) Vendor)->Lun,\r
-        (UINTN) ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort\r
-        );\r
-      Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology);\r
-      if ((Info & 0x0f) == 0) {\r
-        CatPrint (Str, L"NoTopology,0,0,0,");\r
-      } else if (((Info & 0x0f) == 1) || ((Info & 0x0f) == 2)) {\r
-        CatPrint (\r
-          Str,\r
-          L"%s,%s,%s,",\r
-          ((Info & (0x1 << 4)) != 0) ? L"SATA" : L"SAS",\r
-          ((Info & (0x1 << 5)) != 0) ? L"External" : L"Internal",\r
-          ((Info & (0x1 << 6)) != 0) ? L"Expanded" : L"Direct"\r
-          );\r
-        if ((Info & 0x0f) == 1) {\r
-          CatPrint (Str, L"0,");\r
-        } else {\r
-          CatPrint (Str, L"%x,", (UINTN) ((Info >> 8) & 0xff));\r
-        }\r
-      } else {\r
-        CatPrint (Str, L"0,0,0,0,");\r
-      }\r
-\r
-      CatPrint (Str, L"%x)", (UINTN) ((SAS_DEVICE_PATH *) Vendor)->Reserved);\r
-      return ;\r
-\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) {\r
-      CatPrint (Str, L"DebugPort()");\r
-      return ;\r
-    }\r
-    break;\r
-\r
-  case MEDIA_DEVICE_PATH:\r
-    Type = L"Media";\r
-    break;\r
-\r
-  default:\r
-    Type = L"?";\r
-    break;\r
-  }\r
-\r
-  CatPrint (Str, L"Ven%s(%g", Type, &Vendor->Guid);\r
-  DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH);\r
-  if (DataLength > 0) {\r
-    CatPrint (Str, L",");\r
-    for (Index = 0; Index < DataLength; Index++) {\r
-      CatPrint (Str, L"%02x", (UINTN) ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]);\r
-    }\r
-  }\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_HID_DEVICE_PATH  *Acpi;\r
-\r
-  Acpi = DevPath;\r
-  if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-    CatPrint (Str, L"Acpi(PNP%04x,%x)", (UINTN)  EISA_ID_TO_NUM (Acpi->HID), (UINTN) Acpi->UID);\r
-  } else {\r
-    CatPrint (Str, L"Acpi(%08x,%x)", (UINTN) Acpi->HID, (UINTN) Acpi->UID);\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathExtendedAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_EXTENDED_HID_DEVICE_PATH   *ExtendedAcpi;\r
-  \r
-  //\r
-  // Index for HID, UID and CID strings, 0 for non-exist\r
-  //\r
-  UINT16                          HIDSTRIdx;\r
-  UINT16                          UIDSTRIdx;\r
-  UINT16                          CIDSTRIdx;\r
-  UINT16                          Index;\r
-  UINT16                          Length;\r
-  UINT16                          Anchor;\r
-  CHAR8                           *AsChar8Array;\r
-\r
-  HIDSTRIdx    = 0;\r
-  UIDSTRIdx    = 0;\r
-  CIDSTRIdx    = 0;\r
-  ExtendedAcpi = DevPath;\r
-  Length       = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) ExtendedAcpi);\r
-\r
-  AsChar8Array = (CHAR8 *) ExtendedAcpi;\r
-\r
-  //\r
-  // find HIDSTR\r
-  //\r
-  Anchor = 16;\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    HIDSTRIdx = Anchor;\r
-  }\r
-  //\r
-  // find UIDSTR\r
-  //\r
-  Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    UIDSTRIdx = Anchor;\r
-  }\r
-  //\r
-  // find CIDSTR\r
-  //\r
-  Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    CIDSTRIdx = Anchor;\r
-  }\r
-\r
-  if (HIDSTRIdx == 0 && CIDSTRIdx == 0 && ExtendedAcpi->UID == 0) {\r
-    CatPrint (Str, L"AcpiExp(");\r
-    if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->HID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID);\r
-    }\r
-    if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN)  EISA_ID_TO_NUM (ExtendedAcpi->CID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN)  ExtendedAcpi->CID);\r
-    }\r
-    if (UIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\")");\r
-    }\r
-  } else {\r
-    CatPrint (Str, L"AcpiEx(");\r
-    if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN)  EISA_ID_TO_NUM (ExtendedAcpi->HID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID);\r
-    }\r
-    if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->CID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->CID);\r
-    }\r
-    CatPrint (Str, L"%x,", (UINTN) ExtendedAcpi->UID);\r
-\r
-    if (HIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a,", AsChar8Array + HIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\",");\r
-    }\r
-    if (CIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a,", AsChar8Array + CIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\",");\r
-    }\r
-    if (UIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\")");\r
-    }\r
-  }\r
-\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAdrAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_ADR_DEVICE_PATH    *AcpiAdr;\r
-  UINT16                  Index;\r
-  UINT16                  Length;\r
-  UINT16                  AdditionalAdrCount;\r
-\r
-  AcpiAdr            = DevPath;\r
-  Length             = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr);\r
-  AdditionalAdrCount = (UINT16) ((Length - 8) / 4);\r
-\r
-  CatPrint (Str, L"AcpiAdr(%x", (UINTN) AcpiAdr->ADR);\r
-  for (Index = 0; Index < AdditionalAdrCount; Index++) {\r
-    CatPrint (Str, L",%x", (UINTN) *(UINT32 *) ((UINT8 *) AcpiAdr + 8 + Index * 4));\r
-  }\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAtapi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ATAPI_DEVICE_PATH *Atapi;\r
-\r
-  Atapi = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Ata(%s,%s)",\r
-    (Atapi->PrimarySecondary != 0)? L"Secondary" : L"Primary",\r
-    (Atapi->SlaveMaster != 0)? L"Slave" : L"Master"\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathScsi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  SCSI_DEVICE_PATH  *Scsi;\r
-\r
-  Scsi = DevPath;\r
-  CatPrint (Str, L"Scsi(Pun%x,Lun%x)", (UINTN) Scsi->Pun, (UINTN) Scsi->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-  \r
-**/\r
-VOID\r
-DevPathFibre (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  FIBRECHANNEL_DEVICE_PATH  *Fibre;\r
-\r
-  Fibre = DevPath;\r
-  CatPrint (Str, L"Fibre(Wwn%lx,Lun%x)", Fibre->WWN, Fibre->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPath1394 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  F1394_DEVICE_PATH *F1394Path;\r
-\r
-  F1394Path = DevPath;\r
-  CatPrint (Str, L"1394(%lx)", &F1394Path->Guid);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-  \r
-**/\r
-VOID\r
-DevPathUsb (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_DEVICE_PATH *Usb;\r
-\r
-  Usb = DevPath;\r
-  CatPrint (Str, L"Usb(%x,%x)", (UINTN) Usb->ParentPortNumber, (UINTN) Usb->InterfaceNumber);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsbWWID (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_WWID_DEVICE_PATH  *UsbWWId;\r
-\r
-  UsbWWId = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"UsbWwid(%x,%x,%x,\"WWID\")",\r
-    (UINTN) UsbWWId->VendorId,\r
-    (UINTN) UsbWWId->ProductId,\r
-    (UINTN) UsbWWId->InterfaceNumber\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathLogicalUnit (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit;\r
-\r
-  LogicalUnit = DevPath;\r
-  CatPrint (Str, L"Unit(%x)", (UINTN) LogicalUnit->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsbClass (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_CLASS_DEVICE_PATH *UsbClass;\r
-\r
-  UsbClass = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Usb Class(%x,%x,%x,%x,%x)",\r
-    (UINTN) UsbClass->VendorId,\r
-    (UINTN) UsbClass->ProductId,\r
-    (UINTN) UsbClass->DeviceClass,\r
-    (UINTN) UsbClass->DeviceSubClass,\r
-    (UINTN) UsbClass->DeviceProtocol\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathSata (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  SATA_DEVICE_PATH *Sata;\r
-\r
-  Sata = DevPath;\r
-  if ((Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) != 0) {\r
-    CatPrint (\r
-      Str,\r
-      L"Sata(%x,%x)",\r
-      (UINTN) Sata->HBAPortNumber,\r
-      (UINTN) Sata->Lun\r
-      );\r
-  } else {\r
-    CatPrint (\r
-      Str,\r
-      L"Sata(%x,%x,%x)",\r
-      (UINTN) Sata->HBAPortNumber,\r
-      (UINTN) Sata->PortMultiplierPortNumber,\r
-      (UINTN) Sata->Lun\r
-      );\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathI2O (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  I2O_DEVICE_PATH *I2OPath;\r
-\r
-  I2OPath = DevPath;\r
-  CatPrint (Str, L"I2O(%x)", (UINTN) I2OPath->Tid);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMacAddr (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MAC_ADDR_DEVICE_PATH  *MACDevPath;\r
-  UINTN                 HwAddressSize;\r
-  UINTN                 Index;\r
-\r
-  MACDevPath           = DevPath;\r
-\r
-  HwAddressSize = sizeof (EFI_MAC_ADDRESS);\r
-  if (MACDevPath->IfType == 0x01 || MACDevPath->IfType == 0x00) {\r
-    HwAddressSize = 6;\r
-  }\r
-\r
-  CatPrint (Str, L"Mac(");\r
-\r
-  for (Index = 0; Index < HwAddressSize; Index++) {\r
-    CatPrint (Str, L"%02x", (UINTN) MACDevPath->MacAddress.Addr[Index]);\r
-  }\r
-\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathIPv4 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  IPv4_DEVICE_PATH  *IPDevPath;\r
-\r
-  IPDevPath = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"IPv4(%d.%d.%d.%d:%d)",\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[0],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[1],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[2],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[3],\r
-    (UINTN) IPDevPath->RemotePort\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathIPv6 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  IPv6_DEVICE_PATH  *IPv6DevPath;\r
-\r
-  IPv6DevPath = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x)",\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[0],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[1],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[2],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[3],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[4],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[5],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[6],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[7],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[8],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[9],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[10],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[11],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[12],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[13],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[14],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[15]\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathInfiniBand (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  INFINIBAND_DEVICE_PATH  *InfiniBand;\r
-\r
-  InfiniBand = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Infiniband(%x,%g,%lx,%lx,%lx)",\r
-    (UINTN) InfiniBand->ResourceFlags,\r
-    InfiniBand->PortGid,\r
-    InfiniBand->ServiceId,\r
-    InfiniBand->TargetPortId,\r
-    InfiniBand->DeviceId\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUart (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  UART_DEVICE_PATH  *Uart;\r
-  CHAR8             Parity;\r
-\r
-  Uart = DevPath;\r
-  switch (Uart->Parity) {\r
-  case 0:\r
-    Parity = 'D';\r
-    break;\r
-\r
-  case 1:\r
-    Parity = 'N';\r
-    break;\r
-\r
-  case 2:\r
-    Parity = 'E';\r
-    break;\r
-\r
-  case 3:\r
-    Parity = 'O';\r
-    break;\r
-\r
-  case 4:\r
-    Parity = 'M';\r
-    break;\r
-\r
-  case 5:\r
-    Parity = 'S';\r
-    break;\r
-\r
-  default:\r
-    Parity = 'x';\r
-    break;\r
-  }\r
-\r
-  if (Uart->BaudRate == 0) {\r
-    CatPrint (Str, L"Uart(DEFAULT,%c,", Parity);\r
-  } else {\r
-    CatPrint (Str, L"Uart(%ld,%c,", Uart->BaudRate, Parity);\r
-  }\r
-\r
-  if (Uart->DataBits == 0) {\r
-    CatPrint (Str, L"D,");\r
-  } else {\r
-    CatPrint (Str, L"%d,", (UINTN) Uart->DataBits);\r
-  }\r
-\r
-  switch (Uart->StopBits) {\r
-  case 0:\r
-    CatPrint (Str, L"D)");\r
-    break;\r
-\r
-  case 1:\r
-    CatPrint (Str, L"1)");\r
-    break;\r
-\r
-  case 2:\r
-    CatPrint (Str, L"1.5)");\r
-    break;\r
-\r
-  case 3:\r
-    CatPrint (Str, L"2)");\r
-    break;\r
-\r
-  default:\r
-    CatPrint (Str, L"x)");\r
-    break;\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathiSCSI (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ISCSI_DEVICE_PATH_WITH_NAME *IScsi;\r
-  UINT16                      Options;\r
-\r
-  IScsi = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"iSCSI(%a,%x,%lx,",\r
-    IScsi->TargetName,\r
-    (UINTN) IScsi->TargetPortalGroupTag,\r
-    IScsi->Lun\r
-    );\r
-\r
-  Options = IScsi->LoginOption;\r
-  CatPrint (Str, L"%s,", (((Options >> 1) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
-  CatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
-  if (((Options >> 11) & 0x0001) != 0) {\r
-    CatPrint (Str, L"%s,", L"None");\r
-  } else if (((Options >> 12) & 0x0001) != 0) {\r
-    CatPrint (Str, L"%s,", L"CHAP_UNI");\r
-  } else {\r
-    CatPrint (Str, L"%s,", L"CHAP_BI");\r
-\r
-  }\r
-\r
-  CatPrint (Str, L"%s)", (IScsi->NetworkProtocol == 0) ? L"TCP" : L"reserved");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathVlan (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  VLAN_DEVICE_PATH  *Vlan;\r
-\r
-  Vlan = DevPath;\r
-  CatPrint (Str, L"Vlan(%d)", (UINTN) Vlan->VlanId);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathHardDrive (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  HARDDRIVE_DEVICE_PATH *Hd;\r
-\r
-  Hd = DevPath;\r
-  switch (Hd->SignatureType) {\r
-  case SIGNATURE_TYPE_MBR:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,Sig%08x)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (UINTN) *((UINT32 *) (&(Hd->Signature[0])))\r
-      );\r
-    break;\r
-\r
-  case SIGNATURE_TYPE_GUID:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,Sig%g)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (EFI_GUID *) &(Hd->Signature[0])\r
-      );\r
-    break;\r
-\r
-  default:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,MBRType=%02x,SigType=%02x)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (UINTN) Hd->MBRType,\r
-      (UINTN) Hd->SignatureType\r
-      );\r
-    break;\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathCDROM (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CDROM_DEVICE_PATH *Cd;\r
-\r
-  Cd = DevPath;\r
-  CatPrint (Str, L"CDROM(Entry%x)", (UINTN) Cd->BootEntry);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFilePath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  FILEPATH_DEVICE_PATH  *Fp;\r
-\r
-  Fp = DevPath;\r
-  CatPrint (Str, L"%s", Fp->PathName);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMediaProtocol (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_PROTOCOL_DEVICE_PATH  *MediaProt;\r
-\r
-  MediaProt = DevPath;\r
-  CatPrint (Str, L"Media(%g)", &MediaProt->Protocol);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFvFilePath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFilePath;\r
-\r
-  FvFilePath = DevPath;\r
-  CatPrint (Str, L"%g", &FvFilePath->FvFileName);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathRelativeOffsetRange (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r
-\r
-  Offset = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Offset(%lx,%lx)",\r
-    Offset->StartingOffset,\r
-    Offset->EndingOffset\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathBssBss (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  BBS_BBS_DEVICE_PATH *Bbs;\r
-  CHAR16              *Type;\r
-\r
-  Bbs = DevPath;\r
-  switch (Bbs->DeviceType) {\r
-  case BBS_TYPE_FLOPPY:\r
-    Type = L"Floppy";\r
-    break;\r
-\r
-  case BBS_TYPE_HARDDRIVE:\r
-    Type = L"Harddrive";\r
-    break;\r
-\r
-  case BBS_TYPE_CDROM:\r
-    Type = L"CDROM";\r
-    break;\r
-\r
-  case BBS_TYPE_PCMCIA:\r
-    Type = L"PCMCIA";\r
-    break;\r
-\r
-  case BBS_TYPE_USB:\r
-    Type = L"Usb";\r
-    break;\r
-\r
-  case BBS_TYPE_EMBEDDED_NETWORK:\r
-    Type = L"Net";\r
-    break;\r
-\r
-  case BBS_TYPE_BEV:\r
-    Type = L"BEV";\r
-    break;\r
-\r
-  default:\r
-    Type = L"?";\r
-    break;\r
-  }\r
-  CatPrint (Str, L"Legacy-%s", Type);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathEndInstance (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CatPrint (Str, L",");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathNodeUnknown (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CatPrint (Str, L"?");\r
-}\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFvPath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_FW_VOL_DEVICE_PATH *FvPath;\r
-\r
-  FvPath = DevPath;\r
-  CatPrint (Str, L"Fv(%g)", &FvPath->FvName);\r
-}\r
-\r
-DEVICE_PATH_STRING_TABLE  DevPathTable[] = {\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_PCI_DP,\r
-    DevPathPci\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_PCCARD_DP,\r
-    DevPathPccard\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_MEMMAP_DP,\r
-    DevPathMemMap\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_CONTROLLER_DP,\r
-    DevPathController\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_DP,\r
-    DevPathAcpi\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_EXTENDED_DP,\r
-    DevPathExtendedAcpi\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_ADR_DP,\r
-    DevPathAdrAcpi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_ATAPI_DP,\r
-    DevPathAtapi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_SCSI_DP,\r
-    DevPathScsi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_FIBRECHANNEL_DP,\r
-    DevPathFibre\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_1394_DP,\r
-    DevPath1394\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_DP,\r
-    DevPathUsb\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_WWID_DP,\r
-    DevPathUsbWWID\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_DEVICE_LOGICAL_UNIT_DP,\r
-    DevPathLogicalUnit\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_CLASS_DP,\r
-    DevPathUsbClass\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_SATA_DP,\r
-    DevPathSata\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_I2O_DP,\r
-    DevPathI2O\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_MAC_ADDR_DP,\r
-    DevPathMacAddr\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_IPv4_DP,\r
-    DevPathIPv4\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_IPv6_DP,\r
-    DevPathIPv6\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_INFINIBAND_DP,\r
-    DevPathInfiniBand\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_UART_DP,\r
-    DevPathUart\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_ISCSI_DP,\r
-    DevPathiSCSI\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VLAN_DP,\r
-    DevPathVlan\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_HARDDRIVE_DP,\r
-    DevPathHardDrive\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_CDROM_DP,\r
-    DevPathCDROM\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_FILEPATH_DP,\r
-    DevPathFilePath\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PROTOCOL_DP,\r
-    DevPathMediaProtocol\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PIWG_FW_VOL_DP,\r
-    DevPathFvPath,\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PIWG_FW_FILE_DP,\r
-    DevPathFvFilePath\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_RELATIVE_OFFSET_RANGE_DP,\r
-    DevPathRelativeOffsetRange,\r
-  },\r
-  {\r
-    BBS_DEVICE_PATH,\r
-    BBS_BBS_DP,\r
-    DevPathBssBss\r
-  },\r
-  {\r
-    END_DEVICE_PATH_TYPE,\r
-    END_INSTANCE_DEVICE_PATH_SUBTYPE,\r
-    DevPathEndInstance\r
-  },\r
-  {\r
-    0,\r
-    0,\r
-    NULL\r
-  }\r
-};\r
-\r
 \r
 /**\r
   This function converts an input device structure to a Unicode string.\r
 \r
 /**\r
   This function converts an input device structure to a Unicode string.\r
@@ -1454,84 +29,10 @@ DevicePathToStr (
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
-  POOL_PRINT                Str;\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevPathNode;\r
-  VOID (*DumpNode) (POOL_PRINT *, VOID *);\r
-\r
-  UINTN Index;\r
-  UINTN NewSize;\r
-\r
-  EFI_STATUS                       Status;\r
-  CHAR16                           *ToText;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;\r
-\r
-  ZeroMem (&Str, sizeof (Str));\r
-\r
-  if (DevPath == NULL) {\r
-    goto Done;\r
-  }\r
-\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &DevPathToText\r
-                  );\r
-  if (!EFI_ERROR (Status)) {\r
-    ToText = DevPathToText->ConvertDevicePathToText (\r
-                              DevPath,\r
-                              FALSE,\r
-                              TRUE\r
-                              );\r
-    ASSERT (ToText != NULL);\r
-    return ToText;\r
-  }\r
-\r
-  //\r
-  // Process each device path node\r
-  //\r
-  DevPathNode = DevPath;\r
-  while (!IsDevicePathEnd (DevPathNode)) {\r
-    //\r
-    // Find the handler to dump this device path node\r
-    //\r
-    DumpNode = NULL;\r
-    for (Index = 0; DevPathTable[Index].Function != NULL; Index += 1) {\r
-\r
-      if (DevicePathType (DevPathNode) == DevPathTable[Index].Type &&\r
-          DevicePathSubType (DevPathNode) == DevPathTable[Index].SubType\r
-          ) {\r
-        DumpNode = DevPathTable[Index].Function;\r
-        break;\r
-      }\r
-    }\r
-    //\r
-    // If not found, use a generic function\r
-    //\r
-    if (!DumpNode) {\r
-      DumpNode = DevPathNodeUnknown;\r
-    }\r
-    //\r
-    //  Put a path seperator in if needed\r
-    //\r
-    if ((Str.Len != 0) && (DumpNode != DevPathEndInstance)) {\r
-      CatPrint (&Str, L"/");\r
-    }\r
-    //\r
-    // Print this node of the device path\r
-    //\r
-    DumpNode (&Str, DevPathNode);\r
-\r
-    //\r
-    // Next device path node\r
-    //\r
-    DevPathNode = NextDevicePathNode (DevPathNode);\r
-  }\r
-\r
-Done:\r
-  NewSize = (Str.Len + 1) * sizeof (CHAR16);\r
-  Str.Str = ReallocatePool (NewSize, NewSize, Str.Str);\r
-  ASSERT (Str.Str != NULL);\r
-  Str.Str[Str.Len] = 0;\r
-  return Str.Str;\r
+  return ConvertDevicePathToText (\r
+           DevPath,\r
+           FALSE,\r
+           TRUE\r
+           );\r
 }\r
 \r
 }\r
 \r
index 74d4745bfa7c5b0473b2d39ce6bacdb56e37e7ab..a6bd1a36135ee3da15c87ecc810a998842811b89 100644 (file)
@@ -4,7 +4,7 @@
 # Need custom SecureBootConfigDxe for OVMF that does not force\r
 # resets after PK changes since OVMF doesn't have persistent variables\r
 #\r
 # Need custom SecureBootConfigDxe for OVMF that does not force\r
 # resets after PK changes since OVMF doesn't have persistent variables\r
 #\r
-# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2013, Intel Corporation. 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
 # 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
@@ -56,7 +56,8 @@
   UefiHiiServicesLib\r
   DebugLib\r
   HiiLib\r
   UefiHiiServicesLib\r
   DebugLib\r
   HiiLib\r
-  PlatformSecureLib  \r
+  PlatformSecureLib\r
+  DevicePathLib\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid\r
   gEfiImageSecurityDatabaseGuid                 ## CONSUMES\r
   gEfiFileSystemVolumeLabelInfoIdGuid           ## CONSUMES\r
   gEfiGlobalVariableGuid                        ## PRODUCES ## Variable Guid\r
   gEfiImageSecurityDatabaseGuid                 ## CONSUMES\r
   gEfiFileSystemVolumeLabelInfoIdGuid           ## CONSUMES\r
   gEfiGlobalVariableGuid                        ## PRODUCES ## Variable Guid\r
-  gEfiVT100PlusGuid                             ## CONSUMES ## GUID (The type of terminal)\r
-  gEfiVT100Guid                                 ## CONSUMES ## GUID (The type of terminal)\r
-                                                ## CONSUMES ## GUID HOB (The hob holding memory type information)\r
-  gEfiVTUTF8Guid                                ## CONSUMES ## GUID (The type of terminal)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"BootXX" (Boot option variable)\r
-                                                ## CONSUMES           ## Variable:L"Timeout" (The time out value in second of showing progress bar)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"BootOrder" (The boot option array)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" (The driver order list)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ConIn" (The device path of console in device)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID\r
-  gEfiPcAnsiGuid                                ## CONSUMES ## GUID (The type of terminal)\r
-  gEfiUartDevicePathGuid                        ## CONSUMES ## GUID (Identify the device path for UARD device)\r
-  gEfiSasDevicePathGuid                         ## CONSUMES ## GUID (Identify the device path for SAS device)\r
 \r
 [Protocols]\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
 \r
 [Protocols]\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
@@ -95,8 +82,6 @@
   gEfiLoadFileProtocolGuid                      ## PROTOCOL CONSUMES\r
   gEfiBlockIoProtocolGuid                       ## PROTOCOL CONSUMES\r
   gEfiDevicePathProtocolGuid                    ## PROTOCOL CONSUMES\r
   gEfiLoadFileProtocolGuid                      ## PROTOCOL CONSUMES\r
   gEfiBlockIoProtocolGuid                       ## PROTOCOL CONSUMES\r
   gEfiDevicePathProtocolGuid                    ## PROTOCOL CONSUMES\r
-  gEfiDevicePathToTextProtocolGuid\r
-  gEfiDebugPortProtocolGuid\r
 \r
 [Depex]\r
   gEfiHiiConfigRoutingProtocolGuid  AND\r
 \r
 [Depex]\r
   gEfiHiiConfigRoutingProtocolGuid  AND\r
index 5a5ac12426a92a2c613acaf2ad8ca3ff3c2fc919..414ab65c8ba9768254c15a6beeb48ea5f5fe3cf4 100644 (file)
@@ -2,7 +2,7 @@
   The header file of HII Config Access protocol implementation of SecureBoot\r
   configuration module.\r
 \r
   The header file of HII Config Access protocol implementation of SecureBoot\r
   configuration module.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2013, Intel Corporation. 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
 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
@@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SimpleFileSystem.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/DebugPort.h>\r
 #include <Protocol/LoadFile.h>\r
 \r
 #include <Protocol/DebugPort.h>\r
 #include <Protocol/LoadFile.h>\r
 \r
index a27ebe65ac0b9497197f889dbae208fbb6b8f336..c6c76b47891f0be194d171c09c17338cb08010e6 100644 (file)
@@ -1,7 +1,7 @@
 ##  @file\r
 #  Display Performance Application, Module information file.\r
 #\r
 ##  @file\r
 #  Display Performance Application, Module information file.\r
 #\r
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2013, Intel Corporation. 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
 # 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
@@ -66,7 +66,6 @@
   gEfiDriverBindingProtocolGuid                           # SOMETIMES_CONSUMED\r
   gEfiComponentName2ProtocolGuid                          # SOMETIMES_CONSUMED\r
   gEfiLoadedImageDevicePathProtocolGuid                   # SOMETIMES_CONSUMED\r
   gEfiDriverBindingProtocolGuid                           # SOMETIMES_CONSUMED\r
   gEfiComponentName2ProtocolGuid                          # SOMETIMES_CONSUMED\r
   gEfiLoadedImageDevicePathProtocolGuid                   # SOMETIMES_CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                        # SOMETIMES_CONSUMED\r
 \r
 [Pcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize\r
 \r
 [Pcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize\r
index 5e160708b852c30d1ce93729b935744e15b28b4b..4daca0b853624539d27ab7ea45182f8ca7ca534d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, Intel Corporation. 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
   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
@@ -31,7 +31,6 @@
 #include <Protocol/DriverBinding.h>\r
 #include <Protocol/ComponentName2.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/DriverBinding.h>\r
 #include <Protocol/ComponentName2.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Guid/Performance.h>\r
 \r
 \r
 #include <Guid/Performance.h>\r
 \r
@@ -220,7 +219,6 @@ GetNameFromHandle (
   UINTN                       StringSize;\r
   CHAR8                       *PlatformLanguage;\r
   EFI_COMPONENT_NAME2_PROTOCOL      *ComponentName2;\r
   UINTN                       StringSize;\r
   CHAR8                       *PlatformLanguage;\r
   EFI_COMPONENT_NAME2_PROTOCOL      *ComponentName2;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToText;\r
 \r
   //\r
   // Method 1: Get the name string from image PDB\r
 \r
   //\r
   // Method 1: Get the name string from image PDB\r
@@ -336,19 +334,12 @@ GetNameFromHandle (
       //\r
       // Method 5: Get the name string from image DevicePath\r
       //\r
       //\r
       // Method 5: Get the name string from image DevicePath\r
       //\r
-      Status = gBS->LocateProtocol (\r
-                      &gEfiDevicePathToTextProtocolGuid,\r
-                      NULL,\r
-                      (VOID **) &DevicePathToText\r
-                      );\r
-      if (!EFI_ERROR (Status)) {\r
-        NameString = DevicePathToText->ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);\r
-        if (NameString != NULL) {\r
-          StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);\r
-          mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
-          FreePool (NameString);\r
-          return;\r
-        }\r
+      NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);\r
+      if (NameString != NULL) {\r
+        StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);\r
+        mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
+        FreePool (NameString);\r
+        return;\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
index 6d48ae30a55ec013934a80fbbf372f6d871c9993..8c0890e85e8c29113a49637e775a78a28c52747e 100644 (file)
@@ -41,7 +41,7 @@
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf  \r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf  \r
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
index 665e4b6c80908fe50963588fb0a97b94dc79f093..d11ec13373c2b1b0454bf0cdbdef932c1109b384 100644 (file)
@@ -31,7 +31,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/TcgService.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DiskIo.h>\r
 #include <Protocol/TcgService.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DiskIo.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/FirmwareVolumeBlock.h>\r
 \r
 #include <Guid/MeasuredFvHob.h>\r
 #include <Protocol/FirmwareVolumeBlock.h>\r
 \r
 #include <Guid/MeasuredFvHob.h>\r
@@ -940,21 +939,14 @@ DxeTpmMeasureBootHandler (
     //    \r
     DEBUG_CODE_BEGIN ();\r
       CHAR16                            *ToText;\r
     //    \r
     DEBUG_CODE_BEGIN ();\r
       CHAR16                            *ToText;\r
-      EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevPathToText;\r
-      Status = gBS->LocateProtocol (\r
-                      &gEfiDevicePathToTextProtocolGuid,\r
-                      NULL,\r
-                      (VOID **) &DevPathToText\r
-                      );\r
-      if (!EFI_ERROR (Status)) {\r
-        ToText = DevPathToText->ConvertDevicePathToText (\r
-                                  DevicePathNode,\r
-                                  FALSE,\r
-                                  TRUE\r
-                                  );\r
-        if (ToText != NULL) {\r
-          DEBUG ((DEBUG_INFO, "The measured image path is %s.\n", ToText));\r
-        }\r
+      ToText = ConvertDevicePathToText (\r
+                 DevicePathNode,\r
+                 FALSE,\r
+                 TRUE\r
+                 );\r
+      if (ToText != NULL) {\r
+        DEBUG ((DEBUG_INFO, "The measured image path is %s.\n", ToText));\r
+        FreePool (ToText);\r
       }\r
     DEBUG_CODE_END ();\r
 \r
       }\r
     DEBUG_CODE_END ();\r
 \r
index 53b26b0284fa7177a3c3e0e1507d6dafb3835e46..8552c1299665038b5334cebe81a9826f18afde58 100644 (file)
@@ -6,7 +6,7 @@
 #  This external input must be validated carefully to avoid security issue like\r
 #  buffer overflow, integer overflow.\r
 #\r
 #  This external input must be validated carefully to avoid security issue like\r
 #  buffer overflow, integer overflow.\r
 #\r
-# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2013, Intel Corporation. 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
 # 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
@@ -60,4 +60,4 @@
   gEfiFirmwareVolumeBlockProtocolGuid   ## CONSUMES\r
   gEfiBlockIoProtocolGuid               ## CONSUMES\r
   gEfiDiskIoProtocolGuid                ## CONSUMES\r
   gEfiFirmwareVolumeBlockProtocolGuid   ## CONSUMES\r
   gEfiBlockIoProtocolGuid               ## CONSUMES\r
   gEfiDiskIoProtocolGuid                ## CONSUMES\r
-  gEfiDevicePathToTextProtocolGuid      ## SOMETIMES_CONSUMES (Only used in debug mode)\r
+\r
index 97bb077e2e568fef34c1d95d8e2fa54ed042505d..5b4171ddec1bca10281c91aadbbfab550827b6d8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The functions for access policy modification.\r
     \r
 /** @file\r
   The functions for access policy modification.\r
     \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2013, Intel Corporation. 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
 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
@@ -229,24 +229,10 @@ AddDevicePath (
   IN     VOID                                   *OpCodeHandle\r
   )\r
 {\r
   IN     VOID                                   *OpCodeHandle\r
   )\r
 {\r
-  EFI_STATUS                        Status;\r
   EFI_DEVICE_PATH_PROTOCOL          *Next;\r
   EFI_STRING_ID                     NameID;\r
   EFI_STRING                        DriverName;\r
   EFI_DEVICE_PATH_PROTOCOL          *Next;\r
   EFI_STRING_ID                     NameID;\r
   EFI_STRING                        DriverName;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathText;\r
 \r
 \r
-  //\r
-  // Locate device path to text protocol.\r
-  //\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &DevicePathText\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-  \r
   //\r
   // Get driver file name node.\r
   //\r
   //\r
   // Get driver file name node.\r
   //\r
@@ -259,7 +245,7 @@ AddDevicePath (
   //\r
   // Display the device path in form.\r
   //\r
   //\r
   // Display the device path in form.\r
   //\r
-  DriverName = DevicePathText->ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
+  DriverName = ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
   NameID = HiiSetString (mCallbackInfo->HiiHandle, 0, DriverName, NULL);\r
   FreePool (DriverName);\r
   if (NameID == 0) {\r
   NameID = HiiSetString (mCallbackInfo->HiiHandle, 0, DriverName, NULL);\r
   FreePool (DriverName);\r
   if (NameID == 0) {\r
index fc0efaa4f51864120580b9c3390c0abe02c8fffe..afa420ea7babd65046464d714a582752cb7e0b84 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header file for user profile manager driver.\r
     \r
 /** @file\r
   The header file for user profile manager driver.\r
     \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2013, Intel Corporation. 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
 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
@@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/MdeModuleHii.h>\r
 \r
 #include <Protocol/HiiConfigAccess.h>\r
 #include <Guid/MdeModuleHii.h>\r
 \r
 #include <Protocol/HiiConfigAccess.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/UserCredential2.h>\r
 #include <Protocol/UserManager.h>\r
 \r
 #include <Protocol/UserCredential2.h>\r
 #include <Protocol/UserManager.h>\r
 \r
index bd193232968ce2e6cf60f94a7d8a6adb43d1eac9..847aaa21566c72ac876d714f87209089a98c6230 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Component description file for user profile manager driver.\r
 #\r
 ## @file\r
 #  Component description file for user profile manager driver.\r
 #\r
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2013, Intel Corporation. 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
 # 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
@@ -45,6 +45,7 @@
   DebugLib\r
   HiiLib\r
   UefiLib\r
   DebugLib\r
   HiiLib\r
   UefiLib\r
+  DevicePathLib\r
   \r
   [Guids]\r
   gEfiIfrTianoGuid                              ## CONSUMES ## Guid\r
   \r
   [Guids]\r
   gEfiIfrTianoGuid                              ## CONSUMES ## Guid\r
@@ -58,7 +59,6 @@
   gEfiHiiConfigAccessProtocolGuid\r
   gEfiUserCredential2ProtocolGuid\r
   gEfiUserManagerProtocolGuid\r
   gEfiHiiConfigAccessProtocolGuid\r
   gEfiUserCredential2ProtocolGuid\r
   gEfiUserManagerProtocolGuid\r
-  gEfiDevicePathToTextProtocolGuid\r
 \r
 [Depex]\r
   gEfiUserManagerProtocolGuid
\ No newline at end of file
 \r
 [Depex]\r
   gEfiUserManagerProtocolGuid
\ No newline at end of file
index ae44626594f223abebfa407ebd0d8b9a2d8ddbd7..28c4d4f8b66d2be8dc33171a4b20aebdc554edee 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal function defines the default device path string for SecureBoot configuration module.\r
 \r
 /** @file\r
   Internal function defines the default device path string for SecureBoot configuration module.\r
 \r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2012 - 2013, Intel Corporation. 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
 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
@@ -14,1431 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "SecureBootConfigImpl.h"\r
 \r
 \r
 #include "SecureBootConfigImpl.h"\r
 \r
-/**\r
-  Concatenates a formatted unicode string to allocated pool.\r
-  The caller must free the resulting buffer.\r
-\r
-  @param[in, out]  Str      Tracks the allocated pool, size in use, and amount of pool allocated.\r
-  @param[in]       Fmt      The format string\r
-  @param[in]       ...      The data will be printed.\r
-\r
-  @return Allocated buffer with the formatted string printed in it.\r
-          The caller must free the allocated buffer.\r
-          The buffer allocation is not packed.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-CatPrint (\r
-  IN OUT POOL_PRINT   *Str,\r
-  IN CHAR16           *Fmt,\r
-  ...\r
-  )\r
-{\r
-  UINT16  *AppendStr;\r
-  VA_LIST Args;\r
-  UINTN   StringSize;\r
-\r
-  AppendStr = AllocateZeroPool (0x1000);\r
-  if (AppendStr == NULL) {\r
-    return Str->Str;\r
-  }\r
-\r
-  VA_START (Args, Fmt);\r
-  UnicodeVSPrint (AppendStr, 0x1000, Fmt, Args);\r
-  VA_END (Args);\r
-  if (NULL == Str->Str) {\r
-    StringSize   = StrSize (AppendStr);\r
-    Str->Str  = AllocateZeroPool (StringSize);\r
-    ASSERT (Str->Str != NULL);\r
-  } else {\r
-    StringSize = StrSize (AppendStr);\r
-    StringSize += (StrSize (Str->Str) - sizeof (UINT16));\r
-\r
-    Str->Str = ReallocatePool (\r
-                StrSize (Str->Str),\r
-                StringSize,\r
-                Str->Str\r
-                );\r
-    ASSERT (Str->Str != NULL);\r
-  }\r
-\r
-  Str->Maxlen = MAX_CHAR * sizeof (UINT16);\r
-  if (StringSize < Str->Maxlen) {\r
-    StrCat (Str->Str, AppendStr);\r
-    Str->Len = StringSize - sizeof (UINT16);\r
-  }\r
-\r
-  FreePool (AppendStr);\r
-  return Str->Str;\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathPci (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  PCI_DEVICE_PATH *Pci;\r
-\r
-  Pci = DevPath;\r
-  CatPrint (Str, L"Pci(%x|%x)", (UINTN) Pci->Device, (UINTN) Pci->Function);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathPccard (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  PCCARD_DEVICE_PATH  *Pccard;\r
-\r
-  Pccard = DevPath;\r
-  CatPrint (Str, L"Pcmcia(Function%x)", (UINTN) Pccard->FunctionNumber);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMemMap (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEMMAP_DEVICE_PATH  *MemMap;\r
-\r
-  MemMap = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"MemMap(%d:%lx-%lx)",\r
-    (UINTN) MemMap->MemoryType,\r
-    MemMap->StartingAddress,\r
-    MemMap->EndingAddress\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathController (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CONTROLLER_DEVICE_PATH  *Controller;\r
-\r
-  Controller = DevPath;\r
-  CatPrint (Str, L"Ctrl(%d)", (UINTN) Controller->ControllerNumber);\r
-}\r
-\r
-\r
-/**\r
-  Convert Vendor device path to device name.\r
-\r
-  @param[in, out]  Str      The buffer store device name\r
-  @param[in]       DevPath  Pointer to vendor device path\r
-\r
-**/\r
-VOID\r
-DevPathVendor (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  VENDOR_DEVICE_PATH  *Vendor;\r
-  CHAR16              *Type;\r
-  UINTN               DataLength;\r
-  UINTN               Index;\r
-  UINT32              FlowControlMap;\r
-\r
-  UINT16              Info;\r
-\r
-  Vendor  = DevPath;\r
-\r
-  switch (DevicePathType (&Vendor->Header)) {\r
-  case HARDWARE_DEVICE_PATH:\r
-    Type = L"Hw";\r
-    break;\r
-\r
-  case MESSAGING_DEVICE_PATH:\r
-    Type = L"Msg";\r
-    if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) {\r
-      CatPrint (Str, L"VenPcAnsi()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) {\r
-      CatPrint (Str, L"VenVt100()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) {\r
-      CatPrint (Str, L"VenVt100Plus()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {\r
-      CatPrint (Str, L"VenUft8()");\r
-      return ;\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid     )) {\r
-      FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);\r
-      switch (FlowControlMap & 0x00000003) {\r
-      case 0:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"None");\r
-        break;\r
-\r
-      case 1:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware");\r
-        break;\r
-\r
-      case 2:\r
-        CatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff");\r
-        break;\r
-\r
-      default:\r
-        break;\r
-      }\r
-\r
-      return ;\r
-\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) {\r
-      CatPrint (\r
-        Str,\r
-        L"SAS(%lx,%lx,%x,",\r
-        ((SAS_DEVICE_PATH *) Vendor)->SasAddress,\r
-        ((SAS_DEVICE_PATH *) Vendor)->Lun,\r
-        (UINTN) ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort\r
-        );\r
-      Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology);\r
-      if ((Info & 0x0f) == 0) {\r
-        CatPrint (Str, L"NoTopology,0,0,0,");\r
-      } else if (((Info & 0x0f) == 1) || ((Info & 0x0f) == 2)) {\r
-        CatPrint (\r
-          Str,\r
-          L"%s,%s,%s,",\r
-          ((Info & (0x1 << 4)) != 0) ? L"SATA" : L"SAS",\r
-          ((Info & (0x1 << 5)) != 0) ? L"External" : L"Internal",\r
-          ((Info & (0x1 << 6)) != 0) ? L"Expanded" : L"Direct"\r
-          );\r
-        if ((Info & 0x0f) == 1) {\r
-          CatPrint (Str, L"0,");\r
-        } else {\r
-          CatPrint (Str, L"%x,", (UINTN) ((Info >> 8) & 0xff));\r
-        }\r
-      } else {\r
-        CatPrint (Str, L"0,0,0,0,");\r
-      }\r
-\r
-      CatPrint (Str, L"%x)", (UINTN) ((SAS_DEVICE_PATH *) Vendor)->Reserved);\r
-      return ;\r
-\r
-    } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) {\r
-      CatPrint (Str, L"DebugPort()");\r
-      return ;\r
-    }\r
-    break;\r
-\r
-  case MEDIA_DEVICE_PATH:\r
-    Type = L"Media";\r
-    break;\r
-\r
-  default:\r
-    Type = L"?";\r
-    break;\r
-  }\r
-\r
-  CatPrint (Str, L"Ven%s(%g", Type, &Vendor->Guid);\r
-  DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH);\r
-  if (DataLength > 0) {\r
-    CatPrint (Str, L",");\r
-    for (Index = 0; Index < DataLength; Index++) {\r
-      CatPrint (Str, L"%02x", (UINTN) ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]);\r
-    }\r
-  }\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_HID_DEVICE_PATH  *Acpi;\r
-\r
-  Acpi = DevPath;\r
-  if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-    CatPrint (Str, L"Acpi(PNP%04x,%x)", (UINTN)  EISA_ID_TO_NUM (Acpi->HID), (UINTN) Acpi->UID);\r
-  } else {\r
-    CatPrint (Str, L"Acpi(%08x,%x)", (UINTN) Acpi->HID, (UINTN) Acpi->UID);\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathExtendedAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_EXTENDED_HID_DEVICE_PATH   *ExtendedAcpi;\r
-  \r
-  //\r
-  // Index for HID, UID and CID strings, 0 for non-exist\r
-  //\r
-  UINT16                          HIDSTRIdx;\r
-  UINT16                          UIDSTRIdx;\r
-  UINT16                          CIDSTRIdx;\r
-  UINT16                          Index;\r
-  UINT16                          Length;\r
-  UINT16                          Anchor;\r
-  CHAR8                           *AsChar8Array;\r
-\r
-  HIDSTRIdx    = 0;\r
-  UIDSTRIdx    = 0;\r
-  CIDSTRIdx    = 0;\r
-  ExtendedAcpi = DevPath;\r
-  Length       = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) ExtendedAcpi);\r
-\r
-  AsChar8Array = (CHAR8 *) ExtendedAcpi;\r
-\r
-  //\r
-  // find HIDSTR\r
-  //\r
-  Anchor = 16;\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    HIDSTRIdx = Anchor;\r
-  }\r
-  //\r
-  // find UIDSTR\r
-  //\r
-  Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    UIDSTRIdx = Anchor;\r
-  }\r
-  //\r
-  // find CIDSTR\r
-  //\r
-  Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
-    ;\r
-  }\r
-  if (Index > Anchor) {\r
-    CIDSTRIdx = Anchor;\r
-  }\r
-\r
-  if (HIDSTRIdx == 0 && CIDSTRIdx == 0 && ExtendedAcpi->UID == 0) {\r
-    CatPrint (Str, L"AcpiExp(");\r
-    if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->HID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID);\r
-    }\r
-    if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN)  EISA_ID_TO_NUM (ExtendedAcpi->CID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN)  ExtendedAcpi->CID);\r
-    }\r
-    if (UIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\")");\r
-    }\r
-  } else {\r
-    CatPrint (Str, L"AcpiEx(");\r
-    if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN)  EISA_ID_TO_NUM (ExtendedAcpi->HID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID);\r
-    }\r
-    if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {\r
-      CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->CID));\r
-    } else {\r
-      CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->CID);\r
-    }\r
-    CatPrint (Str, L"%x,", (UINTN) ExtendedAcpi->UID);\r
-\r
-    if (HIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a,", AsChar8Array + HIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\",");\r
-    }\r
-    if (CIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a,", AsChar8Array + CIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\",");\r
-    }\r
-    if (UIDSTRIdx != 0) {\r
-      CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);\r
-    } else {\r
-      CatPrint (Str, L"\"\")");\r
-    }\r
-  }\r
-\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAdrAcpi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ACPI_ADR_DEVICE_PATH    *AcpiAdr;\r
-  UINT16                  Index;\r
-  UINT16                  Length;\r
-  UINT16                  AdditionalAdrCount;\r
-\r
-  AcpiAdr            = DevPath;\r
-  Length             = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr);\r
-  AdditionalAdrCount = (UINT16) ((Length - 8) / 4);\r
-\r
-  CatPrint (Str, L"AcpiAdr(%x", (UINTN) AcpiAdr->ADR);\r
-  for (Index = 0; Index < AdditionalAdrCount; Index++) {\r
-    CatPrint (Str, L",%x", (UINTN) *(UINT32 *) ((UINT8 *) AcpiAdr + 8 + Index * 4));\r
-  }\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathAtapi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ATAPI_DEVICE_PATH *Atapi;\r
-\r
-  Atapi = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Ata(%s,%s)",\r
-    (Atapi->PrimarySecondary != 0)? L"Secondary" : L"Primary",\r
-    (Atapi->SlaveMaster != 0)? L"Slave" : L"Master"\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathScsi (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  SCSI_DEVICE_PATH  *Scsi;\r
-\r
-  Scsi = DevPath;\r
-  CatPrint (Str, L"Scsi(Pun%x,Lun%x)", (UINTN) Scsi->Pun, (UINTN) Scsi->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-  \r
-**/\r
-VOID\r
-DevPathFibre (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  FIBRECHANNEL_DEVICE_PATH  *Fibre;\r
-\r
-  Fibre = DevPath;\r
-  CatPrint (Str, L"Fibre(Wwn%lx,Lun%x)", Fibre->WWN, Fibre->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPath1394 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  F1394_DEVICE_PATH *F1394Path;\r
-\r
-  F1394Path = DevPath;\r
-  CatPrint (Str, L"1394(%lx)", &F1394Path->Guid);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-  \r
-**/\r
-VOID\r
-DevPathUsb (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_DEVICE_PATH *Usb;\r
-\r
-  Usb = DevPath;\r
-  CatPrint (Str, L"Usb(%x,%x)", (UINTN) Usb->ParentPortNumber, (UINTN) Usb->InterfaceNumber);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsbWWID (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_WWID_DEVICE_PATH  *UsbWWId;\r
-\r
-  UsbWWId = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"UsbWwid(%x,%x,%x,\"WWID\")",\r
-    (UINTN) UsbWWId->VendorId,\r
-    (UINTN) UsbWWId->ProductId,\r
-    (UINTN) UsbWWId->InterfaceNumber\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathLogicalUnit (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit;\r
-\r
-  LogicalUnit = DevPath;\r
-  CatPrint (Str, L"Unit(%x)", (UINTN) LogicalUnit->Lun);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUsbClass (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  USB_CLASS_DEVICE_PATH *UsbClass;\r
-\r
-  UsbClass = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Usb Class(%x,%x,%x,%x,%x)",\r
-    (UINTN) UsbClass->VendorId,\r
-    (UINTN) UsbClass->ProductId,\r
-    (UINTN) UsbClass->DeviceClass,\r
-    (UINTN) UsbClass->DeviceSubClass,\r
-    (UINTN) UsbClass->DeviceProtocol\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathSata (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  SATA_DEVICE_PATH *Sata;\r
-\r
-  Sata = DevPath;\r
-  if ((Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) != 0) {\r
-    CatPrint (\r
-      Str,\r
-      L"Sata(%x,%x)",\r
-      (UINTN) Sata->HBAPortNumber,\r
-      (UINTN) Sata->Lun\r
-      );\r
-  } else {\r
-    CatPrint (\r
-      Str,\r
-      L"Sata(%x,%x,%x)",\r
-      (UINTN) Sata->HBAPortNumber,\r
-      (UINTN) Sata->PortMultiplierPortNumber,\r
-      (UINTN) Sata->Lun\r
-      );\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathI2O (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  I2O_DEVICE_PATH *I2OPath;\r
-\r
-  I2OPath = DevPath;\r
-  CatPrint (Str, L"I2O(%x)", (UINTN) I2OPath->Tid);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMacAddr (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MAC_ADDR_DEVICE_PATH  *MACDevPath;\r
-  UINTN                 HwAddressSize;\r
-  UINTN                 Index;\r
-\r
-  MACDevPath           = DevPath;\r
-\r
-  HwAddressSize = sizeof (EFI_MAC_ADDRESS);\r
-  if (MACDevPath->IfType == 0x01 || MACDevPath->IfType == 0x00) {\r
-    HwAddressSize = 6;\r
-  }\r
-\r
-  CatPrint (Str, L"Mac(");\r
-\r
-  for (Index = 0; Index < HwAddressSize; Index++) {\r
-    CatPrint (Str, L"%02x", (UINTN) MACDevPath->MacAddress.Addr[Index]);\r
-  }\r
-\r
-  CatPrint (Str, L")");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathIPv4 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  IPv4_DEVICE_PATH  *IPDevPath;\r
-\r
-  IPDevPath = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"IPv4(%d.%d.%d.%d:%d)",\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[0],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[1],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[2],\r
-    (UINTN) IPDevPath->RemoteIpAddress.Addr[3],\r
-    (UINTN) IPDevPath->RemotePort\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathIPv6 (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  IPv6_DEVICE_PATH  *IPv6DevPath;\r
-\r
-  IPv6DevPath = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x)",\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[0],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[1],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[2],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[3],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[4],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[5],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[6],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[7],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[8],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[9],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[10],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[11],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[12],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[13],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[14],\r
-    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[15]\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathInfiniBand (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  INFINIBAND_DEVICE_PATH  *InfiniBand;\r
-\r
-  InfiniBand = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Infiniband(%x,%g,%lx,%lx,%lx)",\r
-    (UINTN) InfiniBand->ResourceFlags,\r
-    InfiniBand->PortGid,\r
-    InfiniBand->ServiceId,\r
-    InfiniBand->TargetPortId,\r
-    InfiniBand->DeviceId\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathUart (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  UART_DEVICE_PATH  *Uart;\r
-  CHAR8             Parity;\r
-\r
-  Uart = DevPath;\r
-  switch (Uart->Parity) {\r
-  case 0:\r
-    Parity = 'D';\r
-    break;\r
-\r
-  case 1:\r
-    Parity = 'N';\r
-    break;\r
-\r
-  case 2:\r
-    Parity = 'E';\r
-    break;\r
-\r
-  case 3:\r
-    Parity = 'O';\r
-    break;\r
-\r
-  case 4:\r
-    Parity = 'M';\r
-    break;\r
-\r
-  case 5:\r
-    Parity = 'S';\r
-    break;\r
-\r
-  default:\r
-    Parity = 'x';\r
-    break;\r
-  }\r
-\r
-  if (Uart->BaudRate == 0) {\r
-    CatPrint (Str, L"Uart(DEFAULT,%c,", Parity);\r
-  } else {\r
-    CatPrint (Str, L"Uart(%ld,%c,", Uart->BaudRate, Parity);\r
-  }\r
-\r
-  if (Uart->DataBits == 0) {\r
-    CatPrint (Str, L"D,");\r
-  } else {\r
-    CatPrint (Str, L"%d,", (UINTN) Uart->DataBits);\r
-  }\r
-\r
-  switch (Uart->StopBits) {\r
-  case 0:\r
-    CatPrint (Str, L"D)");\r
-    break;\r
-\r
-  case 1:\r
-    CatPrint (Str, L"1)");\r
-    break;\r
-\r
-  case 2:\r
-    CatPrint (Str, L"1.5)");\r
-    break;\r
-\r
-  case 3:\r
-    CatPrint (Str, L"2)");\r
-    break;\r
-\r
-  default:\r
-    CatPrint (Str, L"x)");\r
-    break;\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathiSCSI (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  ISCSI_DEVICE_PATH_WITH_NAME *IScsi;\r
-  UINT16                      Options;\r
-\r
-  IScsi = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"iSCSI(%a,%x,%lx,",\r
-    IScsi->TargetName,\r
-    (UINTN) IScsi->TargetPortalGroupTag,\r
-    IScsi->Lun\r
-    );\r
-\r
-  Options = IScsi->LoginOption;\r
-  CatPrint (Str, L"%s,", (((Options >> 1) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
-  CatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
-  if (((Options >> 11) & 0x0001) != 0) {\r
-    CatPrint (Str, L"%s,", L"None");\r
-  } else if (((Options >> 12) & 0x0001) != 0) {\r
-    CatPrint (Str, L"%s,", L"CHAP_UNI");\r
-  } else {\r
-    CatPrint (Str, L"%s,", L"CHAP_BI");\r
-\r
-  }\r
-\r
-  CatPrint (Str, L"%s)", (IScsi->NetworkProtocol == 0) ? L"TCP" : L"reserved");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathVlan (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  VLAN_DEVICE_PATH  *Vlan;\r
-\r
-  Vlan = DevPath;\r
-  CatPrint (Str, L"Vlan(%d)", (UINTN) Vlan->VlanId);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathHardDrive (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  HARDDRIVE_DEVICE_PATH *Hd;\r
-\r
-  Hd = DevPath;\r
-  switch (Hd->SignatureType) {\r
-  case SIGNATURE_TYPE_MBR:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,Sig%08x)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (UINTN) *((UINT32 *) (&(Hd->Signature[0])))\r
-      );\r
-    break;\r
-\r
-  case SIGNATURE_TYPE_GUID:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,Sig%g)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (EFI_GUID *) &(Hd->Signature[0])\r
-      );\r
-    break;\r
-\r
-  default:\r
-    CatPrint (\r
-      Str,\r
-      L"HD(Part%d,MBRType=%02x,SigType=%02x)",\r
-      (UINTN) Hd->PartitionNumber,\r
-      (UINTN) Hd->MBRType,\r
-      (UINTN) Hd->SignatureType\r
-      );\r
-    break;\r
-  }\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathCDROM (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CDROM_DEVICE_PATH *Cd;\r
-\r
-  Cd = DevPath;\r
-  CatPrint (Str, L"CDROM(Entry%x)", (UINTN) Cd->BootEntry);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFilePath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  FILEPATH_DEVICE_PATH  *Fp;\r
-\r
-  Fp = DevPath;\r
-  CatPrint (Str, L"%s", Fp->PathName);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathMediaProtocol (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_PROTOCOL_DEVICE_PATH  *MediaProt;\r
-\r
-  MediaProt = DevPath;\r
-  CatPrint (Str, L"Media(%g)", &MediaProt->Protocol);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFvFilePath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFilePath;\r
-\r
-  FvFilePath = DevPath;\r
-  CatPrint (Str, L"%g", &FvFilePath->FvFileName);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathRelativeOffsetRange (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r
-\r
-  Offset = DevPath;\r
-  CatPrint (\r
-    Str,\r
-    L"Offset(%lx,%lx)",\r
-    Offset->StartingOffset,\r
-    Offset->EndingOffset\r
-    );\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathBssBss (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  BBS_BBS_DEVICE_PATH *Bbs;\r
-  CHAR16              *Type;\r
-\r
-  Bbs = DevPath;\r
-  switch (Bbs->DeviceType) {\r
-  case BBS_TYPE_FLOPPY:\r
-    Type = L"Floppy";\r
-    break;\r
-\r
-  case BBS_TYPE_HARDDRIVE:\r
-    Type = L"Harddrive";\r
-    break;\r
-\r
-  case BBS_TYPE_CDROM:\r
-    Type = L"CDROM";\r
-    break;\r
-\r
-  case BBS_TYPE_PCMCIA:\r
-    Type = L"PCMCIA";\r
-    break;\r
-\r
-  case BBS_TYPE_USB:\r
-    Type = L"Usb";\r
-    break;\r
-\r
-  case BBS_TYPE_EMBEDDED_NETWORK:\r
-    Type = L"Net";\r
-    break;\r
-\r
-  case BBS_TYPE_BEV:\r
-    Type = L"BEV";\r
-    break;\r
-\r
-  default:\r
-    Type = L"?";\r
-    break;\r
-  }\r
-  CatPrint (Str, L"Legacy-%s", Type);\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathEndInstance (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CatPrint (Str, L",");\r
-}\r
-\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathNodeUnknown (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  CatPrint (Str, L"?");\r
-}\r
-/**\r
-  Convert Device Path to a Unicode string for printing.\r
-\r
-  @param[in, out] Str           The buffer holding the output string.\r
-                                This buffer contains the length of the string and \r
-                                the maixmum length reserved for the string buffer.\r
-  @param[in]      DevPath       The device path.\r
-\r
-**/\r
-VOID\r
-DevPathFvPath (\r
-  IN OUT POOL_PRINT       *Str,\r
-  IN VOID                 *DevPath\r
-  )\r
-{\r
-  MEDIA_FW_VOL_DEVICE_PATH *FvPath;\r
-\r
-  FvPath = DevPath;\r
-  CatPrint (Str, L"Fv(%g)", &FvPath->FvName);\r
-}\r
-\r
-DEVICE_PATH_STRING_TABLE  DevPathTable[] = {\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_PCI_DP,\r
-    DevPathPci\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_PCCARD_DP,\r
-    DevPathPccard\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_MEMMAP_DP,\r
-    DevPathMemMap\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_CONTROLLER_DP,\r
-    DevPathController\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_DP,\r
-    DevPathAcpi\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_EXTENDED_DP,\r
-    DevPathExtendedAcpi\r
-  },\r
-  {\r
-    ACPI_DEVICE_PATH,\r
-    ACPI_ADR_DP,\r
-    DevPathAdrAcpi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_ATAPI_DP,\r
-    DevPathAtapi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_SCSI_DP,\r
-    DevPathScsi\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_FIBRECHANNEL_DP,\r
-    DevPathFibre\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_1394_DP,\r
-    DevPath1394\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_DP,\r
-    DevPathUsb\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_WWID_DP,\r
-    DevPathUsbWWID\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_DEVICE_LOGICAL_UNIT_DP,\r
-    DevPathLogicalUnit\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_USB_CLASS_DP,\r
-    DevPathUsbClass\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_SATA_DP,\r
-    DevPathSata\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_I2O_DP,\r
-    DevPathI2O\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_MAC_ADDR_DP,\r
-    DevPathMacAddr\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_IPv4_DP,\r
-    DevPathIPv4\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_IPv6_DP,\r
-    DevPathIPv6\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_INFINIBAND_DP,\r
-    DevPathInfiniBand\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_UART_DP,\r
-    DevPathUart\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_ISCSI_DP,\r
-    DevPathiSCSI\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VLAN_DP,\r
-    DevPathVlan\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_HARDDRIVE_DP,\r
-    DevPathHardDrive\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_CDROM_DP,\r
-    DevPathCDROM\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_VENDOR_DP,\r
-    DevPathVendor\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_FILEPATH_DP,\r
-    DevPathFilePath\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PROTOCOL_DP,\r
-    DevPathMediaProtocol\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PIWG_FW_VOL_DP,\r
-    DevPathFvPath,\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_PIWG_FW_FILE_DP,\r
-    DevPathFvFilePath\r
-  },\r
-  {\r
-    MEDIA_DEVICE_PATH,\r
-    MEDIA_RELATIVE_OFFSET_RANGE_DP,\r
-    DevPathRelativeOffsetRange,\r
-  },\r
-  {\r
-    BBS_DEVICE_PATH,\r
-    BBS_BBS_DP,\r
-    DevPathBssBss\r
-  },\r
-  {\r
-    END_DEVICE_PATH_TYPE,\r
-    END_INSTANCE_DEVICE_PATH_SUBTYPE,\r
-    DevPathEndInstance\r
-  },\r
-  {\r
-    0,\r
-    0,\r
-    NULL\r
-  }\r
-};\r
-\r
 \r
 /**\r
   This function converts an input device structure to a Unicode string.\r
 \r
 /**\r
   This function converts an input device structure to a Unicode string.\r
@@ -1454,84 +29,10 @@ DevicePathToStr (
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
   IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   )\r
 {\r
-  POOL_PRINT                Str;\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevPathNode;\r
-  VOID (*DumpNode) (POOL_PRINT *, VOID *);\r
-\r
-  UINTN Index;\r
-  UINTN NewSize;\r
-\r
-  EFI_STATUS                       Status;\r
-  CHAR16                           *ToText;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;\r
-\r
-  ZeroMem (&Str, sizeof (Str));\r
-\r
-  if (DevPath == NULL) {\r
-    goto Done;\r
-  }\r
-\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &DevPathToText\r
-                  );\r
-  if (!EFI_ERROR (Status)) {\r
-    ToText = DevPathToText->ConvertDevicePathToText (\r
-                              DevPath,\r
-                              FALSE,\r
-                              TRUE\r
-                              );\r
-    ASSERT (ToText != NULL);\r
-    return ToText;\r
-  }\r
-\r
-  //\r
-  // Process each device path node\r
-  //\r
-  DevPathNode = DevPath;\r
-  while (!IsDevicePathEnd (DevPathNode)) {\r
-    //\r
-    // Find the handler to dump this device path node\r
-    //\r
-    DumpNode = NULL;\r
-    for (Index = 0; DevPathTable[Index].Function != NULL; Index += 1) {\r
-\r
-      if (DevicePathType (DevPathNode) == DevPathTable[Index].Type &&\r
-          DevicePathSubType (DevPathNode) == DevPathTable[Index].SubType\r
-          ) {\r
-        DumpNode = DevPathTable[Index].Function;\r
-        break;\r
-      }\r
-    }\r
-    //\r
-    // If not found, use a generic function\r
-    //\r
-    if (!DumpNode) {\r
-      DumpNode = DevPathNodeUnknown;\r
-    }\r
-    //\r
-    //  Put a path seperator in if needed\r
-    //\r
-    if ((Str.Len != 0) && (DumpNode != DevPathEndInstance)) {\r
-      CatPrint (&Str, L"/");\r
-    }\r
-    //\r
-    // Print this node of the device path\r
-    //\r
-    DumpNode (&Str, DevPathNode);\r
-\r
-    //\r
-    // Next device path node\r
-    //\r
-    DevPathNode = NextDevicePathNode (DevPathNode);\r
-  }\r
-\r
-Done:\r
-  NewSize = (Str.Len + 1) * sizeof (CHAR16);\r
-  Str.Str = ReallocatePool (NewSize, NewSize, Str.Str);\r
-  ASSERT (Str.Str != NULL);\r
-  Str.Str[Str.Len] = 0;\r
-  return Str.Str;\r
+  return ConvertDevicePathToText (\r
+           DevPath,\r
+           FALSE,\r
+           TRUE\r
+           );\r
 }\r
 \r
 }\r
 \r
index a0f497f559fc8e73cb3ea83df053eda5ff3815b4..071ca30338d54d24a85d1c6107a4c7328dccc46a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Component name for SecureBoot configuration module.\r
 #\r
 ## @file\r
 #  Component name for SecureBoot configuration module.\r
 #\r
-# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2013, Intel Corporation. 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
 # 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
@@ -53,7 +53,8 @@
   UefiHiiServicesLib\r
   DebugLib\r
   HiiLib\r
   UefiHiiServicesLib\r
   DebugLib\r
   HiiLib\r
-  PlatformSecureLib  \r
+  PlatformSecureLib\r
+  DevicePathLib\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid\r
   gEfiImageSecurityDatabaseGuid                 ## CONSUMES\r
   gEfiFileSystemVolumeLabelInfoIdGuid           ## CONSUMES\r
   gEfiGlobalVariableGuid                        ## PRODUCES ## Variable Guid\r
   gEfiImageSecurityDatabaseGuid                 ## CONSUMES\r
   gEfiFileSystemVolumeLabelInfoIdGuid           ## CONSUMES\r
   gEfiGlobalVariableGuid                        ## PRODUCES ## Variable Guid\r
-  gEfiVT100PlusGuid                             ## CONSUMES ## GUID (The type of terminal)\r
-  gEfiVT100Guid                                 ## CONSUMES ## GUID (The type of terminal)\r
-                                                ## CONSUMES ## GUID HOB (The hob holding memory type information)\r
-  gEfiVTUTF8Guid                                ## CONSUMES ## GUID (The type of terminal)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"BootXX" (Boot option variable)\r
-                                                ## CONSUMES           ## Variable:L"Timeout" (The time out value in second of showing progress bar)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"BootOrder" (The boot option array)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" (The driver order list)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ConIn" (The device path of console in device)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device)\r
-                                                ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID\r
-  gEfiPcAnsiGuid                                ## CONSUMES ## GUID (The type of terminal)\r
-  gEfiUartDevicePathGuid                        ## CONSUMES ## GUID (Identify the device path for UARD device)\r
-  gEfiSasDevicePathGuid                         ## CONSUMES ## GUID (Identify the device path for SAS device)\r
 \r
 [Protocols]\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
 \r
 [Protocols]\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
@@ -92,8 +79,6 @@
   gEfiLoadFileProtocolGuid                      ## PROTOCOL CONSUMES\r
   gEfiBlockIoProtocolGuid                       ## PROTOCOL CONSUMES\r
   gEfiDevicePathProtocolGuid                    ## PROTOCOL CONSUMES\r
   gEfiLoadFileProtocolGuid                      ## PROTOCOL CONSUMES\r
   gEfiBlockIoProtocolGuid                       ## PROTOCOL CONSUMES\r
   gEfiDevicePathProtocolGuid                    ## PROTOCOL CONSUMES\r
-  gEfiDevicePathToTextProtocolGuid\r
-  gEfiDebugPortProtocolGuid\r
 \r
 [Depex]\r
   gEfiHiiConfigRoutingProtocolGuid  AND\r
 \r
 [Depex]\r
   gEfiHiiConfigRoutingProtocolGuid  AND\r
index 5a5ac12426a92a2c613acaf2ad8ca3ff3c2fc919..f87afbe709b9155458cbe91442ebf3cad3073320 100644 (file)
@@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SimpleFileSystem.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/DebugPort.h>\r
 #include <Protocol/LoadFile.h>\r
 \r
 #include <Protocol/DebugPort.h>\r
 #include <Protocol/LoadFile.h>\r
 \r
index 756e84137e31b24ddfe40e3527ecfcc3ebb46af9..c3af617430d54633351744cf49bfd91ae576e3a1 100644 (file)
@@ -1,7 +1,7 @@
 ##  @file\r
 #  This is the shell application\r
 #\r
 ##  @file\r
 #  This is the shell application\r
 #\r
-#  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -93,7 +93,6 @@
   gEfiComponentName2ProtocolGuid                          # ALWAYS_CONSUMED\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
   gEfiDevicePathProtocolGuid                              # ALWAYS_CONSUMED\r
   gEfiComponentName2ProtocolGuid                          # ALWAYS_CONSUMED\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
   gEfiDevicePathProtocolGuid                              # ALWAYS_CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                        # ALWAYS_CONSUMED\r
 \r
 [Pcd]\r
   gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel         # ALWAYS_CONSUMED\r
 \r
 [Pcd]\r
   gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel         # ALWAYS_CONSUMED\r
index df4874a23cf0df1fed392f27e23731c9bf9eda2d..d39114f50e08f1bd56554146b2bea86ed0206f80 100644 (file)
@@ -115,27 +115,18 @@ InternalShellProtocolDebugPrintMessage (
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
   )\r
 {\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
   )\r
 {\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToText;\r
   EFI_STATUS                        Status;\r
   CHAR16                            *Temp;\r
 \r
   EFI_STATUS                        Status;\r
   CHAR16                            *Temp;\r
 \r
-  Status = EFI_SUCCESS;\r
   DEBUG_CODE_BEGIN();\r
   DEBUG_CODE_BEGIN();\r
-  DevicePathToText = NULL;\r
 \r
 \r
-  Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid,\r
-                               NULL,\r
-                               (VOID**)&DevicePathToText);\r
   if (Mapping != NULL) {\r
     DEBUG((EFI_D_INFO, "Added new map item:\"%S\"\r\n", Mapping));\r
   }\r
   if (Mapping != NULL) {\r
     DEBUG((EFI_D_INFO, "Added new map item:\"%S\"\r\n", Mapping));\r
   }\r
-  if (!EFI_ERROR(Status)) {\r
-    if (DevicePath != NULL) {\r
-      Temp = DevicePathToText->ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
-      DEBUG((EFI_D_INFO, "DevicePath: %S\r\n", Temp));\r
-      FreePool(Temp);\r
-    }\r
-  }\r
+  Temp = ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
+  DEBUG((EFI_D_INFO, "DevicePath: %S\r\n", Temp));\r
+  FreePool(Temp);\r
+\r
   DEBUG_CODE_END();\r
   return (Status);\r
 }\r
   DEBUG_CODE_END();\r
   return (Status);\r
 }\r
@@ -647,7 +638,6 @@ EfiShellGetDeviceName(
 {\r
   EFI_STATUS                        Status;\r
   EFI_COMPONENT_NAME2_PROTOCOL      *CompName2;\r
 {\r
   EFI_STATUS                        Status;\r
   EFI_COMPONENT_NAME2_PROTOCOL      *CompName2;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToText;\r
   EFI_DEVICE_PATH_PROTOCOL          *DevicePath;\r
   EFI_HANDLE                        *HandleList;\r
   UINTN                             HandleCount;\r
   EFI_DEVICE_PATH_PROTOCOL          *DevicePath;\r
   EFI_HANDLE                        *HandleList;\r
   UINTN                             HandleCount;\r
@@ -815,28 +805,19 @@ EfiShellGetDeviceName(
     }\r
   }\r
   if ((Flags & EFI_DEVICE_NAME_USE_DEVICE_PATH) != 0) {\r
     }\r
   }\r
   if ((Flags & EFI_DEVICE_NAME_USE_DEVICE_PATH) != 0) {\r
-    Status = gBS->LocateProtocol(\r
-      &gEfiDevicePathToTextProtocolGuid,\r
+    Status = gBS->OpenProtocol(\r
+      DeviceHandle,\r
+      &gEfiDevicePathProtocolGuid,\r
+      (VOID**)&DevicePath,\r
+      gImageHandle,\r
       NULL,\r
       NULL,\r
-      (VOID**)&DevicePathToText);\r
-    //\r
-    // we now have the device path to text protocol\r
-    //\r
+      EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
     if (!EFI_ERROR(Status)) {\r
     if (!EFI_ERROR(Status)) {\r
-      Status = gBS->OpenProtocol(\r
-        DeviceHandle,\r
-        &gEfiDevicePathProtocolGuid,\r
-        (VOID**)&DevicePath,\r
-        gImageHandle,\r
-        NULL,\r
-        EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
-      if (!EFI_ERROR(Status)) {\r
-        //\r
-        // use device path to text on the device path\r
-        //\r
-        *BestDeviceName = DevicePathToText->ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
-        return (EFI_SUCCESS);\r
-      }\r
+      //\r
+      // use device path to text on the device path\r
+      //\r
+      *BestDeviceName = ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
+      return (EFI_SUCCESS);\r
     }\r
   }\r
   //\r
     }\r
   }\r
   //\r
@@ -1583,11 +1564,11 @@ EfiShellExecute(
   DevPath = AppendDevicePath (ShellInfoObject.ImageDevPath, ShellInfoObject.FileDevPath);\r
 \r
   DEBUG_CODE_BEGIN();\r
   DevPath = AppendDevicePath (ShellInfoObject.ImageDevPath, ShellInfoObject.FileDevPath);\r
 \r
   DEBUG_CODE_BEGIN();\r
-  Temp = gDevPathToText->ConvertDevicePathToText(ShellInfoObject.FileDevPath, TRUE, TRUE);\r
+  Temp = ConvertDevicePathToText(ShellInfoObject.FileDevPath, TRUE, TRUE);\r
   FreePool(Temp);\r
   FreePool(Temp);\r
-  Temp = gDevPathToText->ConvertDevicePathToText(ShellInfoObject.ImageDevPath, TRUE, TRUE);\r
+  Temp = ConvertDevicePathToText(ShellInfoObject.ImageDevPath, TRUE, TRUE);\r
   FreePool(Temp);\r
   FreePool(Temp);\r
-  Temp = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, TRUE);\r
+  Temp = ConvertDevicePathToText(DevPath, TRUE, TRUE);\r
   FreePool(Temp);\r
   DEBUG_CODE_END();\r
 \r
   FreePool(Temp);\r
   DEBUG_CODE_END();\r
 \r
index 0f4f503410f4474fbab4647f3483fff0b58b8ac0..13d526edf7e8dc15565e928a02b2b94ccc2715eb 100644 (file)
@@ -4,7 +4,7 @@
   This library is for use ONLY by shell commands linked into the shell application.\r
   This library will not funciton if it is used for UEFI Shell 2.0 Applications.\r
 \r
   This library is for use ONLY by shell commands linked into the shell application.\r
   This library will not funciton if it is used for UEFI Shell 2.0 Applications.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, Intel Corporation. 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
   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
@@ -24,7 +24,6 @@
 #include <Protocol/EfiShell.h>\r
 #include <Protocol/EfiShellParameters.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/EfiShell.h>\r
 #include <Protocol/EfiShellParameters.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
@@ -33,7 +32,6 @@
 // The extern global protocol poionters.\r
 //\r
 extern        EFI_UNICODE_COLLATION_PROTOCOL    *gUnicodeCollation;\r
 // The extern global protocol poionters.\r
 //\r
 extern        EFI_UNICODE_COLLATION_PROTOCOL    *gUnicodeCollation;\r
-extern        EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *gDevPathToText;\r
 extern        CONST CHAR16*                     SupportLevel[];\r
 \r
 //\r
 extern        CONST CHAR16*                     SupportLevel[];\r
 \r
 //\r
index 89c9919e037a4ed7944a2f967fe08f465c35b10d..57c81288da875d7406e2ebf2f8d0812863be611f 100644 (file)
@@ -31,7 +31,6 @@
 #include <Protocol/DriverBinding.h>\r
 #include <Protocol/ComponentName2.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/DriverBinding.h>\r
 #include <Protocol/ComponentName2.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Guid/Performance.h>\r
 \r
 \r
 #include <Guid/Performance.h>\r
 \r
@@ -204,7 +203,6 @@ GetNameFromHandle (
   UINTN                       StringSize;\r
   CHAR8                       *PlatformLanguage;\r
   EFI_COMPONENT_NAME2_PROTOCOL      *ComponentName2;\r
   UINTN                       StringSize;\r
   CHAR8                       *PlatformLanguage;\r
   EFI_COMPONENT_NAME2_PROTOCOL      *ComponentName2;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToText;\r
 \r
   //\r
   // Method 1: Get the name string from image PDB\r
 \r
   //\r
   // Method 1: Get the name string from image PDB\r
@@ -320,19 +318,12 @@ GetNameFromHandle (
       //\r
       // Method 5: Get the name string from image DevicePath\r
       //\r
       //\r
       // Method 5: Get the name string from image DevicePath\r
       //\r
-      Status = gBS->LocateProtocol (\r
-                      &gEfiDevicePathToTextProtocolGuid,\r
-                      NULL,\r
-                      (VOID **) &DevicePathToText\r
-                      );\r
-      if (!EFI_ERROR (Status)) {\r
-        NameString = DevicePathToText->ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);\r
-        if (NameString != NULL) {\r
-          StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);\r
-          mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
-          FreePool (NameString);\r
-          return;\r
-        }\r
+      NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);\r
+      if (NameString != NULL) {\r
+        StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);\r
+        mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
+        FreePool (NameString);\r
+        return;\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
index 2cec991483f9ced6c7ffc6fd0c40fc3c085b1d45..d16f55fe02ff9b55e4d65acffeeeea36dfb63d89 100644 (file)
@@ -25,7 +25,6 @@ extern EFI_GUID gDpHiiGuid;
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index cb53a594966ed81d34bf456e30e8fa3e65bc3b2c..9488a49813a13676a995d29477d2b3cf715d4e4c 100644 (file)
   UefiBootServicesTableLib\r
   SortLib\r
   PrintLib\r
   UefiBootServicesTableLib\r
   SortLib\r
   PrintLib\r
+  DevicePathLib\r
 \r
 [Protocols]\r
   gEfiLoadedImageProtocolGuid                             # ALWAYS_CONSUMED\r
   gEfiDriverBindingProtocolGuid                           # SOMETIMES_CONSUMED\r
   gEfiComponentName2ProtocolGuid                          # SOMETIMES_CONSUMED\r
   gEfiLoadedImageDevicePathProtocolGuid                   # SOMETIMES_CONSUMED\r
 \r
 [Protocols]\r
   gEfiLoadedImageProtocolGuid                             # ALWAYS_CONSUMED\r
   gEfiDriverBindingProtocolGuid                           # SOMETIMES_CONSUMED\r
   gEfiComponentName2ProtocolGuid                          # SOMETIMES_CONSUMED\r
   gEfiLoadedImageDevicePathProtocolGuid                   # SOMETIMES_CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                        # SOMETIMES_CONSUMED\r
 \r
 [Pcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize\r
 \r
 [Pcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize\r
index 45ee9bd5d00164ff7f7cfbcf19a0b1fed062ce65..0c78d0da20253d98d42802c5c8c5b6efd1aae9c9 100644 (file)
@@ -414,19 +414,15 @@ DevicePathProtocolDumpInformation(
   CHAR16                            *Temp;\r
   CHAR16                            *Temp2;\r
   EFI_STATUS                        Status;\r
   CHAR16                            *Temp;\r
   CHAR16                            *Temp2;\r
   EFI_STATUS                        Status;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevPathToText;\r
   Temp = NULL;\r
 \r
   Temp = NULL;\r
 \r
-  Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID**)&DevPathToText);\r
+  Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
   if (!EFI_ERROR(Status)) {\r
   if (!EFI_ERROR(Status)) {\r
-    Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
-    if (!EFI_ERROR(Status)) {\r
-      //\r
-      // I cannot decide whether to allow shortcuts here (the second BOOLEAN on the next line)\r
-      //\r
-      Temp = DevPathToText->ConvertDevicePathToText(DevPath, TRUE, TRUE);\r
-      gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);\r
-    }\r
+    //\r
+    // I cannot decide whether to allow shortcuts here (the second BOOLEAN on the next line)\r
+    //\r
+    Temp = ConvertDevicePathToText(DevPath, TRUE, TRUE);\r
+    gBS->CloseProtocol(TheHandle, &gEfiDevicePathProtocolGuid, gImageHandle, NULL);\r
   }\r
   if (!Verbose && Temp != NULL && StrLen(Temp) > 30) {\r
     Temp2 = NULL;\r
   }\r
   if (!Verbose && Temp != NULL && StrLen(Temp) > 30) {\r
     Temp2 = NULL;\r
index 88c78ee15e3d6feef6144e3f3615f7b0e3a61a13..935e8397fed3550655a1f54d3371a098fe0e6167 100644 (file)
@@ -30,7 +30,6 @@ STATIC BUFFER_LIST                        mFileHandleList;
 \r
 // global variables required by library class.\r
 EFI_UNICODE_COLLATION_PROTOCOL    *gUnicodeCollation            = NULL;\r
 \r
 // global variables required by library class.\r
 EFI_UNICODE_COLLATION_PROTOCOL    *gUnicodeCollation            = NULL;\r
-EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *gDevPathToText               = NULL;\r
 SHELL_MAP_LIST                    gShellMapList;\r
 SHELL_MAP_LIST                    *gShellCurDir                 = NULL;\r
 \r
 SHELL_MAP_LIST                    gShellMapList;\r
 SHELL_MAP_LIST                    *gShellCurDir                 = NULL;\r
 \r
@@ -58,12 +57,6 @@ CommandInit(
       return (EFI_DEVICE_ERROR);\r
     }\r
   }\r
       return (EFI_DEVICE_ERROR);\r
     }\r
   }\r
-  if (gDevPathToText == NULL) {\r
-    Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID**)&gDevPathToText);\r
-    if (EFI_ERROR(Status)) {\r
-      return (EFI_DEVICE_ERROR);\r
-    }\r
-  }\r
   return (EFI_SUCCESS);\r
 }\r
 \r
   return (EFI_SUCCESS);\r
 }\r
 \r
@@ -184,7 +177,6 @@ ShellCommandLibDestructor (
   }\r
 \r
   gUnicodeCollation            = NULL;\r
   }\r
 \r
   gUnicodeCollation            = NULL;\r
-  gDevPathToText               = NULL;\r
   gShellCurDir                 = NULL;\r
 \r
   return (RETURN_SUCCESS);\r
   gShellCurDir                 = NULL;\r
 \r
   return (RETURN_SUCCESS);\r
index 6b3d774f47c1a2676dbfeff692c7d9d4d50c0f79..576805948748c36be26268c5ae0641f9d6abada4 100644 (file)
@@ -1,7 +1,7 @@
 ##  @file\r
 #  Provides interface to shell internal functions for shell commands.\r
 #\r
 ##  @file\r
 #  Provides interface to shell internal functions for shell commands.\r
 #\r
-#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved. <BR>\r
+#  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -52,7 +52,6 @@
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
   gEfiShellProtocolGuid                                   # ALWAYS_CONSUMED\r
   gEfiShellParametersProtocolGuid                         # ALWAYS_CONSUMED\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
   gEfiShellProtocolGuid                                   # ALWAYS_CONSUMED\r
   gEfiShellParametersProtocolGuid                         # ALWAYS_CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                        # ALWAYS_CONSUMED\r
 \r
 [Guids]\r
   gEfiSasDevicePathGuid                                   # ALWAYS_CONSUMED\r
 \r
 [Guids]\r
   gEfiSasDevicePathGuid                                   # ALWAYS_CONSUMED\r
index c26fad7b38b2b52ed55e9f400b45c59fc59824df..87f2383fad7acffd3bfb8b6709915b0592f9e24e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for bcfg shell Debug1 function.\r
 \r
 /** @file\r
   Main file for bcfg shell Debug1 function.\r
 \r
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -1052,7 +1052,7 @@ BcfgDisplayDumpDebug1(
     if ((*(UINT16*)(Buffer+4)) != 0) {\r
       DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));\r
       CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));\r
     if ((*(UINT16*)(Buffer+4)) != 0) {\r
       DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));\r
       CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));\r
-      DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
+      DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
     } else {\r
       DevPath       = NULL;\r
       DevPathString = NULL;\r
     } else {\r
       DevPath       = NULL;\r
       DevPathString = NULL;\r
index 34eb6af8ac80c77051fbcd3420b71f0999ecd694..8d26c9d93b946b978b213863c1aa1b913a1221b0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for SetVar shell Debug1 function.\r
 \r
 /** @file\r
   Main file for SetVar shell Debug1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -49,7 +49,6 @@ ShellCommandRunSetVar (
   UINTN               Size;\r
   UINTN               LoopVar;\r
   EFI_DEVICE_PATH_PROTOCOL           *DevPath;\r
   UINTN               Size;\r
   UINTN               LoopVar;\r
   EFI_DEVICE_PATH_PROTOCOL           *DevPath;\r
-  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *DevPathFromText;\r
 \r
   ShellStatus         = SHELL_SUCCESS;\r
   Status              = EFI_SUCCESS;\r
 \r
   ShellStatus         = SHELL_SUCCESS;\r
   Status              = EFI_SUCCESS;\r
@@ -226,9 +225,7 @@ ShellCommandRunSetVar (
           //\r
           Data++;\r
           Data++;\r
           //\r
           Data++;\r
           Data++;\r
-          Status = gBS->LocateProtocol(&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID**)&DevPathFromText);\r
-          ASSERT_EFI_ERROR(Status);\r
-          DevPath = DevPathFromText->ConvertTextToDevicePath(Data);\r
+          DevPath = ConvertTextToDevicePath(Data);\r
           if (DevPath == NULL) {\r
             ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SETVAR_ERROR_DPFT), gShellDebug1HiiHandle, Status);\r
             ShellStatus = SHELL_INVALID_PARAMETER;\r
           if (DevPath == NULL) {\r
             ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SETVAR_ERROR_DPFT), gShellDebug1HiiHandle, Status);\r
             ShellStatus = SHELL_INVALID_PARAMETER;\r
index bbc539126b01803ee338227586c8ab8a8cabc3f3..d8755bfefce3919aeef982ad87a2dc113fbcd9f9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for NULL named library for Profile1 shell command functions.\r
 \r
 /** @file\r
   Main file for NULL named library for Profile1 shell command functions.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -29,7 +29,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/DriverDiagnostics2.h>\r
 #include <Protocol/DriverDiagnostics.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
 #include <Protocol/DriverDiagnostics2.h>\r
 #include <Protocol/DriverDiagnostics.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
@@ -38,7 +37,6 @@
 #include <Protocol/DriverSupportedEfiVersion.h>\r
 #include <Protocol/DriverFamilyOverride.h>\r
 #include <Protocol/DriverHealth.h>\r
 #include <Protocol/DriverSupportedEfiVersion.h>\r
 #include <Protocol/DriverFamilyOverride.h>\r
 #include <Protocol/DriverHealth.h>\r
-#include <Protocol/DevicePathFromText.h>\r
 #include <Protocol/SimplePointer.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
 \r
 #include <Protocol/SimplePointer.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
 \r
index 9947c56117fcd642d188052501595bb8505ed624..bfbd8d76b03867b6b918b380690ce9265e9d7d98 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Dh shell Driver1 function.\r
 \r
 /** @file\r
   Main file for Dh shell Driver1 function.\r
 \r
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -260,7 +260,7 @@ GetDriverImageName (
     return (Status);\r
   }\r
   DevicePath = LoadedImage->FilePath;\r
     return (Status);\r
   }\r
   DevicePath = LoadedImage->FilePath;\r
-  *Name = gDevPathToText->ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
+  *Name = ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
   return (EFI_SUCCESS);\r
 }\r
 \r
   return (EFI_SUCCESS);\r
 }\r
 \r
@@ -354,7 +354,7 @@ DisplayDriverModelHandle (
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer!=NULL?TempStringPointer:L"<Unknown>");\r
     SHELL_FREE_NON_NULL(TempStringPointer);\r
   \r
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer!=NULL?TempStringPointer:L"<Unknown>");\r
     SHELL_FREE_NON_NULL(TempStringPointer);\r
   \r
-    TempStringPointer = gDevPathToText->ConvertDevicePathToText(DevicePath, TRUE, FALSE);\r
+    TempStringPointer = ConvertDevicePathToText(DevicePath, TRUE, FALSE);\r
     ShellPrintHiiEx(\r
       -1, \r
       -1, \r
     ShellPrintHiiEx(\r
       -1, \r
       -1, \r
index 1f7675b8b561d06224296f16be2d365b8a30108d..fe314f70f8f1a47f2d9af3a08ae3e418469ec242 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Drivers shell Driver1 function.\r
 \r
 /** @file\r
   Main file for Drivers shell Driver1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -80,7 +80,7 @@ GetDevicePathTextForHandle(
   }\r
   RetVal = gEfiShellProtocol->GetFilePathFromDevicePath(FinalPath);\r
   if (RetVal == NULL) {\r
   }\r
   RetVal = gEfiShellProtocol->GetFilePathFromDevicePath(FinalPath);\r
   if (RetVal == NULL) {\r
-    RetVal = gDevPathToText->ConvertDevicePathToText(FinalPath, TRUE, TRUE);\r
+    RetVal = ConvertDevicePathToText(FinalPath, TRUE, TRUE);\r
   }\r
   FreePool(FinalPath);\r
   return (RetVal);\r
   }\r
   FreePool(FinalPath);\r
   return (RetVal);\r
index b82bdf8f36c99e74701f55c43fef3d8f8a344847..35ddd441b1eb13568214c2db09eafa2d6bf859c8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for DrvCfg shell Driver1 function.\r
 \r
 /** @file\r
   Main file for DrvCfg shell Driver1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -406,7 +406,7 @@ ConfigFromFile(
                 //\r
                 // print out an error.\r
                 //\r
                 //\r
                 // print out an error.\r
                 //\r
-                TempDevPathString = gDevPathToText->ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE);\r
+                TempDevPathString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE);\r
                 ShellPrintHiiEx(\r
                   -1, \r
                   -1, \r
                 ShellPrintHiiEx(\r
                   -1, \r
                   -1, \r
index 19633a4b71fc100b799885168c141131b1623d9d..46ba8fdd8f6cd64aa73e107d3821760acba613d9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for NULL named library for Profile1 shell command functions.\r
 \r
 /** @file\r
   Main file for NULL named library for Profile1 shell command functions.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -28,7 +28,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/DriverDiagnostics2.h>\r
 #include <Protocol/DriverDiagnostics.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
 #include <Protocol/DriverDiagnostics2.h>\r
 #include <Protocol/DriverDiagnostics.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
index 940f72d89a4a713fe6f331749e7398e81d03a879..4e1ac0da82533187a7db42bcfb16b3408987afcb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Unload shell Driver1 function.\r
 \r
 /** @file\r
   Main file for Unload shell Driver1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -67,7 +67,6 @@ DumpLoadedImageProtocolInfo (
 {\r
   EFI_LOADED_IMAGE_PROTOCOL         *Image;\r
   EFI_STATUS                        Status;\r
 {\r
   EFI_LOADED_IMAGE_PROTOCOL         *Image;\r
   EFI_STATUS                        Status;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToText;\r
   CHAR16                            *DevicePathText;\r
   CHAR16                            *CodeTypeText;\r
   CHAR16                            *DataTypeText;\r
   CHAR16                            *DevicePathText;\r
   CHAR16                            *CodeTypeText;\r
   CHAR16                            *DataTypeText;\r
@@ -79,23 +78,10 @@ DumpLoadedImageProtocolInfo (
   if (EFI_ERROR(Status)) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
   if (EFI_ERROR(Status)) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
-\r
-  Status = gBS->LocateProtocol(\r
-    &gEfiDevicePathToTextProtocolGuid,\r
-    NULL,\r
-    (VOID**)&DevicePathToText);\r
-  //\r
-  // we now have the device path to text protocol\r
-  //\r
-  if (!EFI_ERROR(Status)) {\r
-    DevicePathText = DevicePathToText->ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);\r
-  } else {\r
-    DevicePathText = NULL;\r
-  }\r
-\r
-  CodeTypeText = ConvertMemoryType(Image->ImageCodeType);\r
-  DataTypeText = ConvertMemoryType(Image->ImageDataType);\r
-  PdbPointer = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);\r
+  DevicePathText = ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);\r
+  CodeTypeText   = ConvertMemoryType(Image->ImageCodeType);\r
+  DataTypeText   = ConvertMemoryType(Image->ImageDataType);\r
+  PdbPointer     = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);\r
   ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_UNLOAD_VERBOSE), gShellDriver1HiiHandle,\r
     ConvertHandleToHandleIndex(TheHandle),\r
     TheHandle,\r
   ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_UNLOAD_VERBOSE), gShellDriver1HiiHandle,\r
     ConvertHandleToHandleIndex(TheHandle),\r
     TheHandle,\r
index 5dcbfb6950e0f8cc70a5267cc5a09610fd61c064..390f1b6da9148a5899700d1933f52464e79e85fe 100644 (file)
@@ -1050,7 +1050,7 @@ BcfgDisplayDumpInstall1(
     if ((*(UINT16*)(Buffer+4)) != 0) {\r
       DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));\r
       CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));\r
     if ((*(UINT16*)(Buffer+4)) != 0) {\r
       DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));\r
       CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));\r
-      DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
+      DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
     } else {\r
       DevPath       = NULL;\r
       DevPathString = NULL;\r
     } else {\r
       DevPath       = NULL;\r
       DevPathString = NULL;\r
index 09207c06989116d65371e9f87eba0637bde50536..8b47a29a8647b8ed715edca55a9eb8483f9f8cbe 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for NULL named library for install 1 shell command functions.\r
 \r
 /** @file\r
   Main file for NULL named library for install 1 shell command functions.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. 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
   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
@@ -25,7 +25,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index b0ef50315808c3cd164860dc86cf5be98d281025..c4ef53620291960640b621d4a18befb486abdb79 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for NULL named library for level 1 shell command functions.\r
 \r
 /** @file\r
   Main file for NULL named library for level 1 shell command functions.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, Intel Corporation. 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
   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
@@ -25,7 +25,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index 2725f4ad39124a8d241e3e2eab69e29bc375d74f..bd004beaaf9fa291bcdf66bf7c8d4471e6343bc9 100644 (file)
@@ -421,7 +421,7 @@ PerformSingleMappingDisplay(
   if (TempSpot != NULL) {\r
     *TempSpot = CHAR_NULL;\r
   }\r
   if (TempSpot != NULL) {\r
     *TempSpot = CHAR_NULL;\r
   }\r
-  DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
+  DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
   if (!SFO) {\r
     TempLen = StrLen(CurrentName);\r
     ShellPrintHiiEx (\r
   if (!SFO) {\r
     TempLen = StrLen(CurrentName);\r
     ShellPrintHiiEx (\r
index 201824757320dbe61df63ab0c5c9e21f6133760c..8abf7e02a80f9f20afc977d0af19b4b022e390ae 100644 (file)
@@ -9,7 +9,7 @@
   * functions are non-interactive only\r
 \r
 \r
   * functions are non-interactive only\r
 \r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, Intel Corporation. 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
   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
@@ -33,7 +33,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index 5787c817f9548ecd0dc6510b1ecd5ff8ff35c650..52844429eaff88be10f71e65763c93e2d63148e2 100644 (file)
@@ -1,7 +1,7 @@
 ##  @file\r
 # Provides shell level 2 functions\r
 #\r
 ##  @file\r
 # Provides shell level 2 functions\r
 #\r
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>\r
+# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved. <BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -65,6 +65,7 @@
   HiiLib\r
   HandleParsingLib\r
   PathLib\r
   HiiLib\r
   HandleParsingLib\r
   PathLib\r
+  DevicePathLib\r
 \r
 [Protocols]\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
 \r
 [Protocols]\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
@@ -73,7 +74,6 @@
   gEfiDevicePathProtocolGuid                              # ALWAYS_CONSUMED\r
   gEfiLoadedImageProtocolGuid                             # ALWAYS_CONSUMED\r
   gEfiSimpleFileSystemProtocolGuid                        # ALWAYS_CONSUMED\r
   gEfiDevicePathProtocolGuid                              # ALWAYS_CONSUMED\r
   gEfiLoadedImageProtocolGuid                             # ALWAYS_CONSUMED\r
   gEfiSimpleFileSystemProtocolGuid                        # ALWAYS_CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                        # ALWAYS_CONSUMED\r
 \r
 [Pcd.common]\r
   gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel         # ALWAYS_CONSUMED\r
 \r
 [Pcd.common]\r
   gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel         # ALWAYS_CONSUMED\r
index 5636d497c06bfba0d2a044ce051572d7f0f90fe7..bd5b9bec9cfaa6f98f35705966f4b7512153f273 100644 (file)
@@ -25,7 +25,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index 9cff46d4e6e6220f8945625876ab524b62e236da..2aab9d26919eb472076d416de3c6b2ced3fb2151 100644 (file)
@@ -17,7 +17,6 @@
 \r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
 \r
 #include <Protocol/UnicodeCollation.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
@@ -25,8 +24,8 @@
 #include <Library/DebugLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/SortLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/SortLib.h>\r
+#include <Library/DevicePathLib.h>\r
 \r
 \r
-STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL;\r
 STATIC EFI_UNICODE_COLLATION_PROTOCOL   *mUnicodeCollation = NULL;\r
 \r
 \r
 STATIC EFI_UNICODE_COLLATION_PROTOCOL   *mUnicodeCollation = NULL;\r
 \r
 \r
@@ -224,15 +223,6 @@ DevicePathCompare (
     return 1;\r
   }\r
 \r
     return 1;\r
   }\r
 \r
-  if (mDevicePathToText == NULL) {\r
-    Status = gBS->LocateProtocol(\r
-      &gEfiDevicePathToTextProtocolGuid,\r
-      NULL,\r
-      (VOID**)&mDevicePathToText);\r
-\r
-    ASSERT_EFI_ERROR(Status);\r
-  }\r
-\r
   if (mUnicodeCollation == NULL) {\r
     Status = gBS->LocateProtocol(\r
       &gEfiUnicodeCollation2ProtocolGuid,\r
   if (mUnicodeCollation == NULL) {\r
     Status = gBS->LocateProtocol(\r
       &gEfiUnicodeCollation2ProtocolGuid,\r
@@ -242,12 +232,12 @@ DevicePathCompare (
     ASSERT_EFI_ERROR(Status);\r
   }\r
 \r
     ASSERT_EFI_ERROR(Status);\r
   }\r
 \r
-  TextPath1 = mDevicePathToText->ConvertDevicePathToText(\r
+  TextPath1 = ConvertDevicePathToText(\r
     DevicePath1,\r
     FALSE,\r
     FALSE);\r
 \r
     DevicePath1,\r
     FALSE,\r
     FALSE);\r
 \r
-  TextPath2 = mDevicePathToText->ConvertDevicePathToText(\r
+  TextPath2 = ConvertDevicePathToText(\r
     DevicePath2,\r
     FALSE,\r
     FALSE);\r
     DevicePath2,\r
     FALSE,\r
     FALSE);\r
index 8080cc0c826dde026f7589479e83f6c1837816e6..31afb279206fbd247e943b428688313d3956533b 100644 (file)
@@ -1,7 +1,7 @@
 ##  @file\r
 #   Library used for sorting routines.\r
 #\r
 ##  @file\r
 #   Library used for sorting routines.\r
 #\r
-#  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>\r
+#  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved. <BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -38,9 +38,9 @@
   BaseMemoryLib\r
   DebugLib\r
   UefiBootServicesTableLib\r
   BaseMemoryLib\r
   DebugLib\r
   UefiBootServicesTableLib\r
+  DevicePathLib\r
 \r
 [Protocols]\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
   gEfiDevicePathProtocolGuid                              # ALWAYS_CONSUMED\r
 \r
 [Protocols]\r
   gEfiUnicodeCollation2ProtocolGuid                       # ALWAYS_CONSUMED\r
   gEfiDevicePathProtocolGuid                              # ALWAYS_CONSUMED\r
-  gEfiDevicePathToTextProtocolGuid                        # ALWAYS_CONSUMED\r
 \r
 \r
index e0b258839b29a9dc6ded151dbe48b5430fffa504..3284c1cdc56a2e8aab256bd69392bad4e9cb78b6 100644 (file)
@@ -26,7 +26,7 @@
 [LibraryClasses.common]\r
   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
 [LibraryClasses.common]\r
   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf\r
   DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf  \r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf  \r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r