Retire Extended HII library class.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8011 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3
2009-04-02 08:48:03 +00:00
parent 186ca8b0cd
commit f6f910dd12
34 changed files with 403 additions and 446 deletions

View File

@@ -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.

View File

@@ -107,7 +107,6 @@
DebugLib
PrintLib
HiiLib
ExtendedHiiLib
UefiDriverEntryPoint
PlatformBdsLib
CapsuleLib

View File

@@ -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
// Install Device Path Protocol and Config Access protocol to driver handle
//
Status = HiiLibCreateHiiDriverHandle (&BmmCallbackInfo->FeDriverHandle);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Install 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;

View File

@@ -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
// Install Device Path Protocol and Config Access protocol to driver handle
//
Status = HiiLibCreateHiiDriverHandle (&gBootManagerPrivate.DriverHandle);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Install 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);

View File

@@ -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 (

View File

@@ -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
// Install Device Path Protocol and Config Access protocol to driver handle
//
Status = HiiLibCreateHiiDriverHandle (&gDeviceManagerPrivate.DriverHandle);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Install 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);

View File

@@ -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
// Install Device Path Protocol and Config Access protocol to driver handle
//
Status = HiiLibCreateHiiDriverHandle (&gFrontPagePrivate.DriverHandle);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Install 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);

View File

@@ -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);
}

View File

@@ -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
);