From f6f910dd125144707e3516bbb517b8ec7a388c06 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Thu, 2 Apr 2009 08:48:03 +0000 Subject: Retire Extended HII library class. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8011 6f19259b-4bc3-4df7-8a09-765794883524 --- .../FrameworkHiiOnUefiHiiThunk/ConfigAccess.c | 39 ++++++++++++++++++---- .../FrameworkHiiOnUefiHiiThunk.inf | 1 - .../FrameworkHiiOnUefiHiiThunk/HiiDatabase.h | 12 ++++++- EdkCompatibilityPkg/EdkCompatibilityPkg.dsc | 1 - 4 files changed, 43 insertions(+), 10 deletions(-) (limited to 'EdkCompatibilityPkg') diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c index 6be0496c61..341d31cb1c 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c @@ -19,6 +19,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. BOOLEAN mHiiPackageListUpdated = FALSE; +HII_VENDOR_DEVICE_PATH mUefiHiiVendorDevicePath = { + { + { + HARDWARE_DEVICE_PATH, + HW_VENDOR_DP, + { + (UINT8) (sizeof (VENDOR_DEVICE_PATH)), + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) + } + }, + // + // {2A1F1827-03E2-4b2f-83DE-89B6073A0182} + // + { 0x2a1f1827, 0x3e2, 0x4b2f, { 0x83, 0xde, 0x89, 0xb6, 0x7, 0x3a, 0x1, 0x82 } } + }, + { + END_DEVICE_PATH_TYPE, + END_ENTIRE_DEVICE_PATH_SUBTYPE, + { + (UINT8) (END_DEVICE_PATH_LENGTH), + (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) + } + } +}; + CONFIG_ACCESS_PRIVATE gConfigAccessPrivateTempate = { CONFIG_ACCESS_PRIVATE_SIGNATURE, { @@ -198,9 +223,6 @@ InstallDefaultConfigAccessProtocol ( ASSERT (ThunkContext->IfrPackageCount != 0); - Status = HiiLibCreateHiiDriverHandle (&ThunkContext->UefiHiiDriverHandle); - ASSERT_EFI_ERROR (Status); - ConfigAccessInstance = AllocateCopyPool ( sizeof (CONFIG_ACCESS_PRIVATE), &gConfigAccessPrivateTempate @@ -209,6 +231,8 @@ InstallDefaultConfigAccessProtocol ( Status = gBS->InstallMultipleProtocolInterfaces ( &ThunkContext->UefiHiiDriverHandle, + &gEfiDevicePathProtocolGuid, + &mUefiHiiVendorDevicePath, &gEfiHiiConfigAccessProtocolGuid, &ConfigAccessInstance->ConfigAccessProtocol, NULL @@ -237,8 +261,6 @@ UninstallDefaultConfigAccessProtocol ( EFI_STATUS Status; EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess; - HiiLibDestroyHiiDriverHandle (ThunkContext->UefiHiiDriverHandle); - Status = gBS->HandleProtocol ( ThunkContext->UefiHiiDriverHandle, &gEfiHiiConfigAccessProtocolGuid, @@ -246,10 +268,13 @@ UninstallDefaultConfigAccessProtocol ( ); ASSERT_EFI_ERROR (Status); - Status = gBS->UninstallProtocolInterface ( + Status = gBS->UninstallMultipleProtocolInterfaces ( ThunkContext->UefiHiiDriverHandle, + &gEfiDevicePathProtocolGuid, + &mUefiHiiVendorDevicePath, &gEfiHiiConfigAccessProtocolGuid, - ConfigAccess + ConfigAccess, + NULL ); ASSERT_EFI_ERROR (Status); diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/FrameworkHiiOnUefiHiiThunk.inf b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/FrameworkHiiOnUefiHiiThunk.inf index 4a7ae4d0f8..9b09c0b52d 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/FrameworkHiiOnUefiHiiThunk.inf +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/FrameworkHiiOnUefiHiiThunk.inf @@ -76,7 +76,6 @@ DebugLib BaseLib HiiLib - ExtendedHiiLib IfrSupportLib ExtendedIfrSupportLib PrintLib diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h index f09c3cea92..94b79e5e2d 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h @@ -45,7 +45,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include +#include #include #include @@ -185,7 +185,17 @@ typedef struct { UINT16 VarStoreId; } BUFFER_STORAGE_ENTRY; +#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() #define CONFIG_ACCESS_PRIVATE_SIGNATURE SIGNATURE_32 ('H', 'T', 'c', 'a') #define CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL(Record) CR(Record, CONFIG_ACCESS_PRIVATE, ConfigAccessProtocol, CONFIG_ACCESS_PRIVATE_SIGNATURE) diff --git a/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc b/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc index b73fce94c3..00c08bdca6 100644 --- a/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc +++ b/EdkCompatibilityPkg/EdkCompatibilityPkg.dsc @@ -46,7 +46,6 @@ define GCC_MACRO = -DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_S SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf - ExtendedHiiLib|MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf IfrSupportLib|MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrSupportLib.inf ExtendedIfrSupportLib|MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf -- cgit v1.2.3