It consumes FV HOBs and creates read-only Firmare Volume Block protocol\r
instances for each of them.\r
\r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
PtrBlockMapEntry++) {\r
FvbDev->NumBlocks += PtrBlockMapEntry->NumBlocks;\r
}\r
+\r
//\r
// Second, allocate the cache\r
//\r
+ if (FvbDev->NumBlocks >= (MAX_ADDRESS / sizeof (LBA_CACHE))) {\r
+ CoreFreePool (FvbDev);\r
+ return EFI_OUT_OF_RESOURCES;\r
+ }\r
FvbDev->LbaCache = AllocatePool (FvbDev->NumBlocks * sizeof (LBA_CACHE));\r
if (FvbDev->LbaCache == NULL) {\r
CoreFreePool (FvbDev);\r
particular, it can be called by BDS to process a single firmware\r
volume found in a capsule.\r
\r
+ Caution: The caller need validate the input firmware volume to follow\r
+ PI specification.\r
+ DxeCore will trust the input data and process firmware volume directly.\r
+\r
@param FvHeader pointer to a firmware volume header\r
@param Size the size of the buffer pointed to by FvHeader\r
@param FVProtocolHandle the handle on which a firmware volume protocol\r