From 76f1dde2c43e02a78af3d09aea48fa316d283a62 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 24 Feb 2009 07:53:20 +0000 Subject: Move Crc32GuidedSectionExtraction from Protocol to Guid directory Move DiskInfo protocol from MdeModulePkg to IntelFrameworkModulePkg Retire unused FvbExtension protocol. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7638 6f19259b-4bc3-4df7-8a09-765794883524 --- .../DxeCrc32GuidedSectionExtractLib.c | 8 +-- .../DxeCrc32GuidedSectionExtractLib.inf | 4 +- .../Library/EdkFvbServiceLib/EdkFvbServiceLib.inf | 1 - MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c | 71 ---------------------- MdeModulePkg/Library/EdkFvbServiceLib/Fvb.h | 2 - 5 files changed, 7 insertions(+), 79 deletions(-) (limited to 'MdeModulePkg/Library') diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c index b87af37a91..398adfcac1 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c @@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include -#include +#include #include #include #include @@ -62,7 +62,7 @@ Crc32GuidedSectionGetInfo ( // Check whether the input guid section is recognized. // if (!CompareGuid ( - &gEfiCrc32GuidedSectionExtractionProtocolGuid, + &gEfiCrc32GuidedSectionExtractionGuid, &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { return EFI_INVALID_PARAMETER; } @@ -113,7 +113,7 @@ Crc32GuidedSectionHandler ( // Check whether the input guid section is recognized. // if (!CompareGuid ( - &gEfiCrc32GuidedSectionExtractionProtocolGuid, + &gEfiCrc32GuidedSectionExtractionGuid, &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { return EFI_INVALID_PARAMETER; } @@ -185,7 +185,7 @@ DxeCrc32GuidedSectionExtractLibConstructor ( ) { return ExtractGuidedSectionRegisterHandlers ( - &gEfiCrc32GuidedSectionExtractionProtocolGuid, + &gEfiCrc32GuidedSectionExtractionGuid, Crc32GuidedSectionGetInfo, Crc32GuidedSectionHandler ); diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf index 8a977003dc..094378fb82 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf @@ -44,7 +44,9 @@ DebugLib BaseMemoryLib +[Guids] + gEfiCrc32GuidedSectionExtractionGuid ## CONSUMES ## GUID + [Protocols] - gEfiCrc32GuidedSectionExtractionProtocolGuid ## PRODUCED gEfiSecurityPolicyProtocolGuid ## SOMETIMES_CONSUMED (Set platform override AUTH status if exist) \ No newline at end of file diff --git a/MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf b/MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf index b28d2afb24..eb77a43fe3 100644 --- a/MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf +++ b/MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf @@ -51,7 +51,6 @@ [Protocols] gEfiFirmwareVolumeBlockProtocolGuid ## NOTIFY - gEfiFvbExtensionProtocolGuid ## CONSUMES [Guids] gEfiEventVirtualAddressChangeGuid ## PRODUCES diff --git a/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c b/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c index 44de6eeaa0..85f5e5a6d2 100644 --- a/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c +++ b/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c @@ -197,15 +197,6 @@ FvbNotificationEvent ( ); ASSERT_EFI_ERROR (Status); - Status = gBS->HandleProtocol ( - Handle, - &gEfiFvbExtensionProtocolGuid, - (VOID **) &mFvbEntry[UpdateIndex].FvbExtension - ); - if (Status != EFI_SUCCESS) { - mFvbEntry[UpdateIndex].FvbExtension = NULL; - } - // // Check the FVB can be accessed in RUNTIME, The FVBs in FVB handle list come from two ways: // 1) Dxe Core. (FVB information is transferred from FV HOB). 2) FVB driver. The FVB produced @@ -251,11 +242,6 @@ FvbVirtualAddressChangeNotifyEvent ( EfiConvertPointer (0x0, (VOID **) &mFvbEntry[Index].Fvb->EraseBlocks); EfiConvertPointer (0x0, (VOID **) &mFvbEntry[Index].Fvb); } - - if (mFvbEntry[Index].FvbExtension != NULL) { - EfiConvertPointer (0x0, (VOID **) &mFvbEntry[Index].FvbExtension->EraseFvbCustomBlock); - EfiConvertPointer (0x0, (VOID **) &mFvbEntry[Index].FvbExtension); - } } EfiConvertPointer (0x0, (VOID **) &mFvbEntry); @@ -668,60 +654,3 @@ EfiFvbGetBlockSize ( return mFvbEntry[Instance].Fvb->GetBlockSize (mFvbEntry[Instance].Fvb, Lba, BlockSize, NumOfBlocks); } - - -/** - Erases and initializes a specified range of a firmware volume. - - The EfiFvbEraseCustomBlockRange() function erases the specified range in the firmware - volume index by Instance. If Instance is larger than the max FVB number, StartLba or - LastLba index is larger than the last block of the firmware volume, StartLba > LastLba - or StartLba equal to LastLba but OffsetStartLba > OffsetLastLba, this function return - the status code EFI_INVALID_PARAMETER. - - @param[in] Instance The FV instance to be operated. - @param[in] StartLba The starting logical block index to be erased. - @param[in] OffsetStartLba Offset into the starting block at which to - begin erasing. - @param[in] LastLba The last logical block index to be erased. - @param[in] OffsetLastLba Offset into the last block at which to end erasing. - - @retval EFI_EFI_SUCCESS Successfully erase custom block range - @retval EFI_INVALID_PARAMETER Invalid parameter. Instance is larger than the max FVB number. - @retval EFI_UNSUPPORTED Firmware volume block device has no this capability. - -**/ -EFI_STATUS -EFIAPI -EfiFvbEraseCustomBlockRange ( - IN UINTN Instance, - IN EFI_LBA StartLba, - IN UINTN OffsetStartLba, - IN EFI_LBA LastLba, - IN UINTN OffsetLastLba - ) -{ - if (Instance >= mFvbCount) { - return EFI_INVALID_PARAMETER; - } - - if (EfiAtRuntime() && !mFvbEntry[Instance].IsRuntimeAccess) { - return EFI_INVALID_PARAMETER; - } - - if (mFvbEntry[Instance].FvbExtension == NULL) { - return EFI_UNSUPPORTED; - } - - if (mFvbEntry[Instance].FvbExtension->EraseFvbCustomBlock == NULL) { - return EFI_UNSUPPORTED; - } - - return mFvbEntry[Instance].FvbExtension->EraseFvbCustomBlock ( - mFvbEntry[Instance].FvbExtension, - StartLba, - OffsetStartLba, - LastLba, - OffsetLastLba - ); -} diff --git a/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.h b/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.h index 1981e9682d..b12894b3c1 100644 --- a/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.h +++ b/MdeModulePkg/Library/EdkFvbServiceLib/Fvb.h @@ -22,7 +22,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include #include #include @@ -40,7 +39,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct { EFI_HANDLE Handle; EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb; - EFI_FVB_EXTENSION_PROTOCOL *FvbExtension; BOOLEAN IsRuntimeAccess; } FVB_ENTRY; -- cgit v1.2.3