Revision: 14398
http://sourceforge.net/p/edk2/code/14398
Author: lzeng14
Date: 2013-06-07 02:38:00 +0000 (Fri, 07 Jun 2013)
Log Message:
-----------
Use right LBA to get the backed up WorkSpace in spare block.
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
Modified: trunk/edk2/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
2013-06-06 09:31:46 UTC (rev 14397)
+++ trunk/edk2/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
2013-06-07 02:38:00 UTC (rev 14398)
@@ -2,7 +2,7 @@
Internal generic functions to operate flash block.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -411,7 +411,7 @@
return EFI_ABORTED;
}
//
- // Write memory buffer currenet spare block. Still top block.
+ // Write memory buffer to current spare block. Still top block.
//
Ptr = Buffer;
for (Index = 0; Index < FtwDevice->NumberOfSpareBlock; Index += 1) {
@@ -1147,6 +1147,7 @@
EFI_FAULT_TOLERANT_WRITE_HEADER *FtwHeader;
UINTN Offset;
EFI_HANDLE FvbHandle;
+ EFI_LBA WorkSpaceLbaOffset;
//
// Find the right SMM Fvb protocol instance for FTW.
@@ -1188,10 +1189,11 @@
//
// Read from spare block
//
+ WorkSpaceLbaOffset = FtwDevice->FtwWorkSpaceLba -
FtwDevice->FtwWorkBlockLba;
Length = FtwDevice->FtwWorkSpaceSize;
Status = FtwDevice->FtwBackupFvb->Read (
FtwDevice->FtwBackupFvb,
- FtwDevice->FtwSpareLba,
+ FtwDevice->FtwSpareLba + WorkSpaceLbaOffset,
FtwDevice->FtwWorkSpaceBase,
&Length,
FtwDevice->FtwWorkSpace
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits