Move ConPlatform module from EdkNT32 package to EdkModulePkg, and remove EdkPeCoffLoa...
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 13 Sep 2006 05:02:30 +0000 (05:02 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 13 Sep 2006 05:02:30 +0000 (05:02 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1523 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h
EdkModulePkg/Core/DxeIplX64Peim/DxeIplX64.msa
EdkModulePkg/Core/DxeIplX64Peim/DxeLoadX64.c
EdkModulePkg/EdkModulePkg.fpd
EdkModulePkg/EdkModulePkg.spd
EdkModulePkg/Universal/ConPlatform/Dxe/ComponentName.c [new file with mode: 0644]
EdkModulePkg/Universal/ConPlatform/Dxe/ComponentName.h [new file with mode: 0644]
EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c [new file with mode: 0644]
EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h [new file with mode: 0644]
EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.msa [new file with mode: 0644]

index 5e35042..13b1a69 100644 (file)
@@ -115,7 +115,7 @@ PeimInitializeDxeIpl (
   );\r
 \r
 EFI_STATUS\r
-PeiLoadx64File (\r
+PeiLoadPeImage (\r
   IN  EFI_PEI_PE_COFF_LOADER_PROTOCOL           *PeiEfiPeiPeCoffLoader,\r
   IN  VOID                                      *Pe32Data,\r
   IN  EFI_MEMORY_TYPE                           MemoryType,\r
index 929a627..849842d 100644 (file)
@@ -42,9 +42,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>HobLib</Keyword>\r
     </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>PerformanceLib</Keyword>\r
-    </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>PeiServicesLib</Keyword>\r
     </LibraryClass>\r
@@ -75,9 +72,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>MemoryAllocationLib</Keyword>\r
     </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>EdkPeCoffLoaderX64Lib</Keyword>\r
-    </LibraryClass>\r
   </LibraryClassDefinitions>\r
   <SourceFiles>\r
     <Filename>DxeIpl.dxs</Filename>\r
index 9a036e6..4015222 100644 (file)
@@ -247,7 +247,7 @@ Returns:
   //\r
   // Install the PEI Protocols that are shared between PEI and DXE\r
   //\r
-  PeiEfiPeiPeCoffLoader = (EFI_PEI_PE_COFF_LOADER_PROTOCOL *)GetPeCoffLoaderX64Protocol ();\r
+  PeiEfiPeiPeCoffLoader = (EFI_PEI_PE_COFF_LOADER_PROTOCOL *)GetPeCoffLoaderProtocol ();\r
   ASSERT (PeiEfiPeiPeCoffLoader != NULL);\r
 \r
   //\r
@@ -313,7 +313,7 @@ Returns:
   //\r
   // Load the DXE Core from a Firmware Volume\r
   //\r
-  Status = PeiLoadx64File (\r
+  Status = PeiLoadPeImage (\r
              PeiEfiPeiPeCoffLoader,\r
              DxeCorePe32Data,\r
              EfiBootServicesData,\r
@@ -446,7 +446,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
-PeiLoadx64File (\r
+PeiLoadPeImage (\r
   IN  EFI_PEI_PE_COFF_LOADER_PROTOCOL           *PeiEfiPeiPeCoffLoader,\r
   IN  VOID                                      *Pe32Data,\r
   IN  EFI_MEMORY_TYPE                           MemoryType,\r
@@ -578,7 +578,7 @@ Returns:
   //\r
   // Relocate DxeIpl into memory by using loadfile service\r
   //\r
-  Status = PeiLoadx64File (\r
+  Status = PeiLoadPeImage (\r
             PeiEfiPeiPeCoffLoader,\r
             (VOID *) (Section + 1),\r
             EfiBootServicesData,\r
@@ -659,7 +659,7 @@ Returns:
   //\r
   // Load the PE image from the FFS file\r
   //\r
-  Status = PeiLoadx64File (\r
+  Status = PeiLoadPeImage (\r
             PeiEfiPeiPeCoffLoader,\r
             Pe32Data,\r
             EfiBootServicesData,\r
index 5a71aa6..77f402c 100644 (file)
         <FfsFormatKey>PE32_PEIM</FfsFormatKey>\r
       </ModuleSaBuildOptions>\r
     </ModuleSA>\r
+    <ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="51ccf399-4fdf-4e55-a45b-e123f84d456a">\r
+      <Libraries>\r
+        <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>\r
+        <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      </Libraries>\r
+      <PcdBuildDefinition>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdReportStatusCodePropertyMask</C_Name>\r
+          <Token>0x00000007</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x06</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPropertyMask</C_Name>\r
+          <Token>0x00000005</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x0f</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugClearMemoryValue</C_Name>\r
+          <Token>0x00000008</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0xAF</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPrintErrorLevel</C_Name>\r
+          <Token>0x00000006</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>0x80000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumUnicodeStringLength</C_Name>\r
+          <Token>0x00000001</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumAsciiStringLength</C_Name>\r
+          <Token>0x00000002</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumLinkedListLength</C_Name>\r
+          <Token>0x00000003</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdSpinLockTimeout</C_Name>\r
+          <Token>0x00000004</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>10000000</Value>\r
+        </PcdData>\r
+      </PcdBuildDefinition>\r
+      <ModuleSaBuildOptions>\r
+        <FvBinding>NULL</FvBinding>\r
+        <FfsFormatKey>BS_DRIVER</FfsFormatKey>\r
+      </ModuleSaBuildOptions>\r
+    </ModuleSA>\r
+    <ModuleSA SupArchList="X64" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="51ccf399-4fdf-4e55-a45b-e123f84d456a">\r
+      <Libraries>\r
+        <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>\r
+        <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      </Libraries>\r
+      <PcdBuildDefinition>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdReportStatusCodePropertyMask</C_Name>\r
+          <Token>0x00000007</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x06</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPropertyMask</C_Name>\r
+          <Token>0x00000005</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x0f</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugClearMemoryValue</C_Name>\r
+          <Token>0x00000008</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0xAF</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPrintErrorLevel</C_Name>\r
+          <Token>0x00000006</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>0x80000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumUnicodeStringLength</C_Name>\r
+          <Token>0x00000001</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumAsciiStringLength</C_Name>\r
+          <Token>0x00000002</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumLinkedListLength</C_Name>\r
+          <Token>0x00000003</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdSpinLockTimeout</C_Name>\r
+          <Token>0x00000004</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>10000000</Value>\r
+        </PcdData>\r
+      </PcdBuildDefinition>\r
+      <ModuleSaBuildOptions>\r
+        <FvBinding>NULL</FvBinding>\r
+        <FfsFormatKey>BS_DRIVER</FfsFormatKey>\r
+      </ModuleSaBuildOptions>\r
+    </ModuleSA>\r
+    <ModuleSA SupArchList="IPF" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="51ccf399-4fdf-4e55-a45b-e123f84d456a">\r
+      <Libraries>\r
+        <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>\r
+        <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      </Libraries>\r
+      <PcdBuildDefinition>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdReportStatusCodePropertyMask</C_Name>\r
+          <Token>0x00000007</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x06</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPropertyMask</C_Name>\r
+          <Token>0x00000005</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x0f</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugClearMemoryValue</C_Name>\r
+          <Token>0x00000008</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0xAF</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPrintErrorLevel</C_Name>\r
+          <Token>0x00000006</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>0x80000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumUnicodeStringLength</C_Name>\r
+          <Token>0x00000001</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumAsciiStringLength</C_Name>\r
+          <Token>0x00000002</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumLinkedListLength</C_Name>\r
+          <Token>0x00000003</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdSpinLockTimeout</C_Name>\r
+          <Token>0x00000004</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>10000000</Value>\r
+        </PcdData>\r
+      </PcdBuildDefinition>\r
+      <ModuleSaBuildOptions>\r
+        <FvBinding>NULL</FvBinding>\r
+        <FfsFormatKey>BS_DRIVER</FfsFormatKey>\r
+      </ModuleSaBuildOptions>\r
+    </ModuleSA>\r
+    <ModuleSA SupArchList="EBC" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="51ccf399-4fdf-4e55-a45b-e123f84d456a">\r
+      <Libraries>\r
+        <Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="19cbbb97-ff61-45ff-8c3f-dfa66dd118c8" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>\r
+        <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+      </Libraries>\r
+      <PcdBuildDefinition>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdReportStatusCodePropertyMask</C_Name>\r
+          <Token>0x00000007</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x06</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPropertyMask</C_Name>\r
+          <Token>0x00000005</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x0f</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugClearMemoryValue</C_Name>\r
+          <Token>0x00000008</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0xAF</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdDebugPrintErrorLevel</C_Name>\r
+          <Token>0x00000006</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>0x80000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumUnicodeStringLength</C_Name>\r
+          <Token>0x00000001</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumAsciiStringLength</C_Name>\r
+          <Token>0x00000002</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdMaximumLinkedListLength</C_Name>\r
+          <Token>0x00000003</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>1000000</Value>\r
+        </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdSpinLockTimeout</C_Name>\r
+          <Token>0x00000004</Token>\r
+          <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT32</DatumType>\r
+          <MaxDatumSize>4</MaxDatumSize>\r
+          <Value>10000000</Value>\r
+        </PcdData>\r
+      </PcdBuildDefinition>\r
+      <ModuleSaBuildOptions>\r
+        <FvBinding>NULL</FvBinding>\r
+        <FfsFormatKey>BS_DRIVER</FfsFormatKey>\r
+      </ModuleSaBuildOptions>\r
+    </ModuleSA>\r
   </FrameworkModules>\r
   <DynamicPcdBuildDefinitions>\r
     <PcdBuildData ItemType="DYNAMIC">\r
index c449fd4..02d2867 100644 (file)
     <Filename>Universal/WatchdogTimer/Dxe/WatchDogTimer.msa</Filename>\r
     <Filename>Universal/StatusCode/Pei/PeiStatusCode.msa</Filename>\r
     <Filename>Universal/StatusCode/Dxe/DxeStatusCode.msa</Filename>\r
+    <Filename>Universal/ConPlatform/Dxe/ConPlatform.msa</Filename>\r
   </MsaFiles>\r
   <PackageHeaders>\r
     <IncludePkgHeader ModuleType="SEC">Include/EdkPeim.h</IncludePkgHeader>\r
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ComponentName.c b/EdkModulePkg/Universal/ConPlatform/Dxe/ComponentName.c
new file mode 100644 (file)
index 0000000..f854499
--- /dev/null
@@ -0,0 +1,141 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  ComponentName.c\r
+\r
+Abstract:\r
+\r
+--*/\r
+\r
+#include "ConPlatform.h"\r
+#include "ComponentName.h"\r
+\r
+//\r
+// EFI Component Name Protocol\r
+//\r
+EFI_COMPONENT_NAME_PROTOCOL     gConPlatformComponentName = {\r
+  ConPlatformComponentNameGetDriverName,\r
+  ConPlatformComponentNameGetControllerName,\r
+  "eng"\r
+};\r
+\r
+STATIC EFI_UNICODE_STRING_TABLE mConPlatformDriverNameTable[] = {\r
+  {\r
+    "eng",\r
+    L"Platform Console Management Driver"\r
+  },\r
+  {\r
+    NULL,\r
+    NULL\r
+  }\r
+};\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
+\r
+  Arguments:\r
+    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+    Language   - A pointer to a three character ISO 639-2 language identifier.\r
+                 This is the language of the driver name that that the caller \r
+                 is requesting, and it must match one of the languages specified\r
+                 in SupportedLanguages.  The number of languages supported by a \r
+                 driver is up to the driver writer.\r
+    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
+                 is the name of the driver specified by This in the language \r
+                 specified by Language.\r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The Unicode string for the Driver specified by This\r
+                            and the language specified by Language was returned \r
+                            in DriverName.\r
+    EFI_INVALID_PARAMETER - Language is NULL.\r
+    EFI_INVALID_PARAMETER - DriverName is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
+                            language specified by Language.\r
+\r
+--*/\r
+{\r
+  return LookupUnicodeString (\r
+           Language,\r
+           gConPlatformComponentName.SupportedLanguages,\r
+           mConPlatformDriverNameTable,\r
+           DriverName\r
+           );\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Retrieves a Unicode string that is the user readable name of the controller\r
+    that is being managed by an EFI Driver.\r
+\r
+  Arguments:\r
+    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+    ControllerHandle - The handle of a controller that the driver specified by \r
+                       This is managing.  This handle specifies the controller \r
+                       whose name is to be returned.\r
+    ChildHandle      - The handle of the child controller to retrieve the name \r
+                       of.  This is an optional parameter that may be NULL.  It \r
+                       will be NULL for device drivers.  It will also be NULL \r
+                       for a bus drivers that wish to retrieve the name of the \r
+                       bus controller.  It will not be NULL for a bus driver \r
+                       that wishes to retrieve the name of a child controller.\r
+    Language         - A pointer to a three character ISO 639-2 language \r
+                       identifier.  This is the language of the controller name \r
+                       that that the caller is requesting, and it must match one\r
+                       of the languages specified in SupportedLanguages.  The \r
+                       number of languages supported by a driver is up to the \r
+                       driver writer.\r
+    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
+                       string is the name of the controller specified by \r
+                       ControllerHandle and ChildHandle in the language \r
+                       specified by Language from the point of view of the \r
+                       driver specified by This. \r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The Unicode string for the user readable name in the\r
+                            language specified by Language for the driver \r
+                            specified by This was returned in DriverName.\r
+    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid \r
+                            EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - Language is NULL.\r
+    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This is not currently \r
+                            managing the controller specified by \r
+                            ControllerHandle and ChildHandle.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
+                            language specified by Language.\r
+\r
+--*/\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ComponentName.h b/EdkModulePkg/Universal/ConPlatform/Dxe/ComponentName.h
new file mode 100644 (file)
index 0000000..3bada84
--- /dev/null
@@ -0,0 +1,44 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+    ComponentName.h\r
+    \r
+Abstract:\r
+\r
+--*/\r
+\r
+#ifndef CON_MANAGE_COMPONENT_NAME_H_\r
+#define CON_MANAGE_COMPONENT_NAME_H_\r
+\r
+//\r
+// EFI Component Name Functions\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  );\r
+\r
+#endif\r
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c
new file mode 100644 (file)
index 0000000..4b7d279
--- /dev/null
@@ -0,0 +1,811 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+    ConPlatform.c\r
+    \r
+Abstract:\r
+\r
+--*/\r
+\r
+#include "ConPlatform.h"\r
+\r
+EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = {\r
+  ConPlatformTextInDriverBindingSupported,\r
+  ConPlatformTextInDriverBindingStart,\r
+  ConPlatformDriverBindingStop,\r
+  0x10,\r
+  NULL,\r
+  NULL\r
+};\r
+\r
+EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding = {\r
+  ConPlatformTextOutDriverBindingSupported,\r
+  ConPlatformTextOutDriverBindingStart,\r
+  ConPlatformDriverBindingStop,\r
+  0x10,\r
+  NULL,\r
+  NULL\r
+};\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextInDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Supported \r
+\r
+Arguments:\r
+  (Standard DriverBinding Protocol Supported() function)\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+{\r
+  return ConPlatformDriverBindingSupported (\r
+          This,\r
+          ControllerHandle,\r
+          RemainingDevicePath,\r
+          &gEfiSimpleTextInProtocolGuid\r
+          );\r
+}\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextOutDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Supported \r
+\r
+Arguments:\r
+  (Standard DriverBinding Protocol Supported() function)\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+{\r
+  return ConPlatformDriverBindingSupported (\r
+          This,\r
+          ControllerHandle,\r
+          RemainingDevicePath,\r
+          &gEfiSimpleTextOutProtocolGuid\r
+          );\r
+}\r
+\r
+EFI_STATUS\r
+ConPlatformDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath,\r
+  IN  EFI_GUID                     *ProtocolGuid\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Supported \r
+\r
+Arguments:\r
+  (Standard DriverBinding Protocol Supported() function)\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+  VOID        *Interface;\r
+\r
+  //\r
+  // Test to see if this is a physical device by checking to see if\r
+  // it has a Device Path Protocol\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  NULL,\r
+                  This->DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  //\r
+  // Test to see if this device supports the Simple Text Output Protocol\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  ProtocolGuid,\r
+                  (VOID **) &Interface,\r
+                  This->DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  gBS->CloseProtocol (\r
+        ControllerHandle,\r
+        ProtocolGuid,\r
+        This->DriverBindingHandle,\r
+        ControllerHandle\r
+        );\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextInDriverBindingStart (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL   *This,\r
+  IN  EFI_HANDLE                    ControllerHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+\r
+Arguments:\r
+  (Standard DriverBinding Protocol Start() function)\r
+\r
+Returns:\r
+\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                  Status;\r
+  EFI_DEVICE_PATH_PROTOCOL    *DevicePath;\r
+  EFI_SIMPLE_TEXT_IN_PROTOCOL *TextIn;\r
+\r
+  //\r
+  // Get the Device Path Protocol so the environment variables can be updated\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  (VOID **) &DevicePath,\r
+                  This->DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  //\r
+  // Open the Simple Input Protocol BY_DRIVER\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiSimpleTextInProtocolGuid,\r
+                  (VOID **) &TextIn,\r
+                  This->DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  //\r
+  // Check the device handle, if it is a hot plug device,\r
+  // do not put the device path into ConInDev, and install\r
+  // gEfiConsoleInDeviceGuid to the device handle directly.\r
+  // The policy is, make hot plug device plug in and play immediately.\r
+  //\r
+  if (IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {\r
+    gBS->InstallMultipleProtocolInterfaces (\r
+          &ControllerHandle,\r
+          &gEfiConsoleInDeviceGuid,\r
+          NULL,\r
+          NULL\r
+          );\r
+  } else {\r
+    //\r
+    // Append the device path to the ConInDev environment variable\r
+    //\r
+    ConPlatformUpdateDeviceVariable (\r
+      VarConsoleInpDev,\r
+      DevicePath,\r
+      APPEND\r
+      );\r
+\r
+    //\r
+    // If the device path is an instance in the ConIn environment variable,\r
+    // then install EfiConsoleInDeviceGuid onto ControllerHandle\r
+    //\r
+    Status = ConPlatformUpdateDeviceVariable (\r
+              VarConsoleInp,\r
+              DevicePath,\r
+              CHECK\r
+              );\r
+\r
+    if (!EFI_ERROR (Status)) {\r
+      gBS->InstallMultipleProtocolInterfaces (\r
+            &ControllerHandle,\r
+            &gEfiConsoleInDeviceGuid,\r
+            NULL,\r
+            NULL\r
+            );\r
+    } else {\r
+      gBS->CloseProtocol (\r
+            ControllerHandle,\r
+            &gEfiSimpleTextInProtocolGuid,\r
+            This->DriverBindingHandle,\r
+            ControllerHandle\r
+            );\r
+    }\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextOutDriverBindingStart (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL   *This,\r
+  IN  EFI_HANDLE                    ControllerHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+\r
+Arguments:\r
+  (Standard DriverBinding Protocol Start() function)\r
+\r
+Returns:\r
+\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                    Status;\r
+  EFI_DEVICE_PATH_PROTOCOL      *DevicePath;\r
+  EFI_SIMPLE_TEXT_OUT_PROTOCOL  *TextOut;\r
+\r
+  BOOLEAN                       NeedClose;\r
+\r
+  NeedClose = TRUE;\r
+\r
+  //\r
+  // Get the Device Path Protocol so the environment variables can be updated\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  (VOID **) &DevicePath,\r
+                  This->DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  //\r
+  // Open the Simple Text Output Protocol BY_DRIVER\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiSimpleTextOutProtocolGuid,\r
+                  (VOID **) &TextOut,\r
+                  This->DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  //\r
+  // Check the device handle, if it is a hot plug device,\r
+  // do not put the device path into ConOutDev and StdErrDev,\r
+  // and install gEfiConsoleOutDeviceGuid to the device handle directly.\r
+  // The policy is, make hot plug device plug in and play immediately.\r
+  //\r
+  if (IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {\r
+    gBS->InstallMultipleProtocolInterfaces (\r
+          &ControllerHandle,\r
+          &gEfiConsoleOutDeviceGuid,\r
+          NULL,\r
+          NULL\r
+          );\r
+  } else {\r
+    //\r
+    // Append the device path to the ConOutDev environment variable\r
+    //\r
+    ConPlatformUpdateDeviceVariable (\r
+      VarConsoleOutDev,\r
+      DevicePath,\r
+      APPEND\r
+      );\r
+    //\r
+    // Append the device path to the StdErrDev environment variable\r
+    //\r
+    ConPlatformUpdateDeviceVariable (\r
+      VarErrorOutDev,\r
+      DevicePath,\r
+      APPEND\r
+      );\r
+\r
+    //\r
+    // If the device path is an instance in the ConOut environment variable,\r
+    // then install EfiConsoleOutDeviceGuid onto ControllerHandle\r
+    //\r
+    Status = ConPlatformUpdateDeviceVariable (\r
+              VarConsoleOut,\r
+              DevicePath,\r
+              CHECK\r
+              );\r
+    if (!EFI_ERROR (Status)) {\r
+      NeedClose = FALSE;\r
+      Status = gBS->InstallMultipleProtocolInterfaces (\r
+                      &ControllerHandle,\r
+                      &gEfiConsoleOutDeviceGuid,\r
+                      NULL,\r
+                      NULL\r
+                      );\r
+    }\r
+    //\r
+    // If the device path is an instance in the StdErr environment variable,\r
+    // then install EfiStandardErrorDeviceGuid onto ControllerHandle\r
+    //\r
+    Status = ConPlatformUpdateDeviceVariable (\r
+              VarErrorOut,\r
+              DevicePath,\r
+              CHECK\r
+              );\r
+    if (!EFI_ERROR (Status)) {\r
+      NeedClose = FALSE;\r
+      gBS->InstallMultipleProtocolInterfaces (\r
+            &ControllerHandle,\r
+            &gEfiStandardErrorDeviceGuid,\r
+            NULL,\r
+            NULL\r
+            );\r
+    }\r
+\r
+    if (NeedClose) {\r
+      gBS->CloseProtocol (\r
+            ControllerHandle,\r
+            &gEfiSimpleTextOutProtocolGuid,\r
+            This->DriverBindingHandle,\r
+            ControllerHandle\r
+            );\r
+    }\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformDriverBindingStop (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  UINTN                        NumberOfChildren,\r
+  IN  EFI_HANDLE                   *ChildHandleBuffer\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+  (Standard DriverBinding Protocol Stop() function)\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                Status;\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
+\r
+  //\r
+  // hot plug device is not included into the console associated variables,\r
+  // so no need to check variable for those hot plug devices.\r
+  //\r
+  if (!IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {\r
+    //\r
+    // Get the Device Path Protocol so the environment variables can be updated\r
+    //\r
+    Status = gBS->OpenProtocol (\r
+                    ControllerHandle,\r
+                    &gEfiDevicePathProtocolGuid,\r
+                    (VOID **) &DevicePath,\r
+                    This->DriverBindingHandle,\r
+                    ControllerHandle,\r
+                    EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                    );\r
+    if (!EFI_ERROR (Status)) {\r
+      //\r
+      // Remove DevicePath from ConInDev, ConOutDev, and StdErrDev\r
+      //\r
+      ConPlatformUpdateDeviceVariable (\r
+        VarConsoleInpDev,\r
+        DevicePath,\r
+        DELETE\r
+        );\r
+      ConPlatformUpdateDeviceVariable (\r
+        VarConsoleOutDev,\r
+        DevicePath,\r
+        DELETE\r
+        );\r
+      ConPlatformUpdateDeviceVariable (\r
+        VarErrorOutDev,\r
+        DevicePath,\r
+        DELETE\r
+        );\r
+    }\r
+  }\r
+  //\r
+  // Uninstall the Console Device GUIDs from Controller Handle\r
+  //\r
+  ConPlatformUnInstallProtocol (\r
+    This,\r
+    ControllerHandle,\r
+    &gEfiConsoleInDeviceGuid\r
+    );\r
+\r
+  ConPlatformUnInstallProtocol (\r
+    This,\r
+    ControllerHandle,\r
+    &gEfiConsoleOutDeviceGuid\r
+    );\r
+\r
+  ConPlatformUnInstallProtocol (\r
+    This,\r
+    ControllerHandle,\r
+    &gEfiStandardErrorDeviceGuid\r
+    );\r
+\r
+  //\r
+  // Close the Simple Input and Simple Text Output Protocols\r
+  //\r
+  gBS->CloseProtocol (\r
+        ControllerHandle,\r
+        &gEfiSimpleTextInProtocolGuid,\r
+        This->DriverBindingHandle,\r
+        ControllerHandle\r
+        );\r
+\r
+  gBS->CloseProtocol (\r
+        ControllerHandle,\r
+        &gEfiSimpleTextOutProtocolGuid,\r
+        This->DriverBindingHandle,\r
+        ControllerHandle\r
+        );\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+VOID\r
+ConPlatformUnInstallProtocol (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Handle,\r
+  IN  EFI_GUID                     *ProtocolGuid\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  Status = gBS->OpenProtocol (\r
+                  Handle,\r
+                  ProtocolGuid,\r
+                  NULL,\r
+                  This->DriverBindingHandle,\r
+                  Handle,\r
+                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
+                  );\r
+\r
+  if (!EFI_ERROR (Status)) {\r
+    gBS->UninstallMultipleProtocolInterfaces (\r
+          Handle,\r
+          ProtocolGuid,\r
+          NULL,\r
+          NULL\r
+          );\r
+  }\r
+\r
+  return ;\r
+}\r
+\r
+VOID *\r
+ConPlatformGetVariable (\r
+  IN  CHAR16    *Name\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Read the EFI variable (Name) and return a dynamically allocated\r
+  buffer, and the size of the buffer. On failure return NULL.\r
+\r
+Arguments:\r
+  Name       - String part of EFI variable name\r
+\r
+Returns:\r
+  Dynamically allocated memory that contains a copy of the EFI variable.\r
+  Caller is repsoncible freeing the buffer.\r
+\r
+  NULL - Variable was not read\r
+  \r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+  VOID        *Buffer;\r
+  UINTN       BufferSize;\r
+\r
+  BufferSize  = 0;\r
+  Buffer      = NULL;\r
+\r
+  //\r
+  // Test to see if the variable exists.  If it doesn't reuturn NULL\r
+  //\r
+  Status = gRT->GetVariable (\r
+                  Name,\r
+                  &gEfiGlobalVariableGuid,\r
+                  NULL,\r
+                  &BufferSize,\r
+                  Buffer\r
+                  );\r
+\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    //\r
+    // Allocate the buffer to return\r
+    //\r
+    Status = gBS->AllocatePool (EfiBootServicesData, BufferSize, &Buffer);\r
+    if (EFI_ERROR (Status)) {\r
+      return NULL;\r
+    }\r
+    //\r
+    // Read variable into the allocated buffer.\r
+    //\r
+    Status = gRT->GetVariable (\r
+                    Name,\r
+                    &gEfiGlobalVariableGuid,\r
+                    NULL,\r
+                    &BufferSize,\r
+                    Buffer\r
+                    );\r
+    if (EFI_ERROR (Status)) {\r
+      gBS->FreePool (Buffer);\r
+      Buffer = NULL;\r
+    }\r
+  }\r
+\r
+  return Buffer;\r
+}\r
+\r
+EFI_STATUS\r
+ConPlatformMatchDevicePaths (\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  * Multi,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  * Single,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  **NewDevicePath OPTIONAL,\r
+  IN  BOOLEAN                   Delete\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Function compares a device path data structure to that of all the nodes of a\r
+  second device path instance.\r
+\r
+Arguments:\r
+  Multi        - A pointer to a multi-instance device path data structure.\r
+\r
+  Single       - A pointer to a single-instance device path data structure.\r
+  \r
+  NewDevicePath - If Delete is TRUE, this parameter must not be null, and it\r
+                  points to the remaining device path data structure. \r
+                  (remaining device path = Multi - Single.)\r
+  \r
+  Delete        - If TRUE, means removing Single from Multi.\r
+                  If FALSE, the routine just check whether Single matches \r
+                  with any instance in Multi.\r
+\r
+Returns:\r
+\r
+  The function returns EFI_SUCCESS if the Single is contained within Multi.  \r
+  Otherwise, EFI_NOT_FOUND is returned.\r
+\r
+--*/\r
+{\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  *TempDevicePath1;\r
+  EFI_DEVICE_PATH_PROTOCOL  *TempDevicePath2;\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePathInst;\r
+  UINTN                     Size;\r
+\r
+  //\r
+  // The passed in DevicePath should not be NULL\r
+  //\r
+  if ((!Multi) || (!Single)) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
+  //\r
+  // if performing Delete operation, the NewDevicePath must not be NULL.\r
+  //\r
+  TempDevicePath1 = NULL;\r
+\r
+  DevicePath      = Multi;\r
+  DevicePathInst  = GetNextDevicePathInstance (&DevicePath, &Size);\r
+\r
+  //\r
+  // search for the match of 'Single' in 'Multi'\r
+  //\r
+  while (DevicePathInst) {\r
+    if (CompareMem (Single, DevicePathInst, Size) == 0) {\r
+      if (!Delete) {\r
+        gBS->FreePool (DevicePathInst);\r
+        return EFI_SUCCESS;\r
+      }\r
+    } else {\r
+      if (Delete) {\r
+        TempDevicePath2 = AppendDevicePathInstance (\r
+                            TempDevicePath1,\r
+                            DevicePathInst\r
+                            );\r
+        gBS->FreePool (TempDevicePath1);\r
+        TempDevicePath1 = TempDevicePath2;\r
+      }\r
+    }\r
+\r
+    gBS->FreePool (DevicePathInst);\r
+    DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);\r
+  }\r
+\r
+  if (Delete) {\r
+    *NewDevicePath = TempDevicePath1;\r
+    return EFI_SUCCESS;\r
+  }\r
+\r
+  return EFI_NOT_FOUND;\r
+}\r
+\r
+EFI_STATUS\r
+ConPlatformUpdateDeviceVariable (\r
+  IN  CHAR16                    *VariableName,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
+  IN  CONPLATFORM_VAR_OPERATION Operation\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  \r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                Status;\r
+  EFI_DEVICE_PATH_PROTOCOL  *VariableDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  *NewVariableDevicePath;\r
+\r
+  VariableDevicePath    = NULL;\r
+  NewVariableDevicePath = NULL;\r
+\r
+  //\r
+  // Get Variable according to variable name.\r
+  // The memory for Variable is allocated within ConPlatformGetVarible(),\r
+  // it is the caller's responsibility to free the memory before return.\r
+  //\r
+  VariableDevicePath = ConPlatformGetVariable (VariableName);\r
+\r
+  if (Operation != DELETE) {\r
+\r
+    Status = ConPlatformMatchDevicePaths (\r
+              VariableDevicePath,\r
+              DevicePath,\r
+              NULL,\r
+              FALSE\r
+              );\r
+\r
+    if ((Operation == CHECK) || (!EFI_ERROR (Status))) {\r
+      //\r
+      // The device path is already in the variable\r
+      //\r
+      gBS->FreePool (VariableDevicePath);\r
+\r
+      return Status;\r
+    }\r
+    //\r
+    // The device path is not in variable. Append DevicePath to the\r
+    // environment variable that is a multi-instance device path.\r
+    //\r
+    Status = EFI_SUCCESS;\r
+    NewVariableDevicePath = AppendDevicePathInstance (\r
+                              VariableDevicePath,\r
+                              DevicePath\r
+                              );\r
+    if (NewVariableDevicePath == NULL) {\r
+      Status = EFI_OUT_OF_RESOURCES;\r
+    }\r
+\r
+  } else {\r
+    //\r
+    // Remove DevicePath from the environment variable that\r
+    // is a multi-instance device path.\r
+    //\r
+    Status = ConPlatformMatchDevicePaths (\r
+              VariableDevicePath,\r
+              DevicePath,\r
+              &NewVariableDevicePath,\r
+              TRUE\r
+              );\r
+  }\r
+\r
+  gBS->FreePool (VariableDevicePath);\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  Status = gRT->SetVariable (\r
+                  VariableName,\r
+                  &gEfiGlobalVariableGuid,\r
+                  EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
+                  GetDevicePathSize (NewVariableDevicePath),\r
+                  NewVariableDevicePath\r
+                  );\r
+\r
+  gBS->FreePool (NewVariableDevicePath);\r
+\r
+  return Status;\r
+}\r
+\r
+BOOLEAN\r
+IsHotPlugDevice (\r
+  EFI_HANDLE    DriverBindingHandle,\r
+  EFI_HANDLE    ControllerHandle\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  //\r
+  // HotPlugDeviceGuid indicates ControllerHandle stands for a hot plug device.\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiHotPlugDeviceGuid,\r
+                  NULL,\r
+                  DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return FALSE;\r
+  }\r
+\r
+  return TRUE;\r
+}\r
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h
new file mode 100644 (file)
index 0000000..41b0256
--- /dev/null
@@ -0,0 +1,126 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+    ConPlatform.h\r
+    \r
+Abstract:\r
+\r
+--*/\r
+\r
+#ifndef CON_MANAGE_H_\r
+#define CON_MANAGE_H_\r
+\r
+//\r
+//\r
+//\r
+#define VarConsoleInpDev  L"ConInDev"\r
+#define VarConsoleInp     L"ConIn"\r
+#define VarConsoleOutDev  L"ConOutDev"\r
+#define VarConsoleOut     L"ConOut"\r
+#define VarErrorOutDev    L"ErrOutDev"\r
+#define VarErrorOut       L"ErrOut"\r
+\r
+typedef enum {\r
+  CHECK,\r
+  APPEND,\r
+  DELETE\r
+} CONPLATFORM_VAR_OPERATION;\r
+\r
+EFI_STATUS\r
+ConPlatformDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath,\r
+  IN  EFI_GUID                     *ProtocolGuid\r
+  );\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextInDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Handle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  );\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextOutDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Handle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  );\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextInDriverBindingStart (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL   *This,\r
+  IN  EFI_HANDLE                    Handle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath\r
+  );\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformTextOutDriverBindingStart (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL   *This,\r
+  IN  EFI_HANDLE                    Handle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath\r
+  );\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+ConPlatformDriverBindingStop (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Handle,\r
+  IN  UINTN                        NumberOfChildren,\r
+  IN  EFI_HANDLE                   *ChildHandleBuffer\r
+  );\r
+\r
+VOID\r
+ConPlatformUnInstallProtocol (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Handle,\r
+  IN  EFI_GUID                     *ProtocolGuid\r
+  );\r
+\r
+VOID *\r
+ConPlatformGetVariable (\r
+  IN  CHAR16              *Name\r
+  );\r
+\r
+EFI_STATUS\r
+ConPlatformMatchDevicePaths (\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  * Multi,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  * Single,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  **NewDevicePath OPTIONAL,\r
+  IN  BOOLEAN                   Delete\r
+  );\r
+\r
+EFI_STATUS\r
+ConPlatformUpdateDeviceVariable (\r
+  IN  CHAR16                    *VariableName,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
+  IN  CONPLATFORM_VAR_OPERATION Operation\r
+  );\r
+\r
+BOOLEAN\r
+IsHotPlugDevice (\r
+  EFI_HANDLE    DriverBindingHandle,\r
+  EFI_HANDLE    ControllerHandle\r
+  );\r
+\r
+#endif\r
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.msa b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.msa
new file mode 100644 (file)
index 0000000..ebedff8
--- /dev/null
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution.  The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->\r
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">\r
+  <MsaHeader>\r
+    <ModuleName>ConPlatform</ModuleName>\r
+    <ModuleType>UEFI_DRIVER</ModuleType>\r
+    <GuidValue>51ccf399-4fdf-4e55-a45b-e123f84d456a</GuidValue>\r
+    <Version>1.0</Version>\r
+    <Abstract>Console Platfrom Driver</Abstract>\r
+    <Description>Console Platfrom DXE Driver, install Console protocols</Description>\r
+    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <License>All rights reserved. This program and the accompanying materials
+      are licensed and made available under the terms and conditions of the BSD License
+      which accompanies this distribution.  The full text of the license may be found at
+      http://opensource.org/licenses/bsd-license.php
+      THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+      WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>\r
+    <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION   0x00000052</Specification>\r
+  </MsaHeader>\r
+  <ModuleDefinitions>\r
+    <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>\r
+    <BinaryModule>false</BinaryModule>\r
+    <OutputFileBasename>ConPlatform</OutputFileBasename>\r
+  </ModuleDefinitions>\r
+  <LibraryClassDefinitions>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>DebugLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>UefiDriverModelLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>UefiDriverEntryPoint</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>UefiLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>BaseLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>BaseMemoryLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>MemoryAllocationLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>UefiBootServicesTableLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>UefiRuntimeServicesTableLib</Keyword>\r
+    </LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+      <Keyword>DevicePathLib</Keyword>\r
+    </LibraryClass>\r
+  </LibraryClassDefinitions>\r
+  <SourceFiles>\r
+    <Filename>ConPlatform.c</Filename>\r
+    <Filename>ConPlatform.h</Filename>\r
+    <Filename>ComponentName.h</Filename>\r
+    <Filename>ComponentName.c</Filename>\r
+  </SourceFiles>\r
+  <PackageDependencies>\r
+    <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+    <Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>\r
+  </PackageDependencies>\r
+  <Protocols>\r
+    <Protocol Usage="TO_START">\r
+      <ProtocolCName>gEfiSimpleTextOutProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
+    <Protocol Usage="TO_START">\r
+      <ProtocolCName>gEfiSimpleTextInProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
+    <Protocol Usage="TO_START">\r
+      <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
+  </Protocols>\r
+  <Variables>\r
+    <Variable Usage="SOMETIMES_CONSUMED">\r
+      <VariableName>0x0043 0x006F 0x006E 0x0049 0x006E 0x0044 0x0065 0x0076</VariableName>\r
+      <GuidC_Name>gConInDevGuid</GuidC_Name>\r
+    </Variable>\r
+    <Variable Usage="SOMETIMES_CONSUMED">\r
+      <VariableName>0x0043 0x006F 0x006E 0x0049 0x006E</VariableName>\r
+      <GuidC_Name>gConInGuid</GuidC_Name>\r
+    </Variable>\r
+    <Variable Usage="SOMETIMES_CONSUMED">\r
+      <VariableName>0x0043 0x006F 0x006E 0x004F 0x0075 0x0074 0x0044 0x0065 0x0076</VariableName>\r
+      <GuidC_Name>gConOutDevGuid</GuidC_Name>\r
+    </Variable>\r
+    <Variable Usage="SOMETIMES_CONSUMED">\r
+      <VariableName>0x0043 0x006F 0x006E 0x004F 0x0075 0x0074</VariableName>\r
+      <GuidC_Name>gConOutGuid</GuidC_Name>\r
+    </Variable>\r
+    <Variable Usage="SOMETIMES_CONSUMED">\r
+      <VariableName>0x0045 0x0072 0x0072 0x004F 0x0075 0x0074 0x0044 0x0065 0x0076</VariableName>\r
+      <GuidC_Name>gErrOutDevGuid</GuidC_Name>\r
+    </Variable>\r
+    <Variable Usage="SOMETIMES_CONSUMED">\r
+      <VariableName>0x0045 0x0072 0x0072 0x004F 0x0075 0x0074</VariableName>\r
+      <GuidC_Name>gErrOutGuid</GuidC_Name>\r
+    </Variable>\r
+  </Variables>\r
+  <Guids>\r
+    <GuidCNames Usage="SOMETIMES_PRODUCED">\r
+      <GuidCName>gEfiConsoleInDeviceGuid</GuidCName>\r
+    </GuidCNames>\r
+    <GuidCNames Usage="SOMETIMES_PRODUCED">\r
+      <GuidCName>gEfiConsoleOutDeviceGuid</GuidCName>\r
+    </GuidCNames>\r
+    <GuidCNames Usage="SOMETIMES_PRODUCED">\r
+      <GuidCName>gEfiStandardErrorDeviceGuid</GuidCName>\r
+    </GuidCNames>\r
+    <GuidCNames Usage="SOMETIMES_CONSUMED">\r
+      <GuidCName>gEfiHotPlugDeviceGuid</GuidCName>\r
+    </GuidCNames>\r
+    <GuidCNames Usage="SOMETIMES_CONSUMED">\r
+      <GuidCName>gEfiGlobalVariableGuid</GuidCName>\r
+    </GuidCNames>\r
+  </Guids>\r
+  <Externs>\r
+    <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
+    <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>\r
+    <Extern>\r
+      <DriverBinding>gConPlatformTextInDriverBinding</DriverBinding>\r
+    </Extern>\r
+    <Extern>\r
+      <ComponentName>gConPlatformComponentName</ComponentName>\r
+    </Extern>\r
+    <Extern>\r
+      <DriverBinding>gConPlatformTextOutDriverBinding</DriverBinding>\r
+    </Extern>\r
+    <Extern>\r
+      <ComponentName>gConPlatformComponentName</ComponentName>\r
+    </Extern>\r
+  </Externs>\r
+</ModuleSurfaceArea>
\ No newline at end of file