Check in patch to refine DevicePath Module and USB2HostController Module.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 27 Jul 2006 08:50:08 +0000 (08:50 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 27 Jul 2006 08:50:08 +0000 (08:50 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1117 6f19259b-4bc3-4df7-8a09-765794883524

12 files changed:
EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c
EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.h
EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciMem.c
EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c
EdkModulePkg/EdkModulePkg.fpd
EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.c
EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.h
EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.msa
EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c
EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c
EdkModulePkg/Universal/DevicePath/Dxe/DevicePathUtilities.c
EdkNt32Pkg/Nt32.fpd

index 8667553..4975c8c 100644 (file)
@@ -479,7 +479,7 @@ EhciDriverBindingStart (
   //\r
   // Create AsyncRequest Polling Timer\r
   //\r
-  Status = CreatePollingTimer (HcDev, AsyncRequestMoniter);\r
+  Status = CreatePollingTimer (HcDev, (EFI_EVENT_NOTIFY) AsyncRequestMoniter);\r
   if (EFI_ERROR (Status)) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto deinit_memory_management;\r
@@ -886,7 +886,7 @@ EhciReset (
     //\r
     Status = SetFrameListBaseAddr (\r
                HcDev, \r
-               (UINT32) GET_0B_TO_31B (HcDev->PeriodicFrameListBuffer)\r
+               GET_0B_TO_31B (HcDev->PeriodicFrameListBuffer)\r
                );\r
     if (EFI_ERROR (Status)) {\r
       Status = EFI_DEVICE_ERROR;\r
index bb7060b..f22ce1a 100644 (file)
@@ -192,11 +192,10 @@ extern EFI_COMPONENT_NAME_PROTOCOL  gEhciComponentName;
 #define OUTPUT_PACKET_ID        0xE1\r
 #define ERROR_PACKET_ID         0x55\r
 \r
-#define bit(a)                1 << (a)\r
-\r
-#define GET_0B_TO_31B(Addr)   (((UINTN) Addr) & (0xffffffff))\r
-#define GET_32B_TO_63B(Addr)  ((((UINTN) Addr) >> 32) & (0xffffffff))\r
+#define bit(a)                  1 << (a)\r
 \r
+#define GET_0B_TO_31B(Addr)     (UINT32) (UINTN) (Addr)\r
+#define GET_32B_TO_63B(Addr)    (UINT32) (RShiftU64(((UINT64) (UINTN) (Addr)), 32) & 0xffffffff)\r
 \r
 //\r
 // Ehci Data and Ctrl Structures\r
@@ -326,7 +325,7 @@ typedef struct _EHCI_QTD_ENTITY     EHCI_QTD_ENTITY;
 typedef struct _EHCI_QH_ENTITY      EHCI_QH_ENTITY;\r
 typedef struct _EHCI_ASYNC_REQUEST  EHCI_ASYNC_REQUEST;\r
 \r
-typedef struct _EHCI_QTD_ENTITY {\r
+struct _EHCI_QTD_ENTITY {\r
   EHCI_QTD_HW     Qtd;\r
   UINT32          TotalBytes;\r
   UINT32          StaticTotalBytes;\r
@@ -335,9 +334,9 @@ typedef struct _EHCI_QTD_ENTITY {
   EHCI_QTD_ENTITY *Next;\r
   EHCI_QTD_ENTITY *AltNext;\r
   EHCI_QH_ENTITY  *SelfQh;\r
-} EHCI_QTD_ENTITY;\r
+};\r
 \r
-typedef struct _EHCI_QH_ENTITY {\r
+struct _EHCI_QH_ENTITY {\r
   EHCI_QH_HW      Qh;\r
   EHCI_QH_ENTITY  *Next;\r
   EHCI_QH_ENTITY  *Prev;\r
@@ -346,7 +345,7 @@ typedef struct _EHCI_QH_ENTITY {
   EHCI_QTD_ENTITY *AltQtdPtr;\r
   UINTN           Interval;\r
   UINT8           TransferType;\r
-} EHCI_QH_ENTITY;\r
+};\r
 \r
 #define GET_QH_ENTITY_ADDR(a)   ((EHCI_QH_ENTITY *) a)\r
 #define GET_QTD_ENTITY_ADDR(a)  ((EHCI_QTD_ENTITY *) a)\r
@@ -359,19 +358,14 @@ typedef struct _EHCI_QH_ENTITY {
 \r
 #define USB2_HC_DEV_SIGNATURE     EFI_SIGNATURE_32 ('e', 'h', 'c', 'i')\r
 \r
-typedef struct _LIST_HEAD {\r
-  struct _LIST_HEAD *pre;\r
-  struct _LIST_HEAD *next;\r
-} LIST_HEAD;\r
-\r
-typedef struct _EHCI_ASYNC_REQUEST {\r
+struct _EHCI_ASYNC_REQUEST {\r
   UINT8                           TransferType;\r
   EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunc;\r
   VOID                            *Context;\r
   EHCI_ASYNC_REQUEST              *Prev;\r
   EHCI_ASYNC_REQUEST              *Next;\r
   EHCI_QH_ENTITY                  *QhPtr;\r
-} EHCI_ASYNC_REQUEST;\r
+};\r
 \r
 typedef struct _MEMORY_MANAGE_HEADER {\r
   UINT8                         *BitArrayPtr;\r
index 2f35f77..0a992fe 100644 (file)
@@ -261,7 +261,7 @@ Returns:
 \r
     Status = AllocMemInMemoryBlock (\r
               TempHeaderPtr,\r
-              Pool,\r
+              (VOID **) Pool,\r
               RealAllocSize / 32\r
               );\r
     if (!EFI_ERROR (Status)) {\r
@@ -302,7 +302,7 @@ Returns:
 \r
   Status = AllocMemInMemoryBlock (\r
              NewMemoryHeader,\r
-             Pool,\r
+             (VOID **) Pool,\r
              RealAllocSize / 32\r
              );\r
   if (!EFI_ERROR (Status)) {\r
index 3dc1ff7..b6864ad 100644 (file)
@@ -1386,7 +1386,7 @@ Returns:
   Value = NULL;\r
 \r
   if (!HwQtdPtr->AltNextQtdTerminate) {\r
-    Value = (EHCI_QTD_HW *) GET_0B_TO_31B (HwQtdPtr->AltNextQtdPointer << 5);\r
+    Value = (EHCI_QTD_HW *) (UINTN) GET_0B_TO_31B (HwQtdPtr->AltNextQtdPointer << 5);\r
   }\r
 \r
   return Value;\r
@@ -1417,7 +1417,7 @@ Returns:
   Value = NULL;\r
 \r
   if (!HwQtdPtr->NextQtdTerminate) {\r
-    Value = (EHCI_QTD_HW *) GET_0B_TO_31B (HwQtdPtr->NextQtdPointer << 5);\r
+    Value = (EHCI_QTD_HW *) (UINTN) GET_0B_TO_31B (HwQtdPtr->NextQtdPointer << 5);\r
   }\r
 \r
   return Value;\r
@@ -1727,7 +1727,7 @@ Returns:
       //\r
       // Not Null FrameList\r
       //\r
-      FindQhHwPtr = (EHCI_QH_HW *) GET_0B_TO_31B (FrameEntryPtr->LinkPointer << 5);\r
+      FindQhHwPtr = (EHCI_QH_HW *) (UINTN) GET_0B_TO_31B (FrameEntryPtr->LinkPointer << 5);\r
       FindQhPtr   = (EHCI_QH_ENTITY *) GET_QH_ENTITY_ADDR (FindQhHwPtr);\r
       //\r
       // FindQh is Left/Right to Qh\r
@@ -1742,12 +1742,12 @@ Returns:
         //\r
         if (NULL != FindQhPtr->Next) {\r
           FindQhPtr->Next->Prev         = QhPtr;\r
-          QhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(FindQhPtr->Next->Qh) >> 5);\r
+          QhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN) &(FindQhPtr->Next->Qh)) >> 5);\r
           QhPtr->Qh.SelectType          = QH_SELECT_TYPE;\r
           QhPtr->Qh.QhTerminate         = FALSE;\r
         }\r
 \r
-        FindQhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+        FindQhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN)&(QhPtr->Qh)) >> 5);\r
         FindQhPtr->Qh.SelectType          = QH_SELECT_TYPE;\r
         FindQhPtr->Qh.QhTerminate         = FALSE;\r
 \r
@@ -1762,7 +1762,7 @@ Returns:
           //\r
           // Qh is the First one in Frame[0] List\r
           //\r
-          FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+          FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
           FrameEntryPtr->SelectType     = QH_SELECT_TYPE;\r
           FrameEntryPtr->LinkTerminate  = FALSE;\r
         } else {\r
@@ -1770,12 +1770,12 @@ Returns:
           // Qh is not the First one in Frame[0] List\r
           //\r
           FindQhPtr->Prev->Next                   = QhPtr;\r
-          FindQhPtr->Prev->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+          FindQhPtr->Prev->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
           FindQhPtr->Prev->Qh.SelectType          = QH_SELECT_TYPE;\r
           FindQhPtr->Prev->Qh.QhTerminate         = FALSE;\r
         }\r
 \r
-        QhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(FindQhPtr->Qh) >> 5);\r
+        QhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN) &(FindQhPtr->Qh)) >> 5);\r
         QhPtr->Qh.SelectType          = QH_SELECT_TYPE;\r
         QhPtr->Qh.QhTerminate         = FALSE;\r
 \r
@@ -1786,7 +1786,7 @@ Returns:
         //\r
         // Link Qh after FindQh, Qh is the Last one\r
         //\r
-        FindQhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+        FindQhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
         FindQhPtr->Prev->Qh.SelectType    = QH_SELECT_TYPE;\r
         FindQhPtr->Qh.QhTerminate         = FALSE;\r
 \r
@@ -1798,7 +1798,7 @@ Returns:
       //\r
       // Null FrameList\r
       //\r
-      FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+      FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
       FrameEntryPtr->SelectType     = QH_SELECT_TYPE;\r
       FrameEntryPtr->LinkTerminate  = FALSE;\r
     }\r
@@ -1812,7 +1812,7 @@ Returns:
       FrameIndex += QhPtr->Interval;\r
       while (FrameIndex < HcDev->PeriodicFrameListLength) {\r
         FrameEntryPtr                 = (FRAME_LIST_ENTRY *) (FrameEntryPtr + QhPtr->Interval);\r
-        FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+        FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
         FrameEntryPtr->SelectType     = QH_SELECT_TYPE;\r
         FrameEntryPtr->LinkTerminate  = FALSE;\r
         FrameIndex += QhPtr->Interval;\r
@@ -1825,7 +1825,7 @@ Returns:
       while (FrameIndex < HcDev->PeriodicFrameListLength) {\r
         FrameEntryPtr = (FRAME_LIST_ENTRY *) (FrameEntryPtr + QhPtr->Interval);\r
         if ((FrameIndex % QhPtr->Prev->Interval) != 0) {\r
-          FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+          FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
           FrameEntryPtr->SelectType     = QH_SELECT_TYPE;\r
           FrameEntryPtr->LinkTerminate  = FALSE;\r
         }\r
@@ -1843,7 +1843,7 @@ Returns:
       //\r
       // Not Null FrameList\r
       //\r
-      FindQhHwPtr = (EHCI_QH_HW *) GET_0B_TO_31B (FrameEntryPtr->LinkPointer << 5);\r
+      FindQhHwPtr = (EHCI_QH_HW *) (UINTN) GET_0B_TO_31B (FrameEntryPtr->LinkPointer << 5);\r
       FindQhPtr   = (EHCI_QH_ENTITY *) GET_QH_ENTITY_ADDR (FindQhHwPtr);\r
       //\r
       // FindQh is Last Qh in the Asynchronous List, Link Qh after FindQh\r
@@ -1852,7 +1852,7 @@ Returns:
         FindQhPtr = FindQhPtr->Next;\r
       }\r
 \r
-      FindQhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+      FindQhPtr->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
       FindQhPtr->Qh.SelectType          = QH_SELECT_TYPE;\r
       FindQhPtr->Qh.QhTerminate         = FALSE;\r
 \r
@@ -1862,7 +1862,7 @@ Returns:
       //\r
       // Null FrameList\r
       //\r
-      FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (&(QhPtr->Qh) >> 5);\r
+      FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Qh)) >> 5);\r
       FrameEntryPtr->SelectType     = QH_SELECT_TYPE;\r
       FrameEntryPtr->LinkTerminate  = FALSE;\r
     }\r
@@ -1929,7 +1929,7 @@ Returns:
         }\r
       } else {\r
         while (FrameIndex < HcDev->PeriodicFrameListLength) {\r
-          FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (&(QhPtr->Next->Qh) >> 5);\r
+          FrameEntryPtr->LinkPointer    = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Next->Qh)) >> 5);\r
           FrameEntryPtr->SelectType     = QH_SELECT_TYPE;\r
           FrameEntryPtr->LinkTerminate  = FALSE;\r
           FrameEntryPtr += Interval;\r
@@ -1949,7 +1949,7 @@ Returns:
         QhPtr->Prev->Qh.SelectType          = 0;\r
         QhPtr->Prev->Qh.QhTerminate         = TRUE;\r
       } else {\r
-        QhPtr->Prev->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (&(QhPtr->Next->Qh) >> 5);\r
+        QhPtr->Prev->Qh.QhHorizontalPointer = (UINT32) GET_0B_TO_31B (((UINTN) &(QhPtr->Next->Qh)) >> 5);\r
         QhPtr->Prev->Qh.SelectType          = QH_SELECT_TYPE;\r
         QhPtr->Prev->Qh.QhTerminate         = FALSE;\r
       }\r
@@ -3026,7 +3026,7 @@ Returns:
     }\r
 \r
     QtdHwPtr = &(AsyncRequestPtr->QhPtr->FirstQtdPtr->Qtd);\r
-    ReceiveBuffer = (UINT8 *) GET_0B_TO_31B ((QtdHwPtr->BufferPointer0 << 12) | AsyncRequestPtr->QhPtr->FirstQtdPtr->StaticCurrentOffset);\r
+    ReceiveBuffer = (UINT8 *) (UINTN) GET_0B_TO_31B ((QtdHwPtr->BufferPointer0 << 12) | AsyncRequestPtr->QhPtr->FirstQtdPtr->StaticCurrentOffset);\r
     CopyMem (\r
       ProcessBuffer,\r
       ReceiveBuffer,\r
index b1738f4..2d3f2fc 100644 (file)
@@ -2374,6 +2374,74 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         <FfsFormatKey>BS_DRIVER</FfsFormatKey>
       </ModuleSaBuildOptions>
     </ModuleSA>
+    <ModuleSA SupArchList="IA32 X64 IPF" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="9B680FCE-AD6B-4F3A-B60B-F59899003443">
+      <Libraries>
+        <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="fd44e603-002a-4b29-9f5f-529e815b6165" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+      </Libraries>
+      <PcdBuildDefinition>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdMaximumUnicodeStringLength</C_Name>
+          <Token>0x00000001</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>1000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdMaximumAsciiStringLength</C_Name>
+          <Token>0x00000002</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>1000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdDebugPropertyMask</C_Name>
+          <Token>0x00000005</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0x0f</Value>
+        </PcdData>
+        <PcdData ItemType="PATCHABLE_IN_MODULE">
+          <C_Name>PcdDebugPrintErrorLevel</C_Name>
+          <Token>0x00000006</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>0x80000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdReportStatusCodePropertyMask</C_Name>
+          <Token>0x00000007</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0x07</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdDebugClearMemoryValue</C_Name>
+          <Token>0x00000008</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0xAF</Value>
+        </PcdData>
+      </PcdBuildDefinition>
+      <ModuleSaBuildOptions>
+        <FvBinding>FV_RECOVERY</FvBinding>
+        <FfsFormatKey>BS_DRIVER</FfsFormatKey>
+      </ModuleSaBuildOptions>
+    </ModuleSA>
     <ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="96B5C032-DF4C-4b6e-8232-438DCF448D0E">
       <Libraries>
         <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
@@ -3561,6 +3629,98 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         <FfsFormatKey>BS_DRIVER</FfsFormatKey>
       </ModuleSaBuildOptions>
     </ModuleSA>
+    <ModuleSA SupArchList="IA32 X64 IPF" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="BDFE430E-8F2A-4db0-9991-6F856594777E">
+      <Libraries>
+        <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
+        <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+      </Libraries>
+      <PcdBuildDefinition>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdMaximumUnicodeStringLength</C_Name>
+          <Token>0x00000001</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>1000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdMaximumAsciiStringLength</C_Name>
+          <Token>0x00000002</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>1000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdSpinLockTimeout</C_Name>
+          <Token>0x00000004</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>10000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdMaximumLinkedListLength</C_Name>
+          <Token>0x00000003</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>1000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdReportStatusCodePropertyMask</C_Name>
+          <Token>0x00000007</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0x07</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdDebugPropertyMask</C_Name>
+          <Token>0x00000005</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0x0f</Value>
+        </PcdData>
+        <PcdData ItemType="PATCHABLE_IN_MODULE">
+          <C_Name>PcdDebugPrintErrorLevel</C_Name>
+          <Token>0x00000006</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT32</DatumType>
+          <MaxDatumSize>4</MaxDatumSize>
+          <Value>0x80000000</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdDebugClearMemoryValue</C_Name>
+          <Token>0x00000008</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0xAF</Value>
+        </PcdData>
+        <PcdData ItemType="FIXED_AT_BUILD">
+          <C_Name>PcdPerformanceLibraryPropertyMask</C_Name>
+          <Token>0x00000009</Token>
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT8</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>0</Value>
+        </PcdData>
+      </PcdBuildDefinition>
+      <ModuleSaBuildOptions>
+        <FvBinding>FV_MAIN</FvBinding>
+        <FfsFormatKey>BS_DRIVER</FfsFormatKey>
+      </ModuleSaBuildOptions>
+    </ModuleSA>
     <ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="0167CCC4-D0F7-4f21-A3EF-9E64B7CDCE8B">
       <Libraries>
         <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
index 79741a4..78c5def 100644 (file)
@@ -20,8 +20,6 @@ Abstract:
 
 --*/
 
-#include <Uefi/UefiSpec.h>
-#include <Protocol/DevicePath.h>
 #include "DevicePath.h"
 
 DEVICE_PATH_DRIVER_PRIVATE_DATA mPrivateData;
@@ -29,27 +27,6 @@ DEVICE_PATH_DRIVER_PRIVATE_DATA mPrivateData;
 EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;
 EFI_GUID mEfiDevicePathMessagingSASGuid             = DEVICE_PATH_MESSAGING_SAS;
 
-STATIC EFI_DEVICE_PATH_UTILITIES_PROTOCOL mDevicePathUtilitiesProtocol = {
-  GetDevicePathSize,
-  DuplicateDevicePath,
-  AppendDevicePath,
-  AppendDeviceNode,
-  AppendDevicePathInstance,
-  GetNextDevicePathInstance,
-  IsDevicePathMultiInstance,
-  CreateDeviceNode
-};
-
-STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL   mDevicePathToTextProtocol = {
-  ConvertDeviceNodeToText,
-  ConvertDevicePathToText
-};
-
-STATIC EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL mDevicePathFromTextProtocol = {
-  ConvertTextToDeviceNode,
-  ConvertTextToDevicePath
-};
-
 EFI_STATUS
 EFIAPI
 DevicePathEntryPoint (
@@ -75,14 +52,14 @@ DevicePathEntryPoint (
 
   mPrivateData.Signature = DEVICE_PATH_DRIVER_SIGNATURE;
 
-  mPrivateData.DevicePathUtilities.GetDevicePathSize         = GetDevicePathSize;
-  mPrivateData.DevicePathUtilities.DuplicateDevicePath       = DuplicateDevicePath;
-  mPrivateData.DevicePathUtilities.AppendDevicePath          = AppendDevicePath;
-  mPrivateData.DevicePathUtilities.AppendDeviceNode          = AppendDeviceNode;
-  mPrivateData.DevicePathUtilities.AppendDevicePathInstance  = AppendDevicePathInstance;
-  mPrivateData.DevicePathUtilities.GetNextDevicePathInstance = GetNextDevicePathInstance;
-  mPrivateData.DevicePathUtilities.IsDevicePathMultiInstance = IsDevicePathMultiInstance;
-  mPrivateData.DevicePathUtilities.CreateDeviceNode          = CreateDeviceNode;
+  mPrivateData.DevicePathUtilities.GetDevicePathSize         = GetDevicePathSizeProtocolInterface;
+  mPrivateData.DevicePathUtilities.DuplicateDevicePath       = DuplicateDevicePathProtocolInterface;
+  mPrivateData.DevicePathUtilities.AppendDevicePath          = AppendDevicePathProtocolInterface;
+  mPrivateData.DevicePathUtilities.AppendDeviceNode          = AppendDeviceNodeProtocolInterface;
+  mPrivateData.DevicePathUtilities.AppendDevicePathInstance  = AppendDevicePathInstanceProtocolInterface;
+  mPrivateData.DevicePathUtilities.GetNextDevicePathInstance = GetNextDevicePathInstanceProtocolInterface;
+  mPrivateData.DevicePathUtilities.IsDevicePathMultiInstance = IsDevicePathMultiInstanceProtocolInterface;
+  mPrivateData.DevicePathUtilities.CreateDeviceNode          = CreateDeviceNodeProtocolInterface;
 
   mPrivateData.DevicePathToText.ConvertDeviceNodeToText      = ConvertDeviceNodeToText;
   mPrivateData.DevicePathToText.ConvertDevicePathToText      = ConvertDevicePathToText;
index aa33345..8e90724 100644 (file)
@@ -247,7 +247,7 @@ ConvertTextToDevicePath (
 ;\r
 \r
 UINTN\r
-GetDevicePathSize (\r
+GetDevicePathSizeProtocolInterface (\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
   )\r
 /*++\r
@@ -265,7 +265,7 @@ GetDevicePathSize (
 ;\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
-DuplicateDevicePath (\r
+DuplicateDevicePathProtocolInterface (\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
   )\r
 /*++\r
@@ -284,7 +284,7 @@ DuplicateDevicePath (
 ;\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
-AppendDevicePath (\r
+AppendDevicePathProtocolInterface (\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2\r
   )\r
@@ -306,7 +306,7 @@ AppendDevicePath (
 ;\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
-AppendDeviceNode (\r
+AppendDeviceNodeProtocolInterface (\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode\r
   )\r
@@ -328,7 +328,7 @@ AppendDeviceNode (
 ;\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
-AppendDevicePathInstance (\r
+AppendDevicePathInstanceProtocolInterface (\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance\r
   )\r
@@ -349,7 +349,7 @@ AppendDevicePathInstance (
 ;\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
-GetNextDevicePathInstance (\r
+GetNextDevicePathInstanceProtocolInterface (\r
   IN OUT EFI_DEVICE_PATH_PROTOCOL   **DevicePathInstance,\r
   OUT UINTN                         *DevicePathInstanceSize\r
   )\r
@@ -374,7 +374,7 @@ GetNextDevicePathInstance (
 ;\r
 \r
 BOOLEAN\r
-IsDevicePathMultiInstance (\r
+IsDevicePathMultiInstanceProtocolInterface (\r
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
   )\r
 /*++\r
@@ -393,7 +393,7 @@ IsDevicePathMultiInstance (
 ;\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
-CreateDeviceNode (\r
+CreateDeviceNodeProtocolInterface (\r
   IN UINT8  NodeType,\r
   IN UINT8  NodeSubType,\r
   IN UINT16 NodeLength\r
index 20dd598..c5440ef 100644 (file)
@@ -56,6 +56,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>UefiBootServicesTableLib</Keyword>\r
     </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>DevicePathLib</Keyword>\r
+    </LibraryClass>\r
   </LibraryClassDefinitions>\r
   <SourceFiles>\r
     <Filename>DevicePath.c</Filename>\r
index e0864da..d611b39 100644 (file)
@@ -19,7 +19,6 @@ Abstract:
 
 --*/
 
-#include <protocol/DevicePathFromText.h>
 #include "DevicePath.h"
 
 CHAR16 *
@@ -574,6 +573,7 @@ Returns:
 {
   UINTN  Length;
 
+  *Data  = 0;
   Length = sizeof (UINT64);
   HexStringToBuf ((UINT8 *) Data, &Length, TrimHexStr (Str), NULL);
 }
@@ -618,7 +618,7 @@ Returns:
   Char = *(str++);
   while (Char) {
     if (Char >= '0' && Char <= '9') {
-      if (Rvalue > High || Rvalue == High && Char - '0' > (INTN) Low) {
+      if ((Rvalue > High || Rvalue == High) && (Char - '0' > (INTN) Low)) {
         return (UINTN) -1;
       }
 
@@ -1298,7 +1298,7 @@ DevPathFromTextVenPcAnsi (
                                     MESSAGING_DEVICE_PATH,
                                     MSG_VENDOR_DP,
                                     sizeof (VENDOR_DEVICE_PATH));
-  Vendor->Guid = gEfiPcAnsiGuid;
+  CopyGuid (&Vendor->Guid, &gEfiPcAnsiGuid);
 
   return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
 }
@@ -1314,7 +1314,7 @@ DevPathFromTextVenVt100 (
                                     MESSAGING_DEVICE_PATH,
                                     MSG_VENDOR_DP,
                                     sizeof (VENDOR_DEVICE_PATH));
-  Vendor->Guid = gEfiVT100Guid;
+  CopyGuid (&Vendor->Guid, &gEfiVT100Guid);
 
   return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
 }
@@ -1330,7 +1330,7 @@ DevPathFromTextVenVt100Plus (
                                     MESSAGING_DEVICE_PATH,
                                     MSG_VENDOR_DP,
                                     sizeof (VENDOR_DEVICE_PATH));
-  Vendor->Guid = gEfiVT100PlusGuid;
+  CopyGuid (&Vendor->Guid, &gEfiVT100PlusGuid);
 
   return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
 }
@@ -1346,7 +1346,7 @@ DevPathFromTextVenUtf8 (
                                     MESSAGING_DEVICE_PATH,
                                     MSG_VENDOR_DP,
                                     sizeof (VENDOR_DEVICE_PATH));
-  Vendor->Guid = gEfiVTUTF8Guid;
+  CopyGuid (&Vendor->Guid, &gEfiVTUTF8Guid);
 
   return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
 }
@@ -1366,7 +1366,7 @@ DevPathFromTextUartFlowCtrl (
                                                         sizeof (UART_FLOW_CONTROL_DEVICE_PATH)
                                                         );
 
-  UartFlowControl->Guid = mEfiDevicePathMessagingUartFlowControlGuid;
+  CopyGuid (&UartFlowControl->Guid, &mEfiDevicePathMessagingUartFlowControlGuid);
   if (StrCmp (ValueStr, L"XonXoff") == 0) {
     UartFlowControl->FlowControlMap = 2;
   } else if (StrCmp (ValueStr, L"Hardware") == 0) {
@@ -1409,7 +1409,7 @@ DevPathFromTextSAS (
                                        sizeof (SAS_DEVICE_PATH)
                                        );
 
-  Sas->Guid   = mEfiDevicePathMessagingSASGuid;
+  CopyGuid (&Sas->Guid, &mEfiDevicePathMessagingSASGuid);
   Xtoi64 (AddressStr, &Sas->SasAddress);
   Xtoi64 (LunStr, &Sas->Lun);
   Sas->RelativeTargetPort = (UINT16) Xtoi (RTPStr);
@@ -1455,7 +1455,7 @@ DevPathFromTextDebugPort (
                                                     sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
                                                     );
 
-  Vend->Guid = gEfiDebugPortProtocolGuid;
+  CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid);
 
   return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
 }
@@ -2166,8 +2166,8 @@ DevPathFromTextBBS (
     Bbs->DeviceType = BBS_TYPE_UNKNOWN;
   }
 
-  AsciiStr = Bbs->String;
-  StrToAscii (IdStr, &AsciiStr);
+  AsciiStr = (UINT8 *) Bbs->String;
+  StrToAscii (IdStr, (CHAR8 **) &AsciiStr);
 
   Bbs->StatusFlag = (UINT16) Xtoi (FlagsStr);
 
@@ -2175,120 +2175,63 @@ DevPathFromTextBBS (
 }
 
 DEVICE_PATH_FROM_TEXT_TABLE DevPathFromTextTable[] = {
-  L"Pci",
-  DevPathFromTextPci,
-  L"PcCard",
-  DevPathFromTextPcCard,
-  L"MemoryMapped",
-  DevPathFromTextMemoryMapped,
-  L"VenHw",
-  DevPathFromTextVenHw,
-  L"Ctrl",
-  DevPathFromTextCtrl,
-  L"Acpi",
-  DevPathFromTextAcpi,
-  L"PciRoot",
-  DevPathFromTextPciRoot,
-  L"Floppy",
-  DevPathFromTextFloppy,
-  L"Keyboard",
-  DevPathFromTextKeyboard,
-  L"Serial",
-  DevPathFromTextSerial,
-  L"ParallelPort",
-  DevPathFromTextParallelPort,
-  L"AcpiEx",
-  DevPathFromTextAcpiEx,
-  L"AcpiExp",
-  DevPathFromTextAcpiExp,
-  L"Ata",
-  DevPathFromTextAta,
-  L"Scsi",
-  DevPathFromTextScsi,
-  L"Fibre",
-  DevPathFromTextFibre,
-  L"I1394",
-  DevPathFromText1394,
-  L"USB",
-  DevPathFromTextUsb,
-  L"I2O",
-  DevPathFromTextI2O,
-  L"Infiniband",
-  DevPathFromTextInfiniband,
-  L"VenMsg",
-  DevPathFromTextVenMsg,
-  L"VenPcAnsi",
-  DevPathFromTextVenPcAnsi,
-  L"VenVt100",
-  DevPathFromTextVenVt100,
-  L"VenVt100Plus",
-  DevPathFromTextVenVt100Plus,
-  L"VenUtf8",
-  DevPathFromTextVenUtf8,
-  L"UartFlowCtrl",
-  DevPathFromTextUartFlowCtrl,
-  L"SAS",
-  DevPathFromTextSAS,
-  L"DebugPort",
-  DevPathFromTextDebugPort,
-  L"MAC",
-  DevPathFromTextMAC,
-  L"IPv4",
-  DevPathFromTextIPv4,
-  L"IPv6",
-  DevPathFromTextIPv6,
-  L"Uart",
-  DevPathFromTextUart,
-  L"UsbClass",
-  DevPathFromTextUsbClass,
-  L"UsbAudio",
-  DevPathFromTextUsbAudio,
-  L"UsbCDCControl",
-  DevPathFromTextUsbCDCControl,
-  L"UsbHID",
-  DevPathFromTextUsbHID,
-  L"UsbImage",
-  DevPathFromTextUsbImage,
-  L"UsbPrinter",
-  DevPathFromTextUsbPrinter,
-  L"UsbMassStorage",
-  DevPathFromTextUsbMassStorage,
-  L"UsbHub",
-  DevPathFromTextUsbHub,
-  L"UsbCDCData",
-  DevPathFromTextUsbCDCData,
-  L"UsbSmartCard",
-  DevPathFromTextUsbSmartCard,
-  L"UsbVideo",
-  DevPathFromTextUsbVideo,
-  L"UsbDiagnostic",
-  DevPathFromTextUsbDiagnostic,
-  L"UsbWireless",
-  DevPathFromTextUsbWireless,
-  L"UsbDeviceFirmwareUpdate",
-  DevPathFromTextUsbDeviceFirmwareUpdate,
-  L"UsbIrdaBridge",
-  DevPathFromTextUsbIrdaBridge,
-  L"UsbTestAndMeasurement",
-  DevPathFromTextUsbTestAndMeasurement,
-  L"UsbWwid",
-  DevPathFromTextUsbWwid,
-  L"Unit",
-  DevPathFromTextUnit,
-  L"iSCSI",
-  DevPathFromTextiSCSI,
-  L"HD",
-  DevPathFromTextHD,
-  L"CDROM",
-  DevPathFromTextCDROM,
-  L"VenMEDIA",
-  DevPathFromTextVenMEDIA,
-  L"Media",
-  DevPathFromTextMedia,
-  L"BBS",
-  DevPathFromTextBBS,
-  NULL,
-  NULL
+  {L"Pci", DevPathFromTextPci},
+  {L"PcCard", DevPathFromTextPcCard},
+  {L"MemoryMapped", DevPathFromTextMemoryMapped},
+  {L"VenHw", DevPathFromTextVenHw},
+  {L"Ctrl", DevPathFromTextCtrl},
+  {L"Acpi", DevPathFromTextAcpi},
+  {L"PciRoot", DevPathFromTextPciRoot},
+  {L"Floppy", DevPathFromTextFloppy},
+  {L"Keyboard", DevPathFromTextKeyboard},
+  {L"Serial", DevPathFromTextSerial},
+  {L"ParallelPort", DevPathFromTextParallelPort},
+  {L"AcpiEx", DevPathFromTextAcpiEx},
+  {L"AcpiExp", DevPathFromTextAcpiExp},
+  {L"Ata", DevPathFromTextAta},
+  {L"Scsi", DevPathFromTextScsi},
+  {L"Fibre", DevPathFromTextFibre},
+  {L"I1394", DevPathFromText1394},
+  {L"USB", DevPathFromTextUsb},
+  {L"I2O", DevPathFromTextI2O},
+  {L"Infiniband", DevPathFromTextInfiniband},
+  {L"VenMsg", DevPathFromTextVenMsg},
+  {L"VenPcAnsi", DevPathFromTextVenPcAnsi},
+  {L"VenVt100", DevPathFromTextVenVt100},
+  {L"VenVt100Plus", DevPathFromTextVenVt100Plus},
+  {L"VenUtf8", DevPathFromTextVenUtf8},
+  {L"UartFlowCtrl", DevPathFromTextUartFlowCtrl},
+  {L"SAS", DevPathFromTextSAS},
+  {L"DebugPort", DevPathFromTextDebugPort},
+  {L"MAC", DevPathFromTextMAC},
+  {L"IPv4", DevPathFromTextIPv4},
+  {L"IPv6", DevPathFromTextIPv6},
+  {L"Uart", DevPathFromTextUart},
+  {L"UsbClass", DevPathFromTextUsbClass},
+  {L"UsbAudio", DevPathFromTextUsbAudio},
+  {L"UsbCDCControl", DevPathFromTextUsbCDCControl},
+  {L"UsbHID", DevPathFromTextUsbHID},
+  {L"UsbImage", DevPathFromTextUsbImage},
+  {L"UsbPrinter", DevPathFromTextUsbPrinter},
+  {L"UsbMassStorage", DevPathFromTextUsbMassStorage},
+  {L"UsbHub", DevPathFromTextUsbHub},
+  {L"UsbCDCData", DevPathFromTextUsbCDCData},
+  {L"UsbSmartCard", DevPathFromTextUsbSmartCard},
+  {L"UsbVideo", DevPathFromTextUsbVideo},
+  {L"UsbDiagnostic", DevPathFromTextUsbDiagnostic},
+  {L"UsbWireless", DevPathFromTextUsbWireless},
+  {L"UsbDeviceFirmwareUpdate", DevPathFromTextUsbDeviceFirmwareUpdate},
+  {L"UsbIrdaBridge", DevPathFromTextUsbIrdaBridge},
+  {L"UsbTestAndMeasurement", DevPathFromTextUsbTestAndMeasurement},
+  {L"UsbWwid", DevPathFromTextUsbWwid},
+  {L"Unit", DevPathFromTextUnit},
+  {L"iSCSI", DevPathFromTextiSCSI},
+  {L"HD", DevPathFromTextHD},
+  {L"CDROM", DevPathFromTextCDROM},
+  {L"VenMEDIA", DevPathFromTextVenMEDIA},
+  {L"Media", DevPathFromTextMedia},
+  {L"BBS", DevPathFromTextBBS},
+  {NULL, NULL}
 };
 
 EFI_DEVICE_PATH_PROTOCOL *
@@ -2413,7 +2356,7 @@ ConvertTextToDevicePath (
       gBS->FreePool (ParamStr);
     }
 
-    NewDevicePath = AppendDeviceNode (DevicePath, DeviceNode);
+    NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
     gBS->FreePool (DevicePath);
     gBS->FreePool (DeviceNode);
     DevicePath = NewDevicePath;
@@ -2422,7 +2365,7 @@ ConvertTextToDevicePath (
       DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
       SetDevicePathInstanceEndNode (DeviceNode);
 
-      NewDevicePath = AppendDeviceNode (DevicePath, DeviceNode);
+      NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
       gBS->FreePool (DevicePath);
       gBS->FreePool (DeviceNode);
       DevicePath = NewDevicePath;
index 64fd565..f38f2ea 100644 (file)
@@ -19,7 +19,6 @@ Abstract:
 \r
 --*/\r
 \r
-#include <protocol/DevicePathToText.h>\r
 #include "DevicePath.h"\r
 \r
 EFI_DEVICE_PATH_PROTOCOL *\r
@@ -372,7 +371,7 @@ DevPathToTextController (
   CatPrint (\r
     Str,\r
     L"Ctrl(%x)",\r
-    (UINT16 *)Controller->ControllerNumber\r
+    Controller->ControllerNumber\r
     );\r
 }\r
 \r
@@ -423,7 +422,7 @@ DevPathToTextAcpi (
   }\r
 }\r
 \r
-#define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + AsciiStrLen (a) + 1))\r
+#define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + AsciiStrLen ((CHAR8 *) (a)) + 1))\r
 \r
 VOID\r
 DevPathToTextExtAcpi (\r
@@ -1257,102 +1256,38 @@ DevPathToTextNodeUnknown (
 }\r
 \r
 DEVICE_PATH_TO_TEXT_TABLE DevPathToTextTable[] = {\r
-  HARDWARE_DEVICE_PATH,\r
-  HW_PCI_DP,\r
-  DevPathToTextPci,\r
-  HARDWARE_DEVICE_PATH,\r
-  HW_PCCARD_DP,\r
-  DevPathToTextPccard,\r
-  HARDWARE_DEVICE_PATH,\r
-  HW_MEMMAP_DP,\r
-  DevPathToTextMemMap,\r
-  HARDWARE_DEVICE_PATH,\r
-  HW_VENDOR_DP,\r
-  DevPathToTextVendor,\r
-  HARDWARE_DEVICE_PATH,\r
-  HW_CONTROLLER_DP,\r
-  DevPathToTextController,\r
-  ACPI_DEVICE_PATH,\r
-  ACPI_DP,\r
-  DevPathToTextAcpi,\r
-  ACPI_DEVICE_PATH,\r
-  ACPI_EXTENDED_DP,\r
-  DevPathToTextExtAcpi,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_ATAPI_DP,\r
-  DevPathToTextAtapi,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_SCSI_DP,\r
-  DevPathToTextScsi,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_FIBRECHANNEL_DP,\r
-  DevPathToTextFibre,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_1394_DP,\r
-  DevPathToText1394,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_USB_DP,\r
-  DevPathToTextUsb,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_USB_WWID_DP,\r
-  DevPathToTextUsbWWID,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_DEVICE_LOGICAL_UNIT_DP,\r
-  DevPathToTextLogicalUnit,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_USB_CLASS_DP,\r
-  DevPathToTextUsbClass,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_I2O_DP,\r
-  DevPathToTextI2O,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_MAC_ADDR_DP,\r
-  DevPathToTextMacAddr,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_IPv4_DP,\r
-  DevPathToTextIPv4,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_IPv6_DP,\r
-  DevPathToTextIPv6,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_INFINIBAND_DP,\r
-  DevPathToTextInfiniBand,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_UART_DP,\r
-  DevPathToTextUart,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_VENDOR_DP,\r
-  DevPathToTextVendor,\r
-  MESSAGING_DEVICE_PATH,\r
-  MSG_ISCSI_DP,\r
-  DevPathToTextiSCSI,\r
-  MEDIA_DEVICE_PATH,\r
-  MEDIA_HARDDRIVE_DP,\r
-  DevPathToTextHardDrive,\r
-  MEDIA_DEVICE_PATH,\r
-  MEDIA_CDROM_DP,\r
-  DevPathToTextCDROM,\r
-  MEDIA_DEVICE_PATH,\r
-  MEDIA_VENDOR_DP,\r
-  DevPathToTextVendor,\r
-  MEDIA_DEVICE_PATH,\r
-  MEDIA_FILEPATH_DP,\r
-  DevPathToTextFilePath,\r
-  MEDIA_DEVICE_PATH,\r
-  MEDIA_PROTOCOL_DP,\r
-  DevPathToTextMediaProtocol,\r
-  MEDIA_DEVICE_PATH,\r
-  MEDIA_FILEPATH_DP,\r
-  DevPathToTextFilePath,\r
-  BBS_DEVICE_PATH,\r
-  BBS_BBS_DP,\r
-  DevPathToTextBBS,\r
-  END_DEVICE_PATH_TYPE,\r
-  END_INSTANCE_DEVICE_PATH_SUBTYPE,\r
-  DevPathToTextEndInstance,\r
-  0,\r
-  0,\r
-  NULL\r
+  {HARDWARE_DEVICE_PATH, HW_PCI_DP, DevPathToTextPci},\r
+  {HARDWARE_DEVICE_PATH, HW_PCCARD_DP, DevPathToTextPccard},\r
+  {HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, DevPathToTextMemMap},\r
+  {HARDWARE_DEVICE_PATH, HW_VENDOR_DP, DevPathToTextVendor},\r
+  {HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, DevPathToTextController},\r
+  {ACPI_DEVICE_PATH, ACPI_DP, DevPathToTextAcpi},\r
+  {ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, DevPathToTextExtAcpi},\r
+  {MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, DevPathToTextAtapi},\r
+  {MESSAGING_DEVICE_PATH, MSG_SCSI_DP, DevPathToTextScsi},\r
+  {MESSAGING_DEVICE_PATH, MSG_FIBRECHANNEL_DP, DevPathToTextFibre},\r
+  {MESSAGING_DEVICE_PATH, MSG_1394_DP, DevPathToText1394},\r
+  {MESSAGING_DEVICE_PATH, MSG_USB_DP, DevPathToTextUsb},\r
+  {MESSAGING_DEVICE_PATH, MSG_USB_WWID_DP, DevPathToTextUsbWWID},\r
+  {MESSAGING_DEVICE_PATH, MSG_DEVICE_LOGICAL_UNIT_DP, DevPathToTextLogicalUnit},\r
+  {MESSAGING_DEVICE_PATH, MSG_USB_CLASS_DP, DevPathToTextUsbClass},\r
+  {MESSAGING_DEVICE_PATH, MSG_I2O_DP, DevPathToTextI2O},\r
+  {MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, DevPathToTextMacAddr},\r
+  {MESSAGING_DEVICE_PATH, MSG_IPv4_DP, DevPathToTextIPv4},\r
+  {MESSAGING_DEVICE_PATH, MSG_IPv6_DP, DevPathToTextIPv6},\r
+  {MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, DevPathToTextInfiniBand},\r
+  {MESSAGING_DEVICE_PATH, MSG_UART_DP, DevPathToTextUart},\r
+  {MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, DevPathToTextVendor},\r
+  {MESSAGING_DEVICE_PATH, MSG_ISCSI_DP, DevPathToTextiSCSI},\r
+  {MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, DevPathToTextHardDrive},\r
+  {MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, DevPathToTextCDROM},\r
+  {MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, DevPathToTextVendor},\r
+  {MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, DevPathToTextFilePath},\r
+  {MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, DevPathToTextMediaProtocol},\r
+  {MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, DevPathToTextFilePath},\r
+  {BBS_DEVICE_PATH, BBS_BBS_DP, DevPathToTextBBS},\r
+  {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, DevPathToTextEndInstance},\r
+  {0, 0, NULL}\r
 };\r
 \r
 CHAR16 *\r
index 2b54c76..a702595 100644 (file)
@@ -19,12 +19,10 @@ Abstract:
 
 --*/
 
-#include <protocol/DevicePathUtilities.h>
-#include <protocol/DevicePath.h>
 #include "DevicePath.h"
 
 UINTN
-GetDevicePathSize (
+GetDevicePathSizeProtocolInterface (
   IN CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath
   )
 /*++
@@ -40,28 +38,11 @@ GetDevicePathSize (
 
 --*/
 {
-  CONST EFI_DEVICE_PATH_PROTOCOL  *Start;
-
-  if (DevicePath == NULL) {
-    return 0;
-  }
-
-  //
-  // Search for the end of the device path structure
-  //
-  Start = (EFI_DEVICE_PATH_PROTOCOL *) DevicePath;
-  while (!IsDevicePathEnd (DevicePath)) {
-    DevicePath = NextDevicePathNode (DevicePath);
-  }
-
-  //
-  // Compute the size and add back in the size of the end device path structure
-  //
-  return ((UINTN) DevicePath - (UINTN) Start) + sizeof (EFI_DEVICE_PATH_PROTOCOL);
+  return GetDevicePathSize (DevicePath);
 }
 
 EFI_DEVICE_PATH_PROTOCOL *
-DuplicateDevicePath (
+DuplicateDevicePathProtocolInterface (
   IN CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath
   )
 /*++
@@ -78,31 +59,11 @@ DuplicateDevicePath (
 
 --*/
 {
-  EFI_DEVICE_PATH_PROTOCOL  *NewDevicePath;
-  UINTN                     Size;
-
-  if (DevicePath == NULL) {
-    return NULL;
-  }
-
-  //
-  // Compute the size
-  //
-  Size = GetDevicePathSize (DevicePath);
-  if (Size == 0) {
-    return NULL;
-  }
-
-  //
-  // Allocate space for duplicate device path
-  //
-  NewDevicePath = AllocateCopyPool (Size, (VOID *) DevicePath);
-
-  return NewDevicePath;
+  return DuplicateDevicePath (DevicePath);
 }
 
 EFI_DEVICE_PATH_PROTOCOL *
-AppendDevicePath (
+AppendDevicePathProtocolInterface (
   IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
   IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
   )
@@ -122,48 +83,11 @@ AppendDevicePath (
 
 --*/
 {
-  UINTN                     Size;
-  UINTN                     Size1;
-  UINTN                     Size2;
-  EFI_DEVICE_PATH_PROTOCOL  *NewDevicePath;
-  EFI_DEVICE_PATH_PROTOCOL  *SecondDevicePath;
-
-  //
-  // If there's only 1 path, just duplicate it
-  //
-  if (Src1 == NULL) {
-    ASSERT (!IsDevicePathUnpacked (Src2));
-    return DuplicateDevicePath (Src2);
-  }
-
-  if (Src2 == NULL) {
-    ASSERT (!IsDevicePathUnpacked (Src1));
-    return DuplicateDevicePath (Src1);
-  }
-
-  //
-  // Allocate space for the combined device path. It only has one end node of
-  // length EFI_DEVICE_PATH_PROTOCOL
-  //
-  Size1         = GetDevicePathSize (Src1);
-  Size2         = GetDevicePathSize (Src2);
-  Size          = Size1 + Size2 - sizeof (EFI_DEVICE_PATH_PROTOCOL);
-
-  NewDevicePath = AllocateCopyPool (Size, (VOID *) Src1);
-
-  if (NewDevicePath != NULL) {
-    //
-    // Over write Src1 EndNode and do the copy
-    //
-    SecondDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) ((CHAR8 *) NewDevicePath + (Size1 - sizeof (EFI_DEVICE_PATH_PROTOCOL)));
-    CopyMem (SecondDevicePath, (VOID *) Src2, Size2);
-  }
-
-  return NewDevicePath;
+  return AppendDevicePath (Src1, Src2);
 }
 
 EFI_DEVICE_PATH_PROTOCOL *
-AppendDeviceNode (
+AppendDeviceNodeProtocolInterface (
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
   )
@@ -183,41 +107,11 @@ AppendDeviceNode (
 
 --*/
 {
-  EFI_DEVICE_PATH_PROTOCOL  *Temp;
-  EFI_DEVICE_PATH_PROTOCOL  *NextNode;
-  EFI_DEVICE_PATH_PROTOCOL  *NewDevicePath;
-  UINTN                     NodeLength;
-
-  if ((DevicePath == NULL) || (DeviceNode == NULL)) {
-    return NULL;
-  }
-
-  //
-  // Build a Node that has a terminator on it
-  //
-  NodeLength  = DevicePathNodeLength (DeviceNode);
-
-  Temp        = AllocateCopyPool (NodeLength + sizeof (EFI_DEVICE_PATH_PROTOCOL), (VOID *) DeviceNode);
-  if (Temp == NULL) {
-    return NULL;
-  }
-
-  //
-  // Add and end device path node to convert Node to device path
-  //
-  NextNode = NextDevicePathNode (Temp);
-  SetDevicePathEndNode (NextNode);
-
-  //
-  // Append device paths
-  //
-  NewDevicePath = AppendDevicePath (DevicePath, Temp);
-  gBS->FreePool (Temp);
-  return NewDevicePath;
+  return AppendDevicePathNode (DevicePath, DeviceNode);
 }
 
 EFI_DEVICE_PATH_PROTOCOL *
-AppendDevicePathInstance (
+AppendDevicePathInstanceProtocolInterface (
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
   )
@@ -236,42 +130,11 @@ AppendDevicePathInstance (
 
 --*/
 {
-  UINT8                     *Ptr;
-  EFI_DEVICE_PATH_PROTOCOL  *DevPath;
-  UINTN                     SrcSize;
-  UINTN                     InstanceSize;
-
-  if (DevicePathInstance == NULL) {
-    return NULL;
-  }
-
-  if (DevicePath == NULL) {
-    return DuplicateDevicePath (DevicePathInstance);
-  }
-
-  SrcSize       = GetDevicePathSize (DevicePath);
-  InstanceSize  = GetDevicePathSize (DevicePathInstance);
-
-  Ptr           = AllocateCopyPool (SrcSize + InstanceSize, (VOID *) DevicePath);
-  if (Ptr != NULL) {
-
-    DevPath = (EFI_DEVICE_PATH_PROTOCOL *) (Ptr + (SrcSize - sizeof (EFI_DEVICE_PATH_PROTOCOL)));
-    //
-    // Convert the End to an End Instance, since we are
-    //  appending another instacne after this one its a good
-    //  idea.
-    //
-    DevPath->SubType  = END_INSTANCE_DEVICE_PATH_SUBTYPE;
-
-    DevPath           = NextDevicePathNode (DevPath);
-    CopyMem (DevPath, (VOID *) DevicePathInstance, InstanceSize);
-  }
-
-  return (EFI_DEVICE_PATH_PROTOCOL *) Ptr;
+  return AppendDevicePathInstance (DevicePath, DevicePathInstance);
 }
 
 EFI_DEVICE_PATH_PROTOCOL *
-GetNextDevicePathInstance (
+GetNextDevicePathInstanceProtocolInterface (
   IN OUT EFI_DEVICE_PATH_PROTOCOL   **DevicePathInstance,
   OUT UINTN                         *DevicePathInstanceSize
   )
@@ -294,56 +157,11 @@ GetNextDevicePathInstance (
 
 --*/
 {
-  EFI_DEVICE_PATH_PROTOCOL  *DevPath;
-  EFI_DEVICE_PATH_PROTOCOL  *ReturnValue;
-  UINT8                     Temp;
-
-  if (*DevicePathInstance == NULL) {
-    if (DevicePathInstanceSize != NULL) {
-      *DevicePathInstanceSize = 0;
-    }
-
-    return NULL;
-  }
-
-  //
-  // Find the end of the device path instance
-  //
-  DevPath = *DevicePathInstance;
-  while (!IsDevicePathEndType (DevPath)) {
-    DevPath = NextDevicePathNode (DevPath);
-  }
-
-  //
-  // Compute the size of the device path instance
-  //
-  if (DevicePathInstanceSize != NULL) {
-    *DevicePathInstanceSize = ((UINTN) DevPath - (UINTN) (*DevicePathInstance)) + sizeof (EFI_DEVICE_PATH_PROTOCOL);
-  }
-
-  //
-  // Make a copy and return the device path instance
-  //
-  Temp              = DevPath->SubType;
-  DevPath->SubType  = END_ENTIRE_DEVICE_PATH_SUBTYPE;
-  ReturnValue       = DuplicateDevicePath (*DevicePathInstance);
-  DevPath->SubType  = Temp;
-
-  //
-  // If DevPath is the end of an entire device path, then another instance
-  // does not follow, so *DevicePath is set to NULL.
-  //
-  if (DevicePathSubType (DevPath) == END_ENTIRE_DEVICE_PATH_SUBTYPE) {
-    *DevicePathInstance = NULL;
-  } else {
-    *DevicePathInstance = NextDevicePathNode (DevPath);
-  }
-
-  return ReturnValue;
+  return GetNextDevicePathInstance (DevicePathInstance, DevicePathInstanceSize);
 }
 
 BOOLEAN
-IsDevicePathMultiInstance (
+IsDevicePathMultiInstanceProtocolInterface (
   IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
   )
 /*++
@@ -360,26 +178,11 @@ IsDevicePathMultiInstance (
 
 --*/
 {
-  CONST EFI_DEVICE_PATH_PROTOCOL  *Node;
-
-  if (DevicePath == NULL) {
-    return FALSE;
-  }
-
-  Node = DevicePath;
-  while (!IsDevicePathEnd (Node)) {
-    if (EfiIsDevicePathEndInstance (Node)) {
-      return TRUE;
-    }
-
-    Node = NextDevicePathNode (Node);
-  }
-
-  return FALSE;
+  return IsDevicePathMultiInstance (DevicePath);
 }
 
 EFI_DEVICE_PATH_PROTOCOL *
-CreateDeviceNode (
+CreateDeviceNodeProtocolInterface (
   IN UINT8  NodeType,
   IN UINT8  NodeSubType,
   IN UINT16 NodeLength
@@ -404,18 +207,5 @@ CreateDeviceNode (
 
 --*/
 {
-  EFI_DEVICE_PATH_PROTOCOL  *Node;
-
-  if (NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL)) {
-    return NULL;
-  }
-
-  Node = (EFI_DEVICE_PATH_PROTOCOL *) AllocateZeroPool ((UINTN) NodeLength);
-  if (Node != NULL) {
-    Node->Type    = NodeType;
-    Node->SubType = NodeSubType;
-    SetDevicePathNodeLength (Node, NodeLength);
-  }
-
-  return Node;
+  return CreateDeviceNode (NodeType, NodeSubType, NodeLength);
 }
index 24b1a53..526d7d7 100644 (file)
@@ -566,46 +566,46 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <MaxDatumSize>1</MaxDatumSize>
           <Value>TRUE</Value>
         </PcdData>
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseSerial</C_Name>\r
-          <Token>0x00010022</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>
-          <Value>FALSE</Value>\r
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseMemory</C_Name>\r
-          <Token>0x00010023</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>
-          <Value>FALSE</Value>\r
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseOEM</C_Name>\r
-          <Token>0x00010024</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>
-          <Value>TRUE</Value>\r
-        </PcdData>\r
-        <PcdData ItemType="PATCHABLE_IN_MODULE">\r
-          <C_Name>PcdStatusCodeMemorySize</C_Name>\r
-          <Token>0x00010025</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>UINT16</DatumType>\r
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseSerial</C_Name>
+          <Token>0x00010022</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>FALSE</Value>
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseMemory</C_Name>
+          <Token>0x00010023</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>FALSE</Value>
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseOEM</C_Name>
+          <Token>0x00010024</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>TRUE</Value>
+        </PcdData>
+        <PcdData ItemType="PATCHABLE_IN_MODULE">
+          <C_Name>PcdStatusCodeMemorySize</C_Name>
+          <Token>0x00010025</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT16</DatumType>
           <MaxDatumSize>2</MaxDatumSize>
-          <Value>1</Value>\r
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNt32StatusCodeLibUseForPei</C_Name>\r
-          <Token>0x0000100b</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkNt32PkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>
-          <Value>TRUE</Value>\r
-        </PcdData>\r
+          <Value>1</Value>
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdNt32StatusCodeLibUseForPei</C_Name>
+          <Token>0x0000100b</Token>
+          <TokenSpaceGuidCName>gEfiEdkNt32PkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>TRUE</Value>
+        </PcdData>
       </PcdBuildDefinition>
       <ModuleSaBuildOptions>
         <FvBinding>FV_RECOVERY</FvBinding>
@@ -2463,94 +2463,94 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <MaxDatumSize>1</MaxDatumSize>
           <Value>TRUE</Value>
         </PcdData>
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseEfiSerial</C_Name>\r
-          <Token>0x00010026</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseEfiSerial</C_Name>
+          <Token>0x00010026</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
           <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseHardSerial</C_Name>\r
-          <Token>0x00010027</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseHardSerial</C_Name>
+          <Token>0x00010027</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseRuntimeMemory</C_Name>\r
-          <Token>0x00010028</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseRuntimeMemory</C_Name>
+          <Token>0x00010028</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseDataHub</C_Name>\r
-          <Token>0x00010029</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseDataHub</C_Name>
+          <Token>0x00010029</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeUseOEM</C_Name>\r
-          <Token>0x00010024</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>
-          <Value>TRUE</Value>\r
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeReplayInSerial</C_Name>\r
-          <Token>0x0001002a</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeUseOEM</C_Name>
+          <Token>0x00010024</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>TRUE</Value>
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeReplayInSerial</C_Name>
+          <Token>0x0001002a</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeReplayInRuntimeMemory</C_Name>\r
-          <Token>0x0001002b</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeReplayInRuntimeMemory</C_Name>
+          <Token>0x0001002b</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeReplayInDataHub</C_Name>\r
-          <Token>0x0001002c</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeReplayInDataHub</C_Name>
+          <Token>0x0001002c</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdStatusCodeReplayInOEM</C_Name>\r
-          <Token>0x0001002c</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdStatusCodeReplayInOEM</C_Name>
+          <Token>0x0001002c</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
           <MaxDatumSize>1</MaxDatumSize>
           <Value>FALSE</Value>
-        </PcdData>\r
-        <PcdData ItemType="PATCHABLE_IN_MODULE">\r
-          <C_Name>PcdStatusCodeRuntimeMemorySize</C_Name>\r
-          <Token>0x0001002d</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>UINT16</DatumType>\r
+        </PcdData>
+        <PcdData ItemType="PATCHABLE_IN_MODULE">
+          <C_Name>PcdStatusCodeRuntimeMemorySize</C_Name>
+          <Token>0x0001002d</Token>
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>UINT16</DatumType>
           <MaxDatumSize>2</MaxDatumSize>
           <Value>128</Value>
-        </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNt32StatusCodeLibUseForPei</C_Name>\r
-          <Token>0x0000100b</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkNt32PkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>
-          <Value>FALSE</Value>\r
-        </PcdData>\r
+        </PcdData>
+        <PcdData ItemType="FEATURE_FLAG">
+          <C_Name>PcdNt32StatusCodeLibUseForPei</C_Name>
+          <Token>0x0000100b</Token>
+          <TokenSpaceGuidCName>gEfiEdkNt32PkgTokenSpaceGuid</TokenSpaceGuidCName>
+          <DatumType>BOOLEAN</DatumType>
+          <MaxDatumSize>1</MaxDatumSize>
+          <Value>FALSE</Value>
+        </PcdData>
       </PcdBuildDefinition>
       <ModuleSaBuildOptions>
         <FvBinding>FV_RECOVERY</FvBinding>
@@ -3682,6 +3682,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
         <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+        <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
       </Libraries>
       <PcdBuildDefinition>
         <PcdData ItemType="FIXED_AT_BUILD">