diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-24 06:35:26 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-24 06:35:26 +0000 |
commit | 0e4cb657f69dae6fcf1d6b4121964b477d40c3bf (patch) | |
tree | b29e12b3f2a540bf25e993cf82e2cff81f457da4 /DuetPkg/FvbRuntimeService | |
parent | 457112f9c686ed352e389122e7076a3529674bb1 (diff) | |
download | edk2-platforms-0e4cb657f69dae6fcf1d6b4121964b477d40c3bf.tar.xz |
Don't produce FvbExtension Protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7631 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/FvbRuntimeService')
-rw-r--r-- | DuetPkg/FvbRuntimeService/DUETFwh.inf | 4 | ||||
-rw-r--r-- | DuetPkg/FvbRuntimeService/FWBlockService.c | 146 | ||||
-rw-r--r-- | DuetPkg/FvbRuntimeService/FwBlockService.h | 24 |
3 files changed, 1 insertions, 173 deletions
diff --git a/DuetPkg/FvbRuntimeService/DUETFwh.inf b/DuetPkg/FvbRuntimeService/DUETFwh.inf index 90d73ec433..9a73ae8110 100644 --- a/DuetPkg/FvbRuntimeService/DUETFwh.inf +++ b/DuetPkg/FvbRuntimeService/DUETFwh.inf @@ -33,10 +33,9 @@ MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
DuetPkg/DuetPkg.dec
- #TianoModulePkg/TianoModulePkg.dec
[Sources.common]
- FwBlockService.c
+ FWBlockService.c
FwBlockService.h
FvbInfo.c
FileIo.c
@@ -55,7 +54,6 @@ gEfiAlternateFvBlockGuid
[Protocols]
- gEfiFvbExtensionProtocolGuid
gEfiSimpleFileSystemProtocolGuid
gEfiFirmwareVolumeBlockProtocolGuid
gEfiBlockIoProtocolGuid
diff --git a/DuetPkg/FvbRuntimeService/FWBlockService.c b/DuetPkg/FvbRuntimeService/FWBlockService.c index 6926a43dcf..f5260a5eaa 100644 --- a/DuetPkg/FvbRuntimeService/FWBlockService.c +++ b/DuetPkg/FvbRuntimeService/FWBlockService.c @@ -61,9 +61,6 @@ EFI_FW_VOL_BLOCK_DEVICE mFvbDeviceTemplate = { FvbProtocolWrite,
FvbProtocolEraseBlocks,
NULL
- },
- {
- FvbExtendProtocolEraseCustomBlockRange
}
};
@@ -701,99 +698,6 @@ Returns: }
EFI_STATUS
-FvbEraseCustomBlockRange (
- IN UINTN Instance,
- IN EFI_LBA StartLba,
- IN UINTN OffsetStartLba,
- IN EFI_LBA LastLba,
- IN UINTN OffsetLastLba,
- IN ESAL_FWB_GLOBAL *Global,
- IN BOOLEAN Virtual
- )
-/*++
-
-Routine Description:
- Erases and initializes a specified range of a firmware volume
-
-Arguments:
- Instance - The FV instance to be erased
- StartLba - The starting logical block index to be erased
- OffsetStartLba - Offset into the starting block at which to
- begin erasing
- LastLba - The last logical block index to be erased
- OffsetStartLba - Offset into the last block at which to end erasing
- Global - Pointer to ESAL_FWB_GLOBAL that contains all
- instance data
- Virtual - Whether CPU is in virtual or physical mode
-
-Returns:
- EFI_SUCCESS - The firmware volume was erased successfully
- EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state
- EFI_DEVICE_ERROR - The block device is not functioning correctly and
- could not be written. Firmware device may have been
- partially erased
- EFI_INVALID_PARAMETER - Instance not found
-
---*/
-{
- EFI_LBA Index;
- UINTN LbaSize;
- UINTN ScratchLbaSizeData;
-
- //
- // First LBA.
- //
- FvbGetLbaAddress (Instance, StartLba, NULL, &LbaSize, NULL, Global, Virtual);
-
- //
- // Use the scratch space as the intermediate buffer to transfer data
- // Back up the first LBA in scratch space.
- //
- FvbReadBlock (Instance, StartLba, 0, &LbaSize, Global->FvbScratchSpace[Virtual], Global, Virtual);
-
- //
- // erase now
- //
- FvbEraseBlock (Instance, StartLba, Global, Virtual);
- ScratchLbaSizeData = OffsetStartLba;
-
- //
- // write the data back to the first block
- //
- if (ScratchLbaSizeData > 0) {
- FvbWriteBlock (Instance, StartLba, 0, &ScratchLbaSizeData, Global->FvbScratchSpace[Virtual], Global, Virtual);
- }
- //
- // Middle LBAs
- //
- if (LastLba > (StartLba + 1)) {
- for (Index = (StartLba + 1); Index <= (LastLba - 1); Index++) {
- FvbEraseBlock (Instance, Index, Global, Virtual);
- }
- }
- //
- // Last LBAs, the same as first LBAs
- //
- if (LastLba > StartLba) {
- FvbGetLbaAddress (Instance, LastLba, NULL, &LbaSize, NULL, Global, Virtual);
- FvbReadBlock (Instance, LastLba, 0, &LbaSize, Global->FvbScratchSpace[Virtual], Global, Virtual);
- FvbEraseBlock (Instance, LastLba, Global, Virtual);
- }
-
- ScratchLbaSizeData = LbaSize - (OffsetStartLba + 1);
-
- return FvbWriteBlock (
- Instance,
- LastLba,
- (OffsetLastLba + 1),
- &ScratchLbaSizeData,
- Global->FvbScratchSpace[Virtual],
- Global,
- Virtual
- );
-}
-
-EFI_STATUS
FvbSetVolumeAttributes (
IN UINTN Instance,
IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes,
@@ -1223,54 +1127,6 @@ Returns: return FvbReadBlock (FvbDevice->Instance, Lba, Offset, NumBytes, Buffer, mFvbModuleGlobal, EfiGoneVirtual ());
}
-//
-// FVB Extension Protocols
-//
-EFI_STATUS
-EFIAPI
-FvbExtendProtocolEraseCustomBlockRange (
- IN EFI_FVB_EXTENSION_PROTOCOL *This,
- IN EFI_LBA StartLba,
- IN UINTN OffsetStartLba,
- IN EFI_LBA LastLba,
- IN UINTN OffsetLastLba
- )
-/*++
-
-Routine Description:
- Erases and initializes a specified range of a firmware volume
-
-Arguments:
- This - Calling context
- StartLba - The starting logical block index to be erased
- OffsetStartLba - Offset into the starting block at which to
- begin erasing
- LastLba - The last logical block index to be erased
- OffsetStartLba - Offset into the last block at which to end erasing
-
-Returns:
- EFI_SUCCESS - The firmware volume was erased successfully
- EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state
- EFI_DEVICE_ERROR - The block device is not functioning correctly and
- could not be written. Firmware device may have been
- partially erased
-
---*/
-{
- EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;
-
- FvbDevice = FVB_EXTEND_DEVICE_FROM_THIS (This);
-
- return FvbEraseCustomBlockRange (
- FvbDevice->Instance,
- StartLba,
- OffsetStartLba,
- LastLba,
- OffsetLastLba,
- mFvbModuleGlobal,
- EfiGoneVirtual ()
- );
-}
EFI_STATUS
ValidateFvHeader (
@@ -1781,8 +1637,6 @@ Returns: //
Status = gBS->InstallMultipleProtocolInterfaces (
&FwbHandle,
- &gEfiFvbExtensionProtocolGuid,
- &FvbDevice->FvbExtension,
&gEfiAlternateFvBlockGuid,
NULL,
NULL
diff --git a/DuetPkg/FvbRuntimeService/FwBlockService.h b/DuetPkg/FvbRuntimeService/FwBlockService.h index 67a016ff48..eddde81b4a 100644 --- a/DuetPkg/FvbRuntimeService/FwBlockService.h +++ b/DuetPkg/FvbRuntimeService/FwBlockService.h @@ -30,7 +30,6 @@ Abstract: //
#include <Guid/EventGroup.h>
#include <Guid/FirmwareFileSystem2.h>
-#include <Protocol/FvbExtension.h>
#include <Protocol/FirmwareVolumeBlock.h>
#include <Guid/AlternateFvBlock.h>
#include <Protocol/DevicePath.h>
@@ -41,7 +40,6 @@ Abstract: #include <Guid/FlashMapHob.h>
#include <Guid/HobList.h>
#include <Guid/AlternateFvBlock.h>
-#include <Protocol/FvbExtension.h>
//
// The Library classes this module consumes
@@ -125,7 +123,6 @@ typedef struct { FV_DEVICE_PATH DevicePath;
UINTN Instance;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance;
- EFI_FVB_EXTENSION_PROTOCOL FvbExtension;
} EFI_FW_VOL_BLOCK_DEVICE;
EFI_STATUS
@@ -240,17 +237,6 @@ FvbGetLbaAddress ( IN BOOLEAN Virtual
);
-EFI_STATUS
-FvbEraseCustomBlockRange (
- IN UINTN Instance,
- IN EFI_LBA StartLba,
- IN UINTN OffsetStartLba,
- IN EFI_LBA LastLba,
- IN UINTN OffsetLastLba,
- IN ESAL_FWB_GLOBAL *Global,
- IN BOOLEAN Virtual
- );
-
//
// Protocol APIs
//
@@ -311,14 +297,4 @@ FvbProtocolEraseBlocks ( ...
);
-EFI_STATUS
-EFIAPI
-FvbExtendProtocolEraseCustomBlockRange (
- IN EFI_FVB_EXTENSION_PROTOCOL *This,
- IN EFI_LBA StartLba,
- IN UINTN OffsetStartLba,
- IN EFI_LBA LastLba,
- IN UINTN OffsetLastLba
- );
-
#endif
|