mirror of https://github.com/acidanthera/audk.git
Update Comments
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7110 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a45eb10f26
commit
8986b8cda6
|
@ -17,7 +17,7 @@
|
|||
|
||||
The write record has three states to specify the different phase of write operation.
|
||||
1) WRITE_ALLOCATED is that the record is allocated in write space.
|
||||
The write record structure records the information of write operation.
|
||||
The information of write operation is stored in write record structure.
|
||||
2) SPARE_COMPLETED is that the data from write buffer is writed into the spare block as the backup.
|
||||
3) WRITE_COMPLETED is that the data is copied from the spare block to the target block.
|
||||
|
||||
|
@ -423,7 +423,6 @@ FtwWriteRecord (
|
|||
|
||||
//
|
||||
// IF target block is working block, THEN Flush Spare Block To Working Block;
|
||||
// ELSE IF target block is boot block, THEN Flush Spare Block To boot Block;
|
||||
// ELSE flush spare block to normal target block.ENDIF
|
||||
//
|
||||
if (IsInWorkingBlock (FtwLiteDevice, Fvb, Record->Lba)) {
|
||||
|
@ -444,7 +443,7 @@ FtwWriteRecord (
|
|||
Status = FlushSpareBlockToWorkingBlock (FtwLiteDevice);
|
||||
} else {
|
||||
//
|
||||
// Update blocks other than working block or boot block
|
||||
// Update blocks other than working block
|
||||
//
|
||||
Status = FlushSpareBlockToTargetBlock (FtwLiteDevice, Fvb, Record->Lba);
|
||||
}
|
||||
|
|
|
@ -68,16 +68,6 @@ typedef struct {
|
|||
|
||||
#define FTW_LITE_DEVICE_SIGNATURE SIGNATURE_32 ('F', 'T', 'W', 'L')
|
||||
|
||||
//
|
||||
// MACRO for Block size.
|
||||
// Flash Erasing will do in block granularity.
|
||||
//
|
||||
#ifdef FV_BLOCK_SIZE
|
||||
#define FTW_BLOCK_SIZE FV_BLOCK_SIZE
|
||||
#else
|
||||
#define FV_BLOCK_SIZE 0x10000
|
||||
#define FTW_BLOCK_SIZE FV_BLOCK_SIZE
|
||||
#endif
|
||||
//
|
||||
// MACRO for FTW WORK SPACE Base & Size
|
||||
//
|
||||
|
@ -249,7 +239,7 @@ FtwWriteRecord (
|
|||
);
|
||||
|
||||
/**
|
||||
To Erase one block. The size is FTW_BLOCK_SIZE
|
||||
To erase the block with the spare block size.
|
||||
|
||||
|
||||
@param FtwLiteDevice Calling context
|
||||
|
@ -348,26 +338,6 @@ IsInWorkingBlock (
|
|||
EFI_LBA Lba
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Check whether the block is a boot block.
|
||||
|
||||
|
||||
@param FtwLiteDevice Calling context
|
||||
@param FvBlock Fvb protocol instance
|
||||
@param Lba Lba value
|
||||
|
||||
@retval FALSE This is a boot block.
|
||||
@retval TRUE This is not a boot block.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
IsBootBlock (
|
||||
EFI_FTW_LITE_DEVICE *FtwLiteDevice,
|
||||
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,
|
||||
EFI_LBA Lba
|
||||
);
|
||||
|
||||
/**
|
||||
Copy the content of spare block to a target block. Size is FTW_BLOCK_SIZE.
|
||||
Spare block is accessed by FTW backup FVB protocol interface. LBA is
|
||||
|
@ -416,27 +386,6 @@ FlushSpareBlockToWorkingBlock (
|
|||
EFI_FTW_LITE_DEVICE *FtwLiteDevice
|
||||
);
|
||||
|
||||
/**
|
||||
Copy the content of spare block to a boot block. Size is FTW_BLOCK_SIZE.
|
||||
Spare block is accessed by FTW backup FVB protocol interface. LBA is
|
||||
FtwLiteDevice->FtwSpareLba.
|
||||
Boot block is accessed by BootFvb protocol interface. LBA is 0.
|
||||
|
||||
|
||||
@param FtwLiteDevice The private data of FTW_LITE driver
|
||||
|
||||
@retval EFI_SUCCESS Spare block content is copied to boot block
|
||||
@retval EFI_INVALID_PARAMETER Input parameter error
|
||||
@retval EFI_OUT_OF_RESOURCES Allocate memory error
|
||||
@retval EFI_ABORTED The function could not complete successfully
|
||||
Notes:
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
FlushSpareBlockToBootBlock (
|
||||
EFI_FTW_LITE_DEVICE *FtwLiteDevice
|
||||
);
|
||||
|
||||
/**
|
||||
Update a bit of state on a block device. The location of the bit is
|
||||
calculated by the (Lba, Offset, bit). Here bit is determined by the
|
||||
|
|
Loading…
Reference in New Issue