Update Variable driver to depend on full version FaultTolerantWrite protocol, and remove the lite version FaultTolerantWrite Dxe Driver. New full version FaultTolerantWriteDxe driver is added in MdeModulePkg.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7788 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2009-03-04 01:27:50 +00:00
parent 85e923a528
commit 88a5561c66
10 changed files with 18 additions and 2587 deletions

View File

@@ -201,21 +201,21 @@ FtwVariableSpace (
IN UINTN BufferSize
)
{
EFI_STATUS Status;
EFI_HANDLE FvbHandle;
EFI_FTW_LITE_PROTOCOL *FtwLiteProtocol;
EFI_LBA VarLba;
UINTN VarOffset;
UINT8 *FtwBuffer;
UINTN FtwBufferSize;
EFI_STATUS Status;
EFI_HANDLE FvbHandle;
EFI_LBA VarLba;
UINTN VarOffset;
UINT8 *FtwBuffer;
UINTN FtwBufferSize;
EFI_FAULT_TOLERANT_WRITE_PROTOCOL *FtwProtocol;
//
// Locate fault tolerant write protocol
//
Status = gBS->LocateProtocol (
&gEfiFaultTolerantWriteLiteProtocolGuid,
&gEfiFaultTolerantWriteProtocolGuid,
NULL,
(VOID **) &FtwLiteProtocol
(VOID **) &FtwProtocol
);
if (EFI_ERROR (Status)) {
return EFI_NOT_FOUND;
@@ -249,13 +249,14 @@ FtwVariableSpace (
//
// FTW write record
//
Status = FtwLiteProtocol->Write (
FtwLiteProtocol,
FvbHandle,
Status = FtwProtocol->Write (
FtwProtocol,
VarLba, // LBA
VarOffset, // Offset
&FtwBufferSize, // NumBytes
FtwBuffer
FtwBufferSize, // NumBytes
NULL, // PrivateData NULL
FvbHandle, // Fvb Handle
FtwBuffer // write buffer
);
FreePool (FtwBuffer);