summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-02 08:48:03 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-02 08:48:03 +0000
commitf6f910dd125144707e3516bbb517b8ec7a388c06 (patch)
tree8bd9280b012a7ca5366fdee7c9579723d9485b60 /IntelFrameworkModulePkg/Universal
parent186ca8b0cd473901fd0a6ce39d7f091383672799 (diff)
downloadedk2-platforms-f6f910dd125144707e3516bbb517b8ec7a388c06.tar.xz
Retire Extended HII library class.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8011 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h14
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf1
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c85
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c45
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h2
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c43
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c43
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/Language.c12
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/String.c11
9 files changed, 171 insertions, 85 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
index 50e5689cce..34327ce77e 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
@@ -60,7 +60,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/PcdLib.h>
#include <Library/CapsuleLib.h>
#include <Library/HiiLib.h>
-#include <Library/ExtendedHiiLib.h>
+#include <Library/DevicePathLib.h>
#include <Library/PcdLib.h>
#include <Library/GenericBdsLib.h>
@@ -73,6 +73,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE \
)
+#pragma pack(1)
+
+///
+/// HII specific Vendor Device Path definition.
+///
+typedef struct {
+ VENDOR_DEVICE_PATH VendorDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL End;
+} HII_VENDOR_DEVICE_PATH;
+
+#pragma pack()
+
/**
Show progress bar with title above it. It only works in Graphics mode.
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
index 2daacb6d6f..08f36f247c 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
@@ -107,7 +107,6 @@
DebugLib
PrintLib
HiiLib
- ExtendedHiiLib
UefiDriverEntryPoint
PlatformBdsLib
CapsuleLib
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
index d935347487..efc862e64b 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
@@ -28,6 +28,55 @@ EFI_DEVICE_PATH_PROTOCOL EndDevicePath[] = {
}
};
+HII_VENDOR_DEVICE_PATH mBmmHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {165A028F-0BB2-4b5f-8747-77592E3F6499}
+ //
+ { 0x165a028f, 0xbb2, 0x4b5f, { 0x87, 0x47, 0x77, 0x59, 0x2e, 0x3f, 0x64, 0x99 } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
+HII_VENDOR_DEVICE_PATH mFeHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {91DB4238-B0C8-472e-BBCF-F3A6541010F4}
+ //
+ { 0x91db4238, 0xb0c8, 0x472e, { 0xbb, 0xcf, 0xf3, 0xa6, 0x54, 0x10, 0x10, 0xf4 } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
EFI_GUID EfiLegacyDevOrderGuid = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID;
EFI_GUID mBootMaintGuid = BOOT_MAINT_FORMSET_GUID;
@@ -850,42 +899,30 @@ InitializeBM (
BmmCallbackInfo->FeDisplayContext = UNKNOWN_CONTEXT;
//
- // Create driver handle used by HII database
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = HiiLibCreateHiiDriverHandle (&BmmCallbackInfo->BmmDriverHandle);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
- //
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&BmmCallbackInfo->BmmDriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mBmmHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &BmmCallbackInfo->BmmConfigAccess
+ &BmmCallbackInfo->BmmConfigAccess,
+ NULL
);
if (EFI_ERROR (Status)) {
return Status;
}
//
- // Create driver handle used by HII database
- //
- Status = HiiLibCreateHiiDriverHandle (&BmmCallbackInfo->FeDriverHandle);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&BmmCallbackInfo->FeDriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mFeHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &BmmCallbackInfo->FeConfigAccess
+ &BmmCallbackInfo->FeConfigAccess,
+ NULL
);
if (EFI_ERROR (Status)) {
return Status;
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
index a1612cd1b1..615c189d8d 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
@@ -19,6 +19,31 @@ EFI_GUID mBootManagerGuid = BOOT_MANAGER_FORMSET_GUID;
LIST_ENTRY *mBootOptionsList;
BDS_COMMON_OPTION *gOption;
+HII_VENDOR_DEVICE_PATH mBootManagerHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {1DDDBE15-481D-4d2b-8277-B191EAF66525}
+ //
+ { 0x1dddbe15, 0x481d, 0x4d2b, { 0x82, 0x77, 0xb1, 0x91, 0xea, 0xf6, 0x65, 0x25 } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
BOOT_MANAGER_CALLBACK_DATA gBootManagerPrivate = {
BOOT_MANAGER_CALLBACK_DATA_SIGNATURE,
NULL,
@@ -104,7 +129,7 @@ BootManagerCallback (
Registers HII packages for the Boot Manger to HII Database.
It also registers the browser call back function.
- @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()
+ @return Status of gBS->InstallMultipleProtocolInterfaces() and gHiiDatabase->NewPackageList()
**/
EFI_STATUS
@@ -116,21 +141,15 @@ InitializeBootManager (
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
//
- // Create driver handle used by HII database
- //
- Status = HiiLibCreateHiiDriverHandle (&gBootManagerPrivate.DriverHandle);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&gBootManagerPrivate.DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mBootManagerHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &gBootManagerPrivate.ConfigAccess
+ &gBootManagerPrivate.ConfigAccess,
+ NULL
);
ASSERT_EFI_ERROR (Status);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
index 4e460788a7..d7566f4ccf 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
@@ -86,7 +86,7 @@ BootManagerCallback (
Registers HII packages for the Boot Manger to HII Database.
It also registers the browser call back function.
- @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()
+ @return Status of gBS->InstallMultipleProtocolInterfaces() and gHiiDatabase->NewPackageList()
**/
EFI_STATUS
InitializeBootManager (
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
index 9492de441c..9264734ddc 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
@@ -36,6 +36,31 @@ DEVICE_MANAGER_MENU_ITEM mDeviceManagerMenuItemTable[] = {
{ STRING_TOKEN (STR_OTHER_DEVICE), EFI_OTHER_DEVICE_CLASS }
};
+HII_VENDOR_DEVICE_PATH mDeviceManagerHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {102579A0-3686-466e-ACD8-80C087044F4A}
+ //
+ { 0x102579a0, 0x3686, 0x466e, { 0xac, 0xd8, 0x80, 0xc0, 0x87, 0x4, 0x4f, 0x4a } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
#define MENU_ITEM_NUM \
(sizeof (mDeviceManagerMenuItemTable) / sizeof (DEVICE_MANAGER_MENU_ITEM))
@@ -100,21 +125,15 @@ InitializeDeviceManager (
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
//
- // Create driver handle used by HII database
- //
- Status = HiiLibCreateHiiDriverHandle (&gDeviceManagerPrivate.DriverHandle);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&gDeviceManagerPrivate.DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mDeviceManagerHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &gDeviceManagerPrivate.ConfigAccess
+ &gDeviceManagerPrivate.ConfigAccess,
+ NULL
);
ASSERT_EFI_ERROR (Status);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index 29974769bb..fbfac08178 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -37,6 +37,31 @@ FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate = {
}
};
+HII_VENDOR_DEVICE_PATH mFrontPageHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {8E6D99EE-7531-48f8-8745-7F6144468FF2}
+ //
+ { 0x8e6d99ee, 0x7531, 0x48f8, { 0x87, 0x45, 0x7f, 0x61, 0x44, 0x46, 0x8f, 0xf2 } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
/**
This function allows a caller to extract the current configuration for one
or more named elements from the target driver.
@@ -324,21 +349,15 @@ InitializeFrontPage (
}
//
- // Create driver handle used by HII database
- //
- Status = HiiLibCreateHiiDriverHandle (&gFrontPagePrivate.DriverHandle);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&gFrontPagePrivate.DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mFrontPageHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &gFrontPagePrivate.ConfigAccess
+ &gFrontPagePrivate.ConfigAccess,
+ NULL
);
ASSERT_EFI_ERROR (Status);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
index 4e7537c9e4..c9e19c5ff0 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
@@ -259,23 +259,13 @@ ExportFonts (
VOID
)
{
- EFI_STATUS Status;
- EFI_HANDLE DriverHandle;
EFI_HII_HANDLE HiiHandle;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
- //
- // Create driver handle used by HII database
- //
- Status = HiiLibCreateHiiDriverHandle (&DriverHandle);
- if (EFI_ERROR (Status)) {
- return ;
- }
-
PackageList = HiiLibPreparePackageList (1, &mFontPackageGuid, &mFontBin);
ASSERT (PackageList != NULL);
- gHiiDatabase->NewPackageList (gHiiDatabase, PackageList, DriverHandle, &HiiHandle);
+ gHiiDatabase->NewPackageList (gHiiDatabase, PackageList, mBdsImageHandle, &HiiHandle);
FreePool (PackageList);
}
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/String.c b/IntelFrameworkModulePkg/Universal/BdsDxe/String.c
index d1c6651977..a509a85df1 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/String.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/String.c
@@ -34,7 +34,6 @@ InitializeStringSupport (
)
{
EFI_STATUS Status;
- EFI_HANDLE DriverHandle;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase);
@@ -42,21 +41,13 @@ InitializeStringSupport (
return Status;
}
- //
- // Create driver handle used by HII database
- //
- Status = HiiLibCreateHiiDriverHandle (&DriverHandle);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
PackageList = HiiLibPreparePackageList (1, &mBdsStringPackGuid, &BdsDxeStrings);
ASSERT (PackageList != NULL);
Status = gHiiDatabase->NewPackageList (
gHiiDatabase,
PackageList,
- DriverHandle,
+ mBdsImageHandle,
&gStringPackHandle
);