Retire Extended HII library class.
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Apr 2009 08:48:03 +0000 (08:48 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Apr 2009 08:48:03 +0000 (08:48 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8011 6f19259b-4bc3-4df7-8a09-765794883524

34 files changed:
DuetPkg/DuetPkg.dsc
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/FrameworkHiiOnUefiHiiThunk.inf
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h
EdkCompatibilityPkg/EdkCompatibilityPkg.dsc
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
IntelFrameworkModulePkg/Universal/BdsDxe/String.c
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.c
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.inf
MdeModulePkg/Include/Guid/MdeModuleHii.h
MdeModulePkg/Include/Library/ExtendedHiiLib.h [deleted file]
MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c [deleted file]
MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf [deleted file]
MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/MdeModulePkg.dsc
MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h
MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h
MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
Nt32Pkg/Nt32Pkg.dsc
UnixPkg/UnixPkg.dsc

index 7c8153b..cfb02df 100644 (file)
@@ -32,7 +32,6 @@
   ExtendedIfrSupportLib|MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-  ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
index 6be0496..341d31c 100644 (file)
@@ -19,6 +19,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 BOOLEAN            mHiiPackageListUpdated = FALSE;\r
 \r
+HII_VENDOR_DEVICE_PATH  mUefiHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {2A1F1827-03E2-4b2f-83DE-89B6073A0182}\r
+    //\r
+    { 0x2a1f1827, 0x3e2, 0x4b2f, { 0x83, 0xde, 0x89, 0xb6, 0x7, 0x3a, 0x1, 0x82 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 CONFIG_ACCESS_PRIVATE gConfigAccessPrivateTempate = {\r
   CONFIG_ACCESS_PRIVATE_SIGNATURE,\r
   {\r
@@ -198,9 +223,6 @@ InstallDefaultConfigAccessProtocol (
 \r
   ASSERT (ThunkContext->IfrPackageCount != 0);\r
 \r
-  Status = HiiLibCreateHiiDriverHandle (&ThunkContext->UefiHiiDriverHandle);\r
-  ASSERT_EFI_ERROR (Status);\r
-  \r
   ConfigAccessInstance = AllocateCopyPool (\r
                            sizeof (CONFIG_ACCESS_PRIVATE), \r
                            &gConfigAccessPrivateTempate\r
@@ -209,6 +231,8 @@ InstallDefaultConfigAccessProtocol (
   \r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
           &ThunkContext->UefiHiiDriverHandle,\r
+          &gEfiDevicePathProtocolGuid,          \r
+          &mUefiHiiVendorDevicePath,\r
           &gEfiHiiConfigAccessProtocolGuid,\r
           &ConfigAccessInstance->ConfigAccessProtocol,\r
           NULL\r
@@ -237,8 +261,6 @@ UninstallDefaultConfigAccessProtocol (
   EFI_STATUS                      Status;\r
   EFI_HII_CONFIG_ACCESS_PROTOCOL  *ConfigAccess;\r
   \r
-  HiiLibDestroyHiiDriverHandle (ThunkContext->UefiHiiDriverHandle);\r
-\r
   Status = gBS->HandleProtocol (\r
                   ThunkContext->UefiHiiDriverHandle,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
@@ -246,10 +268,13 @@ UninstallDefaultConfigAccessProtocol (
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  Status = gBS->UninstallProtocolInterface (\r
+  Status = gBS->UninstallMultipleProtocolInterfaces (\r
                   ThunkContext->UefiHiiDriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mUefiHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  ConfigAccess\r
+                  ConfigAccess,\r
+                  NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
index f09c3ce..94b79e5 100644 (file)
@@ -45,7 +45,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
+#include <Library/DevicePathLib.h>\r
 #include <Library/UefiLib.h>\r
 \r
 #include <Library/IfrSupportLib.h>\r
@@ -185,7 +185,17 @@ typedef struct {
   UINT16     VarStoreId;\r
 } BUFFER_STORAGE_ENTRY;\r
 \r
+#pragma pack(1)\r
 \r
+///\r
+/// HII specific Vendor Device Path definition.\r
+///\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+#pragma pack()\r
 \r
 #define CONFIG_ACCESS_PRIVATE_SIGNATURE            SIGNATURE_32 ('H', 'T', 'c', 'a')\r
 #define CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL(Record) CR(Record, CONFIG_ACCESS_PRIVATE, ConfigAccessProtocol, CONFIG_ACCESS_PRIVATE_SIGNATURE)\r
index b73fce9..00c08bd 100644 (file)
@@ -46,7 +46,6 @@ define GCC_MACRO                 = -DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_S
   SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
-  ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf\r
   IfrSupportLib|MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrSupportLib.inf\r
   ExtendedIfrSupportLib|MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
index 058b100..3fc9e41 100644 (file)
@@ -63,7 +63,6 @@
   ExtendedIfrSupportLib|MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf\r
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
-  ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf\r
   PlatformBdsLib|IntelFrameworkModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf\r
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
index 50e5689..34327ce 100644 (file)
@@ -60,7 +60,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>\r
 #include <Library/CapsuleLib.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
+#include <Library/DevicePathLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
 #include <Library/GenericBdsLib.h>\r
@@ -73,6 +73,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE          \\r
       )\r
 \r
+#pragma pack(1)\r
+\r
+///\r
+/// HII specific Vendor Device Path definition.\r
+///\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+#pragma pack()\r
+\r
 /**\r
 \r
   Show progress bar with title above it. It only works in Graphics mode.\r
index 2daacb6..08f36f2 100644 (file)
   DebugLib\r
   PrintLib\r
   HiiLib\r
-  ExtendedHiiLib\r
   UefiDriverEntryPoint\r
   PlatformBdsLib\r
   CapsuleLib\r
index d935347..efc862e 100644 (file)
@@ -28,6 +28,55 @@ EFI_DEVICE_PATH_PROTOCOL  EndDevicePath[] = {
   }\r
 };\r
 \r
+HII_VENDOR_DEVICE_PATH  mBmmHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {165A028F-0BB2-4b5f-8747-77592E3F6499}\r
+    //\r
+    { 0x165a028f, 0xbb2, 0x4b5f, { 0x87, 0x47, 0x77, 0x59, 0x2e, 0x3f, 0x64, 0x99 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
+HII_VENDOR_DEVICE_PATH  mFeHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {91DB4238-B0C8-472e-BBCF-F3A6541010F4}\r
+    //\r
+    { 0x91db4238, 0xb0c8, 0x472e, { 0xbb, 0xcf, 0xf3, 0xa6, 0x54, 0x10, 0x10, 0xf4 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
 \r
 EFI_GUID EfiLegacyDevOrderGuid  = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID;\r
 EFI_GUID mBootMaintGuid         = BOOT_MAINT_FORMSET_GUID;\r
@@ -850,42 +899,30 @@ InitializeBM (
   BmmCallbackInfo->FeDisplayContext              = UNKNOWN_CONTEXT;\r
 \r
   //\r
-  // Create driver handle used by HII database\r
+  // Install Device Path Protocol and Config Access protocol to driver handle\r
   //\r
-  Status = HiiLibCreateHiiDriverHandle (&BmmCallbackInfo->BmmDriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Install Config Access protocol to driver handle\r
-  //\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &BmmCallbackInfo->BmmDriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mBmmHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &BmmCallbackInfo->BmmConfigAccess\r
+                  &BmmCallbackInfo->BmmConfigAccess,\r
+                  NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
 \r
   //\r
-  // Create driver handle used by HII database\r
-  //\r
-  Status = HiiLibCreateHiiDriverHandle (&BmmCallbackInfo->FeDriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Install Config Access protocol to driver handle\r
+  // Install Device Path Protocol and Config Access protocol to driver handle\r
   //\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &BmmCallbackInfo->FeDriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mFeHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &BmmCallbackInfo->FeConfigAccess\r
+                  &BmmCallbackInfo->FeConfigAccess,\r
+                  NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
index a1612cd..615c189 100644 (file)
@@ -19,6 +19,31 @@ EFI_GUID           mBootManagerGuid = BOOT_MANAGER_FORMSET_GUID;
 LIST_ENTRY         *mBootOptionsList;\r
 BDS_COMMON_OPTION  *gOption;\r
 \r
+HII_VENDOR_DEVICE_PATH  mBootManagerHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {1DDDBE15-481D-4d2b-8277-B191EAF66525}\r
+    //\r
+    { 0x1dddbe15, 0x481d, 0x4d2b, { 0x82, 0x77, 0xb1, 0x91, 0xea, 0xf6, 0x65, 0x25 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 BOOT_MANAGER_CALLBACK_DATA  gBootManagerPrivate = {\r
   BOOT_MANAGER_CALLBACK_DATA_SIGNATURE,\r
   NULL,\r
@@ -104,7 +129,7 @@ BootManagerCallback (
   Registers HII packages for the Boot Manger to HII Database.\r
   It also registers the browser call back function.\r
 \r
-  @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()\r
+  @return Status of gBS->InstallMultipleProtocolInterfaces() and gHiiDatabase->NewPackageList()\r
 \r
 **/\r
 EFI_STATUS\r
@@ -116,21 +141,15 @@ InitializeBootManager (
   EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
 \r
   //\r
-  // Create driver handle used by HII database\r
-  //\r
-  Status = HiiLibCreateHiiDriverHandle (&gBootManagerPrivate.DriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Install Config Access protocol to driver handle\r
+  // Install Device Path Protocol and Config Access protocol to driver handle\r
   //\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &gBootManagerPrivate.DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mBootManagerHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &gBootManagerPrivate.ConfigAccess\r
+                  &gBootManagerPrivate.ConfigAccess,\r
+                  NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
index 4e46078..d7566f4 100644 (file)
@@ -86,7 +86,7 @@ BootManagerCallback (
   Registers HII packages for the Boot Manger to HII Database.\r
   It also registers the browser call back function.\r
 \r
-  @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()\r
+  @return Status of gBS->InstallMultipleProtocolInterfaces() and gHiiDatabase->NewPackageList()\r
 **/\r
 EFI_STATUS\r
 InitializeBootManager (\r
index 9492de4..9264734 100644 (file)
@@ -36,6 +36,31 @@ DEVICE_MANAGER_MENU_ITEM  mDeviceManagerMenuItemTable[] = {
   { STRING_TOKEN (STR_OTHER_DEVICE),    EFI_OTHER_DEVICE_CLASS }\r
 };\r
 \r
+HII_VENDOR_DEVICE_PATH  mDeviceManagerHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {102579A0-3686-466e-ACD8-80C087044F4A}\r
+    //\r
+    { 0x102579a0, 0x3686, 0x466e, { 0xac, 0xd8, 0x80, 0xc0, 0x87, 0x4, 0x4f, 0x4a } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 #define MENU_ITEM_NUM  \\r
   (sizeof (mDeviceManagerMenuItemTable) / sizeof (DEVICE_MANAGER_MENU_ITEM))\r
 \r
@@ -100,21 +125,15 @@ InitializeDeviceManager (
   EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
 \r
   //\r
-  // Create driver handle used by HII database\r
-  //\r
-  Status = HiiLibCreateHiiDriverHandle (&gDeviceManagerPrivate.DriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Install Config Access protocol to driver handle\r
+  // Install Device Path Protocol and Config Access protocol to driver handle\r
   //\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &gDeviceManagerPrivate.DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mDeviceManagerHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &gDeviceManagerPrivate.ConfigAccess\r
+                  &gDeviceManagerPrivate.ConfigAccess,\r
+                  NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
index 2997476..fbfac08 100644 (file)
@@ -37,6 +37,31 @@ FRONT_PAGE_CALLBACK_DATA  gFrontPagePrivate = {
   }\r
 };\r
 \r
+HII_VENDOR_DEVICE_PATH  mFrontPageHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {8E6D99EE-7531-48f8-8745-7F6144468FF2}\r
+    //\r
+    { 0x8e6d99ee, 0x7531, 0x48f8, { 0x87, 0x45, 0x7f, 0x61, 0x44, 0x46, 0x8f, 0xf2 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 /**\r
   This function allows a caller to extract the current configuration for one\r
   or more named elements from the target driver.\r
@@ -324,21 +349,15 @@ InitializeFrontPage (
     }\r
 \r
     //\r
-    // Create driver handle used by HII database\r
-    //\r
-    Status = HiiLibCreateHiiDriverHandle (&gFrontPagePrivate.DriverHandle);\r
-    if (EFI_ERROR (Status)) {\r
-      return Status;\r
-    }\r
-\r
-    //\r
-    // Install Config Access protocol to driver handle\r
+    // Install Device Path Protocol and Config Access protocol to driver handle\r
     //\r
-    Status = gBS->InstallProtocolInterface (\r
+    Status = gBS->InstallMultipleProtocolInterfaces (\r
                     &gFrontPagePrivate.DriverHandle,\r
+                    &gEfiDevicePathProtocolGuid,\r
+                    &mFrontPageHiiVendorDevicePath,\r
                     &gEfiHiiConfigAccessProtocolGuid,\r
-                    EFI_NATIVE_INTERFACE,\r
-                    &gFrontPagePrivate.ConfigAccess\r
+                    &gFrontPagePrivate.ConfigAccess,\r
+                    NULL\r
                     );\r
     ASSERT_EFI_ERROR (Status);\r
 \r
index 4e7537c..c9e19c5 100644 (file)
@@ -259,23 +259,13 @@ ExportFonts (
   VOID\r
   )\r
 {\r
-  EFI_STATUS                   Status;\r
-  EFI_HANDLE                   DriverHandle;\r
   EFI_HII_HANDLE               HiiHandle;\r
   EFI_HII_PACKAGE_LIST_HEADER  *PackageList;\r
 \r
-  //\r
-  // Create driver handle used by HII database\r
-  //\r
-  Status = HiiLibCreateHiiDriverHandle (&DriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-\r
   PackageList = HiiLibPreparePackageList (1, &mFontPackageGuid, &mFontBin);\r
   ASSERT (PackageList != NULL);\r
 \r
-  gHiiDatabase->NewPackageList (gHiiDatabase, PackageList, DriverHandle, &HiiHandle);\r
+  gHiiDatabase->NewPackageList (gHiiDatabase, PackageList, mBdsImageHandle, &HiiHandle);\r
   FreePool (PackageList);\r
 }\r
 \r
index d1c6651..a509a85 100644 (file)
@@ -34,7 +34,6 @@ InitializeStringSupport (
   )\r
 {\r
   EFI_STATUS                   Status;\r
-  EFI_HANDLE                   DriverHandle;\r
   EFI_HII_PACKAGE_LIST_HEADER  *PackageList;\r
 \r
   Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase);\r
@@ -42,21 +41,13 @@ InitializeStringSupport (
     return Status;\r
   }\r
 \r
-  //\r
-  // Create driver handle used by HII database\r
-  //\r
-  Status = HiiLibCreateHiiDriverHandle (&DriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
   PackageList = HiiLibPreparePackageList (1, &mBdsStringPackGuid, &BdsDxeStrings);\r
   ASSERT (PackageList != NULL);\r
 \r
   Status = gHiiDatabase->NewPackageList (\r
                            gHiiDatabase,\r
                            PackageList,\r
-                           DriverHandle,\r
+                           mBdsImageHandle,\r
                            &gStringPackHandle\r
                            );\r
 \r
index aa11022..543f896 100644 (file)
@@ -39,6 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/DevicePathToText.h>\r
 #include <Protocol/DevicePath.h>\r
 \r
+#include <Library/DevicePathLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiLib.h>\r
@@ -47,7 +48,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PlatformDriverOverrideLib.h>\r
 #include <Library/HiiLib.h>\r
 #include <Library/IfrSupportLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
 #include <Library/ExtendedIfrSupportLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
@@ -66,6 +66,18 @@ typedef struct {
   EFI_HII_CONFIG_ACCESS_PROTOCOL  ConfigAccess;\r
 } EFI_CALLBACK_INFO;\r
 \r
+#pragma pack(1)\r
+\r
+///\r
+/// HII specific Vendor Device Path definition.\r
+///\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+#pragma pack()\r
+\r
 //\r
 // uni string and Vfr Binary data.\r
 //\r
@@ -92,6 +104,31 @@ UINTN                        mSelectedDriverImageNum;
 UINTN                        mLastSavedDriverImageNum;\r
 UINT16                       mCurrentPage;\r
 \r
+HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {99936717-BF3D-4b04-9787-76CEE324D76F}\r
+    //\r
+    { 0x99936717, 0xbf3d, 0x4b04, { 0x97, 0x87, 0x76, 0xce, 0xe3, 0x24, 0xd7, 0x6f } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 /**\r
   Converting a given device to an unicode string. \r
   \r
@@ -1276,8 +1313,7 @@ PlatOverMngrInit (
   EFI_HII_DATABASE_PROTOCOL   *HiiDatabase;\r
   EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
   EFI_CALLBACK_INFO           *CallbackInfo;\r
-  EFI_HANDLE                  DriverHandle;\r
-  EFI_FORM_BROWSER2_PROTOCOL       *FormBrowser2;\r
+  EFI_FORM_BROWSER2_PROTOCOL  *FormBrowser2;\r
   \r
   //\r
   // There should only be one HII protocol\r
@@ -1314,22 +1350,15 @@ PlatOverMngrInit (
   CallbackInfo->ConfigAccess.Callback      = PlatOverMngrCallback;\r
 \r
   //\r
-  // Create driver handle used by HII database\r
+  // Install Device Path Protocol and Config Access protocol to driver handle\r
   //\r
-  Status = HiiLibCreateHiiDriverHandle (&DriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    goto Finish;\r
-  }\r
-  CallbackInfo->DriverHandle = DriverHandle;\r
-\r
-  //\r
-  // Install Config Access protocol to driver handle\r
-  //\r
-  Status = gBS->InstallProtocolInterface (\r
-                  &DriverHandle,\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &CallbackInfo->DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &CallbackInfo->ConfigAccess\r
+                  &CallbackInfo->ConfigAccess,\r
+                  NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     goto Finish;\r
@@ -1349,7 +1378,7 @@ PlatOverMngrInit (
   Status = HiiDatabase->NewPackageList (\r
                            HiiDatabase,\r
                            PackageList,\r
-                           DriverHandle,\r
+                           CallbackInfo->DriverHandle,\r
                            &CallbackInfo->RegisteredHandle\r
                            );\r
   FreePool (PackageList);\r
@@ -1405,7 +1434,14 @@ PlatOverMngrInit (
 \r
 Finish:\r
   if (CallbackInfo->DriverHandle != NULL) {\r
-    HiiLibDestroyHiiDriverHandle (CallbackInfo->DriverHandle);\r
+    gBS->UninstallMultipleProtocolInterfaces (\r
+           CallbackInfo->DriverHandle,\r
+           &gEfiDevicePathProtocolGuid,\r
+           &mHiiVendorDevicePath,\r
+           &gEfiHiiConfigAccessProtocolGuid,\r
+           &CallbackInfo->ConfigAccess,\r
+           NULL\r
+           );\r
   }\r
   if (CallbackInfo != NULL) {\r
     FreePool (CallbackInfo);\r
index 8d22f62..6b42f05 100644 (file)
@@ -58,7 +58,6 @@
   PlatformDriverOverrideLib\r
   HiiLib\r
   IfrSupportLib\r
-  ExtendedHiiLib\r
   ExtendedIfrSupportLib\r
   BaseMemoryLib\r
   MemoryAllocationLib\r
@@ -85,4 +84,4 @@
   gEfiFormBrowser2ProtocolGuid                  ## CONSUMED\r
   gEfiHiiConfigRoutingProtocolGuid              ## CONSUMED\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCED\r
-  gEfiDevicePathToTextProtocolGuid              ## CONSUMED
\ No newline at end of file
+  gEfiDevicePathToTextProtocolGuid              ## CONSUMED\r
index e66a944..f5795ef 100644 (file)
@@ -25,26 +25,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define BROWSER_STATE_VALIDATE_PASSWORD  0\r
 #define BROWSER_STATE_SET_PASSWORD       1\r
 \r
-\r
-///\r
-/// HII specific Vendor Device Path Node definition.\r
-///\r
-#pragma pack(1)\r
-typedef struct {\r
-  VENDOR_DEVICE_PATH             VendorDevicePath;\r
-  UINT32                         Reserved;\r
-  UINT64                         UniqueId;\r
-} HII_VENDOR_DEVICE_PATH_NODE;\r
-#pragma pack()\r
-\r
-///\r
-/// HII specific Vendor Device Path definition.\r
-///\r
-typedef struct {\r
-  HII_VENDOR_DEVICE_PATH_NODE    Node;\r
-  EFI_DEVICE_PATH_PROTOCOL       End;\r
-} HII_VENDOR_DEVICE_PATH;\r
-\r
 ///\r
 /// GUIDed opcodes defined for EDKII implementation\r
 ///\r
diff --git a/MdeModulePkg/Include/Library/ExtendedHiiLib.h b/MdeModulePkg/Include/Library/ExtendedHiiLib.h
deleted file mode 100644 (file)
index 15c9760..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/** @file\r
-  This library includes two extended HII functions to \r
-  create and destory Hii Package by create the virtual Driver Handle.\r
-\r
-Copyright (c) 2008, Intel Corporation. <BR>\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
-**/\r
-\r
-#ifndef __EXTENDED_HII_LIB_H__\r
-#define __EXTENDED_HII_LIB_H__\r
-\r
-/**\r
-  The HII driver handle passed in for HiiDatabase.NewPackageList() requires\r
-  that there should be DevicePath Protocol installed on it.\r
-  This routine create a virtual Driver Handle by installing a vendor device\r
-  path on it, so as to use it to invoke HiiDatabase.NewPackageList().\r
-  The Device Path created is a Vendor Device Path specific to Intel's implemenation\r
-  and it is defined as HII_VENDOR_DEVICE_PATH_NODE.\r
-  \r
-\r
-  @param  DriverHandle           Handle to be returned\r
-\r
-  @retval EFI_SUCCESS            Handle destroy success.\r
-  @retval EFI_OUT_OF_RESOURCES   Not enough memory.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibCreateHiiDriverHandle (\r
-  OUT EFI_HANDLE               *DriverHandle\r
-  );\r
-\r
-/**\r
-  Destroy the Driver Handle created by CreateHiiDriverHandle().\r
-\r
-  If no Device Path protocol is installed on the DriverHandle, then ASSERT.\r
-  If this Device Path protocol is failed to be uninstalled, then ASSERT.\r
-\r
-  @param  DriverHandle           Handle returned by CreateHiiDriverHandle()\r
-\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibDestroyHiiDriverHandle (\r
-  IN EFI_HANDLE                 DriverHandle\r
-  );\r
-\r
-\r
-#endif\r
diff --git a/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c b/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c
deleted file mode 100644 (file)
index 4aaf123..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/** @file\r
-Library instance for ExtendedHiiLib.\r
-  \r
-This library instance implements the common HII routines which is\r
-related to HII but reference data structures that are not defined in \r
-UEFI specification, for example HII_VENDOR_DEVICE_PATH.\r
-\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\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
-**/\r
-\r
-\r
-#include <Uefi.h>\r
-#include <Protocol/DevicePath.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/DevicePathLib.h>\r
-#include <Guid/MdeModuleHii.h>\r
-\r
-\r
-//\r
-// Hii vendor device path template\r
-//\r
-GLOBAL_REMOVE_IF_UNREFERENCED CONST HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePathTemplate = {\r
-  {\r
-    {\r
-      {\r
-        HARDWARE_DEVICE_PATH,\r
-        HW_VENDOR_DP,\r
-        {\r
-          (UINT8) (sizeof (HII_VENDOR_DEVICE_PATH_NODE)),\r
-          (UINT8) ((sizeof (HII_VENDOR_DEVICE_PATH_NODE)) >> 8)\r
-        }\r
-      },\r
-      EFI_IFR_TIANO_GUID\r
-    },\r
-    0,\r
-    0\r
-  },\r
-  {\r
-    END_DEVICE_PATH_TYPE,\r
-    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
-      END_DEVICE_PATH_LENGTH\r
-    }\r
-  }\r
-};\r
-\r
-/**\r
-  The HII driver handle passed in for HiiDatabase.NewPackageList() requires\r
-  that there should be DevicePath Protocol installed on it.\r
-  This routine create a virtual Driver Handle by installing a vendor device\r
-  path on it, so as to use it to invoke HiiDatabase.NewPackageList().\r
-  The Device Path created is a Vendor Device Path specific to Intel's implemenation\r
-  and it is defined as HII_VENDOR_DEVICE_PATH_NODE.\r
-  \r
-\r
-  @param  DriverHandle           Handle to be returned\r
-\r
-  @retval EFI_SUCCESS            Handle destroy success.\r
-  @retval EFI_OUT_OF_RESOURCES   Not enough memory.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiLibCreateHiiDriverHandle (\r
-  OUT EFI_HANDLE               *DriverHandle\r
-  )\r
-{\r
-  EFI_STATUS                   Status;\r
-  HII_VENDOR_DEVICE_PATH_NODE  *VendorDevicePath;\r
-\r
-  VendorDevicePath = AllocateCopyPool (sizeof (HII_VENDOR_DEVICE_PATH), &mHiiVendorDevicePathTemplate);\r
-  if (VendorDevicePath == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  //\r
-  // Use memory address as unique ID to distinguish from different device paths\r
-  //\r
-  VendorDevicePath->UniqueId = (UINT64) ((UINTN) VendorDevicePath);\r
-\r
-  *DriverHandle = NULL;\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  DriverHandle,\r
-                  &gEfiDevicePathProtocolGuid,\r
-                  VendorDevicePath,\r
-                  NULL\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-/**\r
-  Destroy the Driver Handle created by CreateHiiDriverHandle().\r
-\r
-  If no Device Path protocol is installed on the DriverHandle, then ASSERT.\r
-  If this Device Path protocol is failed to be uninstalled, then ASSERT.\r
-\r
-  @param  DriverHandle           Handle returned by CreateHiiDriverHandle()\r
-\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibDestroyHiiDriverHandle (\r
-  IN EFI_HANDLE               DriverHandle\r
-  )\r
-{\r
-  EFI_STATUS                   Status;\r
-  EFI_DEVICE_PATH_PROTOCOL     *DevicePath;\r
-\r
-  Status = gBS->HandleProtocol (\r
-                  DriverHandle,\r
-                  &gEfiDevicePathProtocolGuid,\r
-                  (VOID **) &DevicePath\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  Status = gBS->UninstallProtocolInterface (\r
-                  DriverHandle,\r
-                  &gEfiDevicePathProtocolGuid,\r
-                  DevicePath\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  FreePool (DevicePath);\r
-\r
-}\r
-\r
-\r
-\r
diff --git a/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf b/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf
deleted file mode 100644 (file)
index e485eda..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#/** @file\r
-#  \r
-#  Library instance for ExtendedHiiLib.\r
-#  \r
-#  This library instance implements the common HII routines which is\r
-#  related to HII but reference data structures that are not defined in \r
-#  UEFI specification, for example HII_VENDOR_DEVICE_PATH.\r
-#  \r
-#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\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
-#**/\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = ExtendedHiiLib\r
-  FILE_GUID                      = 35961516-ABA1-4636-A4C0-608E62BE8BB0\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = ExtendedHiiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
-  EFI_SPECIFICATION_VERSION      = 0x0002000A\r
-  \r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
-#\r
-\r
-[Sources.common]\r
-  ExtendedHiiLib.c\r
-\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-\r
-[LibraryClasses]\r
-  MemoryAllocationLib\r
-  DebugLib\r
-  DevicePathLib\r
-  \r
-[Protocols]\r
-  gEfiDevicePathProtocolGuid  ## SOMETIMES_PRODUCES\r
-  \r
index 95c7e7a..366a4be 100644 (file)
   ##  @libraryclass  Provides a set of interfaces to do IFR opcode creation and interact with a UEFI Form Browser.\r
   IfrSupportLib|Include/Library/IfrSupportLib.h\r
   \r
-  ##  @libraryclass  Includes two extended HII functions to create and destory Hii Package \r
-  #                  by create the virtual Driver Handle.\r
-  ##\r
-  ExtendedHiiLib|Include/Library/ExtendedHiiLib.h\r
-  \r
   ##  @libraryclass  Defines APIs that is related to IFR operations but specific to EDK II\r
   #                  implementation.\r
   ##\r
index 2644557..a38c73c 100644 (file)
@@ -62,7 +62,6 @@
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
-  ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf\r
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf\r
   NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf\r
   IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf\r
   MdeModulePkg/Library/DxePlatDriOverLib/DxePlatDriOverLib.inf\r
   MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf\r
   MdeModulePkg/Library/DxePrintLibPrint2Protocol/DxePrintLibPrint2Protocol.inf\r
-  MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf\r
   MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf\r
   MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf\r
   MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf\r
index e470a82..8fcce40 100644 (file)
@@ -23,6 +23,56 @@ EFI_GUID   mInventoryGuid = INVENTORY_GUID;
 \r
 CHAR16     VariableName[] = L"MyIfrNVData";\r
 \r
+HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePath1 = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {C153B68D-EBFC-488e-B110-662867745B87}\r
+    //\r
+    { 0xc153b68d, 0xebfc, 0x488e, { 0xb1, 0x10, 0x66, 0x28, 0x67, 0x74, 0x5b, 0x87 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
+HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePath2 = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {06F37F07-0C48-40e9-8436-0A08A0BB76B0}\r
+    //\r
+    { 0x6f37f07, 0xc48, 0x40e9, { 0x84, 0x36, 0xa, 0x8, 0xa0, 0xbb, 0x76, 0xb0 } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 /**\r
   Encode the password using a simple algorithm.\r
   \r
@@ -689,7 +739,7 @@ DriverSampleInit (
   EFI_STATUS                      SavedStatus;\r
   EFI_HII_PACKAGE_LIST_HEADER     *PackageList;\r
   EFI_HII_HANDLE                  HiiHandle[2];\r
-  EFI_HANDLE                      DriverHandle[2];\r
+  EFI_HANDLE                      DriverHandle[2] = {NULL, NULL};\r
   DRIVER_SAMPLE_PRIVATE_DATA      *PrivateData;\r
   EFI_SCREEN_DESCRIPTOR           Screen;\r
   EFI_HII_DATABASE_PROTOCOL       *HiiDatabase;\r
@@ -766,23 +816,18 @@ DriverSampleInit (
   }\r
   PrivateData->HiiConfigRouting = HiiConfigRouting;\r
 \r
-  //\r
-  // Install Config Access protocol\r
-  //\r
-  Status = HiiLibCreateHiiDriverHandle (&DriverHandle[0]);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-  PrivateData->DriverHandle[0] = DriverHandle[0];\r
-\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &DriverHandle[0],\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mHiiVendorDevicePath1,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &PrivateData->ConfigAccess\r
+                  &PrivateData->ConfigAccess,\r
+                  NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  PrivateData->DriverHandle[0] = DriverHandle[0];\r
+\r
   //\r
   // Publish our HII data\r
   //\r
@@ -811,10 +856,14 @@ DriverSampleInit (
   //\r
   // Publish another Fromset\r
   //\r
-  Status = HiiLibCreateHiiDriverHandle (&DriverHandle[1]);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &DriverHandle[1],\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mHiiVendorDevicePath2,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
   PrivateData->DriverHandle[1] = DriverHandle[1];\r
 \r
   PackageList = HiiLibPreparePackageList (\r
index d337408..cdecddb 100644 (file)
@@ -42,7 +42,7 @@ Revision History
 #include <Library/IfrSupportLib.h>\r
 #include <Library/ExtendedIfrSupportLib.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
+#include <Library/DevicePathLib.h>\r
 \r
 #include "NVDataStruc.h"\r
 \r
@@ -97,4 +97,16 @@ typedef struct {
 \r
 #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a)  CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)\r
 \r
+#pragma pack(1)\r
+\r
+///\r
+/// HII specific Vendor Device Path definition.\r
+///\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+#pragma pack()\r
+\r
 #endif\r
index d1da67d..bba6ab0 100644 (file)
@@ -53,7 +53,6 @@
   DebugLib\r
   HiiLib\r
   IfrSupportLib\r
-  ExtendedHiiLib\r
   ExtendedIfrSupportLib\r
 \r
 [Protocols]\r
index feb1118..2bb0ba3 100644 (file)
@@ -24,6 +24,31 @@ LIST_ENTRY      mIScsiConfigFormList = {
   &mIScsiConfigFormList\r
 };\r
 \r
+HII_VENDOR_DEVICE_PATH  mIScsiHiiVendorDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    //\r
+    // {49D7B73E-143D-4716-977B-C45F1CB038CC}\r
+    //\r
+    { 0x49d7b73e, 0x143d, 0x4716, { 0x97, 0x7b, 0xc4, 0x5f, 0x1c, 0xb0, 0x38, 0xcc } }\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    { \r
+      (UINT8) (END_DEVICE_PATH_LENGTH),\r
+      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
+    }\r
+  }\r
+};\r
+\r
 /**\r
   Convert the IPv4 address into a dotted string.\r
 \r
@@ -908,7 +933,7 @@ IScsiConfigFormInit (
     return Status;\r
   }\r
 \r
-  CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocatePool (sizeof (ISCSI_FORM_CALLBACK_INFO));\r
+  CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocateZeroPool (sizeof (ISCSI_FORM_CALLBACK_INFO));\r
   if (CallbackInfo == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -928,22 +953,15 @@ IScsiConfigFormInit (
   }\r
 \r
   //\r
-  // Create driver handle used by HII database\r
+  // Install Device Path Protocol and Config Access protocol to driver handle\r
   //\r
-  Status = HiiLibCreateHiiDriverHandle (&CallbackInfo->DriverHandle);\r
-  if (EFI_ERROR (Status)) {\r
-    FreePool(CallbackInfo);\r
-    return Status;\r
-  }\r
-  \r
-  //\r
-  // Install Config Access protocol to driver handle\r
-  //\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &CallbackInfo->DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &mIScsiHiiVendorDevicePath,\r
                   &gEfiHiiConfigAccessProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &CallbackInfo->ConfigAccess\r
+                  &CallbackInfo->ConfigAccess,\r
+                  NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
   \r
@@ -1010,13 +1028,14 @@ IScsiConfigFormUnload (
   //\r
   // Uninstall EFI_HII_CONFIG_ACCESS_PROTOCOL\r
   //\r
-  gBS->UninstallProtocolInterface (\r
-        mCallbackInfo->DriverHandle,\r
-        &gEfiHiiConfigAccessProtocolGuid,\r
-        &mCallbackInfo->ConfigAccess\r
-        );\r
-  HiiLibDestroyHiiDriverHandle (mCallbackInfo->DriverHandle);\r
-\r
+  gBS->UninstallMultipleProtocolInterfaces (\r
+         mCallbackInfo->DriverHandle,\r
+         &gEfiDevicePathProtocolGuid,\r
+         &mIScsiHiiVendorDevicePath,\r
+         &gEfiHiiConfigAccessProtocolGuid,\r
+         &mCallbackInfo->ConfigAccess,\r
+         NULL\r
+         );\r
   gBS->FreePool (mCallbackInfo);\r
 \r
   return EFI_SUCCESS;\r
index e89d2d4..fd6a2c4 100644 (file)
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Protocol/HiiConfigRouting.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
+#include <Library/DevicePathLib.h>\r
 #include <Library/IfrSupportLib.h>\r
 #include <Library/ExtendedIfrSupportLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -103,6 +103,18 @@ typedef struct _ISCSI_FORM_CALLBACK_INFO {
   ISCSI_CONFIG_FORM_ENTRY          *Current;\r
 } ISCSI_FORM_CALLBACK_INFO;\r
 \r
+#pragma pack(1)\r
+\r
+///\r
+/// HII specific Vendor Device Path definition.\r
+///\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+#pragma pack()\r
+\r
 /**\r
   Updates the iSCSI configuration form to add/delete an entry for the iSCSI\r
   device specified by the Controller.\r
index 8710845..2950991 100644 (file)
@@ -79,7 +79,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   PrintLib\r
   HiiLib\r
   IfrSupportLib\r
-  ExtendedHiiLib\r
   ExtendedIfrSupportLib\r
   NetLib\r
 \r
index 1096462..7e948b3 100644 (file)
@@ -525,7 +525,6 @@ InitializeSetup (
   )\r
 {\r
   EFI_STATUS                  Status;\r
-  EFI_HANDLE                  HiiDriverHandle;\r
   EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
 \r
   //\r
@@ -555,15 +554,12 @@ InitializeSetup (
   //\r
   // Publish our HII data\r
   //\r
-  Status = HiiLibCreateHiiDriverHandle (&HiiDriverHandle);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
   PackageList = HiiLibPreparePackageList (1, &gSetupBrowserGuid, SetupBrowserStrings);\r
   ASSERT (PackageList != NULL);\r
   Status = mHiiDatabase->NewPackageList (\r
                            mHiiDatabase,\r
                            PackageList,\r
-                           HiiDriverHandle,\r
+                           ImageHandle,\r
                            &gHiiHandle\r
                            );\r
   ASSERT_EFI_ERROR (Status);\r
index d8e7ca2..ebd9a47 100644 (file)
@@ -42,7 +42,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/IfrSupportLib.h>\r
 #include <Library/ExtendedIfrSupportLib.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
 #include "Colors.h"\r
index b945322..d531d7b 100644 (file)
@@ -61,7 +61,6 @@
   PrintLib\r
   IfrSupportLib\r
   HiiLib\r
-  ExtendedHiiLib\r
 \r
 [Guids]\r
   gEfiIfrTianoGuid                              ## CONSUMES  ## GUID\r
index 68fbe44..59c49db 100644 (file)
@@ -65,7 +65,6 @@
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
-  ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf\r
   S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf\r
   RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf\r
   IfrSupportLib|MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrSupportLib.inf\r
index 7c45fd0..e48096b 100644 (file)
@@ -61,7 +61,6 @@
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
-  ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf\r
   S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf\r
   RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf\r
   IfrSupportLib|MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrSupportLib.inf\r