diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-02 08:48:03 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-02 08:48:03 +0000 |
commit | f6f910dd125144707e3516bbb517b8ec7a388c06 (patch) | |
tree | 8bd9280b012a7ca5366fdee7c9579723d9485b60 /MdeModulePkg/Universal | |
parent | 186ca8b0cd473901fd0a6ce39d7f091383672799 (diff) | |
download | edk2-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 'MdeModulePkg/Universal')
9 files changed, 133 insertions, 49 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index e470a82cc7..8fcce40327 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -23,6 +23,56 @@ EFI_GUID mInventoryGuid = INVENTORY_GUID; CHAR16 VariableName[] = L"MyIfrNVData";
+HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath1 = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {C153B68D-EBFC-488e-B110-662867745B87}
+ //
+ { 0xc153b68d, 0xebfc, 0x488e, { 0xb1, 0x10, 0x66, 0x28, 0x67, 0x74, 0x5b, 0x87 } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
+HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath2 = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {06F37F07-0C48-40e9-8436-0A08A0BB76B0}
+ //
+ { 0x6f37f07, 0xc48, 0x40e9, { 0x84, 0x36, 0xa, 0x8, 0xa0, 0xbb, 0x76, 0xb0 } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
/**
Encode the password using a simple algorithm.
@@ -689,7 +739,7 @@ DriverSampleInit ( EFI_STATUS SavedStatus;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
EFI_HII_HANDLE HiiHandle[2];
- EFI_HANDLE DriverHandle[2];
+ EFI_HANDLE DriverHandle[2] = {NULL, NULL};
DRIVER_SAMPLE_PRIVATE_DATA *PrivateData;
EFI_SCREEN_DESCRIPTOR Screen;
EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
@@ -766,23 +816,18 @@ DriverSampleInit ( }
PrivateData->HiiConfigRouting = HiiConfigRouting;
- //
- // Install Config Access protocol
- //
- Status = HiiLibCreateHiiDriverHandle (&DriverHandle[0]);
- if (EFI_ERROR (Status)) {
- return Status;
- }
- PrivateData->DriverHandle[0] = DriverHandle[0];
-
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&DriverHandle[0],
+ &gEfiDevicePathProtocolGuid,
+ &mHiiVendorDevicePath1,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &PrivateData->ConfigAccess
+ &PrivateData->ConfigAccess,
+ NULL
);
ASSERT_EFI_ERROR (Status);
+ PrivateData->DriverHandle[0] = DriverHandle[0];
+
//
// Publish our HII data
//
@@ -811,10 +856,14 @@ DriverSampleInit ( //
// Publish another Fromset
//
- Status = HiiLibCreateHiiDriverHandle (&DriverHandle[1]);
- if (EFI_ERROR (Status)) {
- return Status;
- }
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &DriverHandle[1],
+ &gEfiDevicePathProtocolGuid,
+ &mHiiVendorDevicePath2,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
PrivateData->DriverHandle[1] = DriverHandle[1];
PackageList = HiiLibPreparePackageList (
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h index d33740826c..cdecddbfe7 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h @@ -42,7 +42,7 @@ Revision History #include <Library/IfrSupportLib.h>
#include <Library/ExtendedIfrSupportLib.h>
#include <Library/HiiLib.h>
-#include <Library/ExtendedHiiLib.h>
+#include <Library/DevicePathLib.h>
#include "NVDataStruc.h"
@@ -97,4 +97,16 @@ typedef struct { #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_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()
+
#endif
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf index d1da67da04..bba6ab0abf 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf @@ -53,7 +53,6 @@ DebugLib
HiiLib
IfrSupportLib
- ExtendedHiiLib
ExtendedIfrSupportLib
[Protocols]
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index feb1118edd..2bb0ba3df1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c @@ -24,6 +24,31 @@ LIST_ENTRY mIScsiConfigFormList = { &mIScsiConfigFormList
};
+HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {49D7B73E-143D-4716-977B-C45F1CB038CC}
+ //
+ { 0x49d7b73e, 0x143d, 0x4716, { 0x97, 0x7b, 0xc4, 0x5f, 0x1c, 0xb0, 0x38, 0xcc } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
/**
Convert the IPv4 address into a dotted string.
@@ -908,7 +933,7 @@ IScsiConfigFormInit ( return Status;
}
- CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocatePool (sizeof (ISCSI_FORM_CALLBACK_INFO));
+ CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocateZeroPool (sizeof (ISCSI_FORM_CALLBACK_INFO));
if (CallbackInfo == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -928,22 +953,15 @@ IScsiConfigFormInit ( }
//
- // Create driver handle used by HII database
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = HiiLibCreateHiiDriverHandle (&CallbackInfo->DriverHandle);
- if (EFI_ERROR (Status)) {
- FreePool(CallbackInfo);
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
- //
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&CallbackInfo->DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mIScsiHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &CallbackInfo->ConfigAccess
+ &CallbackInfo->ConfigAccess,
+ NULL
);
ASSERT_EFI_ERROR (Status);
@@ -1010,13 +1028,14 @@ IScsiConfigFormUnload ( //
// Uninstall EFI_HII_CONFIG_ACCESS_PROTOCOL
//
- gBS->UninstallProtocolInterface (
- mCallbackInfo->DriverHandle,
- &gEfiHiiConfigAccessProtocolGuid,
- &mCallbackInfo->ConfigAccess
- );
- HiiLibDestroyHiiDriverHandle (mCallbackInfo->DriverHandle);
-
+ gBS->UninstallMultipleProtocolInterfaces (
+ mCallbackInfo->DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mIScsiHiiVendorDevicePath,
+ &gEfiHiiConfigAccessProtocolGuid,
+ &mCallbackInfo->ConfigAccess,
+ NULL
+ );
gBS->FreePool (mCallbackInfo);
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h index e89d2d4914..fd6a2c41cf 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h @@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Protocol/HiiConfigRouting.h>
#include <Library/HiiLib.h>
-#include <Library/ExtendedHiiLib.h>
+#include <Library/DevicePathLib.h>
#include <Library/IfrSupportLib.h>
#include <Library/ExtendedIfrSupportLib.h>
#include <Library/DebugLib.h>
@@ -103,6 +103,18 @@ typedef struct _ISCSI_FORM_CALLBACK_INFO { ISCSI_CONFIG_FORM_ENTRY *Current;
} ISCSI_FORM_CALLBACK_INFO;
+#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()
+
/**
Updates the iSCSI configuration form to add/delete an entry for the iSCSI
device specified by the Controller.
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf index 8710845abe..29509911e7 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf @@ -79,7 +79,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. PrintLib
HiiLib
IfrSupportLib
- ExtendedHiiLib
ExtendedIfrSupportLib
NetLib
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 1096462306..7e948b3058 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -525,7 +525,6 @@ InitializeSetup ( )
{
EFI_STATUS Status;
- EFI_HANDLE HiiDriverHandle;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
//
@@ -555,15 +554,12 @@ InitializeSetup ( //
// Publish our HII data
//
- Status = HiiLibCreateHiiDriverHandle (&HiiDriverHandle);
- ASSERT_EFI_ERROR (Status);
-
PackageList = HiiLibPreparePackageList (1, &gSetupBrowserGuid, SetupBrowserStrings);
ASSERT (PackageList != NULL);
Status = mHiiDatabase->NewPackageList (
mHiiDatabase,
PackageList,
- HiiDriverHandle,
+ ImageHandle,
&gHiiHandle
);
ASSERT_EFI_ERROR (Status);
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h index d8e7ca2d2e..ebd9a47d73 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h @@ -42,7 +42,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/IfrSupportLib.h>
#include <Library/ExtendedIfrSupportLib.h>
#include <Library/HiiLib.h>
-#include <Library/ExtendedHiiLib.h>
#include <Library/PcdLib.h>
#include "Colors.h"
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf index b945322920..d531d7b9af 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf +++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf @@ -61,7 +61,6 @@ PrintLib
IfrSupportLib
HiiLib
- ExtendedHiiLib
[Guids]
gEfiIfrTianoGuid ## CONSUMES ## GUID
|