- //\r
- // Copy FV minus header into memory using the block map we have all ready\r
- // read into memory.\r
- //\r
- BlockMap = FwVolHeader->BlockMap;\r
- CacheLocation = FvDevice->CachedFv;\r
- LbaIndex = 0;\r
- LbaOffset = 0;\r
- HeaderSize = FwVolHeader->HeaderLength;\r
- while ((BlockMap->NumBlocks != 0) || (BlockMap->Length != 0)) {\r
- Index = 0;\r
- Size = BlockMap->Length;\r
- if (HeaderSize > 0) {\r
- //\r
- // Skip header size\r
- //\r
- for (; Index < BlockMap->NumBlocks && HeaderSize >= BlockMap->Length; Index ++) {\r
- HeaderSize -= BlockMap->Length;\r
- LbaIndex ++;\r
- }\r
-\r
- //\r
- // Check whether FvHeader is crossing the multi block range.\r
- //\r
- if (HeaderSize > BlockMap->Length) {\r
- BlockMap++;\r
- continue;\r
- } else if (HeaderSize > 0) {\r
- LbaOffset = HeaderSize;\r
- Size = BlockMap->Length - HeaderSize;\r
- HeaderSize = 0;\r
- }\r
- }\r
- \r